Configuration of L2sw1-
L2sw1>enable
L2sw1#conf t
L2sw1(config)#vlan 10
L2sw1(config-vlan)#exit
L2sw1(config)#vlan 20
L2sw1(config-vlan)#exit
L2sw1(config)#interface fastEthernet 0/1
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 10
L2sw1(config-if)#no shutdown
L2sw1(config-if)#ex
L2sw1(config)#interface fastEthernet 0/2
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 20
L2sw1(config-if)#no shutdown
L2sw1(config-if)#exit
L2sw1(config)#interface range fastEthernet 0/3 -4
L2sw1(config-if-range)#switchport mode trunk
L2sw1(config-if-range)#no shutdown
L2sw1(config-if-range)#exit
---------------------------------------------
Configuration of L2sw2-
L2sw2>enable
L2sw2#conf t
L2sw2(config)#vlan 10
L2sw2(config-vlan)#exit
L2sw2(config)#vlan 20
L2sw2(config-vlan)#exit
L2sw2(config)#interface fastEthernet 0/2
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 10
L2sw2(config-if)#no shutdown
L2sw2(config-if)#ex
L2sw2(config)#interface fastEthernet 0/3
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 20
L2sw2(config-if)#no shutdown
L2sw2(config-if)#exit
L2sw2(config)#interface fastEthernet 0/1
L2sw2(config-if-range)#switchport mode trunk
L2sw2(config-if-range)#no shutdown
L2sw2(config-if-range)#exit
-------------------------------------------------------
Configuration of Multilayer_sw-
Multilayer_sw>enable
Multilayer_sw#conf t
Multilayer_sw(config)#ip routing
Multilayer_sw(config)#vlan 10
Multilayer_sw(config-vlan)#exit
Multilayer_sw(config)#vlan 20
Multilayer_sw(config-vlan)#exit
Multilayer_sw(config)#interface vlan 10
Multilayer_sw(config-if)#ip address 10.0.0.10 255.0.0.0
Multilayer_sw(config-if)#exit
Multilayer_sw(config)#interface vlan 20
Multilayer_sw(config-if)#ip address 20.0.0.10 255.0.0.0
Multilayer_sw(config-if)#ex
Multilayer_sw(config)#interface fastEthernet 0/1
Multilayer_sw(config-if)#switchport trunk encapsulation dot1q
Multilayer_sw(config-if)#switchport mode trunk
Multilayer_sw(config-if)#no shutdown
Multilayer_sw(config-if)#ex
----------------------------------------------
After doing the configuration, try to ping the PCs in different vlans.
PC1>ping 20.0.0.1
Pinging 20.0.0.1 with 32 bytes of data:
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=90ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Ping statistics for 20.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 80ms, Maximum = 90ms, Average = 82ms
PC1>ping 20.0.0.2
Pinging 20.0.0.2 with 32 bytes of data:
Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127
Ping statistics for 20.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 90ms, Maximum = 100ms, Average = 95ms
PCs in different vlans are communicating.
No comments:
Post a Comment