Dear Team
its my configuration
Task:
enable ospf feature and configure
leaf1-9k(config)# feature ospf
leaf1-9k(config)# router ospf 1
leaf1-9k(config-router)# exit
leaf1-9k(config)# int e1/2
leaf1-9k(config-if)# ip router ospf 1 area 0
leaf1-9k(config-if)# int lo0
leaf1-9k(config-if)# ip router ospf 1 area 0
spine-9k(config)# feature ospf
spine-9k(config)# router ospf 1
spine-9k(config-router)# exit
spine-9k(config)# int e1/2
spine-9k(config-if)# ip router ospf 1 area 0
spine-9k(config-if)# int e1/3
spine-9k(config-if)# ip router ospf 1 area 0
spine-9k(config-if)# int lo0
spine-9k(config-if)# ip router ospf 1 area 0
leaf2-9k(config)# feature ospf
leaf2-9k(config)# router ospf 1
leaf2-9k(config-router)# exit
leaf2-9k(config)# int e1/2
leaf2-9k(config-if)# ip router ospf 1 area 0
leaf2-9k(config-if)# int lo0
leaf2-9k(config-if)# ip router ospf 1 area 0
leaf2-9k(config-if)#
Task:
verify ospf routes
leaf1-9k(config)# show ip route ospf-1
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
2.2.2.2/32, ubest/mbest: 1/0
*via 192.168.1.1, Eth1/2, [110/41], 00:02:03, ospf-1, intra
3.3.3.3/32, ubest/mbest: 1/0
*via 192.168.1.1, Eth1/2, [110/81], 00:00:26, ospf-1, intra
192.168.5.0/30, ubest/mbest: 1/0
*via 192.168.1.1, Eth1/2, [110/80], 00:02:03, ospf-1, intra
leaf2-9k(config-if)# show ip route ospf-1
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
1.1.1.1/32, ubest/mbest: 1/0
*via 192.168.5.1, Eth1/2, [110/81], 00:00:45, ospf-1, intra
2.2.2.2/32, ubest/mbest: 1/0
*via 192.168.5.1, Eth1/2, [110/41], 00:00:45, ospf-1, intra
192.168.1.0/30, ubest/mbest: 1/0
*via 192.168.5.1, Eth1/2, [110/80], 00:00:45, ospf-1, intra
done getting loopback prefixes on both leafs
Task:
eanble evpn and bgp and cofiguure
leaf1-9k(config)# feature bgp
leaf1-9k(config)# nv overlay evpn
leaf1-9k(config)# router bgp 100
leaf1-9k(config-router)# neighbor 2.2.2.2
leaf1-9k(config-router-neighbor)# update-source lo0
leaf1-9k(config-router-neighbor)# remote-as 100
leaf1-9k(config-router-neighbor)# address-family l2vpn evpn
leaf1-9k(config-router-neighbor-af)# send-community both
spine-9k(config)# feature bgp
spine-9k(config)# nv overlay evpn
spine-9k(config)# router bgp 100
spine-9k(config-router)# neighbor 1.1.1.1
spine-9k(config-router-neighbor)# remote-as 100
spine-9k(config-router-neighbor)# update-source lo0
spine-9k(config-router-neighbor)# address-family l2vpn evpn
spine-9k(config-router-neighbor-af)# send-community both
spine-9k(config-router-neighbor-af)# route-reflector-client
spine-9k(config-router-neighbor-af)# exit
spine-9k(config-router)# neighbor 3.3.3.3
spine-9k(config-router-neighbor)# remote-as 100
spine-9k(config-router-neighbor)# update-source lo0
spine-9k(config-router-neighbor)# address-family l2vpn evpn
spine-9k(config-router-neighbor-af)# send-community both
spine-9k(config-router-neighbor-af)# route-reflector-client
leaf2-9k(config)# feature bgp
leaf2-9k(config)# nv overlay evpn
leaf2-9k(config)# router bgp 100
leaf2-9k(config-router)# neighbor 2.2.2.2
leaf2-9k(config-router-neighbor)# remote-as 100
leaf2-9k(config-router-neighbor)# update-source lo0
leaf2-9k(config-router-neighbor)# address-family l2vpn evpn
leaf2-9k(config-router-neighbor-af)# send-community both
Task:
verify bgp
leaf1-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 4, L2VPN EVPN config peers 1, capable peers 1
0 network entries and 0 paths using 0 bytes of memory
BGP attribute entries [0/0], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 13 12 4 0 0 00:02:52 0
leaf1-9k(config)#
spine-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 5, L2VPN EVPN config peers 2, capable peers 2
0 network entries and 0 paths using 0 bytes of memory
BGP attribute entries [0/0], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 13 14 5 0 0 00:03:17 0
3.3.3.3 4 100 7 8 5 0 0 00:01:25 0
spine-9k(config)#
leaf2-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 3.3.3.3, local AS number 100
BGP table version is 3, L2VPN EVPN config peers 1, capable peers 1
0 network entries and 0 paths using 0 bytes of memory
BGP attribute entries [0/0], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 7 7 3 0 0 00:01:50 0
leaf2-9k(config)#
Task:
configure vlans and vni on Leafs and assign to ports
leaf1-9k(config)# feature vn-segment-vlan-based
leaf1-9k(config)# feature nv overlay
leaf1-9k(config)# vlan 10
leaf1-9k(config-vlan)# vn-segment 10000
leaf1-9k(config)# vlan 20
leaf1-9k(config-vlan)# vn-segment 20000
leaf1-9k(config)# int e1/3
leaf1-9k(config-if)# switchport access vlan 10
leaf1-9k(config-if)# int e1/4
leaf1-9k(config-if)# switchport access vlan 20
leaf2-9k(config)# feature vn-segment-vlan-based
leaf2-9k(config)# feature nv overlay
leaf2-9k(config)# vlan 10
leaf2-9k(config-vlan)# vn-segment 10000
leaf2-9k(config-vlan)# vlan 20
leaf2-9k(config-vlan)# vn-segment 20000
leaf2-9k(config)# int e1/3
leaf2-9k(config-if)# sw ac vl 10
leaf2-9k(config-if)# int e1/4
leaf2-9k(config-if)# sw ac vl 20
Task:
congire nve interfaces on Leafs
leaf1-9k(config)# interface nve 1
leaf1-9k(config-if-nve)# source-interface lo0
leaf1-9k(config-if-nve)# no sh
leaf1-9k(config-if-nve)# host-reachability protocol bgp
leaf1-9k(config-if-nve)# member vni 10000
leaf1-9k(config-if-nve-vni)# ingress-replication protocol bgp
leaf1-9k(config-if-nve-vni)# exit
leaf1-9k(config-if-nve)# member vni 20000
leaf1-9k(config-if-nve-vni)# ingress-replication protocol bgp
leaf2-9k(config)# interface nve 1
leaf2-9k(config-if-nve)# no sh
leaf2-9k(config-if-nve)# source-interface lo0
leaf2-9k(config-if-nve)# host-reachability protocol bgp
leaf2-9k(config-if-nve)#
leaf2-9k(config-if-nve)# member vni 10000
leaf2-9k(config-if-nve-vni)# ingress-replication protocol bgp
leaf2-9k(config-if-nve-vni)# exit
leaf2-9k(config-if-nve)# member vni 20000
leaf2-9k(config-if-nve-vni)# ingress-replication protocol bgp
verify
leaf1-9k(config-if-nve-vni)# show nve peers detail
Details of nve Peers:
----------------------------------------
Peer-Ip: 3.3.3.3
NVE Interface : nve1
Peer State : Up
Peer Uptime : 00:00:28
Router-Mac : n/a
Peer First VNI : 10000
Time since Create : 00:00:28
Configured VNIs : 10000,20000
Provision State : peer-add-complete
Learnt CP VNIs : 10000,20000
vni assignment mode : SYMMETRIC
Peer Location : N/A
leaf2-9k(config-if-nve-vni)# show nve peers detail
Details of nve Peers:
----------------------------------------
Peer-Ip: 1.1.1.1
NVE Interface : nve1
Peer State : Up
Peer Uptime : 00:00:43
Router-Mac : n/a
Peer First VNI : 10000
Time since Create : 00:00:43
Configured VNIs : 10000,20000
Provision State : peer-add-complete
Learnt CP VNIs : 10000,20000
vni assignment mode : SYMMETRIC
Peer Location : N/A
Task:
configure evpn
leaf1-9k(config)# evpn
leaf1-9k(config-evpn)# vni 10000 l2
leaf1-9k(config-evpn-evi)# rd auto
leaf1-9k(config-evpn-evi)# route-target both auto
leaf1-9k(config-evpn-evi)# exit
leaf1-9k(config-evpn)# vni 20000 l2
leaf1-9k(config-evpn-evi)# rd auto
leaf1-9k(config-evpn-evi)# route-target both auto
leaf2-9k(config)# evpn
leaf2-9k(config-evpn)# vni 10000 l2
leaf2-9k(config-evpn-evi)# rd auto
leaf2-9k(config-evpn-evi)# route-target both auto
leaf2-9k(config-evpn-evi)# exit
leaf2-9k(config-evpn)# vni 20000 l2
leaf2-9k(config-evpn-evi)# rd auto
leaf2-9k(config-evpn-evi)# route-target both auto
Task:
verify bgp now
leaf1-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 10, L2VPN EVPN config peers 1, capable peers 1
6 network entries and 6 paths using 1224 bytes of memory
BGP attribute entries [4/688], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [1/4]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 38 33 10 0 0 00:21:12 2
leaf1-9k(config)#
leaf1-9k(config)# show bgp l2vpn evpn neighbors 2.2.2.2 advertised-routes
Peer 2.2.2.2 routes for address family L2VPN EVPN:
BGP table version is 10, 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:32777 (L2VNI 10000)
*>l[3]:[0]:[32]:[1.1.1.1]/88
1.1.1.1 100 32768 i
Route Distinguisher: 1.1.1.1:32787 (L2VNI 20000)
*>l[3]:[0]:[32]:[1.1.1.1]/88
1.1.1.1 100 32768 i
Route Distinguisher: 3.3.3.3:32777
Route Distinguisher: 3.3.3.3:32787
leaf1-9k(config)#
leaf2-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 3.3.3.3, local AS number 100
BGP table version is 9, L2VPN EVPN config peers 1, capable peers 1
6 network entries and 6 paths using 1224 bytes of memory
BGP attribute entries [4/688], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [1/4]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 39 30 9 0 0 00:21:38 2
leaf2-9k(config)#
leaf2-9k(config)# show bgp l2vpn evpn neighbors 2.2.2.2 advertised-routes
Peer 2.2.2.2 routes for address family L2VPN EVPN:
BGP table version is 9, Local Router ID is 3.3.3.3
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:32777
Route Distinguisher: 1.1.1.1:32787
Route Distinguisher: 3.3.3.3:32777 (L2VNI 10000)
*>l[3]:[0]:[32]:[3.3.3.3]/88
3.3.3.3 100 32768 i
Route Distinguisher: 3.3.3.3:32787 (L2VNI 20000)
*>l[3]:[0]:[32]:[3.3.3.3]/88
3.3.3.3 100 32768 i
leaf2-9k(config)#
spine-9k(config)# show bgp l2vpn evpn summary
BGP summary information for VRF default, address family L2VPN EVPN
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 15, L2VPN EVPN config peers 2, capable peers 2
4 network entries and 4 paths using 976 bytes of memory
BGP attribute entries [4/688], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 38 39 15 0 0 00:24:23 2
3.3.3.3 4 100 33 35 15 0 0 00:22:31 2
spine-9k(config)#
spine-9k(config)# show bgp all
BGP routing table information for VRF default, address family L2VPN EVPN
BGP table version is 15, 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:32777
*>i[3]:[0]:[32]:[1.1.1.1]/88
1.1.1.1 100 0 i
Route Distinguisher: 1.1.1.1:32787
*>i[3]:[0]:[32]:[1.1.1.1]/88
1.1.1.1 100 0 i
Route Distinguisher: 3.3.3.3:32777
*>i[3]:[0]:[32]:[3.3.3.3]/88
3.3.3.3 100 0 i
Route Distinguisher: 3.3.3.3:32787
*>i[3]:[0]:[32]:[3.3.3.3]/88
3.3.3.3 100 0 i
Task:
verify on cliets
vpc6
VPCS> ping 192.168.100.1
84 bytes from 192.168.100.1 icmp_seq=1 ttl=64 time=32.040 ms
84 bytes from 192.168.100.1 icmp_seq=2 ttl=64 time=25.635 ms
84 bytes from 192.168.100.1 icmp_seq=3 ttl=64 time=26.719 ms
84 bytes from 192.168.100.1 icmp_seq=4 ttl=64 time=43.006 ms
84 bytes from 192.168.100.1 icmp_seq=5 ttl=64 time=15.653 ms
vpc4
VPCS> ping 192.168.100.3
host (192.168.100.3) not reachable
vpc7
VPCS> ping 10.10.10.1
84 bytes from 10.10.10.1 icmp_seq=1 ttl=64 time=36.540 ms
84 bytes from 10.10.10.1 icmp_seq=2 ttl=64 time=47.185 ms
84 bytes from 10.10.10.1 icmp_seq=3 ttl=64 time=23.282 ms
vpc5
VPCS> ping 10.10.10.2
host (10.10.10.2) not reachable
its one-way traffic
why its not two way traffic