Cisco VLAN – Inter VLAN with Layer 2 and 3 Switch

ciscolayer3routingswitchvlan

Is there a way to interconnect VLANs using this diagram?

MLS0 has this configuration:

interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk

And SW0:

interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport access vlan 175
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 176
 switchport mode access
!
interface FastEthernet0/4
 switchport mode trunk`

enter image description here

Best Answer

To get traffic from one VLAN to another VLAN, you need to use a router. The layer-3 switch could be used as a router. The hosts connected to each VLAN would use the SVI on the layer-3 switch for it VLAN as the gateway.

ip routing
!
interface Vlan175
 ip address 10.175.0.1 255.255.255.0
 no shutdown
!
interface Vland176
 ip address 10.176.0.1 255.255.255.0
 no shutdown
!

The PCs on VLAN 175 would use 10.175.0.1 as their gateway, and the PCs on VLAN 176 would use 10.176.0.1 as their gateway.


With two layer-3 switches (routers) you could use a FHRP (First Hop Redundancy Protocol), e.g. HSRP, to create a virtual gateway that the PCs use as their gateway, and the real routers will decide which is the active gateway, but will automatically fail over in the event of a router failure.