ABOUT

The difference between switches and routers

2023-07-17 21:51:21

Many people, like me, believe that these two are used for online use, which is not uncommon. As for whether these two are irrelevant or what are the specific differences, it is unclear what is going on. We need to carefully understand them. So what are the specific differences now? Please take a look below.

The first switch and router

Routers can automatically assign IP addresses to your local area network. Virtual dialing is like a traffic police, directing your computer where to go. You don't have to worry so much about it. It is only used to allocate network data.

The second difference between switches and routers

Routers are located at the network layer, addressing based on IP addresses. Routers can handle TCP/IP protocols, but switches cannot. The switch addresses based on MAC address. The third switch in the trunk layer is different from the router. A router can assign an IP to multiple hosts, which only show one IP to the outside world. A switch can connect many hosts, each with its own IP address.

Article 4: Differences between switches and routers

Routers provide firewall services, but switches cannot provide this function. Hubs are used for port expansion, which is to expand the access points of the local area network (usually Ethernet), allowing the local area network to connect to more computers. Routers are used to connect between networks, that is, to connect different networks.

Article 5: Differences between switches and routers

Let's give an example: a router is like a post office, delivering letters to the recipient's address, and its task is completed. But the letter was mailed to your dormitory building, and this address is not exclusive to you alone, so Mr. Wang, the building manager, is also responsible for giving the letter to you. He doesn't care about the recipient's address, only looks at the recipient's name, and then makes an internal call to ask you to pick up the letter. Without a post office, you cannot send letters to beautiful girls around the world, nor can you receive messages from beautiful girls outside the building. But due to the presence of Mr. Lou Guan Wang, you can still exchange letters with good friends in the same dormitory building through him. The system composed of all post offices is called a "wide area network", while your dormitory building is called a "local area network", and building a local area network does not require a router.