router bgp [asn]
Enters BGP router configuration mode and creates a BGP process with the specified autonomous system (AS) number.
router bgp <autonomous-system-number>When to Use This Command
- Starting a BGP process on an internet-facing router.
- Establishing eBGP peering with an ISP or external AS.
- Configuring iBGP within an enterprise or service provider network.
- First step before advertising networks or defining neighbors.
Command Examples
Configure eBGP with an ISP (AS 65001 connecting to AS 100)
R1(config)# router bgp 65001
R1(config-router)# neighbor 203.0.113.1 remote-as 100
R1(config-router)# network 198.51.100.0 mask 255.255.255.0R1(config-router)#
No immediate output. AS 65001 is the local AS number. The neighbor command creates an eBGP peer to AS 100.
Verify the BGP process is running
R1# show ip bgp summaryBGP router identifier 10.0.0.1, local AS number 65001 BGP table version is 3, main routing table version 3 2 network entries using 288 bytes of memory Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 203.0.113.1 4 100 45 43 3 0 0 00:37:10 1
The output confirms the local AS (65001), router ID, and shows the eBGP neighbor in Established state with 1 prefix received.
Understanding the Output
The `router bgp` command itself produces no output. Use `show ip bgp summary` to verify the process is active. The AS number (1–65535; 64512–65535 are private ASNs) must match what your upstream ISP or peer expects. Misconfigured AS numbers are one of the most common BGP configuration errors.
CCNA Exam Tips
CCNA exam tip: AS numbers 64512–65535 are private (like RFC 1918). CCNA scenarios often use 65001, 65002, etc.
CCNA exam tip: Only one BGP process can run per router — you cannot have two 'router bgp' statements.
CCNA exam tip: The AS number in 'router bgp' must match the remote-as advertised by the peer, or the session stays in Active/Idle state.
CCNA exam tip: BGP does not auto-discover neighbors — every peer must be explicitly configured with 'neighbor remote-as'.
Common Mistakes
Mistake 1: Using the wrong AS number — causes the BGP session to stay in Active state indefinitely.
Mistake 2: Forgetting that BGP requires a reachable path to the neighbor's IP before TCP can be established.
Mistake 3: Configuring 'router bgp' without any 'neighbor' statements — the process starts but no sessions form.
Related Commands
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.
network [network] mask [mask]
Advertises a network into BGP. The specified network must exist in the local routing table (via static route, connected, or IGP) for BGP to originate and advertise it.
show ip bgp summary
Displays a summary of the BGP neighbor status and prefix counts, used to quickly verify BGP peering and routing table health.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions