Administrative distance
The administrative distance provides preference to the path. When the routing process determine which route to be used when forwarding a packet, before it router first determine which route to be include in the routing table. It can be happen when a router learn a route to a remote network from more than one routing source. Then routing process need to determine which routing source to use. This is determined by the administrative distance.
The router learns the directly connected network and the remote network by the static route and dynamic routing protocol. A router learns about the route to the same destination network from a more than one source.
Each routing source includes -specific routing protocol, static route and directly connected network is prioritized in order of most to least preferable using an administrative distance value. Router use the AD feature to select the path when there are two more different routes to the same destination from two different routing protocols. AD define the reliability of the routing protocol. AD is an integer value from 0 to 255.The lower the value the most preferred the route source. The administrative distance of directly connected network is 0 and it can’t be changed.
The administrative distance is viewed by the show ip route command as follow-
Router# show ip route
Router# show ip protocols
Static route have default AD value of 1.After the directly connected network, which have AD value 0, the most preferred route source is static route.
Administrative distance of different routing protocols-
Route source AD
Connected 0
Static 1
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
External EIGRP 170
Internal BGP 200
Longest match-
Longest match is bits of network define in the routing updates.
Selection procedure for best path-
If router have multiple path to reach out destination and router is also configure with multiple routing protocol then-
1. Router will check the longest match first. Maximum longest match path will be selected as best path.
2. If longest match for all the path is same then router will check administrative distance. Lowest AD path will be select as best path.
3. If longest match and AD are same then router will check metric. Lowest metric path will select as best path.
4. If longest match, AD and metric are same for all the path then router will use all the path.
Related posts: