Securing BGP with TCP-AO on Arista EOS and Juniper - 夜莺博客

Securing BGP with TCP-AO on Arista EOS and Juniper

TCP MD5 has protected BGP sessions for decades, but its weaknesses — no key rollover, weak crypto, and no key ID negotiation — have made RFC 5925 TCP-AO the modern replacement. Arista added TCP-AO in EOS 4.28.2F, and this walkthrough, based on the TCP-AO community configuration examples, shows exactly how to secure a BGP session between Arista EOS and Juniper routers: the multi-agent routing model requirement, shared secret profiles with send/receive IDs, key lifetimes for seamless rollover, and the verification commands that prove the session is truly authenticated.

Prerequisites

  • Arista EOS 4.28.2F or higher; TCP-AO is available on all platforms.
  • The multi-agent routing model must be enabled (requires a reload):
service routing protocols model multi-agent

Configure the Shared Secret Profile

Define a shared secret profile under management security with key IDs and lifetimes. Multiple secrets with staggered lifetimes enable smooth key rollover:

management security
  session shared-secret profile BGP
    secret 10 7 $1c$zXHy2/5IOz6JEc5qRNYMBA== receive-lifetime 2023-01-01 00:00:00 infinite transmit-lifetime 2023-01-01 00:00:00 infinite
    secret 0 7  $1c$zXHy2/5IOz6JEc5qRNYMBA== receive-lifetime 2023-01-01 00:00:00 infinite transmit-lifetime 2023-01-01 00:00:00 infinite

Verify the Profile

arista# show management security session shared-secret profile BGP
Profile: BGP
Current receive secret: ID: 10, Expires: Does not expire
Current transmit secret: ID: 10, Expires: Does not expire
Receive secret rotation order: 10
Transmit secret rotation order: 10

Attach TCP-AO to the BGP Neighbor

Reference the profile from the BGP neighbor configuration, setting the send-ID and receive-ID to match the peer's key IDs:

router bgp 65001
  neighbor 192.168.1.2 remote-as 65002
  neighbor 192.168.1.2 tcp-ao profile BGP send-id 10 receive-id 10

On the Juniper side, the equivalent uses security authentication-key-chains with the same key IDs and hmac-sha1-96 or aes-128-cmac-96 algorithms — both sides must agree on algorithm, key ID and lifetimes for the session to establish.

Why TCP-AO Beats MD5

  • Explicit key IDs allow zero-downtime key rollover with overlapping lifetimes.
  • Modern algorithms: HMAC-SHA-1-96, AES-128-CMAC-96.
  • Replay protection and better resistance to cross-protocol attacks.

Related reading: securing BGP with ASPA to prevent route leaks and the Arista EOS configuration cheat sheet.

原文链接:https://github.com/TCP-AO/Configuration-examples/blob/master/Arista%20EOS.md