The difference between a switch and a router

1. The router can automatically assign an IP to your local area network, virtual dial-up. The switch is only used to distribute network data.

2. The router works at the network layer. The router is addressed according to the IP address and can handle the TCP/IP protocol, but the switch cannot.

3. The switch works at the relay layer, and the switch is addressed according to the MAC address. A router can assign an IP to multiple hosts, and these hosts only show one IP to the outside world. A switch can connect many hosts, each of which has its own IP address to the outside world.

4. Routers provide firewall services, while switches do not. Hubs and switches are used for port expansion, that is, to expand the access point of the local area network (usually Ethernet), that is, to allow the local area network to connect more computers. A router is an Internet connection, that is, connecting different networks together.

5. The switch uses the physical address or MAC address to determine the destination address for forwarding data. IP addresses are implemented in software and describe 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 provided by the hardware, allocated by the network card manufacturer, and solidified into the network card. Generally, it cannot be changed. The IP address is usually assigned automatically by the network administrator or the system.

Note:

(A switch is a big house with multiple locks. If you want to know the news in the house, you must have a key, and the router is like a key to open the door, allowing you to enter the house and know its information .If there is no router, the house can't be opened, and people outside can't access the Internet, and can't get information.)

The difference between a Layer 3 switch and a router

Although all have the routing function, the main function of the three-layer switch is still data exchange, providing fast data exchange function in the local area network to meet the application characteristics of frequent data exchange.

The router function is just like its name, mainly the routing function, which is reflected in the interconnection between different types of networks. Such as the connection between the local area network and the wide area network, the connection between the networks of different protocols. The main function is routing and forwarding, and solving the connection of various complex routing path networks is his ultimate goal.

Technically, routers typically perform packet switching based on microprocessor-based software routing engines, while Layer 3 switches perform packet switching in hardware. After the Layer 3 switch routes a data flow, it will generate a mapping table between MAC addresses and IP addresses. When the same data flow passes through again, it will directly pass through Layer 2 according to this table instead of re-routing, thus eliminating the need for further routing. The network delay caused by network routing improves the efficiency of packet forwarding. The router adopts the longest matching method, which is complicated to implement, usually implemented in software, and has low forwarding efficiency.

The biggest difference between Layer 3 switching and routing is that routing supports NAT conversion, while Layer 3 does not. It is reflected in the actual project: directly connecting the optical fiber to the router can access the Internet, but connecting the optical fiber to the layer three equipment cannot access the Internet. Each port on the third layer has a dedicated mac address and a dedicated ASIC integrated circuit.


The difference between a network switch and a router:

A network switch is a device that expands the network and can provide more connection ports in the sub-network to connect more computers. With the development of the communication industry and the advancement of the informatization of the national economy, the network switch market has shown a steady upward trend. It has the characteristics of high cost performance, high flexibility, relative simplicity, and easy implementation. Therefore, Ethernet technology has become the most important LAN networking technology today, and network switches have become the most popular switches.

  A router is a device that connects various local area networks and wide area networks in the Internet. It will automatically select and set routes according to the channel conditions, and send signals in the order of the best path. The router is the hub of the Internet, the "traffic cop". At present, routers have been widely used in all walks of life, and various products of different grades have become the main force for realizing the internal connection of various backbone networks, the interconnection between backbone networks, and the interconnection between backbone networks and the Internet. The main difference between routing and switching is that switching occurs at layer 2 (the data link layer) of the OSI reference model, while routing occurs at layer 3, the network layer. This difference determines that routers and switches need to use different control information in the process of moving information , so the way they implement their respective functions is different.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325872312&siteId=291194637