In the three-layer switching technology principle, we mentioned that the three-tier exchange (also known as multi-layer switching technology, or IP switching technology) is relative to the traditional exchange concept. As we all know, the traditional exchange technology is in the OSI Network Standard Model of the second Layer-data link layer operation, and three-tier switching technology in the network model in the third layer to achieve packet high-speed forwarding.
This article shares a more comprehensive three-tier switch configuration instance enable //into private mode configure terminal //into the global mode service password-encryption //encrypt the password hostname catalyst 3550-12t1 //defines names enable password 123456. //for three-tier switches Enable password enable secret 654321 //enable encryption password (should be garbled instead of 654321) ip subnet-zero //allows full 0 subnets (all open by default) ip name-server 172.16.8.1 172.16.8.2 //three-layer switch name CATALYST 3550-12T1 corresponding IP address is 172.16.8.1 service dhcp // Provide DHCP services ip routing //Enable routing modules on the three-tier switch exit vtp mode& nbsp;server //defines VTP working mode as sever mode vtp domain centervtp // Define the name of the VTP domain as the centervtp vlan 2 name vlan2 //define the VLAN and name the VLAN (if not named, Vlan2 's name should be vlan002) vlan 3 name vlan3 vlan 4 name vlan4 Vlan  ; 5 name vlan5 vlan 6 name vlan6 vlan 7 name Vlan7 vlan 8 name vlan8 vlan 9 name vlan9 exit& nbsp; interface port-channel 1 //into the virtual Ethernet channel Group 1 switchport trunk encapsulation dot1q //trunk for this interface is encapsulated in 802.1Q frame format switchport mode trunk //defines the working mode of this interface as trunk switchport trunk allowed vlan all // On this trunk, all VLANs are allowed to enter the Gigabit Ethernet port on module 0 via interface gigabitethernet 0/1 //1 switchport trunk encapsulation dotlq //trunk For this interface is encapsulated in 802.1Q frame format SWITCHPORT MODE TRUNK //defines the working mode of this interface as trunk Switchport trunk allowed vlan all //allows all VLANs to pass channel-group 1 on this trunk mode on //put this interface into the Fast Ethernet channel Group 1 interface gigabitethernet 0/2 //ditto SWITCHPORT TRUNK ENCAPSULATION DOTLQ switchport mode Trunk Switchport trunk allowed vlan all channel-group 1 Mode on port-channel load-balance src-dst-ip //defines the load balancing method for Fast Ethernet channel groups (in terms of the source and destination IP) interface gigabitethernet 0/3 //into the Gigabit etheric Port 3 on module 0 switchport trunk encapsulation dotlq //to trunk encapsulated as 802.1q switchport mode trunk //defines the working mode of this interface as trunk switchport trunk allowed vlan all // Allow all VLAN information to pass interface gigabitethernet 0/4 //ditto &nbsP SWITCHPORT TRUNK ENCAPSULATION DOTLQ Switchport mode trunk Switchport trunk allowed vlan all interface gigbitethernet 0/5 / /ditto SWITCHPORT TRUNK ENCAPSULATION DOTLQ switchport mode Trunk switchport trunk allowed vlan all
interface gigbitethernet 0/6 //ditto switchport TRUNK ENCAPSULATION DOTLQ switchport mode trunk switchprot Trunk allowed vlan all interface gigbitethernet 0/7 //into module 0, Gigabit Ethernet Port 7 switchport mode access //defines the working mode of this interface as access mode switchport access vlan 9 //defines which VLAN this interface can access (actually allocating this interface to VLANs) No shutdown spanning-tree vlan 6-9 cost 1000 //in the spanning tree, the vlan6-9 cost is defined as 10000 interface range gigabitethernet 0/8 – 10 //into the Gigabit etheric port on module 0 8,9,10 switchport mode access //defines the working mode of these interfaces as access mode Switchport access vlan 8 //assign these interfaces to Vlan8 No shutdown Spanning-tree portfast //uses portfast on these interfaces (after using Portfast, does not participate in the generation of the tree, directly becomes the forwarding state) interface gigabitethernet 0/11 //into the Gigabit Ethernet 11 on module 0 switchport trunk encapsulation dotlq //this interface to 802.1q switchport mode trunk //The working mode of defining this interface is trunk switchport trunk allowed vlan all //allows all VLAN information to pass through interface gigabitethernet 0/12 //ditto switchport trunk encapsulation  DOTLQ switchport mode trunk Switchport trunk allowed vlan all interface vlan 1 //into Vlan1 logical interface (not physical interface, used to route VLAN) IP address 172.16.1.7 255.255.255.0 //configuration IP address and subnet mask no shutdown standby 1 ip 172.16.1.9 //turned on redundant hot backup (HSRP), redundant hot backup Group 1, virtual router IP address for 172.16.1.9 standby 1 priority 110 preempt //defines the priority of this three-layer switch in redundant hot-backup Group 1 as 110,preempt is used to open preemption mode interface vlan 2 //ditto ip address 172.16.2.252 255.255.255.0 no shutdown standby 2 ip 172.16.2.254 Standby 2 priority 110 preempt Ip access-group 101 in //uses extended access control lists in the direction 101 interface vlan 3 //Ibid ip address 172.16.3.252 255.255.255.0 No shutdown standby 3 ip 172.16.3.254 standby 3 priority 110 preempt ip Access-group 101 in interface vlan 4 //ditto ip address 172.16.4.252 255.255.255.0 No shutdown standby 4 ip 172.16.4.254 standby 4 priority 110 preempt ip Access-group 101 in interface vlan 5 ip address 172.16.5.252 255.255.255.0 No shutdown standby 5 ip 172.16.5.254 standby 5 priority 110 preempt ip access-group 101 in interface vlan 6 ip address 172.16.6.252 255.255.255.0 no shutdown standby 6 ip 172.16.6.254 Stand By 6 priority 100 preempt interface vlan 7 ip& nbsp;address 172.16.7.252 255.255.255.0
no shutdown standby 7 ip 172.16.7.254 Standby 7 priority 100 preempt interface vlan 8 ip address 172.16.8.252 255.255.255.0 No shutdown standby 8 ip 172.16.8.254 standby 8 priority 100 preempt interface Vlan 9 ip address 172.16.9.252 255.255.255.0 no shutdown & nbsp standby 9 ip 172.16.9.254 standby 9 priority 100 preempt access-list 101 deny ip any 172.16.7.0 0.0.0.255 //Extended access Control List 101 Access-list 101 permit ip any any interface vlan 1 //Enter vlan1 This logical interface IP HELPER-ADDRESS 172.16.8.1 //can forward broadcasts (Helper-address is the function of converting the broadcast to unicast and then sending it to 172.16.8.1) Interface vlan 2 ip helper-address 172.16.8.1 interface vlan 3 ip& nbsp;helper-address 172.16.8.1 interface vlan 4 ip helper-address 172.16.8.1 interface vlan 5 ip helper-address 172.16.8.1 interface vlan 6 ip helper-address 172.16.8.1 interface v Lan 7 ip helper-address 172.16.8.1 interface vlan 9 ip helper-address 172.16.8.1 router rip //Enable routing protocol rip version 2 //use is RIPv2, if there is no such sentence, it is to use the ripv1 network 172.16.0.0 //declared direct connected network segment exit ip route 0.0.0.0 0.0.0.0 172.16.9.250 //default route, all packets that have no way to match in the routing table, send the next hop address to 172.16.9.250 this router line con 0 line aux 0 line vty 0 15 //telnet Line (routers only 5, 0-4) & nbsp; password 12345678 //login Password login end copy running-config startup-config //Save Configuration