FRR EVPN VXLAN ROUTE SHOW
root@dev57:/home/admin# ip -d route show vrf vrf1 unicast 9.9.9.0/24 via 10.10.18.212 dev br100 proto bgp scope global metric 20 onlink unicast 10.1.1.0/24 dev br10 proto kernel scope link src 10.1.1.1 unicast 20.1.1.0/24 dev br20 proto kernel scope link src 20.1.1.1
root@dev57:/home/admin# ip -d nei show vrf vrf1 20.1.1.2 dev br20 lladdr 00:00:00:00:00:02 STALE 10.10.18.212 dev br100 lladdr 00:00:64:00:00:02 extern_learn NOARP 10.1.1.2 dev br10 lladdr 00:00:00:00:00:01 STALE fe80::200:ff:fe00:3 dev br10 lladdr 00:00:00:00:00:03 extern_learn NOARP fe80::200:ff:fe00:1 dev br10 lladdr 00:00:00:00:00:01 STALE fe80::200:ff:fe00:2 dev br20 lladdr 00:00:00:00:00:02 STALE
dev57# show ip route vrf vrf1 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued route, r - rejected route VRF vrf1: B>* 9.9.9.0/24 [20/0] via 10.10.18.212, br100 onlink, 1d17h04m C>* 10.1.1.0/24 is directly connected, br10, 01w4d20h C>* 20.1.1.0/24 is directly connected, br20, 01w5d00h
隧道之间不用直连的路由相连而是通过网段1.1.1.1 到 2.2.2.2,看下bgp evpn同步的路由是什么样子:
dev57# show ip route vrf vrf1 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued route, r - rejected route VRF vrf1: B>* 9.9.9.0/24 [20/0] via 2.2.2.2, br222 onlink, 00:00:52 C>* 10.1.1.0/24 is directly connected, br10, 01w5d00h C>* 20.1.1.0/24 is directly connected, br20, 01w5d05h C>* 22.1.1.0/24 is directly connected, br22, 00:01:54 root@dev57:/home/admin# ip -d route show vrf vrf1 unicast 9.9.9.0/24 via 2.2.2.2 dev br222 proto bgp scope global metric 20 onlink unicast 10.1.1.0/24 dev br10 proto kernel scope link src 10.1.1.1 unicast 20.1.1.0/24 dev br20 proto kernel scope link src 20.1.1.1 unicast 22.1.1.0/24 dev br22 proto kernel scope link src 22.1.1.1 dev57# show evpn next-hops vni all VNI 222 #Next-Hops 1 IP RMAC 2.2.2.2 00:22:22:00:00:02
可以看到bgp evpn同步过来的路由的nexthop是远端vtep的IP。
root@dev57:/home/admin# ip -d nei show vrf vrf1 20.1.1.2 dev br20 lladdr 00:00:00:00:00:02 STALE 2.2.2.2 dev br222 lladdr 00:22:22:00:00:02 extern_learn NOARP 10.1.1.2 dev br10 lladdr 00:00:00:00:00:01 STALE fe80::200:ff:fe00:1 dev br10 lladdr 00:00:00:00:00:01 STALE fe80::200:ff:fe00:2 dev br20 lladdr 00:00:00:00:00:02 STALE root@dev57:/home/admin# bridge fdb show|grep 00:22:22:00:00:02 00:22:22:00:00:02 dev vxlan222 vlan 1 extern_learn master br222 00:22:22:00:00:02 dev vxlan222 extern_learn master br222 00:22:22:00:00:02 dev vxlan222 dst 2.2.2.2 self extern_learn
FRR内部其实把vtep 2.2.2.2 当作是L3 VNI的neighbor,这么做不得不说很是巧妙。