VLAN routing between 3 x L2 switches

Answered Question
May 18th, 2010
User Badges:

Hello,


I have LAN 3 x 2960 L2 switches in a triangle typology gives me some redundancy, I have 1 switch as the VTP server and the other 2 as VTP clients and only have 3 vlans that all the switches are using.  For the 3 vlans to route between each other do I need a router and use it as a router on a stick?  If so I'm not sure where to place it so all 3 switches can route between each other.


Thanks

Correct Answer by Jon Marshall about 6 years 10 months ago

Whiteford wrote:


That makes sense.  I have a router in one switch already, it's in vlan 20 on one of the switches:


interface FastEthernet0/0
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto


Would I simpley remove this and add something like:


interface FastEthernet0/0.20

encapsulation dot1Q 10
  ip address 192.168.20.1 255.255.255.0
  duplex auto
  speed auto


interface FastEthernet0/0.30

encapsulation dot1Q 10
  ip address 192.168.30.1 255.255.255.0
  duplex auto
  speed auto



etc?


Yes you would but note that the encapsulation command under the subinterface must match the vlan id so if you had vlans 20 and 30 using your above example -


interface FastEthernet0/0.20

encapsulation dot1Q 20
  ip address 192.168.20.1 255.255.255.0
  duplex auto
  speed auto


interface FastEthernet0/0.30

encapsulation dot1Q 30
  ip address 192.168.30.1 255.255.255.0
  duplex auto
  speed auto


the actual subinterface number does not have to match the vlan id but it is easier to read if it does.


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Jon Marshall Tue, 05/18/2010 - 07:20
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Whiteford wrote:


Hello,


I have LAN 3 x 2960 L2 switches in a triangle typology gives me some redundancy, I have 1 switch as the VTP server and the other 2 as VTP clients and only have 3 vlans that all the switches are using.  For the 3 vlans to route between each other do I need a router and use it as a router on a stick?  If so I'm not sure where to place it so all 3 switches can route between each other.


Thanks


You either need a router and do routing on a stick or a better solution is to use a L3 switch.


As for placement just connect the router to one of the switches with a trunk that allows all 3 vlans and create subinterfaces on the router. As long as all the switches are connected together with L2 trunks allowing all vlans it doesn't matter which switch you connect the router to.


Jon

Andy White Tue, 05/18/2010 - 07:26
User Badges:

That makes sense.  I have a router in one switch already, it's in vlan 20 on one of the switches:


interface FastEthernet0/0
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto


Would I simpley remove this and add something like:


interface FastEthernet0/0.20

encapsulation dot1Q 10
  ip address 192.168.20.1 255.255.255.0
  duplex auto
  speed auto


interface FastEthernet0/0.30

encapsulation dot1Q 10
  ip address 192.168.30.1 255.255.255.0
  duplex auto
  speed auto



etc?

Correct Answer
Jon Marshall Tue, 05/18/2010 - 07:36
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Whiteford wrote:


That makes sense.  I have a router in one switch already, it's in vlan 20 on one of the switches:


interface FastEthernet0/0
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto


Would I simpley remove this and add something like:


interface FastEthernet0/0.20

encapsulation dot1Q 10
  ip address 192.168.20.1 255.255.255.0
  duplex auto
  speed auto


interface FastEthernet0/0.30

encapsulation dot1Q 10
  ip address 192.168.30.1 255.255.255.0
  duplex auto
  speed auto



etc?


Yes you would but note that the encapsulation command under the subinterface must match the vlan id so if you had vlans 20 and 30 using your above example -


interface FastEthernet0/0.20

encapsulation dot1Q 20
  ip address 192.168.20.1 255.255.255.0
  duplex auto
  speed auto


interface FastEthernet0/0.30

encapsulation dot1Q 30
  ip address 192.168.30.1 255.255.255.0
  duplex auto
  speed auto


the actual subinterface number does not have to match the vlan id but it is easier to read if it does.


Jon

Actions

This Discussion