Verifying Border Gateway Protocol (BGP) operation on a Cisco router is a core operational task for network engineers. Because BGP governs inter-domain routing across the internet and large enterprise backbones, an undetected misconfiguration, dropped peering session, or route-filtering discrepancy can quickly lead to blackholed traffic or widespread outages. Auditing BGP involves confirming the active configuration stanzas, evaluating neighbor state machines, validating bidirectional prefix advertisements, and isolating protocol-level failures.
This guide details how to verify BGP configuration and operational health on Cisco IOS and IOS-XE routers, progressing from running configuration extraction to real-time session monitoring, route validation, troubleshooting, and authoritative command references.
Table of Contents
Viewing the Active BGP Configuration in Cisco IOS
Before inspecting dynamic neighbor tables, you must verify the router’s committed and active BGP configuration. Cisco IOS stores active parameters in the running configuration, which can be isolated using targeted filtering.
Step 1: Access Privileged EXEC Mode
Log in to the router via console or SSH and elevate your privileges:
Router> enable
Router#
Step 2: Extract the BGP Configuration Section
Filter the running configuration specifically for the BGP routing process. In Cisco IOS and IOS-XE, the section parameter displays the entire BGP stanza, including local Autonomous System (AS) definitions, global parameters, address families, and individual neighbor parameters:
Router# show running-config | section bgp
On legacy Cisco IOS versions that do not support the section keyword, use begin to jump directly to the configuration block:
Router# show running-config | begin router bgp
Step 3: Evaluate Key Configuration Directives
Examine the returned output for fundamental BGP parameters:
router bgp 65001
bgp router-id 192.0.2.1
bgp log-neighbor-changes
neighbor 198.51.100.2 remote-as 65002
neighbor 198.51.100.2 description PEERING_TO_ISP_PRIMARY
neighbor 198.51.100.2 update-source GigabitEthernet0/0/0
!
address-family ipv4
network 203.0.113.0 mask 255.255.255.0
neighbor 198.51.100.2 activate
neighbor 198.51.100.2 route-map SECURE_IN inbound
neighbor 198.51.100.2 route-map EXPORT_OUT outbound
exit-address-family
Confirm that the local autonomous system number (router bgp <ASN>) matches your network design, that every expected peer has an assigned remote-as, and that the necessary address families (IPv4 or IPv6 unicast) are explicitly activated for each neighbor.
Verifying BGP Neighbor Status with show ip bgp summary
Once the configuration is confirmed, the next step is checking whether peering sessions have initialized and established correctly. The primary command for auditing peer health across the router is show ip bgp summary.
Step 1: Execute the Summary Command
Run the summary command for the default IPv4 address family:
Router# show ip bgp summary
For IPv6 address families, use:
Router# show bgp ipv6 unicast summary
Step 2: Interpret Header and Table Metrics
The output opens with general BGP routing table metrics:
BGP router identifier 192.0.2.1, local AS number 65001
BGP table version is 28, main routing table version 28
5 network entries using 1240 bytes of memory
5 path entries using 680 bytes of memory
2 BGP path attribute cache entries using 336 bytes of memory
Verify that the BGP router identifier matches the intended loopback or interface IP and that the local AS number matches your assigned autonomous system.
Step 3: Analyze the Neighbor Table Columns
Beneath the summary header, each configured peer is displayed in a tabular format:
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
198.51.100.2 4 65002 142 140 28 0 0 02:14:32 12
203.0.113.5 4 65003 0 0 1 0 0 00:00:15 Active
Evaluate these parameters for each neighbor:
* Neighbor: The remote peer IP address.
* V: BGP protocol version (standard is 4).
* AS: The remote autonomous system number.
* MsgRcvd / MsgSent: Total BGP control messages (Keepalives, Updates) exchanged. Stable sessions show incrementing counts.
* InQ / OutQ: Messages waiting in memory buffers. Persistent non-zero values indicate CPU congestion, link saturation, or memory starvation.
* Up/Down: Duration the session has remained continuously in its current state.
* State/PfxRcd: This is the most critical field.
* If the session is Established, this column displays an integer representing the number of prefix paths received from that peer (e.g., 12).
* If the session is not established, this column displays a text string representing the current state of the BGP finite state machine (e.g., Idle, Active, Connect).
Inspecting Advertised and Received Routes Per Neighbor
An established peering state confirms TCP and protocol-level communication, but it does not guarantee that routes are exchanging as intended. You must verify what your router is sending to and accepting from each peer.
Step 1: Verify Accepted Routes from a Peer
To view prefixes that your router has accepted and placed into its BGP routing table after applying inbound route maps and filters, execute:
Router# show ip bgp neighbors 198.51.100.2 routes
The output lists the valid network prefixes, next-hop IP addresses, metrics, local preferences, and AS paths supplied by that specific neighbor.
Step 2: Inspect Raw Received Routes Prior to Policy Filtering
If you suspect an inbound route map is dropping prefixes sent by a neighbor, inspect the raw updates before policy application:
Router# show ip bgp neighbors 198.51.100.2 received-routes
Operational Note: This command requires that inbound soft reconfiguration was configured beforehand (
neighbor <IP> soft-reconfiguration inbound) or that the remote neighbor supports BGP Route Refresh capabilities. If soft reconfiguration is disabled, the router stores only accepted routes to conserve memory, and this command returns an error.
Step 3: Audit Prefixes Advertised to the Neighbor
To audit what your router is actively transmitting outbound to an adjacent autonomous system:
Router# show ip bgp neighbors 198.51.100.2 advertised-routes
Review this list carefully to ensure:
1. Internal subnets intended for export are present.
2. Private subnets (RFC 1918) or transit routes from other providers are not inadvertently leaked outbound.
Step 4: Validate Prefix Insertion in the Global BGP Table
Confirm that specific prefixes exist within the global BGP table and examine their attribute details:
Router# show ip bgp 203.0.113.0/24
This output displays the best-path selection status (*>), local preference, origin code, and next-hop reachability required for the route to be installed into the router’s main forwarding Information Base (RIB).
Troubleshooting BGP Neighbors Stuck in Idle or Active States
When checking neighbor health via show ip bgp summary, peers displaying Idle or Active indicate a failure in session establishment. An Idle state means BGP is not actively attempting a connection (often due to an administrative shutdown or missing route), while Active indicates BGP is actively trying to initiate a TCP handshake but failing to receive responses.
+-------------------------------------------------------------+
| Idle State |
| - Neighbor administratively down (shutdown) |
| - No Layer 3 route to remote peer IP |
| - Waiting on hold/retry timers |
+------------------------------+------------------------------+
|
v
+-------------------------------------------------------------+
| Active State |
| - Route to peer exists, but TCP connection fails |
| - TCP port 179 blocked by firewall/ACL |
| - Source IP mismatch (missing 'update-source') |
| - Missing 'ebgp-multihop' for non-directly connected peers |
| - AS number or MD5 authentication password mismatch |
+-------------------------------------------------------------+
Step 1: Verify Layer 3 Route Reachability
BGP requires an underlying route to establish its TCP transport session. Verify IP connectivity and routing table resolution for the peer address:
Router# ping 198.51.100.2
Router# show ip route 198.51.100.2
If the ping fails or show ip route returns “Network not in table”, the BGP state machine remains in Idle. Resolve the underlying IGP or static routing issue before proceeding.
Step 2: Validate TCP Port 179 End-to-End Connectivity
BGP communicates over TCP port 179. If intermediate firewalls, cloud security groups, or interface access control lists (ACLs) drop port 179 traffic, the session will remain stuck in Active.
Verify that interface ACLs applied to incoming/outgoing interfaces permit BGP traffic:
Router# show ip access-lists
You can confirm transport-layer communication attempts from the router CLI:
Router# telnet 198.51.100.2 179
An open connection confirming TCP synchronization indicates port 179 is accessible.
Step 3: Verify Source Interface Configuration
When peering between loopback interfaces (common in iBGP or multihomed eBGP topologies), BGP packets must source from the configured peering address. If the router sources packets from a physical egress interface instead of the loopback, the peer will reject the TCP SYN packet.
Ensure your configuration specifies the correct source:
Router(config-router)# neighbor 198.51.100.2 update-source Loopback0
Additionally, eBGP sessions between non-directly connected addresses require increasing the Time-to-Live (TTL) value from its default of 1:
Router(config-router)# neighbor 198.51.100.2 ebgp-multihop 2
Step 4: Audit Autonomous System Numbers and Authentication
A misconfigured remote AS number or mismatched MD5 password prevents BGP session establishment. Compare both ends of the connection:
* Local AS on Router A must match neighbor <IP> remote-as <ASN> on Router B.
* If authentication is enabled, passwords must match exactly:
text
Router(config-router)# neighbor 198.51.100.2 password SecureBgpPassword123
Step 5: Check Detailed Reset and Error Counters
To discover why an established neighbor disconnected or why an active session resets, check the neighbor-specific diagnostic log:
Router# show ip bgp neighbors 198.51.100.2
Search the output for the “Last reset” string and connection counters:
* Last reset 00:04:12, due to Peer closed the session: Indicates the remote peer sent a BGP NOTIFICATION message or terminated the TCP session.
* Notification sent/received: Identifies specific RFC error codes (e.g., Bad Peer AS, Hold Timer Expired, or Cease).
Essential Cisco BGP Show Commands Reference
The following commands form the core CLI toolkit for auditing, monitoring, and validating Cisco BGP operations across operational environments:
show running-config | section bgp
Displays the active BGP configuration block, including autonomous system declarations, global timers, address families, and neighbor policies.show ip bgp summary
Provides a high-level operational overview of all IPv4 BGP neighbors, showing message exchange counters, session uptime, and received prefix counts or current state.show bgp ipv6 unicast summary
Provides the BGP operational summary specifically for IPv6 unicast peering sessions and tables.show ip bgp
Displays the complete local BGP routing information base (RIB), indicating path selection metrics, local preference, weight, and best-path status (*>).show ip bgp neighbors [ip-address]
Produces comprehensive real-time diagnostics for a specific neighbor, including negotiated capabilities, hold/keepalive timers, TCP connection parameters, and drop reasons.show ip bgp neighbors [ip-address] advertised-routes
Lists all network prefixes actively being transmitted to a specified neighbor after outbound policy filtering has executed.show ip bgp neighbors [ip-address] routes
Lists all prefixes received from a specified neighbor that passed inbound filtering and were accepted into the local BGP table.show ip bgp neighbors [ip-address] received-routes
Displays all prefixes sent by a neighbor before inbound policy evaluation (requires inbound soft reconfiguration or route refresh capabilities).show ip route bgp
Displays all BGP-learned routes that have been successfully installed into the primary Cisco IOS routing table (RIB/FIB).show ip bgp rib-failure
Lists BGP routes that were selected as best paths in BGP but failed to install into the main routing table, typically due to a lower administrative distance route (such as an IGP or static route) already occupying the prefix.show tcp brief
Lists all active local TCP connections, allowing verification that local and remote port 179 connections are in anESTABstate.
Cisco Official Documentation and Command Guidelines
Cisco Systems maintains formal documentation standards governing BGP implementation, command syntax, and protocol compliance across Cisco IOS, IOS-XE, and IOS-XR platforms. Network administrators should reference these authoritative documentation paths for architecture validation and command version dependencies:
Cisco IOS IP Routing: BGP Command Reference
The official Cisco IOS IP Routing: BGP Command Reference contains complete syntax dictionaries, default values, command modes, and architectural guidelines for all Cisco BGP commands. Key considerations documented in the reference include:
* Command Scope: Address-family configuration architecture isolates protocol parameters between IPv4, IPv6, VPNv4, and Layer 2 VPNs. Global neighbor parameters apply across families unless overridden within specific address-family modes.
* Deprecation and Syntax Variations: In Cisco IOS-XR platforms, running configuration checks utilize show running-config router bgp rather than pipe section parsing, and updates require explicit commit operations before becoming active.
* RFC Compliance: Cisco BGP adheres strictly to RFC 4271 (A Border Gateway Protocol 4). Error handling mechanisms, NOTIFICATION error subcodes, and the Finite State Machine (FSM) sequence follow standardized definitions.
Cisco Technical Support and Configuration Guides
For platform-specific troubleshooting and design guides, Cisco publishes technical documentation organized by operating system:
* Cisco IOS XE BGP Configuration Guide: Details advanced policy configuration, route reflectors, BGP confederations, autonomous system path prepending, and Flowspec implementation.
* Troubleshooting BGP Technical Notes: Cisco TAC guides provide deterministic debugging procedures using privileged commands such as debug ip bgp and debug ip tcp transactions.
Documentation Directive: Debug commands should never be executed on production routers without strict access lists or filters, as uncontrolled logging of full BGP routing tables can exhaust CPU and memory resources.
Systematic verification of a Cisco router’s BGP configuration begins with auditing the running configuration, followed by inspecting neighbor states via show ip bgp summary. If sessions fail to reach an established state, isolating Layer 3 routing and TCP port 179 reachability resolves the majority of Idle and Active conditions. Once sessions are established, confirming route exchange through advertised and received route commands ensures your BGP policies forward traffic accurately and securely.











Comments