LAB Inter VLAN Routing - Router On Stick
LAB Inter VLAN Routing - Router On Stick
Topology:
SWITCHING-INTER VLAN ROUTING ROUTER ON A STICK LAB01 R1 Fast Ethernet 0/0
fast Ethernet 0/0.1 ip address 10.0.0.1 encapsulation dot1q 10 fast Ethernet 0/0.2 ip address 20.0.0.1 encapsulation dot1q 20 fast Ethernet 0/0.100 ip address 30.0.0.1 encapsulation dot1q 30
SW1
PC1 10.0.0.50/24
PC2 20.0.0.50/24
PC3 30.0.0.50/24
Page 2
Procedure:
1. Configure VLAN 10, 20, & 30 on SW1. 2. Configure switch ports connected to PC to appropriate VLAN 3. Configure switch port FastEthernet0/24 as Trunk port. 4. Configure subinterfaces on Rouetr as shown in topology. 5. Check Inter VLAN Routing. 6. Check the routing Check ping from PC1->PC2->PC3.
Configuration:
Step 1: 1.1: Configure VLANs on Switch SW1 SW1(config)#vlan ? <1-1005> ISL VLAN IDs 1-1005 SW1(config)#vlan 10 SW1(config-vlan)#name RED SW1(config-vlan)#vlan 20 SW1(config-vlan)#name BLUE SW1(config-vlan)#vlan 30 SW1(config-vlan)#name BLACK SW1(config-vlan)#^Z SW1# 1.2: Verifiy L2 Vlans just Created
SW1#sh vlan VLAN Name Status Ports ---- -------------------------------- --------- -----------------------------1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 10 RED active Fa0/1 20 BLUE active Fa0/2 30 BLACK active Fa0/3 1002 fddi-default act/unsup
Page 3
2.1: Configure Switchports connected to PC with appropriate VLANs SW1(config)#int fastEthernet 0/1 SW1(config-if)#switchport mode ? access Set trunking mode to ACCESS unconditionally dynamic Set trunking mode to dynamically negotiate access or trunk mode trunk Set trunking mode to TRUNK unconditionally SW1(config-if)#switchport access ? vlan Set VLAN when interface is in access mode SW1(config-if)#switchport access vlan 10 SW1(config)#int fastEthernet 0/2 SW1(config-if)#switchport access vlan 20 SW1(config)#int fastEthernet 0/3 SW1(config-if)#switchport access vlan 30
3.1: Configure Switchport connected to Router as Trunk SW1(config)#int fastEthernet 0/24 Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk encapsulation dot1q 4.1: Configure Router interface connected to Switch Create sub interfaces for Inter Vlan Routing R1(config)#int fa0/0.10 R1(config-subif)#encapsulation dot1Q ? <1-1005> IEEE 802.1Q VLAN ID R1(config-subif)#encapsulation dot1Q 10 R1(config-subif)#ip address 10.0.0.1 255.255.255.0 R1(config)#int fa0/0.20 R1(config-subif)#encapsulation dot1Q 20 R1(config-subif)#ip address 20.0.0.1 255.255.255.0 R1(config)#int fa0/0.100 (Subinterface Number not required to match Vlan No/Tag) R1(config-subif)#encapsulation dot1Q 30 (This shud Match VLAN NO/TAG)
Router Infotech, Confidential Document Only for Internal Circulation Page 4
C C C
6.1: Check Ping from PC1 to PC2,PC3 PC1>ping 10.0.0.1 Pinging 10.0.0.1 with 32 bytes of data: Reply from 10.0.0.1: bytes=32 time=8ms TTL=254 Reply from 10.0.0.1: bytes=32 time=9ms TTL=254 Reply from 10.0.0.1: bytes=32 time=11ms TTL=254 Reply from 10.0.0.1: bytes=32 time=13ms TTL=254 Ping statistics for 10.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 8ms, Maximum = 13ms, Average = 10ms PC1>ping 20.0.0.1 Pinging 20.0.0.50 with 32 bytes of data: Reply from 20.0.0.50: bytes=32 time=8ms TTL=254 Reply from 20.0.0.50: bytes=32 time=8ms TTL=254
Router Infotech, Confidential Document Only for Internal Circulation Page 5
Reply from 20.0.0.50: bytes=32 time=8ms TTL=254 Reply from 20.0.0.50: bytes=32 time=8ms TTL=254 Ping statistics for 20.0.0.50: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 8ms, Maximum = 13ms, Average = 10ms PC3>ping 30.0.0.50 Pinging 30.0.0.50 with 32 bytes of data: Reply from 30.0.0.50: bytes=32 time=8ms TTL=254 Reply from 30.0.0.50: bytes=32 time=8ms TTL=254 Reply from 30.0.0.50: bytes=32 time=8ms TTL=254 Reply from 30.0.0.50: bytes=32 time=8ms TTL=254 Ping statistics for 30.0.0.50: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 8ms, Maximum = 13ms, Average = 10ms
COOL COOL
Page 6