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
以下が選択肢に出てくる
point-to-point (EVPN VPWS)
vlan-aware
vlan-based
vlan-bundle
interface nve1
source-interface 指定することで、IP を指定しなくてすみます
host-reachability で BGP 経由で MAC を学習
member vni で vlan と紐づけてある vni を通信対象に
neighbor 10.0.0.254 , 253
EVPN の MAC アドレス広報は、コントロール プレーンとして動作させるため、Lo0 を使用することにしました
HOST01 , 02
CE01 , 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
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 動作確認
CE01 BGP + OSPF GIR 動作確認
確認
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 な場合は以下のいずれかとなる。
Active
Idle
Open / OpenSent / OpenConfirm
Sent
Connect
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