- Verify that the next hop can be resolved.
- Choose the path with the lowest preference value (routing protocol process preference).
- Prefer the path with higher local preference. For non-BGP paths, choose the path with the lowest preference2 value.
- If the accumulated interior gateway protocol (AIGP) attribute is enabled, prefer the path with the lower AIGP attribute.
- Prefer the path with the shortest autonomous system (AS) path value.
- Prefer the route with the lower origin code. Routes learned from an IGP have a lower origin code than those learned from an exterior gateway protocol (EGP), and both have lower origin codes than incomplete routes (routes whose origin is unknown).
- Prefer the path with the lowest multiple exit discriminator (MED) metric.
- Prefer strictly internal paths, which include IGP routes and locally generated routes (static, direct, local, and so forth).
- Prefer strictly external BGP (EBGP) paths over external paths learned through internal BGP (IBGP) sessions.
- Prefer the path whose next hop is resolved through the IGP route with the lowest metric.
- If both paths are external, prefer the currently active path to minimize route-flapping.
- Prefer a primary route over a secondary route. A primary route is one that belongs to the routing table. A secondary route is one that is added to the routing table through an export policy.
- Prefer the path from the peer with the lowest router ID. For any path with an originator ID attribute, substitute the originator ID for the router ID during router ID comparison.
- Prefer the path with the shortest cluster list length. The length is 0 for no list.
- Prefer the path from the peer with the lowest peer IP address.
Monthly Archives: June 2015
Cisco BGP path selection
- Prefer the path with the highest WEIGHT. (Weight is a Cisco-proprietary attribute and is non-transitive)
- Prefer the path with the highest LOCAL_PREF. (Default value is 100 and is non-transitive)
- Prefer the path that was locally originated via a network or aggregate BGP sub-command or through redistribution from an IGP.
- Prefer the path with the shortest AS_PATH.
- Prefer the path with the lowest origin type.
- Prefer the path with the lowest multi-exit discriminator (MED).
- Prefer eBGP over iBGP paths.
- Prefer the path with the lowest IGP metric to the BGP next hop.
- Determine if multiple paths require installation in the routing table for BGP Multipath.
- When both paths are external, prefer the path that was received first (the oldest one).
- Prefer the route that comes from the BGP router with the lowest router ID.
- If the originator or router ID is the same for multiple paths, prefer the path with the minimum cluster list length.
- Prefer the path that comes from the lowest neighbor address.
Comparing Cisco and Juniper administrative distance
Protocol | Cisco | Juniper |
Connected / Direct | 0 | 0 |
Static | 1 | 5 |
EIGRP Summary | 5 | – |
OSPF Internal | – | 10 |
IS-IS Level 1 Internal | – | 15 |
IS-IS Level 2 Internal | – | 18 |
BGP External | 20 | – |
EIGRP Internal | 90 | – |
OSPF All | 110 | – |
IS-IS All | 115 | – |
RIP | 120 | 100 |
OSPF External | – | 150 |
IS-IS Level 1 External | – | 160 |
IS-IS Level 2 External | – | 165 |
EIGRP External | 170 | – |
BGP All | – | 170 |
BGP Internal | 200 | – |
IPv6 quick reference guide
Prefix | Bits | IP Addresses | /64s | /48s | In English |
/64 | 64 | 18,446,744,073,709,551,616 | 1 | 18.446 Quintillion | |
/63 | 65 | 36,893,488,147,419,103,232 | 2 | 36.893 Quintillion | |
/62 | 66 | 73,786,976,294,838,206,464 | 4 | 73.786 Quintillion | |
/61 | 67 | 147,573,952,589,676,412,928 | 8 | 147.573 Quintillion | |
/60 | 68 | 295,147,905,179,352,825,856 | 16 | 295.147 Quintillion | |
/59 | 69 | 590,295,810,358,705,651,712 | 32 | 590.295 Quintillion | |
/58 | 70 | 1,180,591,620,717,411,303,424 | 64 | 1.180 Sextillion | |
/57 | 71 | 2,361,183,241,434,822,606,848 | 128 | 2.361 Sextillion | |
/56 | 72 | 4,722,366,482,869,645,213,696 | 256 | 4.722 Sextillion | |
/55 | 73 | 9,444,732,965,739,290,427,392 | 512 | 9.444 Sextillion | |
/54 | 74 | 18,889,465,931,478,580,854,784 | 1,024 | 18.889 Sextillion | |
/53 | 75 | 37,778,931,862,957,161,709,568 | 2,048 | 37.778 Sextillion | |
/52 | 76 | 75,557,863,725,914,323,419,136 | 4,096 | 75.557 Sextillion | |
/51 | 77 | 151,115,727,451,828,646,838,272 | 8,192 | 151.115 Sextillion | |
/50 | 78 | 302,231,454,903,657,293,676,544 | 16,384 | 302.231 Sextillion | |
/49 | 79 | 604,462,909,807,314,587,353,088 | 32,768 | 604.462 Sextillion | |
/48 | 80 | 1,208,925,819,614,629,174,706,176 | 65,536 | 1 | 1.208 Septillion |
/47 | 81 | 2,417,851,639,229,258,349,412,352 | 131,072 | 2 | 2.417 Septillion |
/46 | 82 | 4,835,703,278,458,516,698,824,704 | 262,144 | 4 | 4.835 Septillion |
/45 | 83 | 9,671,406,556,917,033,397,649,408 | 524,288 | 8 | 9.671 Septillion |
/44 | 84 | 19,342,813,113,834,066,795,298,816 | 1,048,576 | 16 | 19.342 Septillion |
/43 | 85 | 38,685,626,227,668,133,590,597,632 | 2,097,152 | 32 | 38.685 Septillion |
/42 | 86 | 77,371,252,455,336,267,181,195,264 | 4,194,304 | 64 | 77.371 Septillion |
/41 | 87 | 154,742,504,910,672,534,362,390,528 | 8,388,608 | 128 | 154.742 Septillion |
/40 | 88 | 309,485,009,821,345,068,724,781,056 | 16,777,216 | 256 | 309.485 Septillion |
/39 | 89 | 618,970,019,642,690,137,449,562,112 | 33,554,432 | 512 | 618.970 Septillion |
/38 | 90 | 1,237,940,039,285,380,274,899,124,224 | 67,108,864 | 1,024 | 1.237 Octillion |
/37 | 91 | 2,475,880,078,570,760,549,798,248,448 | 134,217,728 | 2,048 | 2.475 Octillion |
/36 | 92 | 4,951,760,157,141,521,099,596,496,896 | 268,435,456 | 4,096 | 4.951 Octillion |
/35 | 93 | 9,903,520,314,283,042,199,192,993,792 | 536,870,912 | 8,192 | 9.903 Octillion |
/34 | 94 | 19,807,040,628,566,084,398,385,987,584 | 1,073,741,824 | 16,384 | 19.807 Octillion |
/33 | 95 | 39,614,081,257,132,168,796,771,975,168 | 2,147,483,648 | 32,768 | 39.614 Octillion |
/32 | 96 | 79,228,162,514,264,337,593,543,950,336 | 4,294,967,296 | 65,536 | 79.228 Octillion |
/31 | 97 | 158,456,325,028,528,675,187,087,900,672 | 8,589,934,592 | 131,072 | 158.456 Octillion |
/30 | 98 | 316,912,650,057,057,350,374,175,801,344 | 17,179,869,184 | 262,144 | 316.912 Octillion |
/29 | 99 | 633,825,300,114,114,700,748,351,602,688 | 34,359,738,368 | 524,288 | 633.825 Octillion |
/28 | 100 | 1,267,650,600,228,229,401,496,703,205,376 | 68,719,476,736 | 1,048,576 | 1.267 Nonillion |
/27 | 101 | 2,535,301,200,456,458,802,993,406,410,752 | 137,438,953,472 | 2,097,152 | 2.535 Nonillion |
/26 | 102 | 5,070,602,400,912,917,605,986,812,821,504 | 274,877,906,944 | 4,194,304 | 5.070 Nonillion |
/25 | 103 | 10,141,204,801,825,835,211,973,625,643,008 | 549,755,813,888 | 8,388,608 | 10.141 Nonillion |
/24 | 104 | 20,282,409,603,651,670,423,947,251,286,016 | 1,099,511,627,776 | 16,777,216 | 20.282 Nonillion |
IPv4 quick reference
Prefix | Bits | IP Addresses | /24s | /16s | /8s | Subnet Mask |
/32 | 0 | 1 | 255.255.255.255 | |||
/31 | 1 | 2 | 255.255.255.254 | |||
/30 | 2 | 4 | 255.255.255.252 | |||
/29 | 3 | 8 | 255.255.255.248 | |||
/28 | 4 | 16 | 255.255.255.240 | |||
/27 | 5 | 32 | 255.255.255.224 | |||
/26 | 6 | 64 | 255.255.255.192 | |||
/25 | 7 | 128 | 255.255.255.128 | |||
/24 | 8 | 256 | 1 | 255.255.255.0 | ||
/23 | 9 | 512 | 2 | 255.255.254.0 | ||
/22 | 10 | 1,024 | 4 | 255.255.252.0 | ||
/21 | 11 | 2,048 | 8 | 255.255.248.0 | ||
/20 | 12 | 4,096 | 16 | 255.255.240.0 | ||
/19 | 13 | 8,192 | 32 | 255.255.224.0 | ||
/18 | 14 | 16,384 | 64 | 255.255.192.0 | ||
/17 | 15 | 32,768 | 128 | 255.255.128.0 | ||
/16 | 16 | 65,536 | 256 | 1 | 255.255.0.0 | |
/15 | 17 | 131,072 | 512 | 2 | 255.254.0.0 | |
/14 | 18 | 262,144 | 1,024 | 4 | 255.252.0.0 | |
/13 | 19 | 524,288 | 2,048 | 8 | 255.248.0.0 | |
/12 | 20 | 1,048,576 | 4,096 | 16 | 255.240.0.0 | |
/11 | 21 | 2,097,152 | 8,192 | 32 | 255.224.0.0 | |
/10 | 22 | 4,194,304 | 16,384 | 64 | 255.192.0.0 | |
/9 | 23 | 8,388,608 | 32,768 | 128 | 255.128.0.0 | |
/8 | 24 | 16,777,216 | 65,536 | 256 | 1 | 255.0.0.0 |
/7 | 25 | 33,554,432 | 131,072 | 512 | 2 | 254.0.0.0 |
/6 | 26 | 67,108,864 | 262,144 | 1,024 | 4 | 252.0.0.0 |
/5 | 27 | 134,217,728 | 524,288 | 2,048 | 8 | 248.0.0.0 |
/4 | 28 | 268,435,456 | 1,048,576 | 4,096 | 16 | 240.0.0.0 |
/3 | 29 | 536,870,912 | 2,097,152 | 8,192 | 32 | 224.0.0.0 |
/2 | 30 | 1,073,741,824 | 4,194,304 | 16,384 | 64 | 192.0.0.0 |
/1 | 31 | 2,147,483,648 | 8,388,608 | 32,768 | 128 | 128.0.0.0 |
/0 | 32 | 4,294,967,296 | 16,777,216 | 65,536 | 256 | 0.0.0.0 |