Select the Best Path
A PicOS system can run multiple routing protocols simultaneously. For example, RIP may be used to distribute routes within our network and BGP to learn external routes. In some situations this can lead to a router learning the same route from more than one routing protocol.
For example, these two routes might be learned:
• Subnet: 22.214.171.124/24, nexthop: 126.96.36.199, learned from BGP via an external peering. AS Path: 123 567 987.
• Subnet: 188.8.131.52/24, nexthop: 10.0.0.2, learned from RIP with metric 13
The longest prefix match rule doesn’t help us because the prefix lengths are the same, and the metric used for RIP is not directly comparable against the AS path length or any other attribute attached to a BGP route. So, how do we decide which route to take? A PicOS system uses the concept of administrative distance to determine which route wins. Basically, each routing protocol has a configured “distance,” and if a route is heard from two protocols, then the version with the smallest distance wins.
Default Distance Value Table
This table lists the administrative distance default values of the protocols that PicOS supports:
Default Distance Values
Hence, in the example above, the route learned from BGP will be preferred.
The administrative distance is fixed in the PicOS system, and cannot be modified.