BGP 자동 검색된 인접 항목
BGP 자동 검색 인접 항목 이해
SUMMARY BGP 자동 검색 인접 항목 사용 원격 또는 로컬 인접 IP 주소를 지정하는 대신 인터페이스별로 BGP 피어링을 구성할 수 있습니다.
라우터 간에 BGP 세션을 설정하려면 BGP 그룹과 피어를 주소별로 명시적으로 구성해야 합니다 . BGP 피어링 세션 에서는 TCP 통신의 엔드포인트에 대한 소스 및 대상 IP 주소를 식별 해야 합니다. 따라서 이러한 주소를 명시적으로 구성하는 것은 네트워크 확장에 장애가 되며 잘못 구성할 가능성이 있습니다.
BGP 구성을 간소화하기 위해 BGP에서 피어별 주소를 구성할 필요가 없습니다. BGP 자동 검색 인접 항목 사용 원격 또는 로컬 인접 IP 주소를 지정하는 대신 인터페이스별로 BGP 피어링을 구성할 수 있습니다. 여기에는 TCP 피어링 세션에서 사용할 IP 주소를 검색하기 위한 암시적 또는 프로토콜 메커니즘의 사용이 포함됩니다.
피어링 동작 및 주소 사용은 인터페이스 주소에 따라 피어링이 변경되지 않도록 명시적으로 구성되어야 합니다 구성 또는 주소 유효성으로 인한 변경(예: IPv6 DAD(Duplicate Address Detection)).
BGP는 구성에 따라 피어링할 주소 패밀리를 결정합니다. 피어링 세션은 결정된 패밀리에 대한 인터페이스 주소의 가용성에 따라 시작됩니다. 피어 link-local 주소는 IPv6 RFC4861(neighbor discovery)를 사용하여 검색되며 해당 인접 라우터에 대한 BGP 세션을 생성합니다. IPv6 인터페이스에 주소가 구성되지 않은 경우에도 링크-로컬 주소가 생성됩니다.
이 기능이 작동하려면 IPv6 인접 항목 검색을 사용하도록 설정해야 합니다.
BGP 자동 검색 인접 항목의 이점
-
단일 홉 외부 BGP(EBGP)에 대한 IGP 구축 간소화
-
IP 주소 대신 인터페이스 및 인터페이스 범위로 인접 항목을 구성합니다
-
동적 이웃 그룹으로 양쪽의 구성 최소화
예: BGP 자동 검색 인접 항목 구성
SUMMARY 이 예에서는 BGP 자동 검색 인접 항목을 구성하는 방법을 보여 줍니다.
개요
Junos OS 릴리스 21.1R1부터 IPv6 ND(Neighbor Discovery Protocol)를 사용하여 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, show protocols, show policy-options 및 show 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 인접 라우터를 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show bgp summary auto-discovered
리프1
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
스파인1
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 인접 항목의 요약이 표시됩니다. 자동 검색된 피어의 수와 세부 정보를 볼 수 있습니다.
BGP 자동 검색 피어 확인
목적
자동 검색된 BGP 인접 라우터를 확인합니다.
작업
운영 모드에서 show bgp neighbor auto-discovered
명령을 실행합니다.
리프1
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 ....................
스파인1
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 인접 라우터에 대한 정보가 표시됩니다.