general:network:frrouting
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
general:network:frrouting [2021/05/10 07:25] – created sunkan | general:network:frrouting [2021/05/10 08:50] – sunkan | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Taken from frr-6.0.2/ | ||
+ | Reordered them according to their value for easier reading | ||
+ | |||
< | < | ||
/* Default Administrative Distance of each protocol. */ | /* Default Administrative Distance of each protocol. */ | ||
Line 4: | Line 7: | ||
#define ZEBRA_CONNECT_DISTANCE_DEFAULT | #define ZEBRA_CONNECT_DISTANCE_DEFAULT | ||
#define ZEBRA_STATIC_DISTANCE_DEFAULT | #define ZEBRA_STATIC_DISTANCE_DEFAULT | ||
- | # | + | # |
- | # | + | # |
#define ZEBRA_OSPF_DISTANCE_DEFAULT | #define ZEBRA_OSPF_DISTANCE_DEFAULT | ||
#define ZEBRA_OSPF6_DISTANCE_DEFAULT | #define ZEBRA_OSPF6_DISTANCE_DEFAULT | ||
#define ZEBRA_ISIS_DISTANCE_DEFAULT | #define ZEBRA_ISIS_DISTANCE_DEFAULT | ||
+ | #define ZEBRA_RIP_DISTANCE_DEFAULT | ||
+ | #define ZEBRA_RIPNG_DISTANCE_DEFAULT | ||
#define ZEBRA_IBGP_DISTANCE_DEFAULT | #define ZEBRA_IBGP_DISTANCE_DEFAULT | ||
- | #define ZEBRA_EBGP_DISTANCE_DEFAULT | ||
- | #define ZEBRA_TABLE_DISTANCE_DEFAULT | ||
</ | </ | ||
+ | |||
+ | Also documentation from latest release is available here [[http:// | ||
+ | |||
+ | ====== Administrative Distance ====== | ||
+ | |||
+ | Administrative distance allows FRR to make decisions about what routes should be installed in the rib based upon the originating protocol. The lowest Admin Distance is the route selected. This is purely a subjective decision about ordering and care has been taken to choose the same distances that other routing suites have choosen. | ||
+ | |||
+ | < | ||
+ | Protocol | ||
+ | System | ||
+ | Kernel | ||
+ | Connect | ||
+ | Static | ||
+ | NHRP 10 | ||
+ | EBGP 20 | ||
+ | EIGRP 90 | ||
+ | BABEL 100 | ||
+ | OSPF 110 | ||
+ | ISIS 115 | ||
+ | OPENFABRIC 115 | ||
+ | RIP 120 | ||
+ | Table 150 | ||
+ | SHARP 150 | ||
+ | IBGP 200 | ||
+ | PBR 200 | ||
+ | |||
+ | </ | ||
+ | |||
+ | An admin distance of 255 indicates to Zebra that the route should not be installed into the Data Plane. Additionally routes with an admin distance of 255 will not be redistributed. | ||
+ | |||
+ | Zebra does treat Kernel routes as special case for the purposes of Admin Distance. Upon learning about a route that is not originated by FRR we read the metric value as a uint32_t. The top byte of the value is interpreted as the Administrative Distance and the low three bytes are read in as the metric. This special case is to facilitate VRF default routes. | ||
+ | |||
+ | ====== Prefix list explained ====== | ||
+ | |||
+ | Taken from [[https:// | ||
+ | |||
+ | < | ||
+ | ip prefix-list just seq permit 20.0.0.0/16 le 17 | ||
+ | </ | ||
+ | |||
+ | * Will 20.0.128.0 | ||
+ | |||
+ | This particular prefix list matches prefixes of the form P/M (Prefix/ | ||
+ | |||
+ | - P & /16 == 20.0.0.0 | ||
+ | - /16 <= M <= /17 | ||
+ | |||
+ | Now, 20.0.128.0 & /16 = 20.0.0.0, so the first condition is met. However, you have not indicated the mask of the prefix 20.0.128.0 and that is crucial to say what subnets would match. If their mask was either /16 or /17 and they were allocated from the 20.0.0.0/16 space, the prefix list would match. If the mask was different from these two values, the prefix list would not match. | ||
+ | |||
+ | In general, a prefix list of the form | ||
+ | |||
+ | < | ||
+ | ip prefix-list NAME permit|deny A.B.C.D/N ge L le U | ||
+ | </ | ||
+ | |||
+ | matches all prefixes of the form P/M that meet the two following criteria: | ||
+ | |||
+ | - P & N == A.B.C.D (the prefix must be a subnet of the A.B.C.D/N) | ||
+ | - L <= M <= U (the mask of the prefix must be between L and U) | ||
+ | |||
+ | If the ge L argument is not used then the conditions are: | ||
+ | |||
+ | - P & N == A.B.C.D (the prefix must be a subnet of the A.B.C.D/N) | ||
+ | - N <= M <= U (the mask of the prefix must be between N and U) | ||
+ | |||
+ | If the le U argument is not used then the condition are: | ||
+ | |||
+ | - P & N == A.B.C.D (the prefix must be a subnet of the A.B.C.D/N) | ||
+ | - L <= M <= /32 (the mask of the prefix must be at least L) | ||
+ | |||
+ | If neither ge L nor le U are used then the prefix list evaluation is very simple: P must be exactly A.B.C.D and M must be exactly N. | ||
+ |
general/network/frrouting.txt · Last modified: 2021/05/10 08:52 by sunkan