BGP 자동 검색 이웃
SUMMARY BGP 자동 검색 이웃을 사용하여 원격 또는 로컬 이웃 IP 주소를 지정하는 대신 인터페이스별로 BGP 피어링을 구성합니다.
BGP 자동 검색 이웃 이해하기
SUMMARY BGP 자동 검색 인접 장치 사용 원격 또는 로컬 인접 IP 주소를 지정하는 대신 인터페이스별로 BGP 피어링을 구성합니다.
라우터 간에 BGP 세션을 설정하려면 주소별로 BGP 그룹 및 피어를 명시적으로 구성해야 합니다. BGP 피어링 세션은 TCP 통신의 엔드포인트에 대한 소스 및 대상 IP 주소를 식별해야 합니다. 따라서 이러한 주소를 명시적으로 구성하는 것은 네트워크 스케일아웃의 장애물이자 잘못된 구성의 기회입니다.
BGP 구성을 간소화하기 위해 BGP에서 피어별 주소를 구성할 필요가 없습니다. BGP 자동 검색 인접 장치 사용 원격 또는 로컬 인접 IP 주소를 지정하는 대신 인터페이스별로 BGP 피어링을 구성합니다. 여기에는 TCP 피어링 세션에서 사용하기 위한 IP 주소를 검색하기 위한 암시적 또는 프로토콜 메커니즘의 사용이 포함됩니다.

인터페이스 주소에 기반한 피어링 변경을 방지하기 위해 피어링 동작 및 주소 사용량을 명시적으로 구성해야 합니다. 구성 또는 주소 유효성으로 인한 변경 사항(예: DAD(IPv6 중복 주소 탐지)).
BGP는 구성을 기반으로 피어오버할 주소 패밀리를 결정합니다. 피어링 세션은 결정된 패밀리에 대한 인터페이스 주소의 가용성을 기반으로 합니다. 피어 link-local 주소는 IPv6 인접 검색(RFC4861)을 사용하여 발견되고 해당 이웃을 향해 BGP 세션을 생성합니다. IPv6 인터페이스에 주소가 구성되지 않은 경우에도 link-local 주소가 생성됩니다.
이 기능이 작동하려면 IPv6 인접 검색을 활성화해야 합니다.
BGP 자동 검색 인접 라우터의 이점
-
단일 홉 외부 BGP(EBGP)에 대한 IGP 구축 간소화
-
IP 주소 대신 인터페이스 및 인터페이스 범위별로 neighbor 구성
-
동적 이웃 그룹으로 양쪽에서 구성 최소화
예를 들면 다음과 같습니다. BGP 자동 검색 이웃 구성
SUMMARY 이 예는 BGP 자동 검색 이웃을 구성하는 방법을 보여줍니다.
개요
Junos OS 릴리스 21.1R1부터 IPv6 인접 탐색 프로토콜(ND)을 사용하여 BGP 자동 검색 이웃을 지원합니다. 이 기능을 통해 BGP는 직접 연결된 이웃 라우터의 link-local IPv6 주소를 사용하여 피어 이웃 세션을 생성할 수 있습니다. 원격 또는 로컬 이웃 IP 주소를 지정할 필요가 없습니다.
토폴로지
다음 그림에는 단순화된 샘플 토폴로지가 표시됩니다.

요구 사항
이 예는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
MX 시리즈 라우터
Junos OS 릴리스 21.1R1 이상
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 명령을 복사하여 [edit] 계층 수준에서 CLI로 붙여 넣습니다.
VM1
set interfaces interface-range tor-to-leaf member ge-0/0/4 set interfaces interface-range tor-to-leaf unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.1.1/24 set interfaces lo0 unit 0 family inet address 192.168.30.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:70::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64500 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface tor-to-leaf set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop set protocols bgp group to-leaf-v4 export DIRECT-RTS set protocols bgp group to-leaf-v4 local-as 64500 set protocols bgp group to-leaf-v4 neighbor 192.168.1.2 peer-as 64496
VM2
set interfaces interface-range tor-to-leaf member ge-0/0/4 set interfaces interface-range tor-to-leaf unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.2.1/24 set interfaces lo0 unit 0 family inet address 192.168.30.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:60::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64501 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface tor-to-leaf set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop set protocols bgp group to-leaf-v4 export DIRECT-RTS set protocols bgp group to-leaf-v4 local-as 64501 set protocols bgp group to-leaf-v4 neighbor 192.168.2.2 peer-as 64497
리프 1
set interfaces interface-range to-spine member "ge-0/0/[0-4]" set interfaces interface-range to-spine unit 0 family inet set interfaces interface-range to-spine unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.1.2/24 set interfaces lo0 unit 0 family inet address 192.168.10.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:90::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64496 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-spine max-advertisement-interval 9 set protocols router-advertisement interface to-spine min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-spine set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-crpd-v4 family inet unicast extended-nexthop set protocols bgp group to-crpd-v4 export DIRECT-RTS set protocols bgp group to-crpd-v4 neighbor 192.168.1.1 peer-as 64500
리프 2
set interfaces interface-range to-spine member "ge-0/0/[0-4]" set interfaces interface-range to-spine unit 0 family inet set interfaces interface-range to-spine unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.2.2/24 set interfaces lo0 unit 0 family inet address 192.168.10.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:90::2/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64497 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-spine max-advertisement-interval 9 set protocols router-advertisement interface to-spine min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-spine set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-crpd-v4 family inet unicast extended-nexthop set protocols bgp group to-crpd-v4 export DIRECT-RTS set protocols bgp group to-crpd-v4 neighbor 192.168.2.1 peer-as 64501
스파인 1
set interfaces interface-range to-leaf member "ge-0/0/[0-3]" set interfaces interface-range to-leaf unit 0 family inet set interfaces interface-range to-leaf unit 0 family inet6 set interfaces lo0 unit 0 family inet address 192.168.20.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:80::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64498 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-leaf max-advertisement-interval 9 set protocols router-advertisement interface to-leaf min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-leaf set protocols bgp group autodisc peer-as-list a-list
스파인 2
set interfaces interface-range to-leaf member "ge-0/0/[0-3]" set interfaces interface-range to-leaf unit 0 family inet set interfaces interface-range to-leaf unit 0 family inet6 set interfaces lo0 unit 0 family inet address 192.168.20.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:80::2/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64499 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-leaf max-advertisement-interval 9 set protocols router-advertisement interface to-leaf min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-leaf set protocols bgp group autodisc peer-as-list a-list
VM1 구성
BGP 자동 검색 인접 라우터를 구성하려면 VM1에서 다음 단계를 수행하십시오.
-
디바이스 인터페이스를 구성합니다.
user@VM1# set interfaces interface-range tor-to-leaf member ge-0/0/4 user@VM1# set interfaces interface-range tor-to-leaf unit 0 family inet6
-
루프백 인터페이스를 생성하고 IP 주소를 구성합니다.
user@VM1# set interfaces lo0 unit 0 family inet address 192.168.30.1/32 user@VM1# set interfaces lo0 unit 0 family inet6 address 2001:db8:70::1/128
-
라우팅 정책을 활성화합니다.
user@VM1# set policy-options policy-statement DIRECT-RTS from protocol direct user@VM1# set policy-options policy-statement DIRECT-RTS then accept user@VM1# set policy-options policy-statement lb then load-balance per-packet user@VM1# set policy-options as-list a-list members 1-65535
-
AS(Autonomous System) 번호 구성
user@VM1# set routing-options autonomous-system 64500
-
패킷당 정책을 적용하여 트래픽 및 ECMP의 로드 밸런싱을 활성화합니다.
user@VM1# set routing-options forwarding-table export lb user@VM1# set routing-options forwarding-table ecmp-fast-reroute
-
내부 및 외부 피어링 세션을 설정하도록 BGP를 구성합니다.
user@VM1# set protocols bgp group autodisc family inet unicast extended-nexthop user@VM1# set protocols bgp group autodisc family inet6 unicast user@VM1# set protocols bgp group autodisc export DIRECT-RTS user@VM1# set protocols bgp group autodisc multipath multiple-as user@VM1# set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd user@VM1# set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf user@VM1# set protocols bgp group autodisc peer-as-list a-list user@VM1# set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop user@VM1# set protocols bgp group to-leaf-v4 export DIRECT-RTS user@VM1# set protocols bgp group to-leaf-v4 local-as 5 user@VM1# set protocols bgp group to-leaf-v4 neighbor 192.168.1.2 peer-as 1
-
디바이스 구성이 완료되면 구성을 커밋합니다.
user@VM1# commit
결과
구성 모드에서 show interfaces를 입력하여 구성을 확인하고, 프로토콜을 표시하고, 정책 옵션을 표시하고, routing-options 명령을 표시합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit] user@VM1# show interfaces interface-range tor-to-leaf { member ge-0/0/4; unit 0 { family inet6; } } ge-0/0/4 { unit 0 { family inet { address 192.168.1.1/24; } } } lo0 { unit 0 { family inet { address 192.168.30.1/32; } family inet6 { address 2001:db8:70::1/128; } } }
[edit] user@VM1# show protocols router-advertisement { interface tor-to-leaf; } bgp { group autodisc { family inet { unicast { extended-nexthop; } } family inet6 { unicast; } export DIRECT-RTS; multipath { multiple-as; } dynamic-neighbor ndp { peer-auto-discovery { family inet6 { ipv6-nd; } interface tor-to-leaf; } } peer-as-list a-list; } group to-leaf-v4 { family inet { unicast { extended-nexthop; } } export DIRECT-RTS; local-as 64500; neighbor 192.168.1.2 { peer-as 64496; } } }
[edit] user@VM1# show policy-options policy-statement DIRECT-RTS { from protocol direct; then accept; } policy-statement lb { then { load-balance per-packet; } } as-list a-list members 1-65535;
[edit] user@VM1# show policy-options policy-statement DIRECT-RTS { from protocol direct; then accept; } policy-statement lb { then { load-balance per-packet; } } as-list a-list members 1-65535; [
edit] user@VM1# show routing-options autonomous-system 64500; forwarding-table { export lb; ecmp-fast-reroute; }
확인
구성이 제대로 작동하는지 확인합니다.
자동 검색 이웃 확인
목적
자동 검색된 BGP neighbor를 확인합니다.
실행
운영 모드에서 명령을 실행합니다 show bgp summary auto-discovered
.
On Leaf1
user@Leaf1> show bgp summary auto-discovered Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 2 Peers: 5 Down peers: 1 Auto-discovered peers: 4 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 24 20 0 0 0 0 inet6.0 16 16 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... fe80::5668:a3ff:fe16:1049%ge-0/0/3.0 64499 194 195 0 1 1:25:18 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:104c%ge-0/0/4.0 64499 193 195 0 1 1:25:18 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:12c9%ge-0/0/1.0 64498 217 223 0 1 1:35:53 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:12ce%ge-0/0/2.0 64498 218 223 0 1 1:35:57 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0
On Spine1
user@Spine1> show bgp summary auto-discovered Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 1 Peers: 4 Down peers: 0 Auto-discovered peers: 4 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 24 20 0 0 0 0 inet6.0 16 16 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... fe80::5668:a3ff:fe16:2e7%ge-0/0/0.0 64496 245 237 0 0 1:45:19 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:2f2%ge-0/0/1.0 64496 245 238 0 0 1:45:23 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:e49%ge-0/0/2.0 64497 245 243 0 0 1:45:19 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:e59%ge-0/0/3.0 64497 247 248 0 0 1:45:23 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0
의미
출력은 자동 검색된 bgp neighbor의 요약을 보여줍니다. 자동 검색된 피어의 수와 해당 세부 정보를 볼 수 있습니다.
BGP 자동 검색 피어 확인
목적
자동 검색된 BGP neighbor를 확인합니다.
실행
운영 모드에서 명령을 실행합니다 show bgp neighbor auto-discovered
.
On Leaf1
user@Leaf1> show bgp neighbor auto-discovered Peer: fe80::5668:a3ff:fe16:1049%ge-0/0/3.0+65265 AS 64499 Local: fe80::5668:a3ff:fe16:2f6%ge-0/0/3.0+179 AS 64496 Group: autodisc Routing-Instance: master Forwarding routing-instance: master Type: External State: Established Flags: <Sync PeerAsList AutoDiscoveredNdp> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ DIRECT-RTS ] Options: <AddressFamily Multipath Refresh> Options: <MultipathAs> Options: <GracefulShutdownRcv> Address families configured: inet-unicast inet6-unicast Holdtime: 90 Preference: 170 Graceful Shutdown Receiver local-preference: 0 Number of flaps: 1 Last flap event: RecvNotify Error: 'Cease' Sent: 0 Recv: 1 Peer ID: 128.49.102.24 Local ID: 128.49.102.139 Active Holdtime: 90 Keepalive Interval: 30 Group index: 2 Peer index: 2 SNMP index: 9 I/O Session Thread: bgpio-0 State: Enabled BFD: disabled, down Local Interface: ge-0/0/3.0 NLRI for restart configured on peer: inet-unicast inet6-unicast NLRI advertised by peer: inet-unicast inet6-unicast NLRI for this session: inet-unicast inet6-unicast Peer supports Refresh capability (2) 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: inet-unicast inet6-unicast NLRI of received end-of-rib markers: inet-unicast inet6-unicast NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast ....................
On Spine1
user@Spine1> show bgp neighbor auto-discovered Peer: fe80::5668:a3ff:fe16:2e7%ge-0/0/0.0+60458 AS 64496 Local: fe80::5668:a3ff:fe16:12c9%ge-0/0/0.0+179 AS 64498 Group: autodisc Routing-Instance: master Forwarding routing-instance: master Type: External State: Established Flags: <Sync PeerAsList AutoDiscoveredNdp> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ DIRECT-RTS ] Options: <AddressFamily Multipath Refresh> Options: <MultipathAs> Options: <GracefulShutdownRcv> Address families configured: inet-unicast inet6-unicast Holdtime: 90 Preference: 170 Graceful Shutdown Receiver local-preference: 0 Number of flaps: 0 Peer ID: 128.49.102.139 Local ID: 128.49.103.129 Active Holdtime: 90 Keepalive Interval: 30 Group index: 1 Peer index: 3 SNMP index: 7 I/O Session Thread: bgpio-0 State: Enabled BFD: disabled, down Local Interface: ge-0/0/0.0 NLRI for restart configured on peer: inet-unicast inet6-unicast NLRI advertised by peer: inet-unicast inet6-unicast NLRI for this session: inet-unicast inet6-unicast Peer supports Refresh capability (2) 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: inet-unicast inet6-unicast NLRI of received end-of-rib markers: inet-unicast inet6-unicast NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 64496) Peer does not support Addpath NLRI that we support extended nexthop encoding for: inet-unicast NLRI that peer supports extended nexthop encoding for: inet-unicast Table inet.0 Bit: 20000 ....................
의미
출력은 자동 검색된 BGP neighbor에 대한 정보를 보여줍니다.