Routing table update algorithm (problem solving ideas)

The routing table of router R6 at a certain moment is as follows:

  • Step 1: Increase the distance of the updated information by +1, and change the next route to the route that sent the updated information

R4 update form: (yellow words are explanations)

destination network

distance

next hop router

net1

3 =2+1

R4 R1 next hop at R4

net2

5 =4+1

R4 R2 next hop at R4

net3

4 =3+1

R4 R9 is the next hop of R4

  • Step 2: Compare with the original table

The original table of R6:

destination network

distance

next hop router

net2

3

R4

net3

4

R5

  1. Destination network net1: The R6 table itself does not have net1, so add it directly (update net1).

  1. Destination network net2: The next-hop router of net2 in R6 table points to R4, so net2 should also be updated. (Because R4 has been updated, the old R4 is useless, so it needs to be changed)

  1. Destination network ne3: The next-hop router of net3 in R6 table is not R4. The distance needs to be selected, 4=4, the own distance is the same as the update distance, and no update is required. (If the R4 update table is smaller than the R6 original table distance, the data needs to be updated)

Results after R6 update: (updated ones are marked in yellow)

destination network

distance

next hop router

net1

3

R4

net2

5

R4

net3

4

R5

Summarize:

First check whether the destination network exists, then check whether the router has been updated, and finally compare the distance.

Guess you like

Origin blog.csdn.net/qq_61649579/article/details/129126632