L
L
loltrol2016-11-17 13:22:48
linux
loltrol, 2016-11-17 13:22:48

Vlan - pc (1 port), router (3 ports) - how to connect a pc and a router on 1 port, mark the other 2 ports as vlan?

There is a PC with one network interface. There is a router with one network interface eth0 and three ports on it, each port can be tagged as vlan. Here is a screenshot of what the router allows you to doTomato-Guest-VLAN-2.pngActually, what needs to be done: connect the PC to the router with one of the ports, make vlans eth0.1 and eth0.2 on the PC, tag the remaining two ports on the router vid 1 and vid 2 (we will get vlan1, vlan2 interfaces) and, accordingly, drive all traffic over pairs eth0.1-vlan1 and eth0.2-vlan2 (this is necessary in order to use the iptables rules on the PC to steer the traffic that goes to the router). Will such a link work? How do I configure the router so that all traffic from vlan1 and vlan2 somehow gets to the third untagged port and flies to the PC port? Do I need to configure the PC somehow, so that all traffic that arrives at eth0 is distributed over eth0.1 and eth0.2 in accordance with vlan tags?
ps: PC and linux-based router, ebtables, iptables work.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Bogdan Romanov, 2016-11-17
@st_scar

Router, if not a secret, what model?

I
Ilyas, 2016-11-18
@id2669099

and what kind of traffic should be sent to 1 vlan, and what to 2?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question