neighbor [ip] update-source [interface]
Sources BGP sessions from a loopback interface to increase session stability in iBGP topologies.
Definition: neighbor [ip] update-source [interface] is a Cisco IOS router config command. Specifies the source interface for BGP TCP sessions to a neighbor. Used in iBGP configurations to source sessions from a loopback interface for stability — if the physical link fails but another path exists, the loopback remains reachable and the session stays up.
neighbor <ip-address> update-source <interface-type><interface-number>When to Use This Command
- iBGP sessions between routers that have multiple paths between them.
- Sourcing BGP updates from a stable loopback instead of a physical interface.
- Required when the neighbor IP is the peer's loopback address.
- Standard best practice in all iBGP full-mesh configurations.
Command Examples
iBGP session sourced from Loopback0
R1(config)# router bgp 65001
R1(config-router)# neighbor 10.0.0.2 remote-as 65001
R1(config-router)# neighbor 10.0.0.2 update-source Loopback0R1(config-router)#
Both routers peer via their Loopback0 addresses (10.0.0.1 and 10.0.0.2). The update-source ensures BGP TCP sessions originate from Loopback0, not the outgoing physical interface. This must be configured symmetrically on both peers.
Verify source interface in BGP detail
R1# show ip bgp neighbors 10.0.0.2BGP neighbor is 10.0.0.2, remote AS 65001, internal link BGP version 4, remote router ID 10.0.0.2 BGP state = Established, up for 01:23:45 Local host: 10.0.0.1, Local port: 32456 Foreign host: 10.0.0.2, Foreign port: 179 Connection established 1; dropped 0 Last reset never
Local host shows 10.0.0.1 (Loopback0), confirming the session is sourced from the loopback. The session is Established and stable.
Understanding the Output
No direct output from the command. Verify with 'show ip bgp neighbors [ip]' — look for 'Local host' to confirm the source interface IP. Without this command for loopback-peered iBGP, the session will fail because the BGP OPEN will arrive from a physical interface IP that the peer doesn't recognize as a neighbor.
CCNA Exam Tips
CCNA exam tip: When iBGP peers use loopback addresses, BOTH routers need 'neighbor update-source Loopback0' — one-sided config causes the session to fail.
CCNA exam tip: The loopback IP must be reachable via IGP (OSPF, EIGRP) for the iBGP session to establish.
CCNA exam tip: This command is not needed for eBGP over a directly connected link — physical interface is the default source.
CCNA exam tip: Missing update-source is the #1 reason iBGP sessions fail to establish in lab scenarios.
Common Mistakes
Mistake 1: Configuring update-source on only one side — the TCP session fails because the source IP doesn't match what the remote side expects.
Mistake 2: Using update-source without ensuring the loopback is advertised into the IGP — the loopback is unreachable from the peer.
Mistake 3: Configuring update-source for eBGP when it's not needed — though not harmful, it adds unnecessary complexity.
neighbor [ip] update-source [interface] vs router bgp [asn]
Both commands are essential for BGP configuration but operate at different levels: 'router bgp [asn]' initiates the BGP process, while 'neighbor [ip] update-source [interface]' specifies the source interface for TCP connections to a specific neighbor. They are often confused because both are used in BGP setups and involve interface or ASN association.
| Aspect | neighbor [ip] update-source [interface] | router bgp [asn] |
|---|---|---|
| Scope | Applies to a specific neighbor | Applies to entire BGP process |
| Configuration mode | Router Config (BGP sub-mode) | Global Config |
| Persistence | Saved per neighbor in config | Creates persistent BGP process |
| Precedence | Must follow router bgp command | Must be entered first |
| Typical use | iBGP loopback source for stability | Start any BGP configuration |
Use neighbor [ip] update-source [interface] when you need to ensure BGP TCP sessions source from a specific interface, typically a loopback, for resilience in iBGP.
Use router bgp [asn] when you need to begin BGP configuration on the router, which is mandatory before any other BGP commands.
Related Commands
neighbor [ip] next-hop-self
Forces a BGP router to advertise itself as the next hop for routes sent to a specific iBGP neighbor. Used on eBGP-to-iBGP boundary routers so that iBGP peers can reach eBGP-learned prefixes.
neighbor [ip] remote-as [asn]
Defines a BGP neighbor (peer) by specifying its IP address and AS number. If the remote AS matches the local AS, this creates an iBGP session; if different, it creates an eBGP session.
router bgp [asn]
Enters BGP router configuration mode and creates a BGP process with the specified autonomous system (AS) number. This is the first command required to configure BGP on a Cisco router.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions