BGP Notification: Authentication Failure

BGP Neighbor Auth Failure: 3 Fixes That Actually Work

BGP neighbor auth failures usually come down to mismatched passwords or MD5 hashing issues. Here's the no-BS fix order I've used on Cisco and Juniper gear.

1. Password Mismatch (The Real Culprit 90% of the Time)

I've lost count of how many times I've walked into a ticket where someone swore they copied the password correctly. Nine times out of ten, they didn't. BGP authentication uses a shared plaintext password — but it's hashed with MD5 and sent inside the TCP header. If either side has even one character off, the neighbor never comes up.

What happens: You see something like %BGP-3-NOTIFICATION: sent to neighbor 10.0.0.2 2/2 (authentication failure) 0 bytes on a Cisco box. On Juniper, you get BGP peer 10.0.0.2 authentication failure. The session bounces, tries again, fails again. Fun for no one.

Fix it: Log into both routers and verify the password character by character. Yes, do it manually. I write them down in a terminal side-by-side. Common screw-ups:

  • Trailing spaces — BGP passwords include them. Copy-paste from a web form? You likely dragged a space.
  • Case sensitivity — BGP passwords are case-sensitive. Secret123 is not secret123.
  • Special characters — Some older IOS versions (pre-15.0) hate certain characters like @ or #. Stick to alphanumeric if you can.

On Cisco, the config looks like:

router bgp 65001
 neighbor 10.0.0.2 password MyP@ssw0rd

On Juniper:

protocols bgp {
    group my-group {
        neighbor 10.0.0.2 {
            authentication-key "MyP@ssw0rd";
        }
    }
}

If you've checked twice and it's still not working, move on to the next cause.

2. MD5 Hash Mismatch from Different Platforms or IOS Versions

This one bit me hard on a network merge a few years back. We had a Cisco 4500 talking to a Juniper MX960. Passwords matched — I triple-checked. Still failed. Turns out, different platforms can generate different MD5 digests from the same password. The BGP spec (RFC 2385) defines how the MD5 hash is calculated, but some old code implementations did it slightly differently.

When it happens: Almost always when you're mixing vendors — Cisco to Juniper, Cisco to Arista, Cisco to Nokia. Also seen between older Cisco IOS (12.x) and newer IOS-XE (16.x) where the hash algorithm implementation was patched.

Fix it: First, upgrade any gear running ancient IOS (pre-12.4). If you can't upgrade, try disabling authentication temporarily to confirm the session forms. If it does form without auth but fails with it, you've got a hash mismatch. The workaround:

  • Use a simpler password — only alphanumeric, no special chars. Less complexity means less chance of encoding differences.
  • On newer code, make sure both sides use the same password encryption aes or type-7 scheme. Not directly related, but I've seen encryption type screw up the plaintext.
  • For Juniper, check the authentication-algorithm md5 — make sure it's not set to hmac-sha-256 by accident. Yes, some newer JunOS versions default to SHA.

If you're still stuck, and you've confirmed passwords match on both ends, try removing the password entirely, clearing the BGP session, then reapplying. I've seen leftover hash state corrupt the negotiation.

3. ACL or Firewall Filter Blocking TCP Port 179

This one's almost not an authentication problem — it's a connectivity problem that looks like one. BGP uses TCP port 179. If an ACL or firewall drops that port, the session never completes the TCP handshake, and BGP reports an authentication failure because it never got far enough to verify the password. Annoying but easy to miss.

Real-world trigger: Someone added an ACL to the loopback interface or the management VRF and forgot to permit tcp 179 from the neighbor's IP. Or a firewall upgrade reset the state table. I once spent two hours blaming authentication until I ran a telnet 10.0.0.2 179 and watched it hang.

Fix it:

  • On Cisco, check with show ip bgp summary — if the neighbor shows Idle or Active and never goes to Established, suspect a firewall/ACL.
  • Run a packet capture on the interface. Filter for tcp.port == 179. If you see TCP SYNs but no SYN-ACKs, something in the path is dropping them.
  • Check the ACL on the receiving router's interface: show ip access-lists. Look for a deny entry for tcp 179. If you find one, fix it.
  • For Juniper, check the firewall filter applied to the loopback interface: show configuration firewall filter protect-loopback. Make sure term 1 permits tcp 179 from the peer.

Don't forget stateful firewalls — they need to see the BGP session's TCP state. If the firewall rebooted, the state table cleared, and the session won't form until you clear it from both sides. Do a clear ip bgp * on both peers after fixing ACLs.

Quick-Reference Summary Table

Cause Most Common? What to Check Fix
Password mismatch Yes (~70%) Characters, spaces, case, special chars Re-type password manually; use alphanumeric only
MD5 hash implementation diff No (~20%) Mixed vendors or old IOS vs new Upgrade code; use simple password; apply auth after session up
ACL/firewall blocking port 179 No (~10%) ACL on interface/firewall state Permit tcp 179 from peer; clear BGP after fix

One last thing — if none of these work, check the BGP timers. I've seen a hold-time mismatch cause the session to reset so fast you never see the auth error in the logs. Set timers bgp 30 90 on both sides for testing. But honestly, that's rare. Start with the password.

Related Errors in Network & Connectivity
0X000013C1 Cluster IP Address 0x13C1: Already In Use Fix 0X00002744 WSAENETRESET 0x00002744: The Fix That Actually Works 0X00002733 WSAEWOULDBLOCK 0X00002733 Fix: Nonblocking Socket Delays Fix Dropping Wi-Fi on Dell Latitude 5440 with AX211 Card

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.