BGP 自動検出ネイバー
SUMMARY BGP自動検出ネイバーを使用して、リモートまたはローカルネイバーIPアドレスを指定するのではなく、インターフェイス別にBGPピアリングを設定します。
BGP 自動検出されたネイバーを理解する
SUMMARY BGP 自動検出ネイバーを使用する リモートまたはローカルネイバーIPアドレスを指定するのではなく、インターフェイス別にBGPピアリングを設定します。
ルーター間でBGPセッションを確立するには、アドレスごとにBGPグループとピアを明示的に設定する必要があります。BGPピアリングセッションでは、TCP通信のエンドポイントの送信元と宛先のIPアドレスを識別する必要があります。そのため、これらのアドレスを明示的に設定することは、ネットワークのスケールアウトに障害となり、設定ミスが発生する可能性があります。
BGPの設定を効率化するために、BGPからピアごとのアドレスを設定する必要がなくなりました。BGP 自動検出ネイバーを使用する リモートまたはローカルネイバーIPアドレスを指定するのではなく、インターフェイス別にBGPピアリングを設定します。これには、TCPピアリングセッションで使用するIPアドレスを検出するための暗示的またはプロトコルメカニズムの使用が含まれます。

インターフェイス アドレスに基づくピアリングの変更を回避するには、ピアリングの動作とアドレスの使用を明示的に設定する必要があります。 設定やアドレスの有効性による変更(例:IPv6 DAD(重複アドレス検出))。
BGPは、設定に基づいて、ピアリングするアドレスファミリーを決定します。ピアリングセッションは、決定されたファミリーのインターフェイスアドレスの可用性に基づいて起動します。ピアリンクローカルアドレスは、IPv6ネイバー検出(RFC4861)を使用して発見され、そのネイバーに向けたBGPセッションを作成します。IPv6インターフェイスにアドレスが設定されていない場合でも、リンクローカルアドレスが生成されます。
この機能が機能するためには、IPv6ネイバー検出を有効にする必要があります。
BGP 自動検出ネイバーのメリット
-
シングルホップ 外部 BGP(EBGP)への IGP 導入を簡素化
-
IPアドレスではなく 、インターフェイスとインターフェイス範囲で ネイバーを設定します。
-
動的ネイバーグループで両側の設定を最小限に抑える
例:BGP 自動検出ネイバーの設定
SUMMARY この例では、BGP自動検出ネイバーを設定する方法を示しています。
概要
Junos OS リリース 21.1R1 以降、IPv6 Neighbor Discovery Protocol(ND)を使用して BGP 自動検出ネイバーをサポートしています。この機能により、BGPは直接接続されたネイバールーターのリンクローカル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)番号を設定する
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ネイバーに関する情報を示しています。