Interface-Scoped TCP Authentication
Understanding Interface-Scoped Authentication for BGP Unnumbered Peers
When you deploy BGP unnumbered peering, routers automatically discover neighbors using IPv6 Neighbor Discovery Protocol (NDP) and establish sessions over IPv6 link-local addresses. You can enable interface-scoped TCP authentication (MD5, TCP-AO, Keychain authentication) for these dynamically discovered peers by associating authentication keys directly with the logical interfaces, regardless of the peer's IP address.
Routers establish BGP sessions using IPv6 link-local addresses through BGP unnumbered peering, which eliminates the need to assign unique IP addresses to each point-to-point interface. This approach simplifies network configuration but creates challenges for traditional TCP authentication mechanism that rely on knowing the peers’ IP address or IP prefix in advance. The interface-scoped authentication approach associates the authentication key directly with a logical interface. This configuration ensures that the BGP session initiated over a configured interface uses the authentication key assigned to that interface regardless of the peer’s IP address.
You can
configure authentication for BGP unnumbered peers under the [edit
protocols bgp group group-name dynamic-neighbor
dyn-name] hierarchy,
- authentication-algorithm: Specifies the authentication algorithm
to be used. The supported algorithms are
aes-128-cmac-96,ao,hmac-sha-1-96, andmd5. - authentication-key: Defines the TCP-MD5 authentication key.
- authentication-key-chain: Specifies the
authentication key-chain used for TCP-AO or TCP Keychain authentication.
Note: When an authentication algorithm is specified, it must be configured with a key-chain and cannot be used with key.
We also support nonstop active routing (NSR) implementing BGP unnumbered peer sessions using interface-scoped authentication. NSR ensures that BGP sessions remain uninterrupted during control-plane failovers by preserving protocol state across the Routing Engine switchover. When combined with interface-scoped authentication, NSR allows BGP sessions establish over unnumbered interfaces to maintain their authenticated state even during system transitions. This is particularly valuable in high-availability environments where maintaining secure and persistent routing sessions is critical.
Benefits of BGP Unnumbered Peering
-
Establishes a secure BGP peering on enabling authentication for a BGP unnumbered session.
Limitations
-
Changing the TCP MD5 key for an established BGP session might flap or restart the session.
-
This functionality is limited to single-hop connectivity in symmetric routing scenarios.
How to Configure Interface-Scoped TCP Authentication for BGP Unnumbered Peers
To enable the BGP unnumbered sessions with interface-scoped TCP authentication,
configure the following options under the [edit protocols bgp group
name dynamic-neighbor
name] hierarchy.
[edit protocols bgp group name dynamic-neighbor name] user@host# set authentication-algorithm Authentication algorithm name user@host# set authentication-key MD5 authentication key (secret) user@host# set authentication-key-chain Key chain name
Action
Consider the following configuration scenarios for BGP authentication.
- Use case 1: BGP Unnumbered session authenticated with Interface-scoped TCP-MD5 under default routing instance
- Use case 2: BGP Unnumbered session with Interface-scoped TCP-MD5 authentication and interface-range configuration under default routing instance (Junos EVO only)
- Use case 3: BGP Unnumbered sessions authenticated with Interface-scoped TCP-MD5 under non-default routing instance
- Use case 4: BGP Unnumbered sessions authenticated with Interface-scoped TCP-AO authentication
- Use case 5: BGP Unnumbered sessions authenticated with Interface-scoped Keychain authentication under default routing instance
Use case 1: BGP Unnumbered session authenticated with Interface-scoped TCP-MD5 under default routing instance
Use the following configuration snippet to configure interface-scoped MD5 authentication for BGP unnumbered session using IPv6 link-local address for et-0/0/1.0 interface under the default routing instance.
set interfaces et-0/0/1 unit 0 family inet6 set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128 set routing-options router-id 1.1.1.1 set routing-options autonomous-system 65001 set routing-options nonstop-routing set protocols router-advertisement interface et-0/0/1.0 set protocols bgp group test peer-as 65002 set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery interface et-0/0/1.0 set protocols bgp group test dynamic-neighbor ndp authentication-key "$9$mPF/tpB1Eyk.tORcvMX7-dwg"
Use case 2: BGP Unnumbered session with Interface-scoped TCP-MD5 authentication and interface-range configuration under default routing instance (Junos EVO only)
Use the following configuration snippet to configure interface-scoped MD5 authentication for BGP unnumbered session using interface-range configuration under default routing instance.
set routing-options router-id 1.1.1.1 set routing-options autonomous-system 65001 set routing-options nonstop-routing set interfaces interface-range to-range member "et-0/0/[1-3]" set interfaces interface-range to-range unit 0 family inet6 set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128 set protocols router-advertisement interface to-range set protocols bgp group test type external set protocols bgp group test peer-as 65002 set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery interface to-range set protocols bgp group test dynamic-neighbor ndp authentication-key "$9$mPF/tpB1Eyk.tORcvMX7-dwg"
Use case 3: BGP Unnumbered sessions authenticated with Interface-scoped TCP-MD5 under non-default routing instance
Use the following configuration snippet to configure interface-scoped MD5 authentication with BGP unnumbered session under non-default routing instance.
set routing-options router-id 1.1.1.1 set routing-options autonomous-system 65001 set routing-options nonstop-routing set interfaces et-0/0/5 unit 0 family inet6 set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128 set interfaces lo0 unit 1 family inet6 address 2001:da18::1/128 set protocols router-advertisement interface et-0/0/5.0 set routing-instances vrf1 instance-type vrf set routing-instances vrf1 routing-options autonomous-system 6501 set routing-instances vrf1 routing-options router-id 11.11.11.1 set routing-instances vrf1 protocols bgp group test-v6 type external set routing-instances vrf1 protocols bgp group test-v6 peer-as 6502 set routing-instances vrf1 protocols bgp group test-v6 dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set routing-instances vrf1 protocols bgp group test-v6 dynamic-neighbor ndp peer-auto-discovery interface et-0/0/5.0 set routing-instances vrf1 protocols bgp group test-v6 dynamic-neighbor ndp authentication-key "$9$mPF/tpB1Eyk.tORcvMX7-dwg" set routing-instances vrf1 interface et-0/0/5.0 set routing-instances vrf1 interface lo0.1 set routing-instances vrf1 route-distinguisher 65500:2 set routing-instances vrf1 vrf-target target:65520:200
Use case 4: BGP Unnumbered sessions authenticated with Interface-scoped TCP-AO authentication
Use the following configuration snippet to configure interface-scoped TCP-AO authentication for BGP unnumbered session under default routing instance.
set security authentication-key-chains key-chain tcpao key 1 secret "$9$OMjY1IcrlMXxdtuRSlKx7Ygo" set security authentication-key-chains key-chain tcpao key 1 start-time "2021-2-2.21:53:00 -0800" set security authentication-key-chains key-chain tcpao key 1 algorithm ao set security authentication-key-chains key-chain tcpao key 1 ao-attribute send-id 1 set security authentication-key-chains key-chain tcpao key 1 ao-attribute recv-id 1 set security authentication-key-chains key-chain tcpao key 1 ao-attribute cryptographic-algorithm hmac-sha-1-96 set routing-options router-id 1.1.1.1 set routing-options autonomous-system 65001 set routing-options nonstop-routing set interfaces et-0/0/1 unit 0 family inet6 set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128 set protocols router-advertisement interface et-0/0/1.0 set protocols bgp group test type external set protocols bgp group test peer-as 65002 set protocols bgp group test dynamic-neighbor ndp authentication-algorithm ao set protocols bgp group test dynamic-neighbor ndp authentication-key-chain tcpao set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group test dynamic-neighbor ndp peer-auto-discovery interface et-0/0/1.0
Use case 5: BGP Unnumbered sessions authenticated with Interface-scoped Keychain authentication under default routing instance
Use the following configuration snippet to configure interface-scoped TCP-Keychain authentication for BGP unnumbered session under default routing instance.
set security authentication-key-chains key-chain chain1 key 1 secret "$9$Ueji.f5F/9paZ" set security authentication-key-chains key-chain chain1 key 1 start-time "2025-12-2.09:56:19 +0530" set interfaces et-0/0/3 unit 0 family inet6 set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128 set protocols router-advertisement interface et-0/0/3.0 set protocols bgp group test type external set protocols bgp group test peer-as 65002 set protocols bgp group test local-as 65001 set protocols bgp group test dynamic-neighbor test authentication-algorithm aes-128-cmac-96 set protocols bgp group test dynamic-neighbor test authentication-key-chain chain1 set protocols bgp group test dynamic-neighbor test peer-auto-discovery family inet6 ipv6-nd set protocols bgp group test dynamic-neighbor test peer-auto-discovery interface et-0/0/3.0
Validate
Use the show bgp neighbor command to verify interface-scoped
authentication for BGP Unnumbered peers.
Output
In this example output, you see the verified interface-scoped authentication key-chain and algorithm for the two BGP peers.
user@host> show bgp neighbor
Peer: fe80::5604:17ff:fe00:5701%ge-0/0/0.0+179 AS 65002 Local: fe80::5604:17ff:fe00:4eba%ge-0/0/0.0+59438 AS 65001
Group: test Routing-Instance: master
Forwarding routing-instance: master
Type: External State: Established Flags: <Sync AutoDiscoveredNdp>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: <PeerAS LocalAS Refresh>
Options: <AutheKeyChain>
Options: <GracefulShutdownRcv>
Authentication key chain: ao-chain1
Authentication algorithm: ao
Holdtime: 90 Preference: 170
Graceful Shutdown Receiver local-preference: 0
Local AS: 65001 Local System AS: 65001
Number of flaps: 0
Up/Down Time : 16
Receive eBGP Origin Validation community: Reject
Malformed attributes log interval: 300 route limit: 1000
Peer ID: 128.51.153.18 Local ID: 128.51.150.11 Active Holdtime: 90
Keepalive Interval: 30 Group index: 0 Peer index: 0 SNMP index: 1
I/O Session Thread: bgpio-0 State: Enabled
BFD: disabled, down
Local Interface: ge-0/0/0.0
NLRI for restart configured on peer: inet6-unicast
NLRI advertised by peer: inet6-unicast
NLRI for this session: inet6-unicast
AS loop check: Domain Scoped
Peer supports Refresh capability (2)
Peer supports 4 byte AS extension (peer-as 65002)
Peer does not support Addpath
Table inet6.0 Bit: 20000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 0
Received prefixes: 0
Accepted prefixes: 0
Suppressed due to damping: 0
Advertised prefixes: 0
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
Restart flag received from the peer: Notification
NLRI that restart is negotiated for: inet6-unicast
NLRI of received end-of-rib markers: inet6-unicast
NLRI of all end-of-rib markers sent: inet6-unicast
Peer does not support LLGR Restarter functionality
Inbound convergence status: Complete
Time taken: 0
Reason: Received end-of-rib for all NLRI
Family inet6-unicast
Initial send time: 0
Initial recv time: 0
Last traffic (seconds): Received 16 Sent 16 Checked 17
Input messages: Total 3 Updates 1 Refreshes 0 Octets 112
Output messages: Total 2 Updates 0 Refreshes 0 Octets 49
Output Queue[1]: 0 (inet6.0, inet6-unicast)