By default, BGP uses the IP address of the outgoing interface toward the peer as the source IP address for the TCP connection over which the BGP session runs. If the outgoing interface goes down, the BGP session is dropped because the IP source address is no longer valid. This is appropriate behavior for EBGP sessions because the EBGP peers typically can reach each other only by virtue of being connected to a common subnet.
For IBGP sessions, however, you typically want BGP sessions to be automatically rerouted around interfaces that are down. You can issue the neighbor update-source command to accomplish this. This command instructs BGP to use the IP address of a specified interface as the source address of the underlying TCP connection. Typically, a loopback interface is used because it is inherently stable.
For example, you can specify that BGP use loopback interface 2 as the source for messages that it sends to peer 192.50.30.1:
- host1(config)#neighbor 192.50.30.1 update-source
loopback 2
neighbor update-source
The source address that you specify with the neighbor update-source command is also used by BGP as the default value for the next hop address advertised for IPv4 or IPv6 prefixes.
The source addresses and next hop address that result from using the neighbor update-source command vary depending on the configuration of the command. Table 14 lists the results for different configurations.
Table 14: Source Addresses and Default Next Hop Addresses for Various Configurations
You can override a native IPv6 next-hop address with either the neighbor update-source command or an outbound route map.
When you specify an interface with the neighbor update-source command, the IPv4-mapped IPv6 address of the interface is used instead of the native IPv6 address for the next hop.
- host1(config)#interface loopback 0
- host1(config-if)#ip address 10.1.1.1/32
- host1(config-if)#exit
- host1(config)#router bgp 100
- host1(config-router)#neighbor 2::2 update-source
loopback 0
In this example, the IPv4-mapped IPv6 address of the loopback 0 interface is the next-hop address sent when IPv6 prefixes are advertised. However, if loopback 0 has an IPv6 address, then that address is used as the default next hop for advertising IPv6 prefixes.