인터페이스 범위 TCP 인증
BGP 번호가 지정되지 않은 피어에 대한 인터페이스 범위 인증 이해
BGP 번호가 지정되지 않은 피어링을 구축할 때 라우터는 IPv6 NDP(Neighbor Discovery Protocol)를 사용하여 자동으로 이웃을 발견하고 IPv6 link-local 주소를 통해 세션을 설정합니다. 피어의 IP 주소에 관계없이 인증 키를 논리적 인터페이스와 직접 연결하여 동적으로 검색된 피어에 대해 인터페이스 범위 TCP 인증(MD5, TCP-AO, Keychain 인증)를 활성화할 수 있습니다.
라우터는 BGP 번호가 지정되지 않은 피어링을 통해 IPv6 link-local 주소를 사용하여 BGP 세션을 설정하므로 각 point-to-point 인터페이스에 고유한 IP 주소를 할당할 필요가 없습니다. 이 접근 방식은 네트워크 구성을 단순화하지만 피어의 IP 주소 또는 IP 접두사를 미리 아는 데 의존하는 기존 TCP 인증 메커니즘에는 문제가 생깁니다. 인터페이스 범위 인증 접근 방식은 인증 키를 논리적 인터페이스와 직접 연결합니다. 이 구성은 구성된 인터페이스를 통해 시작된 BGP 세션이 피어의 IP 주소에 관계없이 해당 인터페이스에 할당된 인증 키를 사용하도록 보장합니다.
계층 아래에서 번호가 지정되지 않은 BGP 피어에 대한 인증 구성할 수 있습니다.[edit protocols bgp group group-name dynamic-neighbor dyn-name]
- 인증 알고리즘: 사용할 인증 알고리즘을 지정합니다. 지원되는 알고리즘은
aes-128-cmac-96,ao,hmac-sha-1-96, 및md5입니다. - 인증 키: TCP-MD5 인증 키를 정의합니다.
- 인증-key-chain: TCP-AO 또는 TCP 키체인 인증에 사용되는 인증 키 체인을 지정합니다. 참고: 인증 알고리즘이 지정되면 키 체인으로 구성해야 하며 키와 함께 사용할 수 없습니다.
또한 인터페이스 범위 인증을 사용하여 BGP 번호가 지정되지 않은 피어 세션을 구현하는 NSR(Nonstop Active Routing)도 지원합니다. NSR은 라우팅 엔진 전환 전반에서 프로토콜 상태를 유지하여 컨트롤 플레인 페일오버 중에 BGP 세션이 중단되지 않도록 보장합니다. 인터페이스 범위 인증과 결합된 경우 NSR은 BGP 세션이 번호가 지정되지 않은 인터페이스를 통해 설정되어 시스템 전환 중에도 인증된 상태를 유지할 수 있도록 합니다. 이는 안전하고 지속적인 라우팅 세션을 유지하는 것이 중요한 고가용성 환경에서 특히 중요합니다.
BGP 번호가 지정되지 않은 피어링의 이점
-
BGP 번호가 지정되지 않은 세션에 대한 인증 활성화 시 보안 BGP 피어링을 설정합니다.
제한 사항
-
설정된 BGP 세션에 대한 TCP MD5 키를 변경하면 세션이 플랩되거나 다시 시작될 수 있습니다.
-
이 기능은 대칭 라우팅 시나리오에서 단일 홉 연결로 제한됩니다.
BGP 번호가 지정되지 않은 피어에 대한 인터페이스 범위 TCP 인증 구성 방법
인터페이스 범위 TCP 인증으로 BGP 번호가 지정되지 않은 세션을 활성화하려면 계층 아래에서 [edit protocols bgp group name dynamic-neighbor name] 다음 옵션을 구성합니다.
[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
작업
BGP 인증에 대한 다음 구성 시나리오를 고려하십시오.
- 사용 사례 1: BGP 기본 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5로 인증된 번호가 지정되지 않은 세션
- 사용 사례 2: 기본 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5 인증 및 인터페이스 범위 구성을 사용하는 BGP 번호가 지정되지 않은 세션(Junos EVO만 해당)
- 사용 사례 3: BGP 기본이 아닌 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5로 인증된 번호가 지정되지 않은 세션
- 사용 사례 4: BGP 인터페이스 범위 TCP-AO 인증으로 인증된 번호가 지정되지 않은 세션
- 사용 사례 5: BGP 기본 라우팅 인스턴스에서 인터페이스 범위 키체인 인증으로 인증된 번호가 지정되지 않은 세션
사용 사례 1: 기본 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5로 인증된 BGP 번호가 지정되지 않은 세션
다음 구성 코드 조각을 사용하여 기본 라우팅 인스턴스에서 et-0/0/1.0 인터페이스에 대한 IPv6 link-local 주소를 사용하여 BGP 번호가 지정되지 않은 세션에 대한 인터페이스 범위 MD5 인증을 구성합니다.
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"
사용 사례 2: 기본 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5 인증 및 인터페이스 범위 구성이 있는 BGP 번호가 지정되지 않은 세션(Junos EVO만 해당)
다음 구성 코드 조각을 사용하여 기본 라우팅 인스턴스에서 interface-range 구성을 사용하여 BGP 번호가 지정되지 않은 세션에 대한 인터페이스 범위 MD5 인증을 구성합니다.
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"
사용 사례 3: BGP 기본이 아닌 라우팅 인스턴스에서 인터페이스 범위 TCP-MD5로 인증된 번호가 지정되지 않은 세션
다음 구성 코드 조각을 사용하여 기본이 아닌 라우팅 인스턴스에서 BGP 번호가 지정되지 않은 세션으로 인터페이스 범위 MD5 인증을 구성합니다.
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
사용 사례 4: 인터페이스 범위 TCP-AO 인증으로 인증된 BGP 번호가 지정되지 않은 세션 인증
다음 구성 코드 조각을 사용하여 기본 라우팅 인스턴스에서 BGP 번호가 지정되지 않은 세션에 대한 인터페이스 범위 TCP-AO 인증을 구성합니다.
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
사용 사례 5: BGP 기본 라우팅 인스턴스에서 인터페이스 범위 키체인 인증으로 인증된 번호가 지정되지 않은 세션
다음 구성 코드 조각을 사용하여 기본 라우팅 인스턴스에서 BGP 번호가 지정되지 않은 세션에 대한 인터페이스 범위 TCP 키 체인 인증을 구성합니다.
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
검증
이 명령을 사용하여 show bgp neighbor BGP 번호가 지정되지 않은 피어에 대한 인터페이스 범위 인증을 확인합니다.
출력
이 예제 출력에서는 두 BGP 피어에 대해 확인된 인터페이스 범위 인증 키 체인과 알고리즘을 확인할 수 있습니다.
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)