VLANs trunking to other switches (Doesn't Work)
-
I have a switch connected to a router and 2 other switches. I have set up 3 VLANs: 1 as the native VLAN connecting to a router and the primary switch, VLAN 2 connecting to 1 switch and VLAN 3 connecting to another switch. I have set up trunking protocols with encapsulation dot1q connecting from the primary switch to the router and the 2 other switches. I have allowed VLANs to be trunked to each other. I have set up the router as a router on a stick with sub interfaces to allow the pings to connect to each VLAN. I have interfaced all 3 VLANs on the primary switch giving them IP Addresses and their own subnets. When I ping from the router from one VLAN to another VLAN, it doesn't work. My assumption is that all of the switches should each have all of the VLANs interfaced with their own IP addresses on the same VLAN subnet as the primary switch. Am I correct in this assumption? So far, the switch with VLAN 2 has only VLAN 2 interfaced with its own IP Address and the same subnet as the primary switch with VLAN 2 interfaced. The same goes with the 3rd switch which has only VLAN 3 and its corresponding subnet with the same subnet as the primary switch.
-
@Ponciana S Pajela,
I'm having a little problem visualizing your topology:
On R1, Try something like this:
R1(config)#int fa0/1 R1(config-if)# int fa0/1.10 #default gateway for vlan 10 R1(config-if)# encapsulation dot1q vlan 10 R1(config-if)# ip address 192.168.10.1 255.255.255.0 R1(config-if)# int fa0/1.20 #default gateway for vlan 10 R1(config-if)# encapsulation dot1q vlan 20 R1(config-if)# ip address 192.168.20.1 255.255.255.0 R1(config-if)# int fa0/1.30 #default gateway for vlan 10 R1(config-if)# encapsulation dot1q vlan 30 R1(config-if)# ip address 192.168.30.1 255.255.255.0 R1(config-if)# int fa0/1 R1(config-if)# no shutdown
ON SW1
SW1(config)# int fa0/1 SW1(config-if)# switchport mode trunk SW1(config-if)# switchport nonegotiate SW1(config-if)# exit SW1(config)# vtp domain itprotv SW1(config)# vtp password itprotv SW1(config)# interface range fa0/2 - 3 SW1(config-if-range)# switchport mode trunk SW1(config-if-range)# switchport nonegotiate SW1(config-if-range)# interface vlan 1 SW1(config-if)# ip address 192.168.10.2 255.255.255.0 SW1(config-if)# no shutdown
ON SW2 trunk to fa0/2 on SW1 and trunk to fa0/3 on SW3
SW2(config)# int fa0/1 SW2(config-if)# switchport mode trunk SW2(config-if)# switchport nonegotiate SW2(config-if)# exit SW2(config)# vtp domain itprotv SW2(config)# vtp password itprotv SW2(config)# vtp mode client SW2(config)# interface fa0/3 SW2(config-if)# switchport mode trunk SW2(config-if)# switchport nonegotiate SW2(config-if)# interface vlan 1 SW2(config-if)# ip address 192.168.20.2 255.255.255.0
ON SW3 trunk fa0/2 to fa0/2 on SW2, trunk fa0/1 to SW3 on SW1 fa0/3
SW3(config)# int fa0/1 SW3(config-if)# switchport mode trunk SW3(config-if)# switchport nonegotiate SW3(config-if)# exit SW3(config)# vtp domain itprotv SW3(config)# vtp password itprotv SW3(config)# vtp mode client SW3(config)# interface fa0/2 SW3(config-if)# switchport mode trunk SW3(config-if)# switchport nonegotiate SW3(config-if)# interface vlan 1 SW3(config-if)# ip address 192.168.30.2 255.255.255.0
ON SW1, create VLAN 10,20,30 and verify on SW2 and SW3 that the vlans appear. If they do, verify you can ping from the router to each vlan interface IP address.
Then on SW3, plug a PC into fa0/10 and put that port into vlan 30, verify you can ping the default gateway for vlan 30, then vlan 20.If not troubleshoot, cabling connections are correct, and configurations are correct.