A router is a device that connects LANs and WANs in the Internet. It automatically selects and sets routes based on the conditions of the channel, and sends signals in the forward and backward sequence according to the best path. The router is the hub of the Internet, "traffic police." Currently, routers have been widely used in various industries, and products of various grades have become the main force for achieving various backbone network internal connections, backbone network interconnections, and interconnection between backbone networks and the Internet. The main difference between a router and a switch is that the switch occurs in the second layer of the OSI reference model (data link layer), and the routing occurs in the third layer, the network layer. This difference determines that routing and switches need to use different control information in the process of moving information, so the way the two implement their respective functions is different.
A router is also called a gateway. It is used to connect multiple logically separated networks. The so-called logical network represents a single network or a subnet. When data is transmitted from one subnet to another, it can be done through the routing function of the router. Therefore, the router has the function of judging the network address and selecting the IP path. It can establish a flexible connection in a multi-network interconnection environment, and can use different data packet and media access methods to connect various subnets. The router only accepts the source station or The information of other routers is an interconnected device at the network layer.