3.12 layer-3 Switching
Purpose:
1. master the basic configurations of layer-3 switching for inter-VLAN communication.
2. Understand the implementation principle of layer-3 switching.
Tutorial topology:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/062203O08-0.png "title =" 3.12.png "/>
Tutorial steps:
1. Deploy the Trunk link between SW1 and SW2 Based on the topology shown in the figure. The configuration is as follows:
SW1 (config) # int f0/0
SW1 (config-if) # switchport trunk encapsulation dot1q
SW1 (config-if) # switchport mode trunk
SW1 (config-if) # exit
SW2 (config) # int f0/0
SW2 (config-if) # switchport trunk encapsulation dot1q
SW2 (config-if) # switchport mode trunk
SW2 (config-if) # exit
2. Deploy VTP technology. SW1 is the Server, and SW2 is the Client to implement VLAN synchronization as follows:
SW1 # vlan database
SW1 (vlan) # vtp server
SW1 (vlan) # vtp domain pinginginglab
SW1 (vlan) # vtp password cisco
SW1 (vlan) # vlan 10
SW1 (vlan) # vlan 20
SW1 (vlan) # exit
SW2 # vlan database
SW2 (vlan) # vtp client
SW2 (vlan) # vtp domain pinginginglab
SW2 (vlan) # vtp password cisco
SW2 (vlan) # exit
3. Confirm VTP Information Synchronization and add the interface to the corresponding VLAN, as shown below:
SW2 # show vlan-switch brief
VLAN NameStatusPorts
----------------------------------------------------------------------------
1DefaultActiveFa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15
10VLAN0010Active
20VLAN0020Active
1002 fddi-defaultActive
1003 token-ring-defaultActive
1004 fddinet-defaultActive
1005 trnet-defaultActive
As you can see, SW2 has learned about VLAN10 and VLAN20. It is configured as follows:
SW2 (config) # int f0/1
SW2 (config-if) # switchport mode access
SW2 (config-if) # switchport access vlan 10
SW2 (config-if) # int f0/2
SW2 (config-if) # switchport mode access
SW2 (config-if) # switchport access vlan 20
SW2 (config-if) # exit
4. Configure IP addresses for different PCs Based on the topology as follows:
PC1 (config) # no ip routing [PL1]
PC1 (config) # int f0/0
PC2 (config-if) # no sh
PC1 (config-if) # ip address 192.168.10.1 255.255.255.0
PC1 (config-if) # exit
PC1 (config) # ip default-gateway 192.168.10.254 [PL2]
PC2 (config) # no ip routing
PC2 (config) # int f0/0
PC2 (config-if) # no sh
PC2 (config-if) # ip address 192.168.20.1 255.255.255.0
PC2 (config-if) # exit
PC2 (config) # ip default-gateway 192.168.255.254
5. Enable layer-3 routing on a layer-3 Switch and define different IP addresses for different VLANs, as shown below:
SW1 (config) # ip routing [PL3]
SW1 (config) # int vlan 10
SW1 (config-if) # ip address 192.168.10.254 255.255.255.0
SW1 (config-if) # exit
SW1 (config) # int vlan 20
SW1 (config-if) # ip address 192.168.255.254 255.255.255.0
SW1 (config-if) # exit
6. Test layer-3 switching, as shown below:
① Test the connectivity between the host and the gateway.
PC1 # ping 192.168.10.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/227/1036 MS
② Test the connectivity between the host and the host
PC1 # ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 24/48/84 MS
From the above, we can see that through the deployment of layer-3 switching technology, the host between VLANs can communicate with each other. This experiment is complete.
[PL1]Disable layer-3 routing to simulate hosts.
[PL2]Define the default gateway.
[PL3]Enable the layer-3 routing function. By default, the layer-3 Switch disables the routing function. To enable inter-VLAN communication, you must enable it.
========================================================== =
PingingLab· High quality ITEducation provider
CCIELab-ITProject Practice · customization of high-end Talents
Shenzhen pinke Information Technology Co., Ltd. · waihuan West Road Station, Guangzhou University City
Sina Weibo :@PingingLab@ PingingLab-Chen xinjie
PingingLabPublic Account: pinginglab
PingingLabTechnical Exchange Group: 240920680
650) this. length = 650; "src =" http://s6.sinaimg.cn/mw690/d37011a2gx6BJaUMtiR85&690 "real_src =" http://s6.sinaimg.cn/mw690/d37011a2gx6BJaUMtiR85&690 "name =" image_operate_13921376062848408 "alt =" PingingLab classic series "CCNA full Configuration Guide"-3.12 <wbr> layer-3 switching "title =" pingingLab-3.12 <wbr> layer-3 switching "/>
This article from the "Chen xinjie network" blog, please be sure to keep this source http://chenxinjie.blog.51cto.com/7749507/1274496