A peer stuck in Idle or OpenSent, or a session that keeps bouncing and taking a route with it, is one of the most common escalations on a WAN edge. This is the diagnostic order that separates the handful of root causes behind most of these tickets — the exact display commands, the error codes, and where route iteration quietly breaks a session that otherwise looks fine.
By the AtlasCommTech engineering team — 13 years of carrier & enterprise network deployments · Updated July 2026
I don't start by staring at the configuration — I start by asking which of six states the peer is actually stuck in.
A BGP session moves through a fixed sequence — Idle, Connect, Active, OpenSent, OpenConfirm, Established — and almost every "neighbor won't come up" ticket is really a question of which of those states it's stuck at, not a mystery to be solved by changing settings on both ends at once. A session that reaches Established and then drops, bounces, or quietly sends traffic down only one of several equal-cost paths is a different problem with its own diagnostic order, even though it gets reported the same way: "BGP is down."
What follows is the fault tree this is built on, the checks for each branch with the exact commands to run, the root causes that show up again and again once you're past the first few checks, and a handful of real FAQ answers pulled from actual field cases.
BGP failures split into exactly two shapes: the neighbor never reaches Established, or it does and something still isn't right.
Placing the symptom on this tree first saves a lot of backtracking later — it tells you which of the sections below actually applies to what you're looking at.
Diagram labels are kept in English for engineering clarity.
Once you know which branch applies, almost every check below is a single display command away from a confirmed cause — the trap is treating a flapping, already-Established session with the same checklist as one that has never come up at all.The same discipline, applied one protocol over, is behind OSPF Neighbor Stuck or Route Flapping? Reading the State Machine to Find the Fault, its sister note for OSPF adjacencies.
Six states, one exact command that tells you which one you're stuck in — and where the flap logs explain themselves once you know the error code.
If the peer never leaves Idle or Active, don't touch the BGP configuration yet — confirm the two ends can actually reach each other over TCP 179 first.
<HUAWEI> display acl all
Basic ACL 3001, 2 rules
ACL's step is 5
ACL's match-order is config
rule 5 deny tcp source-port eq bgp
rule 10 deny tcp destination-port eq bgp
// undo rule 5 destination-port / undo rule 10 source-port removes the block
Transport is fine, but the peer still won't leave OpenSent or shows "No Neg" — this is almost always one specific parameter that looks fine in isolation but doesn't actually match the other end.
<HUAWEI> display bgp peer
BGP local router ID : 1.1.1.1
Local AS number : 41976
Total number of peers : 12 Peers in established state : 4
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.9.0.8 4 100 1601 1443 0 23:21:56 Established 10000
10.10.0.10 4 200 1565 1799 0 23:15:30 Established 9999
// Router ID and AS both compared directly against the peer's own values
If either end sources the session from a Loopback interface, four extra parameters have to be configured correctly, and a fifth — the Device ID — has to simply not be zero.
<Huawei> display bgp vpnv4 vpn-instance VPN1 peer
BGP local Device ID : 0.0.0.0 // invalid -- session will not originate or accept
...
// after adding a Loopback interface outside any VPN instance:
BGP local Device ID : 192.168.1.2
VPN-Instance VPN1, Device ID 192.168.1.2:
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.83.255.2 4 39651 10 22 0 02:59:49 Established 1
A session that was fine and then dropped, or keeps bouncing, leaves an exact reason behind — you don't have to be watching when it happens.
<HUAWEI> display bgp peer 10.8.200.26 log-info
Date/Time : 2021-02-06 18:34:31+00:00
State : Down
Error Code : 4(Hold Timer Expired)
Error Subcode : 0(UnSpecific)
Notification : Send Notification
[~HUAWEI-diagnose] pads diagnose neighbor establish-abnormal bgp history-record
NBR-Peer-IP Last-Detect-Time State Reason
1.1.1.1 01-27 20:23:49 OpenConfirm The shutdown command is run in the BGP view.
2.2.2.2 01-27 20:23:49 Idle The peer ignore command is configured for the BGP peer.
The session is stable — the "fault" is in how the routes it carries are being used or re-advertised.
[Device] bgp 65001
[Device-bgp] maximum load-balancing 4
// configure identically on every router in the cross-connected mesh
[Device-bgp] preference 65
// set BGP's preference lower (worse) than the static route feeding the same aggregate (default static preference 60)
Once the states above have told you where the problem sits, these six account for most of what's actually wrong.
SYMPTOMThe peer never reaches Established even though the transport ping succeeds cleanly — it just sits in OpenSent or cycles.
CAUSETwo peers end up with the same Router ID — often after a cloned or templated configuration where the Loopback address, or the default Router ID selection, wasn't changed on the copy.
FIXSet an explicit, unique Router ID on each device, generally using its own Loopback address.
[Device] bgp 65001
[Device-bgp] router id 2.2.2.2
SYMPTOMTransport-layer ping between the two peer addresses works fine, but the session never leaves Idle or Active.
CAUSEAn ACL configured for an unrelated purpose — security filtering, QoS classification — happens to deny TCP source-port or destination-port bgp on the path between the two peers.
FIXCheck display acl all on both ends and remove or narrow the rule that matches TCP port 179.
<HUAWEI> display acl all
Basic ACL 3001, 2 rules
rule 5 deny tcp source-port eq bgp
rule 10 deny tcp destination-port eq bgp
[HUAWEI] acl 3001
[HUAWEI-acl-basic-3001] undo rule 5 destination-port
[HUAWEI-acl-basic-3001] undo rule 10 source-port
SYMPTOMA session to a different vendor's router refuses to reconnect after a device reboot, even though the underlying TCP connection completes cleanly.
CAUSEIf every IP-addressed interface on the device is bound inside a VPN instance and there's no standalone Loopback, the BGP Device ID resolves to 0.0.0.0 — a value most implementations treat as invalid, so the device won't originate or accept a session at that ID no matter how healthy the transport is. Separately, Loopback-sourced sessions need peer connect-interface, and Loopback-sourced or otherwise multihop EBGP sessions need peer ebgp-max-hop — without either, the session sits unestablished with no obvious error.
FIXAdd a Loopback interface outside any VPN instance (or set router id explicitly) so the Device ID is never 0.0.0.0, and configure connect-interface and ebgp-max-hop wherever the session isn't a plain directly-connected EBGP peer.
[Device] interface loopback 1
[Device-LoopBack1] ip address 192.168.1.2 32
[Device] bgp 64512
[Device-bgp] peer 10.83.255.2 ebgp-max-hop 2
[Device-bgp] peer 10.83.255.2 connect-interface LoopBack1
SYMPTOMA dual-uplink BGP session that was fine drops into OpenSent the moment one physical uplink goes down — even though you can still ping the peer's Loopback address from this device.
CAUSEStatic routes toward the peer's Loopback recurse through another static route rather than pointing at an explicit interface and next hop. When one physical link drops, the surviving equal-cost route's next hop iterates into a Null0 route configured for an unrelated blackhole purpose. An un-sourced ping hashes onto the still-working path and succeeds, but the BGP session — sourced from the Loopback — hashes onto the path that now iterates to Null0, and drops.
FIXPoint each static route at an explicit outbound interface and next hop instead of letting it recurse through another static entry.
[Device] undo ip route-static 10.0.0.1 255.255.255.255 192.168.0.1
[Device] ip route-static 10.0.0.1 255.255.255.255 10GE0/0/2 192.168.0.1
<Device> display bgp peer
// the peer at 10.0.0.1 returns to Established once the recursive path is removed
SYMPTOMTwo or more EBGP links of equal cost connect the same pair of routers, but almost all the traffic rides one of them while the other sits nearly idle.
CAUSEBGP only installs and uses a single best path per prefix by default — regardless of how many equal-cost routes actually exist — unless load-balancing is explicitly enabled. Without it, ordinary BGP path selection (lowest Router ID among identical routes, for instance) always lands on the same single path.
FIXEnable maximum load-balancing with a count of 2 or more on every router in the cross-connected mesh, sized for future growth, and confirm what count the far-end vendor's platform supports if it isn't the same as this one.
[Device] bgp 65001
[Device-bgp] maximum load-balancing 4
SYMPTOMA summarized route advertised toward the backbone flaps continuously — downstream peers see it appear and disappear even though nobody touched any policy or added or withdrew a route.
CAUSEThe aggregate is fed by both a static (often blackhole) route and a dynamically learned IBGP or IGP route with a better preference than the static entry. Every time the dynamic route's underlying session blips — even briefly — the preferred source for the aggregate flips between the two, and the aggregate is withdrawn and re-advertised even though nothing about the actual network changed.
FIXSet the dynamic protocol's preference worse (numerically higher) than the static route's, so the static entry stays the stable, permanent source for the aggregate.
[Device] bgp 65001
[Device-bgp] preference 65
// static route default preference is 60 -- keep it better than BGP/IGP for this aggregate's source
Pulled straight from the field — the ones worth having an answer ready for.
display bgp peer shows the current State column directly (Idle / Connect / Active / OpenSent / OpenConfirm / Established). If it's not obvious why it won't progress past that state, the diagnostic-view command pads diagnose neighbor establish-abnormal bgp history-record prints a one-line plain-English reason per peer — "the shutdown command is run in the BGP view," "the peer ignore command is configured" — without you having to reconstruct it from the running configuration.
display bgp peer <ip> log-info keeps a history of Up/Down transitions with the exact Error Code / Error Subcode pair for each one. Code 6 subcode 2 (Administrative Shutdown) means someone ran shutdown or configured peer ignore; code 4 (Hold Timer Expired) means keepalives simply stopped arriving in time — check the link and CPU load; code 6 subcode 6 means a peer-affecting command, like ebgp-max-hop, was changed. Cross-reference the timestamp against the operation log for the same moment.
BGP only installs a single best path per prefix by default. Without maximum load-balancing configured to a value of 2 or higher on the routers that see the equal-cost paths, only one path is ever used no matter how many equal-cost routes actually exist. Configure it on every router in the cross-connected pair, and check what count the far-end vendor's platform supports if it isn't the same as this one.
This is a priority problem more often than a protocol problem. If the aggregate is fed by both a static route and a dynamically learned IBGP or IGP route, whichever currently has the better preference decides whether the aggregate is "up." When the session behind the dynamic route blips, even briefly, the winning source flips and the aggregate gets withdrawn and re-advertised — nothing in the actual network changed. Set the dynamic protocol's preference worse than the static route's so the static entry stays the stable source.
Check whether this device actually has a usable BGP Device ID. If every IP-addressed interface is bound inside a VPN instance and there's no standalone Loopback, the Device ID resolves to 0.0.0.0, which most implementations reject outright — the device won't originate or accept a session at that ID even though the TCP connection itself completes cleanly. Add a Loopback interface outside any VPN instance, or set router id explicitly, before changing anything else.
This note is built around the Huawei AR-series router's BGP fault-classification model and its display bgp peer / display bgp peer log-info / pads diagnose neighbor bgp commands, plus the field cases behind them. If your router is a different vendor, the exact commands change, but the underlying logic — Router ID and AS matching, transport-layer ACLs, Loopback-peering parameters, route iteration, missing load-balancing, priority-driven flapping — carries over directly. It doesn't cover BGP FlowSpec, RPKI origin validation, or SR-TE-integrated BGP scenarios in depth.
Tell us the exact State column from display bgp peer, or the Error Code from display bgp peer log-info, and we'll help you read it.