Computer Network Exam Review - Chapter 4 4.6

Ideal routing algorithm: several characteristics

1. The algorithm must be correct and complete

2. The algorithm should be computationally simple

3. The algorithm can adapt to changes in traffic volume and network topology and is adaptive, also known as robustness.

4. The algorithm should be stable

5. Algorithms should be fair

6. The algorithm should be optimal

Regarding "optimal routing" - there is no absolute optimal routing algorithm. The so-called "best" can only be a more reasonable choice based on a specific requirement.

Routing is very complex: all nodes need to work together to coordinate. The environment is constantly changing, and this change sometimes cannot be known in advance. When network congestion occurs, it is difficult to obtain the required routing information.

Routing algorithm classification:

Static routing strategy: non-adaptive routing; unable to adapt to changes in network status in a timely manner; simple and low overhead.

Dynamic routing strategy: adaptive routing; can better adapt to changes in network status; implementation is complex and expensive.

2) Hierarchical routing protocol

Internet: Employs adaptive (i.e., dynamic), distributed routing protocols. Divide the entire Internet into many smaller autonomous systems AS and use hierarchical routing protocols.

Divided into 2 levels: routing between autonomous systems or inter-domain routing; routing within autonomous systems or intra-domain routing.

There are also two gateway protocols. Here we mainly explain the RIP protocol, which is the interior gateway protocol.

Interior Gateway Protocol RIP protocol

Routing Information Protocol RIP (Routing Information Protocol) is a distributed , distance vector-based routing protocol. The standard protocol of the Internet. Biggest advantage: simplicity. Each router in the network is required to maintain a record of the distance from itself to every other destination network.

RIP "distance" definition: distance from router to directly connected network = 1. The distance from a router to a non-directly connected network = the number of routers passed + 1. The "distance" in the RIP protocol is also called the "hop count" . Every time it passes through a router, the hop count increases by 1.

Good route = "short distance" route. Best route = the "shortest distance" route. A path can only contain up to 15 routers. When the maximum value of "distance" is 16 , it is equivalent to being unreachable. RIP cannot use multiple routes between two networks at the same time and only selects the route with the shortest distance.

Three characteristics of the RIP protocol

1. Only exchange information with neighboring routers.

2. The information exchanged is all the information currently known by this router, that is, its own routing table.

3. Exchange routing information at fixed intervals, for example, every 30 seconds. When the network topology changes, the router also promptly notifies the adjacent routers of the routing information after the topology change.

Creation of routing table:

When the router first starts working, the routing table is empty.

Then, get the distance of directly connected networks (this distance is defined as 1).

After that, each router only exchanges and updates routing information with a very limited number of neighboring routers.

After several updates, all routers will eventually know the shortest distance to any network in this autonomous system and the address of the next-hop router.

The convergence process of the RIP protocol is relatively fast. "Convergence" is the process in which all nodes in the autonomous system obtain correct routing information.

Main information and update rules of routing table

 Routing table update rules: Use the distance vector algorithm to find the shortest distance to each destination network. Then make a judgment update.

! ! ! The execution process of distance vector algorithm! ! !

For the RIP packets sent by each adjacent router (assuming its address is X), the router:

(1) Modify all items (i.e. routes) in the RIP message: Change the addresses in the "Next Hop" field to X, and add 1 to the values ​​of all "Distance" fields.

(2) Repeat the following steps for each item in the modified RIP message: If there is no destination network N in the routing table, add the item to the routing table. Otherwise, if the next-hop router of network N in the routing table is X, replace the item in the original routing table with the received item. Otherwise, if the distance in the received item is less than the distance in the routing table, update the item in the original routing table with the received item. Otherwise do nothing.

(3) If the updated routing table of the adjacent router has not been received within 3 minutes, the adjacent router will be recorded as an unreachable router, that is, the distance will be set to 16 (indicating unreachable).

(4) Return.

An example question:

Characteristics of RIP protocol: Good news spreads quickly, bad news spreads slowly. Because when the network fails, the network propagates messages very slowly, so the bad news takes a very slow time to arrive.

Advantages and disadvantages of RIP protocol:

Advantages: Simple implementation and low overhead.

Disadvantages: 1. The network size is limited. The maximum distance is 15 (16 means unreachable). 2. The routing information exchanged is a complete routing table, which requires a large overhead. 3. Bad news spreads slowly and takes too long to converge. 

Router composition

Routers work at the network layer and are used to interconnect networks. It is a key device in the Internet. The main job of a router: forwarding packets. Forward the packet received from a certain input port from a suitable output port of the router to the next-hop router according to the destination of the packet (i.e., the destination network).

Router structure: 

The difference between "forwarding" and "routing"

Forwarding: Forward the user's IP datagram from the appropriate port according to the forwarding table. Only one router is involved. The forwarding table is derived from the routing table. The forwarding table must contain the information necessary to complete the forwarding function. Each row must contain a mapping from the destination network to be reached to the output port and some MAC address information (such as the Ethernet address of the next hop).

Routing selection: According to the routing selection algorithm, the selected route is dynamically changed according to changes in network topology, and the entire routing table is constructed from this. There are many routers involved. Routing tables typically only contain mappings from destination networks to next hops (represented by IP addresses).

There are three commonly used switching methods: through memory, through bus, and through crossbar switching structure.

Via memory:

(1) When an input port of the router receives a packet, it notifies the routing processor using an interrupt. The packet is then copied from the input port to memory. (2) The router processor extracts the destination address from the packet header, looks up the routing table, and copies the packet to the buffer of the appropriate output port. (3) If the memory bandwidth (read or write) is M packets per second, then the router's switching rate (that is, the rate at which packets are transmitted from the input port to the output port) must be less than M/2.

Via bus:

(1) Datagrams are transmitted directly from the input port to the appropriate output port through the shared bus without the intervention of the routing processor. (2) If the bus is found to be busy when the packet arrives at the input port, it will be blocked and cannot pass through the switching fabric, and will be queued at the input port. (3) Because every packet to be forwarded must pass through this bus, the forwarding bandwidth of the router is limited by the bus rate.

Through the crossbar switching structure:

(1) It has 2N buses, and controlling the cross node can connect N input ports and N output ports. (2) When the input port receives a packet, it is sent to the horizontal bus. (3) If the vertical bus leading to the output port is idle, connect the vertical bus and the horizontal bus and forward the packet to the output port. If the output port is occupied, the packet is queued at the input port. Features: It is a non-blocking switching structure. Packets can be forwarded to any output port as long as the output port is not occupied by other groups.

Guess you like

Origin blog.csdn.net/m0_53345417/article/details/130231150