1, the work level of the two different
The initial switch is the data link layer that works in the OSI/RM open architecture, which is the second tier, and the router is designed to work at the network layer of the OSI model at the outset. Since the switch works in the second layer of the OSI (data link layer), it works relatively simple, and the router works in the third layer of the OSI (Network layer), can get more protocol information, the router can make a more intelligent forwarding decision.
2, the two are based on the different objects to be forwarded
A switch uses a physical address or MAC address to determine the destination address of the forwarded data. The router uses the ID number (i.e. IP address) of the different network to determine the address of the data forwarding. IP addresses are implemented in software, describing the network where the device resides, and sometimes these third-tier addresses are referred to as protocol addresses or network addresses. MAC addresses are usually hardware-brought, distributed by the manufacturer of the network card, and have been cured to the network card, which is generally non-changing. The IP address is usually assigned automatically by the network administrator or the system.
3, the traditional switch can only split the conflict domain, cannot split the broadcast domain, and the router can split the broadcast domain
Network segments connected by switches still belong to the same broadcast domain, and broadcast packets propagate across all network segments connected to the switch, and in some cases lead to traffic congestion and security vulnerabilities. Network segments connected to routers are assigned to different broadcast domains, and broadcast data does not pass through the router. Although the third layer above the switch has the VLAN function, may also divide the broadcast domain, but each sub-broadcast domain is unable to communicate the communication, the communication between them still needs the router.
4, the router provides the service of the firewall, and the switch does not
The router only forwards packets of a specific address, and does not transmit packets that do not support routing protocols and the transmission of unknown destination network packets, which can prevent broadcast storms.
In summary, the switch is generally used for Lan-wan connection, the switch to the Network Bridge, is the data link layer of equipment, some switches can also achieve the third layer of exchange. Routers are used for connections between Wan-wan, which can be used to transfer packets between heterosexual networks for use in the network layer. They just accept input groupings from one line, and then forward to another line. These two lines may belong to different networks and use different protocols. In comparison, the router's function is stronger than the switch, but the speed is relatively slow, the price is expensive, the third layer switch has both the Switch line speed forwarding message capability, and the router has good control function, so it can be widely used.
- Switch
- Hardware processing switching (forwarding) process
- One route (pathfinding), multiple exchanges (forwarding)
- Router
- Software processing switching (forwarding) process
- One route (pathfinding), one exchange (forwarding)
- Switches are primarily used to build local area networks
- The main function of routing is to connect the LAN of the switch group to each other, or access the Internet.
Dd
The difference between routers and switches