admin_distance_test - openconfig/featureprofiles GitHub Wiki
BGP default-route-distance, external-route-distance and internal-route-distance (administrative distance) configuration.
For each section of configuration below, prepare a gnmi.SetBatch with all the configuration items appended to one SetBatch. Then apply the configuration to the DUT in one gnmi.Set using the replace
option
- Connect DUT port-1, 2 and 3 to ATE port-1, 2 and 3
- Configure IPv4/IPv6 addresses on the ports
- Create an IPv4 network i.e.
ipv4-network-1 = 192.168.10.0/24
attached to ATE port-1 and port-2 - Create an IPv6 network i.e.
ipv6-network-1 = 2024:db8:64:64::/64
attached to ATE port-1 and port-2 - Configure IPv4 and IPv6 IS-IS between DUT Port-1 and ATE Port-1
- /network-instances/network-instance/protocols/protocol/isis/global/config
- Advertise
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
from ATE to DUT over the IPv4 and IPv6 IS-IS session on port-1
- Configure IPv4 and IPv6 eBGP between DUT Port-2 and ATE Port-2
- /network-instances/network-instance/protocols/protocol/bgp/global/config
- /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/config/
- Advertise
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
from ATE to DUT over the IPv4 and IPv6 eBGP session on port-2
- Configure Route-Distance of eBGP session on port-2 to 5
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/external-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 5 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/external-route-distance
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Verify that the traffic is received on port-2 of the ATE
- Configure Route-Distance of eBGP session on port-2 to 250
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/external-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 250 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/external-route-distance
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Verify that the traffic is received on port-1 of the ATE
- Replace IPv4 and IPv6 eBGP with IPv4 and IPv6 iBGP between DUT Port-2 and ATE Port-2
- /network-instances/network-instance/protocols/protocol/bgp/global/config
- /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/config/
- Advertise
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
from ATE to DUT over the IPv4 and IPv6 iBGP session on port-2
- Configure Route-Distance of iBGP session on port-2 to 5
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 5 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/internal-route-distance
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Validate that the traffic is received on port-2 of the ATE
- Configure Route-Distance of iBGP session on port-2 to 250
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 250 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/internal-route-distance
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Validate that the traffic is received on port-1 of the ATE
- Configure eBGP Route-Distance to 9 at DUT and eBGP session on ATE port-2
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 9 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/internal-route-distance
- Advertise
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
from OTG port 2 over eBGP - Configure static route for same ipv4, ipv6 prefix with next-hop towards port-1 and Route-Distance 13
- Disable isis on port-1
- Shut-down eBGP session from OTG
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Validate that the traffic is received on port-1 (towards static) of the ATE
- Wait for 10s
- Enable eBGP session back from OTG
- Validate that the traffic is received on port-2 (eBGP peer) of the ATE
- Remove static route configuration
- Configure eBGP Route-Distance to 9 at DUT and eBGP session on ATE port-2
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance
- Configure iBGP Route-Distance to 250 at DUT and iBGP session on ATE port-1
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance
- Validate using gNMI Subscribe with mode 'ONCE' that the correct Route-Distance value of 9 and 250 is reported:
- /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/internal-route-distance
- Advertise
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- From OTG port 1 over iBGP with one ASN on as-path
- From OTG port 2 over eBGP with six ASN on the path
- Generate traffic from ATE port-3 towards
ipv4-network-1 = 192.168.10.0/24
andipv6-network-1 = 2024:db8:64:64::/64
- Validate that the traffic is received on port-1 (iBGP peer) of the ATE
- Shut down iBGP session on port-1
- Validate that the traffic is received on port-2 (eBGP peer) of the ATE
The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here.
paths:
## Config paths
### Route-Distance
/network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/external-route-distance:
/network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/config/internal-route-distance:
## State paths
### Route-Distance
/network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/internal-route-distance:
/network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state/external-route-distance:
rpcs:
gnmi:
gNMI.Set:
gNMI.Subscribe: