NutaNice Xperience

主にNutanix製品を検証したり触ったりした結果をつづっています。※このブログの内容は個人の見識や見解をもとに作成しています。参考にされる場合は自己責任でご活用ください。実際に製品を使用される場合は、メーカードキュメントの手順に従い実施してください。

Flow Virtual NetworkingのネットワークゲートウェイをVyOSとVPN接続してみる②(NAT接続 - BGP) 【AOS 7.0 AHV 10.0/pc.2024.3】

 ※この記事は「AOS 7.0 AHV10.0 Prism Central pc.2024.3」時点の情報をもとに作成しています。その後の機能アップデートについてはメーカーの公開情報をご確認ください。

NutanixのFlow Virtual Networkingの連載については以下の記事にリンクをまとめています。ほかの記事にもこちらからアクセス可能です。tomomartin.hateblo.jp

前回の記事では、FVNでNutanixのネイティブ機能のVPNゲートウェイとVyOSをVPNで接続してみました。今回は、さらにBGPを有効化してみたいと思います。

目次

1.今回の環境

 AOS: 7.0.1
AHV: 10.0.1
Prism Central: pc.2024.3.1.1
VyOS: 2025.06.01-0024-rolling

▽今回の環境のイメージ図は以下の通りです。前回の環境の踏襲ですが、BGPを有効化してVPN接続を作成してみます。

なお、VPNゲートウェイの作成やVPN接続の作成については前回までの記事をご参照ください。

2. BGPの設定

▽VyOSに以下の通りBGPの設定を追加しました。ポイントは、BGP neighborのリモートIPをFloating IPではなく、VTIのIPアドレス(10.20.20.2)にすることでしょうか。必要な部分だけお見せしています。

vyos@vyos:~$ show configuration
protocols {
    bgp {
        address-family {
            ipv4-unicast {
                redistribute {
                    connected {
                    }
                }
            }
        }
        interface vti0 {
        }
        neighbor 10.20.20.2 {
            address-family {
                ipv4-unicast {
                }
            }
            password ****************
            remote-as 65002
        }
        system-as 65001
    }
vyos@vyos:~$

▽BGPを使用する場合は、Nutanix側のVPNゲートウェイ作成時に、「eBGP」を選択して、ASNとパスワードを設定します。 

▽あとは通常通り、VPN接続を作成すると、設定内容が問題なければ以下のようにIPSecとEBGPのステータスがCennectedとEstablishedになります。

3.BGPの接続とルート情報の確認

作成されたBGPのセッションは、VyOS側でも以下の通り確認できます。

vyos@vyos:~$ show ip bgp neighbors 10.20.20.2
BGP neighbor is 10.20.20.2, remote AS 65002, local AS 65001, external link
  Local Role: undefined
  Remote Role: undefined
Hostname: vyos
  BGP version 4, remote router ID 100.64.1.172, local router ID 172.22.7.5
  BGP state = Established, up for 00:00:51
  Last read 00:00:50, Last write 00:00:50
  Hold time is 180 seconds, keepalive interval is 60 seconds
  Configured hold time is 180 seconds, keepalive interval is 60 seconds
  Configured tcp-mss is 0, synced tcp-mss is 1316
  Configured conditional advertisements interval is 60 seconds
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                 81         81
    Notifications:         54          0
    Updates:              390        156
    Keepalives:           255         81
    Route Refresh:          0          0
    Capability:             0          0
    Total:                780        318
  Minimum time between advertisement runs is 0 seconds

 For address family: IPv4 Unicast
  Update group 82, subgroup 82
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  1 accepted prefixes

  Connections established 81; dropped 80
  Last reset 00:01:25,  No AFI/SAFI activated for peer (n/a)
  External BGP neighbor may be up to 1 hops away.
Local host: 10.20.20.1, Local port: 179
Foreign host: 10.20.20.2, Foreign port: 37080
Nexthop: 10.20.20.1
Nexthop global: fe80::f4a2:c4ff:fe09:73c9
Nexthop local: fe80::f4a2:c4ff:fe09:73c9
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 120
Estimated round trip time: 0 ms
Peer Authentication Enabled
Read thread: on  Write thread: on  FD used: 23

vyos@vyos:~$

VPC側のVPNから受け取ったオーバーレイサブネットのルート情報も自動追加されています。

vyos@vyos:~$ show ip route
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

S>* 0.0.0.0/0 [1/0] via 172.22.7.1, eth1, weight 1, 13:11:49
C>* 10.10.5.0/24 is directly connected, eth2, weight 1, 13:11:52
L>* 10.10.5.1/32 is directly connected, eth2, weight 1, 13:11:52
C>* 10.20.20.0/30 is directly connected, vti0, weight 1, 00:00:45
L>* 10.20.20.1/32 is directly connected, vti0, weight 1, 00:00:45
C>* 172.22.7.0/24 is directly connected, eth1, weight 1, 13:11:52
L>* 172.22.7.5/32 is directly connected, eth1, weight 1, 13:11:52
B>* 192.168.10.0/24 [20/0] via 10.20.20.2, vti0, weight 1, 00:00:38
vyos@vyos:~$

VPC側のルーティングテーブルにも、VyOSの先にあるネットワークが自動追加されていますね。

以上です。次回は、vTEPを触ってみようかと思います。