I. the role of management distance
administrative distance is a measure that determines the validity or trustworthiness of a routing protocol. In various routing protocols, sorting is done from the most believable to the most untrusted. Used to determine the best route when there are multiple paths generated by different protocols to the same destination.
The default administrative distances for the different protocols commonly used are the following table:
Lu Yuyan (Routing protocol) |
Default administrative distance |
Direct Connect Routing |
0 |
Static to Interface |
0 |
Static to Next hop |
1 |
External BGP |
20 |
Ospf |
110 |
Is-is |
115 |
PIR V1,V2 |
120 |
Internal BGP |
200 |
Unknown |
255 |
as you can see from the table above, when the administrative distance is 255 , the route generated by the protocol is the least trusted, and the routing entry is not entered into the local routing table.
II. Routing Entry Analysis
Each route consists of the following six parts: The following routing entries
R 30.2.1.0[120/1] via 10.1.1.2,00:00:21,serial0/0
" R"means that this route islearned from the" RIP"protocol;" 30.2.1.0"is the destination network; "[120/1]"is a rip the management distance of the protocol,1 means that the path to the target is only 1 hops; "via 10.1.1.2" means the IP address of thenext hop router that reaches the destination network ; 00:00:21"refers to the time (age) at which the route bar has been created;"Serial 0/0"refers to the port on which the next hop should go out.
Mastering the generation of routing and related attributes is very important to the application by modifying the management distance control and filtering routing.
Third, the application practice of modifying management distance in IP protocol
in the in the configuration mode of the RIP protocol, the command format is as follows:
Distance weightip-address Wildcard Access-list-number
Each parameter has the following meanings:
Weight: modified to a new range of administrative distance values 1-255
Ip-address: IP address of the routing source
Wildcard: The match for the IP address of the route source is represented by an anti-mask
Access-list-number: Modify access list number (1-99) to manage distances only for routes that meet the access list
For example: command distance 255 The router will learn all the RIP protocol routes to the administrative distance set to 255, which causes the router to learn no rip route;
Distance 192.168.1.5 0.0.0.0 The route passed by the 192.168.1.5 to the management distance set to ;
Distance Access-list ( such as access-list for permit 192.168.30.0 0.0.0.255), the order The standard network is the administrative distance setting for the 192.168.30.0 routing entry 88
Iv. Practical Application
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/AA/wKiom1ShWRqBb5TmAADWHO4sYlk591.jpg "title=" 333. JPG "alt=" Wkiom1shwrqbb5tmaadwho4sylk591.jpg "/>
RA (config) #routerrip
RA (Config-router) #version2
RA (Config-router) #network192.168.1.0
RA (Config-router) #network192.168.2.0
RA (config-router) #noauto-summary
RA (config-router) #distance 255
RA (config-router) #distance 192.168.1.2 0.0.0.0
RB (config) #routerrip
RB (Config-router) #version2
RB (Config-router) #network192.168.1.0
RB (Config-router) #network192.168.10.0
RB (config-router) #noauto-summary
RC (config) #routerrip
RC (Config-router) #version2
RC (Config-router) #network192.168.2.0
RC (Config-router) #network192.168.20.0
RC (config-router) #noauto-summary
The above configuration makes the router A can only obtain RIP routes advertised by router B , while the management distance of router C advertises RIP 's routing entry is set 255, router A These routing entries (the target network segment is 192.168.20.0/24 discarded).
This article is from the "Yugong Yishan" blog, make sure to keep this source http://1538620.blog.51cto.com/1528620/1597499
Application of management distance in RIP protocol