Three devices for networking

HUB
Ü HUB, also known as a hub, is a physical layer device. Data packets coming from one port will be forwarded to all other ports and sent out without analysis.
Ü All ports share the channel, only 2 computers can communicate at any one time, and other computers connected to the HUB cannot communicate at the same time.
Lanswitch
Ü Lanswitch is a MAC layer device that automatically learns the MAC address corresponding to the computer network card connected to each port, and generates a MAC table, which stores the correspondence between the MAC address and the port.
Ü After port A receives the data packet, it looks up the MAC table according to the destination MAC address and finds that the corresponding port is B, so the data packet is sent out from port B.
Router
Ü Router is a network layer device that can automatically learn the IP address corresponding to the computer connected to each port through a routing protocol, generate a routing table, or manually configure static routes in the routing table. The routing table stores the correspondence between the destination IP address and the next-hop IP address.
Ü After port A receives the data packet, it looks up the routing table according to the destination IP address and finds that the corresponding next-hop IP address is in the same network segment as port B, so the data packet is sent out from port B.
Ü The IP addresses of each network port of the router are not allowed to be in the same network segment.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326835666&siteId=291194637