Objective
- To configure VLAN routing for a layer 3 switch.
Topology
Setting
PC0 and PC2 ar in VLAN1, and PC1 and PC3 are in VLAN2.Gig1/1 on every access layer is connected to distribution layer.
Distribution layer switch has routing function
IPs for computers have been set up.
Requirments
- Configure the link between switches as trunk
- Configure distribution layer switch to enable routing between VLAN1 and VLAN2.
Steps
On Switch1
Switch>enSwitch#confi t
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int fastEthernet 0/2
Switch(config-if)#switchport access vlan 2
Switch(config)#int gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#
On Switch2
Switch>enSwitch#confi t
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int fastEthernet 0/2
Switch(config-if)#switchport access vlan 2
Switch(config)#int gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#
On Switch0
Switch>enSwitch#confi t
Switch(config)#vlan 2
Switch(config)#interface gigabitEthernet 0/1
Switch(config)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface gigabitEthernet 0/2
Switch(config)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.0.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#interface vlan 2
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#
On PC3, ping PC0
PC>ping 192.168.0.2Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2: bytes=32 time=19ms TTL=127
Reply from 192.168.0.2: bytes=32 time=17ms TTL=127
Reply from 192.168.0.2: bytes=32 time=18ms TTL=127
Reply from 192.168.0.2: bytes=32 time=15ms TTL=127
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 19ms, Average = 17ms
PC>
No comments :
Post a Comment