2025-02-12 IOL-L2 EVPN L2VPN 機能検証
近年 Catalyst 9000 シリーズに EVPN が実装されてきていますが、先日無償公開された CML2.8 Free に付属している IOL-L2 でも動作することがわかりました。
BGP-EVPN の L2VPN について機能検証を実施しました。
このページにラボシナリオとして、コンフィグや確認コマンド、疎通確認のポイントなどをまとめています。
EVPN とは
MPLS VPN のように複雑化したプロトコルを使わずに、L2VPN や L3VPN を構築できる規格です。
このドキュメントの目的
EVPN の動作について理解を深められること。
ラボを再現して検証できること。
通信要件
EVPN : BGP / OSPF
- L2VPN : HOST と HOST が EVPN を超えて、同一の IP セグメントで通信できること
所感
メリット
- Cat9000V は UADP / Q200 ともに 18GB / 12Gb とメモリ消費量が非常に大きいが、IOL であれば 1GB で済むこと
- CML2.8 Free 版でも IOL が動作するため、費用なく検証できること
- L3NW を経由して同一の IP セグメントを別の機器に持たせられる
考慮点
- Catalyst 9000 で実際に EVPN が構築された例はまだまだ少ないと思われる
構成・検証結果概要
構成
アンダーレイ : IPv4 OSPF
- /30 の P2P リンクで OSPF ネイバーを確立
- Loopback0 と 1 をルート広報
オーバーレイ : IPv4 BGP
- Loopback0 同士で BGP ネイバーを張る
- address-family l2vpn evpn で MAC アドレスを広報
オーバーレイ : VxLAN
- Loopback1 を送信元にして、対向側の Loopback1 を宛先にする
- VxLAN でカプセル化して、L2 トンネリングする
EVPN の実装状況について
プロトコル | コメント |
---|---|
BGP | Cat8000V だと MPLS が必須だったが、IOL-L2 では BGP のみで問題なし |
OSPF | アンダーレイ OSPF では特に EVPN の実装を意識しなくて OK |
VxLAN | 使用できる |
マルチキャスト | 使用しなくても BUM は Ingress Replication で OK |
その他
- IPv6 LLA をアンダーレイに使用した、interface 指定の自動 BGP ピアリングは実装されていない
検証環境
EVE-NG 6.2.0-4
- CML からイメージをインポート
Cisco IOL-L2 : IOS-XE 17.15.1
構成図
- IOL-L2 : HOST01 , EVPN01 , EVPN02 , HOST02

IP アドレッシング
文書用例示アドレス (8.8.8.8 を除く) | ||||||
---|---|---|---|---|---|---|
大種別 | 小種別 | ネットワーク アドレス | ホスト | インターフェース | ホスト アドレス | 備考 |
プライベートアドレス | OSPF / BGP | 10.0.0.0/30 | EVPN01 | Eth0/1 | 10.0.0.1/30 | OSPF P2P で接続、Lo0 と Lo1 をルート広報 |
EVPN02 | Eth0/3 | 10.0.0.2/30 | ||||
10.0.0.254/32
10.0.0.253/32 |
EVPN01 | Lo0 | 10.0.0.254/32 | アンダーレイ・コントロールプレーン用途
OSPF Router-ID / BGP ピアに使用 | ||
EVPN02 | Lo0 | 10.0.0.254/32 | ||||
VxLAN | 10.0.255.0/24 | EVPN01 | Lo1 | 10.0.255.254/32 | VxLAN NVE1 インターフェースに使用
L2VPN のトンネルに使用 | |
EVPN02 | Lo1 | 10.0.255.253/32 | VxLAN NVE1 インターフェースに使用
L2VPN のトンネルに使用 | |||
ホストアドレス | 172.16.0.0/24 | HOST01 | Vlan10 | 172.16.0.101/24 | HOST02 との通信に使用 | |
HOST02 | Vlan10 | 172.16.0.102/24 | HOST02 との通信に使用 |
コンフィギュレーション
ここではプロトコル・ホスト別にコンフィギュレーションを簡単に解説します。
自分でコンフィグを組んでみたい人向けに、デフォルトでは表示しません。
PE01
プロトコル | EVPN01 コンフィグ | EVPN02 コンフィグ | 解説 |
---|---|---|---|
L2VPN
OSPF BGP VxLAN |
EVPN01#show run | s back[0-1]|0/1|0/3|ospf|bgp|nve|l2vpn|vlan.*10|vtp vtp mode transparent l2vpn evpn replication-type ingress l2vpn evpn instance 10 vlan-based encapsulation vxlan vlan configuration 10 member evpn-instance 10 vni 10010 vlan 10 interface Loopback0 ip address 10.0.0.254 255.255.255.255 interface Loopback1 ip address 10.0.255.254 255.255.255.255 interface Ethernet0/1 no switchport ip address 10.0.0.1 255.255.255.252 ip ospf network point-to-point interface Ethernet0/3 switchport trunk encapsulation dot1q switchport trunk allowed vlan 10 switchport mode trunk switchport nonegotiate interface nve1 no ip address source-interface Loopback1 host-reachability protocol bgp member vni 10010 ingress-replication router ospf 1 router-id 10.0.0.254 network 10.0.0.0 0.0.0.3 area 0.0.0.0 network 10.0.0.254 0.0.0.0 area 0.0.0.0 network 10.0.255.254 0.0.0.0 area 0.0.0.0 router bgp 1 bgp router-id 10.0.0.254 bgp log-neighbor-changes no bgp default ipv4-unicast timers bgp 10 30 neighbor 10.0.0.253 remote-as 1 neighbor 10.0.0.253 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family l2vpn evpn neighbor 10.0.0.253 activate neighbor 10.0.0.253 send-community both neighbor 10.0.0.253 soft-reconfiguration inbound exit-address-family |
EVPN02#show run | s back[0-1]|0/1|0/3|ospf|bgp|nve|l2vpn|vlan.*10|vtp vtp mode transparent l2vpn evpn replication-type ingress l2vpn evpn instance 10 vlan-based encapsulation vxlan vlan configuration 10 member evpn-instance 10 vni 10010 vlan 10 interface Loopback0 ip address 10.0.0.253 255.255.255.255 interface Loopback1 ip address 10.0.255.253 255.255.255.255 interface Ethernet0/1 switchport trunk encapsulation dot1q switchport trunk allowed vlan 10 switchport mode trunk switchport nonegotiate interface Ethernet0/3 no switchport ip address 10.0.0.2 255.255.255.252 ip ospf network point-to-point interface nve1 no ip address source-interface Loopback1 host-reachability protocol bgp member vni 10010 ingress-replication router ospf 1 router-id 10.0.0.253 network 10.0.0.0 0.0.0.3 area 0.0.0.0 network 10.0.0.253 0.0.0.0 area 0.0.0.0 network 10.0.255.253 0.0.0.0 area 0.0.0.0 router bgp 1 bgp router-id 10.0.0.253 bgp log-neighbor-changes no bgp default ipv4-unicast timers bgp 10 30 neighbor 10.0.0.254 remote-as 1 neighbor 10.0.0.254 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family l2vpn evpn neighbor 10.0.0.254 activate neighbor 10.0.0.254 send-community both neighbor 10.0.0.254 soft-reconfiguration inbound exit-address-family |
l2vpn evpn instance
以下が選択肢に出てくる
|
HOST01 , 02
プロトコル | HOST01 コンフィグ | HOST02 コンフィグ | 解説 |
---|---|---|---|
trunk
SVI |
HOST01#show run | s 0/1|Vlan10 interface Ethernet0/1 switchport trunk encapsulation dot1q switchport trunk allowed vlan 10 switchport mode trunk switchport nonegotiate interface Vlan10 ip address 172.16.0.101 255.255.255.0 |
HOST02#show run | s 0/3|Vlan10 interface Ethernet0/3 switchport trunk encapsulation dot1q switchport trunk allowed vlan 10 switchport mode trunk switchport nonegotiate interface Vlan10 ip address 172.16.0.102 255.255.255.0 |
正常時の疎通・経路確認
コマンドリスト
HOST01
HOST01#ping 172.16.0.102 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.0.102, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/4 ms HOST01#traceroute 172.16.0.102 Type escape sequence to abort. Tracing the route to 172.16.0.102 VRF info: (vrf in name/id, vrf out name/id) 1 172.16.0.102 3 msec * 4 msec HOST01#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 172.16.0.1 37 aabb.cc80.6000 ARPA Vlan10 Internet 172.16.0.2 1 aabb.cc80.6000 ARPA Vlan10 Internet 172.16.0.101 - aabb.cc80.5000 ARPA Vlan10 Internet 172.16.0.102 148 aabb.cc80.8000 ARPA Vlan10
HOST02
HOST02#ping 172.16.0.101 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.0.101, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms HOST02#traceroute 172.16.0.101 Type escape sequence to abort. Tracing the route to 172.16.0.101 VRF info: (vrf in name/id, vrf out name/id) 1 172.16.0.101 3 msec * 3 msec HOST02#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 172.16.0.1 38 aabb.cc80.6000 ARPA Vlan10 Internet 172.16.0.2 2 aabb.cc80.6000 ARPA Vlan10 Internet 172.16.0.3 44 aabb.cc80.7000 ARPA Vlan10 Internet 172.16.0.101 149 aabb.cc80.5000 ARPA Vlan10 Internet 172.16.0.102 - aabb.cc80.8000 ARPA Vlan10
HOST 同士でお互いの MAC が ARP で解決されています。
ARP はブロードキャストドメイン = ルータを超えられないため、EVPN で ARP を転送し L2VPN として動作していることがわかります。
EVPN01
EVPN01#show l2vpn evpn mac MAC Address EVI VLAN ESI Ether Tag Next Hop(s) -------------- ----- ----- ------------------------ ---------- --------------- aabb.cc80.5000 10 10 0000.0000.0000.0000.0000 0 Et0/3:10 aabb.cc80.8000 10 10 0000.0000.0000.0000.0000 0 10.0.255.253
MAC アドレスを Eth0/3 と EVPN02 から学習していることがわかります。
EVPN02
EVPN02#show l2vpn evpn mac MAC Address EVI VLAN ESI Ether Tag Next Hop(s) -------------- ----- ----- ------------------------ ---------- --------------- aabb.cc80.5000 10 10 0000.0000.0000.0000.0000 0 10.0.255.254 aabb.cc80.8000 10 10 0000.0000.0000.0000.0000 0 Et0/1:10
MAC アドレスを Eth0/1 と EVPN02 から学習していることがわかります。
BGP 動作確認
確認 | EVPN01 | EVPN02 | 備考 |
---|---|---|---|
BGP 状態確認 |
EVPN01#show bgp all summary For address family: L2VPN E-VPN BGP router identifier 10.0.0.254, local AS number 1 BGP table version is 16, main routing table version 16 9 network entries using 3528 bytes of memory 9 path entries using 2088 bytes of memory 4/4 BGP path/bestpath attribute entries using 1184 bytes of memory 1 BGP extended community entries using 40 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 6840 total bytes of memory BGP activity 12/3 prefixes, 12/3 paths, scan interval 60 secs 9 networks peaked at 00:50:41 Feb 12 2025 UTC (00:00:07.828 ago) Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.253 4 1 323 320 16 0 0 00:50:08 3 |
EVPN02#show bgp all summary For address family: L2VPN E-VPN BGP router identifier 10.0.0.253, local AS number 1 BGP table version is 17, main routing table version 17 9 network entries using 3528 bytes of memory 9 path entries using 2088 bytes of memory 5/5 BGP path/bestpath attribute entries using 1480 bytes of memory 1 BGP extended community entries using 40 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 7136 total bytes of memory BGP activity 12/3 prefixes, 12/3 paths, scan interval 60 secs 9 networks peaked at 00:50:41 Feb 12 2025 UTC (00:00:17.138 ago) Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.254 4 1 321 324 17 0 0 00:50:18 3 |
State/PfxRcd
数字が表示されていれば Establish , 数字自体は学習した MAC アドレスを示します。 NG な場合は以下のいずれかとなる。
|
BGP 広報 |
EVPN01#show bgp all neighbors 10.0.0.253 advertised-routes For address family: L2VPN E-VPN BGP table version is 16, local router ID is 10.0.0.254 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, L long-lived-stale, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 10.0.0.254:10 *> [2][10.0.0.254:10][0][48][AABBCC805000][0][*]/20 0.0.0.0 32768 ? *> [2][10.0.0.254:10][0][48][AABBCC805000][32][172.16.0.101]/24 0.0.0.0 32768 ? *> [3][10.0.0.254:10][0][32][10.0.0.254]/17 0.0.0.0 32768 ? Total number of prefixes 3 |
EVPN02#show bgp all neighbors 10.0.0.254 advertised-routes For address family: L2VPN E-VPN BGP table version is 17, local router ID is 10.0.0.253 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, L long-lived-stale, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 10.0.0.253:10 *> [2][10.0.0.253:10][0][48][AABBCC808000][0][*]/20 0.0.0.0 32768 ? *> [2][10.0.0.253:10][0][48][AABBCC808000][32][172.16.0.102]/24 0.0.0.0 32768 ? *> [3][10.0.0.253:10][0][32][10.0.0.253]/17 0.0.0.0 32768 ? Total number of prefixes 3 |
BGP 広報
MAC アドレスと学習した機器の Lo0 アドレスが見えます。 |
BGP 受信 |
EVPN01#show bgp all neighbors 10.0.0.253 received-routes For address family: L2VPN E-VPN BGP table version is 16, local router ID is 10.0.0.254 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, L long-lived-stale, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 10.0.0.253:10 *>i [2][10.0.0.253:10][0][48][AABBCC808000][0][*]/20 10.0.255.253 0 100 0 ? *>i [2][10.0.0.253:10][0][48][AABBCC808000][32][172.16.0.102]/24 10.0.255.253 0 100 0 ? Route Distinguisher: 10.0.0.254:10 *>i [2][10.0.0.254:10][0][48][AABBCC808000][0][*]/20 10.0.255.253 0 100 0 ? *>i [2][10.0.0.254:10][0][48][AABBCC808000][32][172.16.0.102]/24 10.0.255.253 0 100 0 ? Route Distinguisher: 10.0.0.253:10 *>i [3][10.0.0.253:10][0][32][10.0.0.253]/17 10.0.255.253 0 100 0 ? Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 10.0.0.254:10 *>i [3][10.0.0.254:10][0][32][10.0.0.253]/17 10.0.255.253 0 100 0 ? Total number of prefixes 6 |
EVPN02#show bgp all neighbors 10.0.0.254 received-routes For address family: L2VPN E-VPN BGP table version is 17, local router ID is 10.0.0.253 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, L long-lived-stale, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 10.0.0.253:10 *>i [2][10.0.0.253:10][0][48][AABBCC805000][0][*]/20 10.0.255.254 0 100 0 ? *>i [2][10.0.0.253:10][0][48][AABBCC805000][32][172.16.0.101]/24 10.0.255.254 0 100 0 ? Route Distinguisher: 10.0.0.254:10 *>i [2][10.0.0.254:10][0][48][AABBCC805000][0][*]/20 10.0.255.254 0 100 0 ? *>i [2][10.0.0.254:10][0][48][AABBCC805000][32][172.16.0.101]/24 10.0.255.254 0 100 0 ? Route Distinguisher: 10.0.0.253:10 *>i [3][10.0.0.253:10][0][32][10.0.0.254]/17 10.0.255.254 0 100 0 ? Route Distinguisher: 10.0.0.254:10 *>i [3][10.0.0.254:10][0][32][10.0.0.254]/17 10.0.255.254 0 100 0 ? Total number of prefixes 6 |
BGP 受信
BGP で受信した MAC アドレスや対向側機器の IP などが見えます。 |
動作確認 - ホスト別コマンドリスト
HOST01
ping 172.16.0.102
traceroute 172.16.0.102
show ip arp
HOST02
ping 172.16.0.101
traceroute 172.16.0.101
show ip arp
EVPN01
show ip ospf neighbor
show bgp all summary
show bgp all neighbors 10.0.0.253 advertised-routes
show bgp all neighbors 10.0.0.253 received-routes
show l2fib bridge-domain 10 table unicast
show l2route evpn mac ip
show l2route evpn summary
show l2vpn evpn default-gateway
show l2vpn evpn evi detail
show l2vpn evpn peers
show l2vpn evpn mac summary
show l2vpn evpn mac
show nve peers
EVPN02
show ip ospf neighbor
show bgp all summary
show bgp all neighbors 10.0.0.254 advertised-routes
show bgp all neighbors 10.0.0.254 received-routes
show l2fib bridge-domain 10 table unicast
show l2route evpn mac ip
show l2route evpn summary
show l2vpn evpn default-gateway
show l2vpn evpn evi detail
show l2vpn evpn peers
show l2vpn evpn mac summary
show l2vpn evpn mac
show nve peers
リファレンス
IOS-XE Catalyst 9k(CML) で EVPN-VXLANを構築してみた
更新履歴
2025/02/12 : 初版作成