EN / CN
SITE MAP
close
关注嘉富微信公众号
Product Analysis
Difference between Ethernet Switch and Router
日期:2020-12-03

Both Ethernet switch and router are very important in the data room, and their appearance is very similar, and Hub also looks similar to switch and router. Although the appearance of the three devices is similar, the data processing methods are different.

 

Hub:

The hub has multiple data interfaces, whose main purpose is to connect all the devices connected to its data port. They do not have the function of filtering data, and can only judge whether there are connected related devices on the port. When a device connected to a hub port sends data to it, the hub copies the data to all ports, and all devices connected to the hub receive the data. Its working mode is a bit similar to that of a two way radio, the same frequency band is compared to a hub, when a two way radio sends a signal, all two way radio within the frequency band can receive the signal. The same is true for computers. When multiple computers are connected through a hub, one computer sends data, the data will be sent to other computers through broadcasting, even if the data is not sent to them. Therefore, the security of the hub is very low, and it will produce unnecessary traffic and waste bandwidth.

图片1.jpg

 

Ethernet Switch:

Switches, like hubs, are network devices with multiple ports, but they are much more intelligent than hubs. When the computer is connected to a port of the Ethernet switch, the Ethernet switch will first obtain the physical address of the corresponding device (the MAC physical address is written into the device by the device supplier when the device leaves the factory), And store the address in its address list, which is equivalent to postal code. When the mail arrives at the logistics center, the staff will classify and forward the mail according to the postal code. The same is true of the switch. If the two computers connected to the switch want to communicate with each other, computer A needs to send the data packet carrying the MAC address of computer B to the switch. 

After receiving the data, the switch finds the port matching the MAC address carried by the data packet in its address table and sends the data packet to computer B through this port. Data packets will only be transmitted between computer A and computer B, which not only improves the security, but also improves the utilization of bandwidth.

Hubs and Ethernet switches can only be used for data exchange in the internal network (using private IP). They cannot exchange data with the external network (such as accessing the Internet and public IP). To exchange external data, the equipment needs to be able to read the corresponding IP address, while the hub and Ethernet switch do not have the function of reading IP address, so the router needs to be used.

图片2.jpg

Router:

To figure out the differences between the three devices, we need to briefly introduce the IP address. IP address is divided into public IP address and private IP address. The public IP address is assigned by Internet NIC to the organization that registers and submits application, visitors can be accessed the Internet directly through this IP address, which can be understood as WAN. The private IP address is used for the internal component LAN of the enterprise and cannot be registered. If we need to visit the official website of JFOPT(www.jfopt. com), the string of English characters "www.jfopt. com" entered on the browser is the domain name, and the corresponding 219.234.7.230 is the public IP address. One IP address can correspond to multiple domain names, but one domain name can only correspond to one IP address.

地址.jpg

The function of router is to forward a packet from one network to another network device according to the corresponding IP address. When the router receives the data, the first step is to check whether the IP address of the data is the same as its own IP address. If the IP address of the data is the same as that of the router, the router will accept the data. If the IP address of the data is different from the router's own address, the router will forward the data to other networks. The router can be regarded as a courier, the packet is a mail, and the IP address is the sending and receiving address. When the courier receives the mail, the process of sending the mail according to the address is the process of router routing.

图片3.jpg