Traditional Culture Encyclopedia - Traditional stories - Two computers, * * * with a network cable. Which is better, distributor or routing?

Two computers, * * * with a network cable. Which is better, distributor or routing?

Select a router. All right. The main differences between routers and switches are as follows:

Different levels of work?

The original switch works in the data link layer of OSI/RM open architecture, that is, the second layer, while the router is designed to work in the network layer of OSI model from the beginning. Because the switch works in the second layer (data link layer) of OSI, its working principle is relatively simple, while the router works in the third layer (network layer) of OSI, which can obtain more protocol information and make more intelligent forwarding decisions. ?

Are the objects on which data forwarding is based different?

Switches use physical addresses or MAC addresses to determine the destination address for forwarding data. Routers use the ID numbers (IP addresses) of different networks to determine the address of data forwarding. The IP address is implemented in software and describes the network where the device is located. Sometimes these Layer 3 addresses are also called protocol addresses or network addresses. The MAC address is usually assigned by the hardware itself and the network card manufacturer, and has been solidified into the network card, which is generally unchangeable. The IP address is usually automatically assigned by the network administrator or the system. ?

Traditional switches can only divide collision domains, but not broadcast domains; And routers can split broadcast domains?

The network segments connected by the switch still belong to the same broadcast domain, and broadcast packets will spread on all network segments connected by the switch, which will lead to communication congestion and security loopholes in some cases. The network segments connected to the router will be assigned to different broadcast domains, and the broadcast data will not pass through the router. Switches with more than three layers can be divided into broadcast domains although they have VLAN function, but there is no communication between sub-broadcast domains, and routers are still needed for communication between them.

Routers provide firewall services?

Routers only forward packets with specific addresses, and do not forward packets that do not support routing protocols and packets of unknown target networks, thus preventing broadcast storms. ?

Switches are usually used for LAN-WAN connections. Switches belong to bridges and are data link layer devices. Some switches can also implement Layer 3 switching. Routers are used to connect between wide area networks, which can solve the problem of forwarding packets between heterogeneous networks and act on the network layer. They just accept incoming packets from one line and forward them to another. These two lines may belong to different networks and adopt different protocols. Comparatively speaking, routers are more powerful than switches, but they are relatively slow and expensive. Layer 3 switches are widely used because they have both the line speed forwarding ability of switches and the good control function of routers. ?