BGPRouter Config

bgp router-id [ip]

Statically assigns the BGP router ID to avoid ID changes when interface states change.

Syntax·Router Config
bgp router-id <ip-address>

When to Use This Command

  • Preventing BGP session resets caused by router ID changes when interfaces go up or down.
  • Ensuring a predictable, stable router ID in production environments.
  • Resolving router ID conflicts in complex BGP topologies.
  • Best practice in any BGP deployment — always set it explicitly.

Command Examples

Set the router ID to a loopback address

R1(config)# router bgp 65001 R1(config-router)# bgp router-id 10.0.0.1
R1(config-router)#
%BGP-5-ADJCHANGE: neighbor 203.0.113.1 Down  Router ID changed
%BGP-5-ADJCHANGE: neighbor 203.0.113.1 Up

Changing the router ID resets all BGP sessions — expect a brief outage. For this reason, set it before establishing any sessions. After the reset, the new router ID 10.0.0.1 is used permanently.

Verify router ID

R1# show ip bgp summary
BGP router identifier 10.0.0.1, local AS number 65001

The first line of 'show ip bgp summary' confirms the active router ID.

Understanding the Output

If BGP sessions are already established when you set the router ID, IOS resets all sessions — you'll see ADJCHANGE syslog messages. The router ID is shown at the top of 'show ip bgp summary' and 'show ip bgp'. Best practice: always use the primary loopback IP as the router ID.

CCNA Exam Tips

1.

CCNA exam tip: If not configured manually, BGP selects the highest loopback IP; if no loopback, the highest active physical interface IP.

2.

CCNA exam tip: Changing the router ID resets ALL BGP sessions — this is a traffic-impacting event.

3.

CCNA exam tip: The router ID does not need to be a routable IP — it's just an identifier, similar to OSPF router ID.

4.

CCNA exam tip: A router ID conflict (two routers with the same ID) can cause BGP instability.

Common Mistakes

Mistake 1: Changing the router ID on a live router — this resets all BGP sessions and causes a routing outage.

Mistake 2: Using a physical interface IP instead of a loopback — if that interface goes down, the router ID changes and sessions reset.

Mistake 3: Not setting the router ID at all — if the highest IP interface flaps, the ID changes and sessions drop.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions