2020-07-26 11:34 PM 2020-07-26 11:35 PM 更新
このドキュメントでは、 Cisco Nexus VXLAN EVPN での L3VNI について簡単な紹介、基本設定及び設定方法を紹介いたします。
L3VNI とは、VXLAN において prefix の広報を実現するために使用されます。これにより、VXLAN fabric 外の経路情報を広報することや、VXLAN domain 間の routing が可能となります。
例えば、以下のように Leaf1 が VLAN 100 を、 Leaf2 が VLAN 200 を持っており、それぞれに L3VNI が設定されている場合、L3VNI により広報された prefix 情報に基づき VXLAN 間 routing が実現します。
ここからは、 L3VNI を用いた VXLAN の設定方法に加え、実際の動作について紹介していきます。
※Internet は 8.8.8.8 を持っており、これをVXLAN Fabric 外としています。
各VTEPに疎通性を持たせるため、アンダーレイネットワークを構築します。
また、今回はルーティングプロトコルとしてOSPFを使用し、各LeafではLoopback 0をEVPN MP-BGPで使用するSource I/Fとして設定しておきます。
L9504-1: conf t ! feature ospf ! router ospf 100 router-id 10.10.10.10 ! interface loopback 0 ip address 10.10.10.10/32 ip router ospf 100 area 0 no shutdown ! interface ethernet 1/29 no switchport ip address 192.168.10.1/24 ip ospf network point-to-point ip router ospf 100 area 0 mtu 9216 no shutdown ! interface ethernet 1/30 no switchport ip address 192.168.20.1/24 ip ospf network point-to-point ip router ospf 100 area 0 mtu 9216 no shutdown ! end
G9372-1: conf t ! feature ospf ! router ospf 100 router-id 1.1.1.1 ! interface ethernet 1/3 ! interface ethernet 1/51 mtu 9216 ip address 192.168.10.2/24 ip router ospf 100 area 0 ip ospf network point-to-point ! interface loopback 0 ip address 1.1.1.1/32 ip router ospf 100 area 0 ! end
H9372-2: conf t ! feature ospf ! router ospf 100 router-id 2.2.2.2 ! interface ethernet 1/4 ! interface ethernet 1/51 mtu 9216 ip address 192.168.20.2/24 ip router ospf 100 area 0 ip ospf network point-to-point ! interface loopback 0 ip address 2.2.2.2/32 ip router ospf 100 area 0 ! end
ホストの情報交換やVTEPの検出を行うため、EVPN MP-BGPを設定します。
また、Spineは各LeafのRR(Route Refrector)とします。
L9504-1: conf t ! feature bgp nv overlay evpn ! router bgp 10000 neighbor 1.1.1.1 remote-as 10000 update-source lo 0 address-family l2vpn evpn send-community both route-reflector-client ! neighbor 2.2.2.2 remote-as 10000 update-source lo 0 address-family l2vpn evpn send-community both route-reflector-client ! end
G9372-1 & H9372-2: conf t ! feature bgp nv overlay evpn ! router bgp 10000 neighbor 10.10.10.10 remote-as 10000 update-source lo 0 address-family l2vpn evpn send-community both ! end
VXLANにてL2延伸を行うため、Overlay Networkを構築します。仮想ネットワーク (L2VNI と L3VNI) を定義し、VLAN及びVXLAN Tunnel I/F (NVE I/F) との紐付けを行います。
また、VXLAN でカプセル化する際のSource I/Fとして、Loopback I/F 1を作成します。
加えて、それぞれの Leaf で自身が持つ L2 domain の prefix を BGP で広報します。この際、 Leaf2 は BGW として VXLAN fabric 外の経路情報も広報しています。
※VXLAN 間 routing を試験するため、G9372-1 には L2VNI として 10100を、H9372-2 には L2VNI として 10200 を持たせており、それぞれにL3VNI として 10300 を設定しています。
G9372-1: conf t ! feature vn-segment-vlan-based ! vlan 100 vn-segment 10100 ! vlan 300 vn-segment 10300 ! vrf context vxlan-10300 vni 10300 rd auto address-family ipv4 unicast route-target both 10300:100 route-target both 10300:100 evpn ! fabric forwarding anycast-gateway-mac 2020.0000.00aa feature interface-vlan ! int vlan 100 vrf member vxlan-10300 ip add 192.168.100.254/24 fabric forwarding mode anycast-gateway no shut ! int vlan 300 vrf member vxlan-10300 ip forward no shut ! evpn vni 10100 l2 rd auto route-target import auto route-target export auto ! interface loopback 1 ip add 11.11.11.11/32 ip router ospf 100 area 0 no shutdown ! feature nv overlay ! interface nve 1 source-interface lo 1 host-reachability protocol bgp member vni 10100 ingress-replication protocol bgp member vni 10300 associate-vrf no shutdown ! router bgp 10000 vrf vxlan-10300 address-family ipv4 unicast network 192.168.100.0/24 ! end
H9372-2: conf t ! feature vn-segment-vlan-based ! vlan 200 vn-segment 10200 ! vlan 300 vn-segment 10300 ! route-map TO-GLOBAL-RIB permit 10 ! vrf context vxlan-10300 vni 10300 ip route 8.8.8.8/32 Ethernet1/4 10.0.0.2 vrf default rd auto address-family ipv4 unicast route-target both 10300:100 route-target both 10300:100 evpn export vrf default map TO-GLOBAL-RIB allow-vpn ! fabric forwarding anycast-gateway-mac 2020.0000.00aa feature interface-vlan ! int vlan 200 vrf member vxlan-10300 ip add 192.168.200.254/24 fabric forwarding mode anycast-gateway no shut ! int vlan 300 vrf member vxlan-10300 ip forward no shut ! evpn vni 10200 l2 rd auto route-target import auto route-target export auto ! interface loopback 1 ip add 22.22.22.22/32 ip router ospf 100 area 0 no shutdown ! feature nv overlay ! interface nve 1 source-interface lo 1 host-reachability protocol bgp member vni 10200 ingress-replication protocol bgp member vni 10300 associate-vrf no shutdown ! router bgp 10000 vrf vxlan-10300 address-family ipv4 unicast network 8.8.8.8/32 network 192.168.200.0/24 ! end
ホストが接続される I/F や、それぞれの GW として SVI を設定します。
G9372-1: conf t ! interface ethernet 1/5 switchport access vlan 100 no shutdown ! fabric forwarding anycast-gateway-mac 2020.0000.00aa feature interface-vlan ! interface vlan 100 ip address 192.168.100.254/24 fabric forwarding mode anycast-gateway no shutdown ! end
H9372-2: conf t ! interface ethernet 1/6 switchport access vlan 200 no shutdown ! fabric forwarding anycast-gateway-mac 2020.0000.00aa feature interface-vlan ! interface vlan 100 ip address 192.168.200.254/24 fabric forwarding mode anycast-gateway no shutdown ! end
上記設定が完了すると、
・Leaf が MP-BGP により経路情報を学習していること
・それぞれの Leaf に接続されているホストが、お互いに通信できること (L3VNI 経由)
・それぞれの Leaf に接続されているホストが、Internet (8.8.8.8) に通信できること (L3VNI 経由)
・それらが mac address table に登録されていると
・それらが routing table に登録されていること
が確認できます。
I93180-1# ping 192.168.200.1 PING 192.168.200.1 (192.168.200.1): 56 data bytes 64 bytes from 192.168.200.1: icmp_seq=0 ttl=252 time=1.227 ms 64 bytes from 192.168.200.1: icmp_seq=1 ttl=252 time=0.77 ms 64 bytes from 192.168.200.1: icmp_seq=2 ttl=252 time=0.753 ms 64 bytes from 192.168.200.1: icmp_seq=3 ttl=252 time=0.75 ms 64 bytes from 192.168.200.1: icmp_seq=4 ttl=252 time=0.709 ms --- 192.168.200.1 ping statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 0.709/0.841/1.227 ms I93180-1# I93180-1# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: icmp_seq=0 ttl=252 time=1.267 ms 64 bytes from 8.8.8.8: icmp_seq=1 ttl=252 time=1.042 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=252 time=0.877 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=252 time=0.725 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=252 time=0.722 ms --- 8.8.8.8 ping statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 0.722/0.926/1.267 ms J93180-2# ping 192.168.100.1 PING 192.168.100.1 (192.168.100.1): 56 data bytes 64 bytes from 192.168.100.1: icmp_seq=0 ttl=252 time=1.244 ms 64 bytes from 192.168.100.1: icmp_seq=1 ttl=252 time=0.763 ms 64 bytes from 192.168.100.1: icmp_seq=2 ttl=252 time=0.714 ms 64 bytes from 192.168.100.1: icmp_seq=3 ttl=252 time=0.735 ms 64 bytes from 192.168.100.1: icmp_seq=4 ttl=252 time=0.724 ms --- 192.168.100.1 ping statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 0.714/0.835/1.244 ms J93180-2# J93180-2# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: icmp_seq=0 ttl=253 time=1.035 ms 64 bytes from 8.8.8.8: icmp_seq=1 ttl=253 time=0.674 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=253 time=0.632 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=253 time=0.626 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=253 time=0.648 ms --- 8.8.8.8 ping statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 0.626/0.722/1.035 ms G9372-1# show bgp l2 evpn BGP routing table information for VRF default, address family L2VPN EVPN BGP table version is 13, Local Router ID is 1.1.1.1 Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-i njected Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - b est2 Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 1.1.1.1:32867 (L2VNI 10100) *>l[2]:[0]:[0]:[48]:[502f.a8ba.abb5]:[0]:[0.0.0.0]/216 11.11.11.11 100 32768 i *>l[2]:[0]:[0]:[48]:[502f.a8ba.abb5]:[32]:[192.168.100.1]/272 11.11.11.11 100 32768 i *>l[3]:[0]:[32]:[11.11.11.11]/88 11.11.11.11 100 32768 i Route Distinguisher: 2.2.2.2:3 *>i[5]:[0]:[0]:[24]:[192.168.200.0]/224 22.22.22.22 100 0 i *>i[5]:[0]:[0]:[32]:[8.8.8.8]/224 22.22.22.22 100 0 i Route Distinguisher: 2.2.2.2:32967 *>i[2]:[0]:[0]:[48]:[502f.a8ba.aa75]:[32]:[192.168.200.1]/272 22.22.22.22 100 0 i Route Distinguisher: 1.1.1.1:3 (L3VNI 10300) *>i[2]:[0]:[0]:[48]:[502f.a8ba.aa75]:[32]:[192.168.200.1]/272 22.22.22.22 100 0 i *>l[5]:[0]:[0]:[24]:[192.168.100.0]/224 11.11.11.11 100 32768 i *>i[5]:[0]:[0]:[24]:[192.168.200.0]/224 22.22.22.22 100 0 i *>i[5]:[0]:[0]:[32]:[8.8.8.8]/224 22.22.22.22 100 0 i G9372-1# G9372-1# show mac address-table Legend: * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC age - seconds since last seen,+ - primary entry using vPC Peer-Link, (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan VLAN MAC Address Type age Secure NTFY Ports ---------+-----------------+--------+---------+------+----+------------------ * 1 0050.5696.b290 dynamic 0 F F Eth1/12 * 1 00d7.8fe6.dcc1 dynamic 0 F F Eth1/20 * 1 0cf5.a495.a405 dynamic 0 F F Eth1/20 * 1 c4b9.cd0a.708b dynamic 0 F F Eth1/12 * 100 502f.a8ba.abb5 dynamic 0 F F Eth1/5 * 300 780c.f035.f39f static - F F nve1(22.22.22.22) * 300 780c.f0a2.2bdf static - F F Vlan300 G - 2020.0000.00aa static - F F sup-eth1(R) G - 780c.f0a2.2bdf static - F F sup-eth1(R) G 300 780c.f0a2.2bdf static - F F sup-eth1(R) G 100 780c.f0a2.2bdf static - F F sup-eth1(R) H9372-2# show bgp l2vpn evpn BGP routing table information for VRF default, address family L2VPN EVPN BGP table version is 13, Local Router ID is 2.2.2.2 Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-i njected Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - b est2 Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 1.1.1.1:3 *>i[5]:[0]:[0]:[24]:[192.168.100.0]/224 11.11.11.11 100 0 i Route Distinguisher: 1.1.1.1:32867 *>i[2]:[0]:[0]:[48]:[502f.a8ba.abb5]:[32]:[192.168.100.1]/272 11.11.11.11 100 0 i Route Distinguisher: 2.2.2.2:32967 (L2VNI 10200) *>l[2]:[0]:[0]:[48]:[502f.a8ba.aa75]:[0]:[0.0.0.0]/216 22.22.22.22 100 32768 i *>l[2]:[0]:[0]:[48]:[502f.a8ba.aa75]:[32]:[192.168.200.1]/272 22.22.22.22 100 32768 i *>l[3]:[0]:[32]:[22.22.22.22]/88 22.22.22.22 100 32768 i Route Distinguisher: 2.2.2.2:3 (L3VNI 10300) *>i[2]:[0]:[0]:[48]:[502f.a8ba.abb5]:[32]:[192.168.100.1]/272 11.11.11.11 100 0 i *>i[5]:[0]:[0]:[24]:[192.168.100.0]/224 11.11.11.11 100 0 i *>l[5]:[0]:[0]:[24]:[192.168.200.0]/224 22.22.22.22 100 32768 i *>l[5]:[0]:[0]:[32]:[8.8.8.8]/224 22.22.22.22 100 32768 i H9372-2# show mac address-table Legend: * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC age - seconds since last seen,+ - primary entry using vPC Peer-Link, (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan VLAN MAC Address Type age Secure NTFY Ports ---------+-----------------+--------+---------+------+----+------------------ * 1 0050.5696.b290 dynamic 0 F F Eth1/53 * 1 00d7.8fe6.dcc1 dynamic 0 F F Eth1/53 * 1 0cf5.a495.a406 dynamic 0 F F Eth1/20 * 200 502f.a8ba.aa75 dynamic 0 F F Eth1/6 * 300 780c.f035.f39f static - F F Vlan300 * 300 780c.f0a2.2bdf static - F F nve1(11.11.11.11) G - 2020.0000.00aa static - F F sup-eth1(R) G - 780c.f035.f39f static - F F sup-eth1(R) G 300 780c.f035.f39f static - F F sup-eth1(R) G 200 780c.f035.f39f static - F F sup-eth1(R) VRF vxlan-10300 の routing table に、EVPN route type 5 で広報された経路情報が学習されていることを確認。 G9372-1# show ip route vrf vxlan-10300 IP Route Table for VRF "vxlan-10300" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] '%<string>' in via output denotes VRF <string> 8.8.8.8/32, ubest/mbest: 1/0 *via 22.22.22.22%default, [200/0], 00:35:36, bgp-10000, internal, tag 10000 (evpn) segid: 10300 tunnelid: 0x16161616 encap: VXLAN 192.168.100.0/24, ubest/mbest: 1/0, attached *via 192.168.100.254, Vlan100, [0/0], 06:10:20, direct 192.168.100.1/32, ubest/mbest: 1/0, attached *via 192.168.100.1, Vlan100, [190/0], 00:28:15, hmm 192.168.100.254/32, ubest/mbest: 1/0, attached *via 192.168.100.254, Vlan100, [0/0], 06:10:20, local 192.168.200.0/24, ubest/mbest: 1/0 *via 22.22.22.22%default, [200/0], 06:08:52, bgp-10000, internal, tag 10000 (evpn) segid: 10300 tunnelid: 0x16161616 encap: VXLAN 192.168.200.1/32, ubest/mbest: 1/0 *via 22.22.22.22%default, [200/0], 00:17:36, bgp-10000, internal, tag 10000 (evpn) segid: 10300 tunnelid: 0x16161616 encap: VXLAN H9372-2# show ip route vrf vxlan-10300 IP Route Table for VRF "vxlan-10300" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] '%<string>' in via output denotes VRF <string> 8.8.8.8/32, ubest/mbest: 1/0 *via 10.0.0.2%default, Eth1/4, [1/0], 00:36:42, static 192.168.100.0/24, ubest/mbest: 1/0 *via 11.11.11.11%default, [200/0], 06:09:06, bgp-10000, internal, tag 10000, segid: 10300 tunnelid: 0xb0b0b0b encap: VXLAN 192.168.100.1/32, ubest/mbest: 1/0 *via 11.11.11.11%default, [200/0], 00:28:32, bgp-10000, internal, tag 10000, segid: 10300 tunnelid: 0xb0b0b0b encap: VXLAN 192.168.200.0/24, ubest/mbest: 1/0, attached *via 192.168.200.254, Vlan200, [0/0], 06:09:14, direct 192.168.200.1/32, ubest/mbest: 1/0, attached *via 192.168.200.1, Vlan200, [190/0], 00:17:53, hmm 192.168.200.254/32, ubest/mbest: 1/0, attached *via 192.168.200.254, Vlan200, [0/0], 06:09:14, local
Configuration Guide : Configuring VXLAN BGP EVPN
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます