The difference between a switch and a router is simply two different things for a computer expert, but for Xiaobai, the two are similar in appearance and even think that the function is the same. So what is the difference between them? Let’s take a look at it.
Differences between switches and routers
The router can automatically assign IP to your LAN, virtual dialing, like a traffic police, directing your computer where to go, you don’t have to worry about it. The switch is only used to distribute network data.
2nd – Switch and router difference
The router is at the network layer, the router is addressed according to the IP address, the router can handle the TCP/IP protocol, and the switch cannot. The switch is at the relay layer and the switch is addressed according to the MAC address.
3rd – difference between switch and router
A router can assign an IP to a number of hosts, and these hosts only show one IP to the outside. The switch can connect many hosts, each of which has its own IP.
4th- difference between switch and router
The router provides a firewall service that the switch cannot provide. Hubs and switches are all port extensions, which are to expand the access point of the LAN (usually Ethernet), which allows the LAN to connect to more computers. Routers are used to connect between networks, that is, to connect to different networks.
For example: the router is equivalent to the post office, the letter is delivered to the recipient address, and its task is completed. But the letter has arrived at your dormitory, and this address is not exclusive to you alone, so the uncle Wang is also responsible for giving the letter to you, he will not care about the address of the recipient, only the name of the recipient Then make an inside call and ask you to get the letter.
If you don’t have a post office, you can’t send letters to beautiful girls around the world, and you can’t receive letters from beautiful girls outside the building. However, because of the existence of the uncle Wang, you can still communicate with him through the good friends of the same dormitory.
The system consisting of all post offices is the “wide area network”, and your dormitory building is the “local area network”. The construction of the local area network does not require a router.
The above is a detailed introduction of the difference between the switch and the router . See here, I believe everyone knows their differences and their functions.