The classification and function of routing

One, the definition of routing

Routing (routing) refers to the process of determining the network scope of the end-to-end path when a packet travels from the source to the destination [1]. Routing works at the third layer of the OSI reference model-the packet forwarding device at the network layer. The router realizes network interconnection by forwarding data packets. Although routers can support multiple protocols (such as TCP/IP, IPX/SPX, AppleTalk, etc.), most routers in my country run TCP/IP. A router usually connects two or more logical ports identified by an IP subnet or point-to-point protocol, and has at least one physical port. The router determines the output port and next hop address according to the network layer address in the received data packet and the routing table maintained inside the router, and rewrites the link layer data packet header to forward the data packet. The router reflects the current network topology by dynamically maintaining the routing table, and maintains the routing table by exchanging routing and link information with other routers on the network.
In routing, the forwarding conditions are determined by
the routing table . In the routing table, each row is a routing entry (or a routing table entry, a routing entry). Normally, a piece of routing information consists of three elements: destination/mask (Destination/Mask), outgoing interface (Interface), and next hop IP address (NextHop).

(1) Destination/mask: If the length of the mask in the destination/mask is 32, the destination will be a host interface address, otherwise the destination will be a network address. Under normal circumstances, it is always said that the destination of a routing item is a network address (that is, the destination network address), and the host interface address is regarded as a special case of the destination.

(2) Outgoing interface: refers to the interface from which the data content contained in the routing table entry should be sent;

(3) Next hop IP address: If the next hop IP address of a routing table entry is the same as the IP address of the outgoing interface, it means that the outgoing interface has been directly connected to the destination network pointed to by the routing entry. Note: The host interface and the outgoing interface corresponding to the next hop IP address must be in the same Layer 2 network (Layer 2 broadcast domain)

Second, the working principle and classification of routing

1. Working principle

Above that, the principle is based on the role of the router routing table, the routing table is as follows: a route entry router maintains a set of
2 router selected in accordance with the routing table to make a routing path
formed routing table
directly connected segment
configure the IP address
non Directly connected to the network side
Routing protocol: 1 static routing-----route manually configured by the administrator
2 dynamic routing----automatically learn routing between routers
3 in the LAN----IGP (Interior Gateway Routing Protocol), Subdivided into RIPV.RIPV2.EIGRPLOV) distance
vector routing protocol: 1 link state routing protocol
2 exterior gateway routing protocol (version 4)

2. Classification of routing

1 Static routing
is manually configured by the administrator, and it is one-way. It
lacks flexibility.
Static advantages and disadvantages.
Advantages
Another advantage of using static routing is the high network security and confidentiality. Dynamic routing requires routers to frequently exchange their respective routing tables, and the analysis of the routing table can reveal information such as the network topology and network addresses. Therefore, the network can also use static routing for security considerations. Does not occupy network bandwidth, because static routing does not generate update traffic.
Disadvantages
Static routing is usually not suitable for large and complex network environments. On the one hand, it is difficult for network administrators to fully understand the topology of the entire network; on the other hand, when the topology and link status of the network change, the static routing information in the router needs to be adjusted on a large scale, which is difficult. And the complexity is very high. When the network changes or the network fails, the route cannot be reselected, which may cause the route to fail.
Configuration method
1 Configure the ip address on the port connected to the route, and each route should be directly connected, and the port should be configured with static ip
2ip route-static connected to the next hop network segment (non-router port network segment) + mask + next hop Network segment (this is the routing port interface)
3 After the configuration is completed, the priority should be selected, that is, the weight. The default weight is 60. The higher the priority, the later.
2 Default route The
default route is a special static route. The router can make a choice when there is no matching entry in the routing table with the destination address of the packet. If there is no default router, then the packet whose destination address does not match the entry in the routing table will be discarded. The default route is in some Time is very effective. When there is a stub network, the default route will greatly simplify the configuration of the router, reduce the workload of the administrator, and improve the network performance.
3 Dynamic routing
Based on a certain routing protocol, the features are: 1 Reduced management tasks
2 Occupied Network bandwidth
Configuration method: consistent with static routing, first set the port ip
change version number 2 version 2
turn off automatic aggregation undo summrry to
announce the next network segment network segment
single-arm routing
single-arm routing is used to achieve communication between different vlans and network segments The technology is similar to the layer 3 switching industry. The configuration instructions are as follows (Huawei).
Int interface
undo shutdown Open physical interface
int g0/0/0.1 Enter sub-interface
vlan-type dont1q vlan number defailut
ip add address + mask

Guess you like

Origin blog.csdn.net/weixin_49172531/article/details/112095388
Recommended