From the perspective of common users

·The switch is used to change one network cable into multiple. If users need to log in the network, everyone logs in separately.

·The router is used to change a network into multiple networks, and the divided networks share the network bandwidth of the main line.

The actual situation is that most domestic routes consist of routers and switches. Switches are used for internal network data transmission, and routers use NAT to forward data and communicate with external networks.

From the perspective of textbook definitions

·Switches

  • for fast data transmission within the same network
  • forwarding decisions are made by viewing the L2 header
  • forwarding without modifying data frames
  • working in the second layer of TCP/IP protocol – the data link layer
  • simple operation, direct use of hardware processing

·Routers

  • cross network transmission of data between different networks
  • forwarding decisions are made by viewing the L3 header
  • TTL needs to be modified for forwarding, IP header checksum needs to be recalculated, and data frames need to be resealed
  • working in the third layer of TCP/IP protocol – the network layer
  • complicated operation, use of software

From the perspective of forwarding mode

·Switches

  • hardware processing switching (forwarding) process  ccie lab exam
  • primary routing, multiple switching (forwarding)

·Routers

  • software processing switching (forwarding) process
  • primary routing, primary switching (forwarding)

It is said that there are also three-layer switches with pure software forwarding. Although the above description is about the difference between software and hardware, it is actually more about the difference in the working mode:

·The three-layer (multi-layer) switch does not work with pure hardware, but has a separate routing engine. However, the routing engine does not work all the time. Instead, it queries the routing table through the routing engine during the first communication and establishes forwarding. The subsequent data will no longer pass through the routing engine, but will be forwarded through a switching engine similar to layer-2. Due to the simple work principle, the forwarding engine can use special hardware chips to achieve high-performance at low cost.

·However, the router queries the route of each data packet, which takes up a lot of resources, so the routing efficiency is low. Because the routing protocol is complex, it cannot be processed by pure hardware chips. As a result, its data forwarding performance is not as good as that of a three-layer (multi-layer) switch. In fact, there are similar technologies in routers, such as Cisco’s fast forwarding mechanism. It is also the differences in working modes that cause some differences in their practical application:

·The routing engine of the three-layer (multi-layer) switch is weak, and the routing protocols supported by the switch are limited compared with the routing protocols supported by the router.

·Also, because the routing engine of the three-layer (multi-layer) switch is weak and the forwarding is limited, it is not suitable for complex multi-network interconnection.

·Because not every packet will pass through the routing engine, the routing policy function of the three-layer (multi-layer) switch is weak.

·The three layer (multi-layer) switch is more suitable for the scenarios with simple network structure and large amount of data exchanged (such as the convergence layer of small networks)

·The router is more suitable for the core switching area of complex multi-network interconnection.

cciedump.spoto.net

TIME BUSINESS NEWS

JS Bin