From the perspective of filtering network traffic, the role of routers is very similar to that of switches and bridges.
。 But unlike switches that work in the network data link layer and physically divide network segments, routers logically divide the whole network using special software protocols. For example, a router supporting IP protocol can divide the network into several sub-network segments. Only network traffic pointing to a special IP address can pass through the router. For each received packet, the router recalculates its check value and writes it to a new physical address. Therefore, using routers to forward and filter data is often slower than switching machines that only look at the physical addresses of data packets. However, for those complex networks, the use of routers can improve the overall efficiency of the network. Another obvious advantage of routers is that they can automatically filter network broadcasts. Generally speaking, the whole installation process of adding routers to the network is much more complicated than that of Plug and Play switches.
Some routers only support a single protocol, but most routers can support the transmission of multiple protocols, that is, multi-protocol routers. Since each protocol has its own rules, the performance of a router will be degraded if the algorithm of multiple protocols is to be implemented in one router. The main task of a router is to find an optimal transmission path for each data frame passing through the router and transmit the data to the destination site effectively. Thus, the strategy of choosing the best path, namely routing algorithm, is the key of router. In order to accomplish this task, Routing Table (Routing Table) is stored in routers for routing. The path table contains the logo information of the subnet, the number of routers on the network and the name of the next router. The path table can be fixed by the system administrator.
Static routing table: The fixed routing table set by the system administrator beforehand is called static routing table.
Dynamic routing table: Dynamic routing table is a routing table that routers automatically adjust according to the operation of the network system.
Router is a multi-port device, which can connect different transmission rates and run in various environments of LAN and WAN, and can also use different protocols. Router belongs to the third layer of O S I model - network layer. Guiding data transmission from one network segment to another can also guide data transmission from one network to another.
First, network interconnection: Routers support a variety of LAN and WAN interfaces, mainly for interconnecting LAN and WAN, to achieve communication between different networks;
Second, data processing: providing functions including packet filtering, packet forwarding, priority, multiplexing, encryption, compression and firewall;
Thirdly, network management: routers provide functions including router configuration management, performance management, fault-tolerant management and traffic control.
The so-called "routing" refers to the actions and actions of transferring data from one place to another. Router is the machine that performs such actions. Its English name is Router. It is a network device connecting multiple networks or segments. It can "flip" the data information between different networks or segments. Translated to enable them to "read" each others data, thus forming a larger network.
In order to complete the work of routing, Routing Table, which is the data related to various transmission paths, is stored in routers for routing selection. The routing table contains the information of the subnet logo, the number of routers on the network and the name of the next router. Routing tables can be fixed by system administrators, dynamically modified by the system, automatically adjusted by routers, or controlled by hosts. There are two concepts about address names in routers: static routing table and dynamic routing table. The fixed routing table set by the system administrator is called static routing table. It is usually pre-set according to the configuration of the network when the system is installed. It will not change with the change of the future network structure. Dynamic routing table is a routing table that routers automatically adjust according to the operation of the network system. Router automatically learns and memorizes the operation of the network according to the functions provided by Routing Protocol, and automatically calculates the best path of data transmission when needed.