The routing function of a Cisco layer-3 switch is configured on the Link Layer. A layer-2 switch has no routing function, that is, it can only communicate with machines in the same network segment. Www.2cto.com and the layer-3 switch can configure the routing function at the network layer so that devices in different network segments can communicate with each other. Take the Cisco 3550 vswitch as an example to configure the layer-3 routing function. To achieve the following topology communication. Cisco 3550 L3 switch | ---- -------------------- ------- 50.1.1.1 (23 ports) 60.1.1.1 (24 ports) | 50.1.1.2 60.1.1.2 (pc1) (pc2) 23 ports: switch # enableSwitch # configure terminal Switch (config) # interface fastEthernet 0/23 Switch (config) ip addr 50.1.1.1 255.255.255.0 Switch (config-if) # no switchport Switch (config-if) # no shutdown Switch (config-if) #24 ports with similar end configurations: Switch # enableSwitc H # configure terminal Switch (config) # interface fastEthernet 0/24 Switch (config) ip addr 60.1.1.1 255.255.255.0 Switch (config-if) # no switchport Switch (config-if) # no shutdown Switch (config-if) # enable the Switch route forwarding Switch at end: Switch # configure terminal Switch (config) # ip routing Switch (config) # ip cef (this is enabled by default) Now you can view the status of the next 23 ports: Switch # show interfaces fastEthernet 0/23 www.2cto.com. At this time, the addresses of the two ports on the Switch are successfully pinged: switch # ping 50.1.1.1 T Ype escape sequence to abort. Sending 5, 100-byte ICMP Echos to 50.1.1.1, timeout is 2 seconds :!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msSwitch # ping 60.1.1.1 Type escape sequence to abort. sending 5, 100-byte ICMP Echos to 60.1.1.1, timeout is 2 seconds :!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 msSwitch # www.2cto.com pc1 (win7) add route: data packets sent to route/24 are forwarded through route 50.1.1.1: route ADD 60.1.1.0 MASK route 255.255.0 50.1.1.1 METRIC 3 corresponding pc2 also adds route: route ADD 50.1.1.0 MASK route 255.255.0 60.1.1.1 METRIC 3 then the route and route can be communicated. If the routing function of the vswitch port is used, this port (namely the port here) has no switching capability. If the switch has the routing and switching functions, the switching functions can be borne by other ports.