VLAN config for router
SanKuKaï
Member Posts: 65 ■■□□□□□□□□
in CCNA & CCENT
Hi all,
When a router is used to route between 2 VLANs, what is the basic config it should have to correctly route the packets?
When a router is used to route between 2 VLANs, what is the basic config it should have to correctly route the packets?
Comments
-
gojericho0 Member Posts: 1,059 ■■■□□□□□□□You will need to create sub-interfaces on the router in order to do intervlan routing. Each sub-interface will be on a different network. The router will be connected to a switch.
A trunk port is needed to allow multiple VLANs to pass between the switch and the router. Also on both the router and switch port an encapsulation method is needed. This is required so that the receiving device can examine the frame and determine its VLAN membership.
Finally you can vlan membership is done on the the switch ports.
Do you need a configuration example? -
jediknight Member Posts: 113glenus wrote:Hi all,
When a router is used to route between 2 VLANs, what is the basic config it should have to correctly route the packets?
The Fast Ethernet Interface on the router should be setup to use subinterfaces and each subinterface should be in a different IP Subnet. Make sure you setup your encapsulation on each interface (ISL or dot1q)
ex.
Router(config)# interface fastethernet 0/0.1
Router(config-subif)# encapsulation isl 1
Router(config-subif)# ip address 172.16.1.1 255.255.255.0
Router(config-subif)# interface fastethernet 0/0.2
Router(config-subif)# encapsulation isl 2
Router(config-subif)# ip address 172.16.2.1 255.255.255.0
hope this helps. -
SanKuKaï Member Posts: 65 ■■□□□□□□□□Thank you guys! Excellent!!
But as soon as the Fa port of the router is configured with one the encap protocol, it will try to trunk isn't it? No vlan mode needed here?
Sorry, my questions seem weird but I am really trying crosscheck my knowledge with yours.. -
gojericho0 Member Posts: 1,059 ■■■□□□□□□□The switch port that is connected to the router configured as a trunk, otherwise multiple VLANs will not be able to travel across the wire
-
geezer Member Posts: 136Depending on which router you have can dictate which encapsulation you can configure, e.g. 2950 would be dot1q but the mighty 1900 will have the proprietary cisco isl encapsulation.
You would also need to remember that hosts on a particular vlan will need to have the default-gateway configured as per the subinterface IP address on the router for that particular vlan.
HTH.I used to be undecided but now I'm not so sure.
There are only 10 types of people in the world: Those who understand binary, and those who don't! -
LOkrasa Member Posts: 343 ■■■□□□□□□□You also can't do it on all routers... What kind of router are you using? You need one with a Fast Ethernet port, will not work with a Ethernet port. Unless you are using one Ethernet port per VLAN.