mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
tests: Adding test suites evpn_type5_test_topo1
1. Added 15 test cases to test evpn type5 functionality 2. Total execution time is ~9 mins Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
This commit is contained in:
parent
3c334c3915
commit
1b66072ce0
0
tests/topotests/evpn_type5_test_topo1/__init__.py
Normal file
0
tests/topotests/evpn_type5_test_topo1/__init__.py
Normal file
@ -0,0 +1,887 @@
|
|||||||
|
{
|
||||||
|
"address_types": ["ipv4","ipv6"],
|
||||||
|
"ipv4base": "10.0.0.0",
|
||||||
|
"ipv4mask": 30,
|
||||||
|
"ipv6base": "fd00::",
|
||||||
|
"ipv6mask": 64,
|
||||||
|
"link_ip_start": {
|
||||||
|
"ipv4": "10.0.0.0",
|
||||||
|
"v4mask": 30,
|
||||||
|
"ipv6": "fd00::",
|
||||||
|
"v6mask": 64
|
||||||
|
},
|
||||||
|
"lo_prefix": {
|
||||||
|
"ipv4": "1.0.",
|
||||||
|
"v4mask": 32,
|
||||||
|
"ipv6": "2001:db8:f::",
|
||||||
|
"v6mask": 128
|
||||||
|
},
|
||||||
|
"routers": {
|
||||||
|
"r1": {
|
||||||
|
"links": {
|
||||||
|
"e1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "1",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"static_routes":[
|
||||||
|
{
|
||||||
|
"network":"10.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "RED"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"10::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "RED"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r2": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"e1-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "2",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "2",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"static_routes":[
|
||||||
|
{
|
||||||
|
"network":"20.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "BLUE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"20::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "BLUE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"30.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "GREEN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"30::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "GREEN"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"e1": {
|
||||||
|
"links": {
|
||||||
|
"r1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r2-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r2-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"},
|
||||||
|
"d1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"d2-link1": {"ipv4": "auto", "ipv6": "auto"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"ipv4":{
|
||||||
|
"e1-link1": "activate"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"ipv4":{
|
||||||
|
"e1-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"d1": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"r3": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r4-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r4-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"ipv4":{
|
||||||
|
"d1-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"r3": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r4-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r4-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"ipv4":{
|
||||||
|
"d2-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r3": {
|
||||||
|
"links": {
|
||||||
|
"d1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"d2": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "3",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r4": {
|
||||||
|
"links": {
|
||||||
|
"d1-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"d1-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"},
|
||||||
|
"d2-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"d2-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "4",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "4",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
887
tests/topotests/evpn_type5_test_topo1/evpn_type5_topo1.json
Normal file
887
tests/topotests/evpn_type5_test_topo1/evpn_type5_topo1.json
Normal file
@ -0,0 +1,887 @@
|
|||||||
|
{
|
||||||
|
"address_types": ["ipv4","ipv6"],
|
||||||
|
"ipv4base": "10.0.0.0",
|
||||||
|
"ipv4mask": 30,
|
||||||
|
"ipv6base": "fd00::",
|
||||||
|
"ipv6mask": 64,
|
||||||
|
"link_ip_start": {
|
||||||
|
"ipv4": "10.0.0.0",
|
||||||
|
"v4mask": 30,
|
||||||
|
"ipv6": "fd00::",
|
||||||
|
"v6mask": 64
|
||||||
|
},
|
||||||
|
"lo_prefix": {
|
||||||
|
"ipv4": "1.0.",
|
||||||
|
"v4mask": 32,
|
||||||
|
"ipv6": "2001:db8:f::",
|
||||||
|
"v6mask": 128
|
||||||
|
},
|
||||||
|
"routers": {
|
||||||
|
"r1": {
|
||||||
|
"links": {
|
||||||
|
"e1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "1",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"static_routes":[
|
||||||
|
{
|
||||||
|
"network":"10.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "RED"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"10::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "RED"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r2": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"e1-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "2",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "2",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"redistribute": [
|
||||||
|
{"redist_type": "static"}
|
||||||
|
],
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"static_routes":[
|
||||||
|
{
|
||||||
|
"network":"20.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "BLUE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"20::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "BLUE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"30.1.1.1/32",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "GREEN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network":"30::1/128",
|
||||||
|
"next_hop":"Null0",
|
||||||
|
"vrf": "GREEN"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"e1": {
|
||||||
|
"links": {
|
||||||
|
"r1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r2-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r2-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"},
|
||||||
|
"d1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"d2-link1": {"ipv4": "auto", "ipv6": "auto"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"e1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"ipv4":{
|
||||||
|
"e1-link1": "activate"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"ipv4":{
|
||||||
|
"e1-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"d1": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"r3": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r4-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r4-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"ipv4":{
|
||||||
|
"d1-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "100",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d1-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"links": {
|
||||||
|
"e1-link1": {"ipv4": "auto", "ipv6": "auto"},
|
||||||
|
"r3": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"r4-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"r4-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1",
|
||||||
|
"vni": 75100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "2",
|
||||||
|
"vni": 75200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "3",
|
||||||
|
"vni": 75300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {
|
||||||
|
"deactivate": "ipv4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"neighbor": {
|
||||||
|
"e1": {
|
||||||
|
"ipv4":{
|
||||||
|
"d2-link1": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advertise-all-vni": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r3": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "200",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"r4": {
|
||||||
|
"dest_link": {
|
||||||
|
"d2-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"l2vpn": {
|
||||||
|
"evpn": {
|
||||||
|
"advertise": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r3": {
|
||||||
|
"links": {
|
||||||
|
"d1": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"},
|
||||||
|
"d2": {"ipv4": "auto", "ipv6": "auto", "vrf": "RED"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "RED",
|
||||||
|
"id": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "3",
|
||||||
|
"vrf": "RED",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r3": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r4": {
|
||||||
|
"links": {
|
||||||
|
"d1-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"d1-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"},
|
||||||
|
"d2-link1": {"ipv4": "auto", "ipv6": "auto", "vrf": "BLUE"},
|
||||||
|
"d2-link2": {"ipv4": "auto", "ipv6": "auto", "vrf": "GREEN"}
|
||||||
|
},
|
||||||
|
"vrfs":[
|
||||||
|
{
|
||||||
|
"name": "BLUE",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GREEN",
|
||||||
|
"id": "2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bgp":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"local_as": "4",
|
||||||
|
"vrf": "BLUE",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link1": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"local_as": "4",
|
||||||
|
"vrf": "GREEN",
|
||||||
|
"address_family": {
|
||||||
|
"ipv4": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipv6": {
|
||||||
|
"unicast": {
|
||||||
|
"neighbor": {
|
||||||
|
"d1": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"d2": {
|
||||||
|
"dest_link": {
|
||||||
|
"r4-link2": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1048
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
Executable file
1048
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
Executable file
File diff suppressed because it is too large
Load Diff
2117
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
Executable file
2117
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -1057,28 +1057,22 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
API will verify if BGP is converged with in the given time frame.
|
API will verify if BGP is converged with in the given time frame.
|
||||||
Running "show bgp summary json" command and verify bgp neighbor
|
Running "show bgp summary json" command and verify bgp neighbor
|
||||||
state is established,
|
state is established,
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
* `tgen`: topogen object
|
* `tgen`: topogen object
|
||||||
* `topo`: input json file data
|
* `topo`: input json file data
|
||||||
* `dut`: device under test
|
* `dut`: device under test
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
# To veriry is BGP is converged for all the routers used in
|
# To veriry is BGP is converged for all the routers used in
|
||||||
topology
|
topology
|
||||||
results = verify_bgp_convergence(tgen, topo, dut="r1")
|
results = verify_bgp_convergence(tgen, topo, dut="r1")
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
errormsg(str) or True
|
errormsg(str) or True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = False
|
logger.debug("Entering lib API: verify_bgp_convergence()")
|
||||||
logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
|
|
||||||
|
|
||||||
tgen = get_topogen()
|
|
||||||
for router, rnode in tgen.routers().iteritems():
|
for router, rnode in tgen.routers().iteritems():
|
||||||
if "bgp" not in topo["routers"][router]:
|
if "bgp" not in topo["routers"][router]:
|
||||||
continue
|
continue
|
||||||
@ -1141,7 +1135,6 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
)
|
)
|
||||||
return errormsg
|
return errormsg
|
||||||
|
|
||||||
if "l2VpnEvpn" in show_bgp_json[vrf]:
|
|
||||||
l2VpnEvpn_data = show_bgp_json[vrf]["l2VpnEvpn"][
|
l2VpnEvpn_data = show_bgp_json[vrf]["l2VpnEvpn"][
|
||||||
"peers"
|
"peers"
|
||||||
]
|
]
|
||||||
@ -1156,7 +1149,6 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
router,
|
router,
|
||||||
vrf,
|
vrf,
|
||||||
)
|
)
|
||||||
result = True
|
|
||||||
else:
|
else:
|
||||||
errormsg = (
|
errormsg = (
|
||||||
"[DUT: %s] VRF: %s, BGP is not converged "
|
"[DUT: %s] VRF: %s, BGP is not converged "
|
||||||
@ -1164,22 +1156,22 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
)
|
)
|
||||||
return errormsg
|
return errormsg
|
||||||
else:
|
else:
|
||||||
total_peer = 0
|
|
||||||
for addr_type in bgp_addr_type.keys():
|
for addr_type in bgp_addr_type.keys():
|
||||||
if not check_address_types(addr_type):
|
if not check_address_types(addr_type):
|
||||||
continue
|
continue
|
||||||
|
total_peer = 0
|
||||||
|
|
||||||
bgp_neighbors = bgp_addr_type[addr_type]["unicast"]["neighbor"]
|
bgp_neighbors = bgp_addr_type[addr_type]["unicast"]["neighbor"]
|
||||||
|
|
||||||
for bgp_neighbor in bgp_neighbors:
|
for bgp_neighbor in bgp_neighbors:
|
||||||
total_peer += len(bgp_neighbors[bgp_neighbor]["dest_link"])
|
total_peer += len(bgp_neighbors[bgp_neighbor]["dest_link"])
|
||||||
|
|
||||||
no_of_peer = 0
|
|
||||||
for addr_type in bgp_addr_type.keys():
|
for addr_type in bgp_addr_type.keys():
|
||||||
if not check_address_types(addr_type):
|
if not check_address_types(addr_type):
|
||||||
continue
|
continue
|
||||||
bgp_neighbors = bgp_addr_type[addr_type]["unicast"]["neighbor"]
|
bgp_neighbors = bgp_addr_type[addr_type]["unicast"]["neighbor"]
|
||||||
|
|
||||||
|
no_of_peer = 0
|
||||||
for bgp_neighbor, peer_data in bgp_neighbors.items():
|
for bgp_neighbor, peer_data in bgp_neighbors.items():
|
||||||
for dest_link in peer_data["dest_link"].keys():
|
for dest_link in peer_data["dest_link"].keys():
|
||||||
data = topo["routers"][bgp_neighbor]["links"]
|
data = topo["routers"][bgp_neighbor]["links"]
|
||||||
@ -1190,11 +1182,8 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
"neighbor_type" in peer_details
|
"neighbor_type" in peer_details
|
||||||
and peer_details["neighbor_type"] == "link-local"
|
and peer_details["neighbor_type"] == "link-local"
|
||||||
):
|
):
|
||||||
intf = topo["routers"][bgp_neighbor]["links"][
|
neighbor_ip = get_ipv6_linklocal_address(
|
||||||
dest_link
|
topo["routers"], bgp_neighbor, dest_link
|
||||||
]["interface"]
|
|
||||||
neighbor_ip = get_frr_ipv6_linklocal(
|
|
||||||
tgen, bgp_neighbor, intf
|
|
||||||
)
|
)
|
||||||
elif "source_link" in peer_details:
|
elif "source_link" in peer_details:
|
||||||
neighbor_ip = topo["routers"][bgp_neighbor][
|
neighbor_ip = topo["routers"][bgp_neighbor][
|
||||||
@ -1214,7 +1203,7 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
0
|
0
|
||||||
]
|
]
|
||||||
nh_state = None
|
nh_state = None
|
||||||
neighbor_ip = neighbor_ip.lower()
|
|
||||||
if addr_type == "ipv4":
|
if addr_type == "ipv4":
|
||||||
ipv4_data = show_bgp_json[vrf]["ipv4Unicast"][
|
ipv4_data = show_bgp_json[vrf]["ipv4Unicast"][
|
||||||
"peers"
|
"peers"
|
||||||
@ -1224,7 +1213,6 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
ipv6_data = show_bgp_json[vrf]["ipv6Unicast"][
|
ipv6_data = show_bgp_json[vrf]["ipv6Unicast"][
|
||||||
"peers"
|
"peers"
|
||||||
]
|
]
|
||||||
if neighbor_ip in ipv6_data:
|
|
||||||
nh_state = ipv6_data[neighbor_ip]["state"]
|
nh_state = ipv6_data[neighbor_ip]["state"]
|
||||||
|
|
||||||
if nh_state == "Established":
|
if nh_state == "Established":
|
||||||
@ -1238,9 +1226,8 @@ def verify_bgp_convergence(tgen, topo, dut=None):
|
|||||||
(router, vrf, addr_type))
|
(router, vrf, addr_type))
|
||||||
return errormsg
|
return errormsg
|
||||||
|
|
||||||
logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
|
logger.debug("Exiting API: verify_bgp_convergence()")
|
||||||
|
return True
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
@retry(attempts=3, wait=4, return_is_str=True)
|
@retry(attempts=3, wait=4, return_is_str=True)
|
||||||
|
@ -2352,7 +2352,7 @@ def configure_brctl(tgen, topo, input_dict):
|
|||||||
):
|
):
|
||||||
|
|
||||||
ip_cmd_list = []
|
ip_cmd_list = []
|
||||||
cmd = "brctl addbr {}".format(brctl_name)
|
cmd = "ip link add name {} type bridge stp_state {}".format(brctl_name, stp)
|
||||||
|
|
||||||
logger.info("[DUT: %s]: Running command: %s", dut, cmd)
|
logger.info("[DUT: %s]: Running command: %s", dut, cmd)
|
||||||
rnode.run(cmd)
|
rnode.run(cmd)
|
||||||
@ -2360,19 +2360,13 @@ def configure_brctl(tgen, topo, input_dict):
|
|||||||
ip_cmd_list.append("{} up dev {}".format(ip_cmd, brctl_name))
|
ip_cmd_list.append("{} up dev {}".format(ip_cmd, brctl_name))
|
||||||
|
|
||||||
if vxlan:
|
if vxlan:
|
||||||
cmd = "brctl addif {} {}".format(brctl_name, vxlan)
|
cmd = "{} dev {} master {}".format(ip_cmd, vxlan, brctl_name)
|
||||||
|
|
||||||
logger.info("[DUT: %s]: Running command: %s", dut, cmd)
|
logger.info("[DUT: %s]: Running command: %s", dut, cmd)
|
||||||
rnode.run(cmd)
|
rnode.run(cmd)
|
||||||
|
|
||||||
ip_cmd_list.append("{} up dev {}".format(ip_cmd, vxlan))
|
ip_cmd_list.append("{} up dev {}".format(ip_cmd, vxlan))
|
||||||
|
|
||||||
if stp:
|
|
||||||
cmd = "brctl stp {} {}".format(brctl_name, stp)
|
|
||||||
|
|
||||||
logger.info("[DUT: %s]: Running command: %s", dut, cmd)
|
|
||||||
rnode.run(cmd)
|
|
||||||
|
|
||||||
if vrf:
|
if vrf:
|
||||||
ip_cmd_list.append(
|
ip_cmd_list.append(
|
||||||
"{} dev {} master {}".format(ip_cmd, brctl_name, vrf)
|
"{} dev {} master {}".format(ip_cmd, brctl_name, vrf)
|
||||||
|
Loading…
Reference in New Issue
Block a user