1, the following conditions as long as there is an unsatisfied, you need to use a dynamic routing protocol: 1) network size is small, 2) only one connection point for connecting to other networks, 3) No redundant routers (typically used as backup)
2, the so-called dynamic routing is each router and its own adjacent routers to exchange the information of their connected networks, so that their own routing table is always up-to-date, and different communication update mode, called different dynamic routing protocol
3, we divide the entire Internet into many autonomous systems (autonomous System,as), the routers in each autonomous system use the same dynamic routing protocol, called IGP (interior gateway protocol) and the routing protocol between the two different autonomous system routers is called EGP (Exterior Gateway Protocol)
4. RIP (Routing information Protocol): An IGP for small and medium-sized networks, because there is a metrics field in the RIP message that records the number of hops required to the destination address, and the value of this field is 16 o'clock, Indicates that the destination address is unreachable, so the scope of the network using RIP is very limited. Typically, UDP is used for communication with a port number of 520.
5, the implementation of the RIP protocol steps:
1) Initialize, first broadcast RIP request packets on each port, let other routers send their entire routing table back.
2) When the other router receives the request message, first to determine whether the message is the initialization request message, is the entire routing table package sent back, or each one to determine the destination address of the request, if the address itself can be assigned to their own metric value, not to, The metric value is set to 16 (indicating that the destination address is unreachable).
3) After the router receives the reply, it updates its own routing table according to the resulting routing table. Add a table entry with the new destination address, and the original route table entry is updated with a better path selection.
4) Regular routing updates: every 30 seconds each router sends its own complete routing table to a router that is directly connected to it.
5) Trigger update: When the metric value of a table entry in the routing table changes, only the change of the table entry is notified to the neighboring router
6) Remove the table entry from the routing table if there is a regular update in the routing table for every 30 seconds in which the table entry has not been updated, or 4, for 3 minutes
6, RIP takes a long time to recover from the router or the fault of the connection, because the failure will inevitably lead to the increase in the number of hops to the destination address, and the RIP Protocol routing table update is toward the better, that is, the number of hops less direction updates, so the reverse update is undoubtedly a longer time.
7. OSPF (Open shortest Path first): It is another IGP that overcomes the shortcomings of RIP and can meet the needs of large networks. It is a link-state protocol, unlike RIP, where it interacts with neighboring routers for link state information, not the distance from the RIP to a destination address. And each router stores the link state information that they receive in the database, and then produces a routing table based on the database. Moreover, the transmission of OSPF link state information is not based on UDP or TCP, but rather as a separate protocol that has a specific value in the Protocol field in the header of the IP data.
In an OSPF-based routing table, there is only one optimal table entry for the routing table that differs from RIP, and there may be multiple table entries for the same destination address, and OSPF chooses the table items based on the rotation method to ensure load balance. When the topology of the network changes, the router will be triggered to send the update packets, so that the router's routing table is updated timely, effectively overcome the bad news of rip slow transmission defects. (OSPF is much more complicated than RIP, so here are just a few simple overviews)
8. BGP (Border Gateway Protocol) is a routing protocol between autonomous systems running on TCP, which updates routing information between autonomous systems by sending network accessibility information. and keep-alive messages are sent every 30 seconds to maintain connectivity and detect changes in network topology.
9, Cdir (Classless interdomain Routing): CIDR is essentially designed to reduce the table entries in routers in the Internet. We know that for each class C address, the corresponding routing table entry is added to the router, so the entire routing table becomes very verbose. So our very normal idea is to combine several high-level class C networks, so that only one route table entry is added to the routing table. In fact, CIDR is based on this idea, to a certain extent, this also weakened the a,b,c such a network division. When an IP datagram arrives at a router lookup routing table for matching, we only need to select the longest table entry that matches the length of the destination address (which should be the matching length of the subnet mask, not destination).
"TCP/IP detailed Volume One" reading notes-----Dynamic routing protocol