Multiprotocol Extensions to BGP
Multiprotocol extensions to BGP (MP-BGP, RFC 2283) allow the same BGP process to carry routing information for different “address families”: IPv4 unicast, IPv4 multicast, IPv6 unicast, IPv6 multicast, Virtual Private Networks version 4 (VPNv4 for IPv6 or IPv4), and Connectionless Network Services (CLNS).
The address family model for configuring BGP is based on splitting apart the configuration for each address family. All commands that are independent of the address family are grouped together at the beginning (highest BGP level, no address family) of the configuration, and these are followed by separate submodes for commands specific to each address family (with the exception that commands relating to IPv4 unicast can also be entered at the beginning of the configuration). When a network operator configures BGP, the flow of BGP configuration categories is represented by the following bullets in order:
- Global configuration - configuration that is applied to BGP in general, rather than to specific neighbors. For example, the network, redistribute, and bgp bestpath commands.
- Address family – dependent configuration—configuration that applies to a specific address family such as policy on an individual neighbor.
router bgp <autonomous-system-number>
router-id <A.B.C.D>
!
address-family ipv4 [unicast | multicast | vrf vrf-name]
neighbor <address> activate
!
!
end
2610b(config-router)bgp upgrade-cli
You are about to upgrade to the AFI syntax of bgp commands
Are you sure ? [yes]: yes
2610bsh run | be bgp
router bgp 400
bgp router-id 192.168.0.1
bgp log-neighbor-changes
timers bgp 30 90
neighbor 192.168.0.2 remote-as 400
neighbor 192.168.0.2 update-source Loopback999
neighbor 192.168.107.2 remote-as 100
!
address-family ipv4
neighbor 192.168.0.2 activate
neighbor 192.168.107.2 activate
no auto-summary
no synchronization
exit-address-family
Extensions to the BGP Path Selection Algorythm
1) Prefer the path with the highest WEIGHT.
2) Prefer the path with the highest LOCAL_PREF. A path without LOCAL_PREF is considered to have had the value set with the bgp default local-preference command, or to have a value of 100 by default.
3) Prefer the path that was locally originated via a network or aggregate BGP subcommand or through redistribution from an IGP. Local paths that are sourced by the network or redistribute commands are preferred over local aggregates that are sourced by the aggregate-address command.
4) Prefer the path with the shortest AS_PATH.
Be aware of these items:
– This step is skipped if you have configured the “bgp bestpath as-path ignore” command.
– An AS_SET counts as 1, no matter how many ASs are in the set.
5) Prefer the path with the lowest origin type.
Note: IGP is lower than Exterior Gateway Protocol (EGP), and EGP is lower than INCOMPLETE.
6) Prefer the path with the lowest multi-exit discriminator (MED).
Be aware of these items:
– MEDs are compared only if the first AS in the AS_SEQUENCE is the same for multiple paths. Any preceding AS_CONFED_SEQUENCE is ignored.
– If “bgp always-compare-med” is enabled, MEDs are compared for all paths, all AS. First per AS, then per neighbor.
– The “bgp deterministic med” makes the order paths are received, from neighbors and AS, not important (always same result).
– Unless you enable the “bgp bestpath missing-as-worst” command, paths received with no MED are assigned a MED of 0.
– If “bgp bestpath med-confed” is enabled, MEDs are compared for all paths that consist only of AS_CONFED_SEQUENCE.
7) Prefer eBGP over iBGP paths.
EXTENSION: => If bestpath is selected and no tiebreak is required, go to 8) “Multipath“, otherwise go further
8) Prefer the path with the lowest IGP metric to the BGP next hop.
EXTENSION: => If Cost community is enabled, prefer path with the lowest Cost ID, Cost Value community.
9) Multipath: Determine if multiple paths require installation in the routing table for BGP Multipath. If multipath is on, select a number of best as configured by “maximum-paths”
10) When both paths are external, prefer the path that was received first (the oldest one).
11) 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.