afts_reboot - openconfig/featureprofiles GitHub Wiki
This test verifies that eBGP multipath and IS-IS routes are correctly reflected in AFT telemetry and that these routes, along with their next-hop information, are successfully restored after a DUT reboot.
- featureprofiles/topologies/atedut_2.testbed
Variables
- Let
Xbe the number of IPv4 prefixes to be advertised by eBGP. (User Adjustable Value) - Let
Ybe the number of IPv6 prefixes to be advertised by eBGP. (User Adjustable Value) - Let
Zbe the number of IPv4 prefixes to be advertised by IS-IS. (User Adjustable Value) - Let
Z1be the number of IPv6 prefixes to be advertised by IS-IS. (User Adjustable Value)
Configure IS-IS session.
- Configure DUT:port1,port2 for IS-IS session with ATE:port1,port2.
- IS-IS must be level 2 only with wide metric.
- IS-IS must be point to point.
- Send
ZIPv4 andZ1IPv6 prefixes from ATE:port1 to DUT:port1. - Each prefix advertised by ISIS must have one next hop pointing to ATE port1.
Configure eBGP multipath sessions.
- Configure eBGP sessions over the interface IPs between
ATE:port1/port2andDUT:port1/port2. - eBGP DUT AS is 65501 and peer AS is 200.
- Enable IPv4 and IPv6 address families for BGP.
- From both ATE:port1 and ATE:port2, advertise the same set of
XIPv4 andYIPv6 prefixes. This setup ensures the DUT learns two next-hops for each prefix, enabling multipath routing. - Each prefix advertised by eBGP must have 2 next hops pointing to ATE port1 and ATE port2.
- Use gNMI UPDATE option to push the Test Setup configuration to the DUT.
- ATE configuration must be pushed.
- Using gNMI Subscribe with an ON_CHANGE subscription, confirm that /
network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-stateisESTABLISHEDfor each BGP neighbor. - Initiate a gNMI Subscribe stream with ON_CHANGE mode to the path
/network-instances/network-instance[name=DEFAULT]/afts/. - For each eBGP prefix received, verify that the AFT entry points to a next-hop-group that contains two next-hops.
- For each IS-IS prefix received, verify that the AFT entry points to a next-hop-group that contains one next-hop.
- For all prefixes, verify that the
interface-ref/state/interfaceleaf within the next-hop object points to the correct egress interface (e.g., port1, port2). - Verify that all other leaves within the subscribed AFT paths (e.g., prefix, next-hop-group, id, ip-address) contain valid, non-default data.
- Initiate a reboot on the DUT using the gNOI.System.Reboot RPC.
- After initiating the reboot, continuously poll the
/system/state/boot-timeleaf via gNMI subscribe once request. Wait for the DUT to respond and for the BGP peerings to re-establish by polling/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-stateuntil it returns toESTABLISHED.
- Verify that the value of
/system/state/boot-timeafter the reboot is greater than the value read before the reboot. - During reboot gNMI connection will terminate, retry must be there till the device comes up.
- Confirm that
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-stateisESTABLISHEDfor all BGP neighbors. - Using the gNMI Subscribe stream for
/network-instances/network-instance[name=DEFAULT]/afts/, re-verify the state of the AFTs: - Confirm eBGP prefixes have next-hop-groups with two next-hops.
- Confirm IS-IS prefixes have next-hop-groups with one next-hop.
- Confirm all next-hops point to the correct egress interfaces.
- Confirm all relevant AFT leaves are populated with the correct post-reboot state.
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:
## State Paths ##
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group:
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix:
/network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/next-hop-group:
/network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/prefix:
/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/index:
/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/weight:
/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id:
/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/interface:
/network-instances/network-instance/afts/next-hops/next-hop/state/index:
/network-instances/network-instance/afts/next-hops/next-hop/state/ip-address:
rpcs:
gnmi:
gNMI.Subscribe:{
"network-instances": {
"network-instance": [
{
"name": "DEFAULT",
"protocols": {
"protocol": [
{
"identifier": "BGP",
"name": "BGP",
"config": {
"identifier": "BGP",
"name": "BGP"
},
"bgp": {
"global": {
"config": {
"as": 65501,
"router-id": "192.0.2.1"
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV4_UNICAST",
"config": {
"afi-safi-name": "IPV4_UNICAST",
"enabled": true
},
"use-multiple-paths": {
"ebgp": {
"config": {
"maximum-paths": 2
}
}
}
},
{
"afi-safi-name": "IPV6_UNICAST",
"config": {
"afi-safi-name": "IPV6_UNICAST",
"enabled": true
},
"use-multiple-paths": {
"ebgp": {
"config": {
"maximum-paths": 2
}
}
}
}
]
}
},
"peer-groups": {
"peer-group": [
{
"peer-group-name": "BGP-PEER-GROUP-V4-P1",
"config": {
"peer-group-name": "BGP-PEER-GROUP-V4-P1",
"peer-as": 200
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV4_UNICAST",
"config": {
"afi-safi-name": "IPV4_UNICAST",
"enabled": true
},
"apply-policy": {
"config": {
"import-policy": [
"ALLOW"
],
"export-policy": [
"ALLOW"
]
}
},
"use-multiple-paths": { "config": { "enabled": true } }
}
]
}
},
{
"peer-group-name": "BGP-PEER-GROUP-V6-P1",
"config": {
"peer-group-name": "BGP-PEER-GROUP-V6-P1",
"peer-as": 200
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV6_UNICAST",
"config": {
"afi-safi-name": "IPV6_UNICAST",
"enabled": true
},
"apply-policy": {
"config": {
"import-policy": [
"ALLOW"
],
"export-policy": [
"ALLOW"
]
}
},
"use-multiple-paths": { "config": { "enabled": true } }
}
]
}
},
{
"peer-group-name": "BGP-PEER-GROUP-V4-P2",
"config": {
"peer-group-name": "BGP-PEER-GROUP-V4-P2",
"peer-as": 200
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV4_UNICAST",
"config": {
"afi-safi-name": "IPV4_UNICAST",
"enabled": true
},
"apply-policy": {
"config": {
"import-policy": [
"ALLOW"
],
"export-policy": [
"ALLOW"
]
}
},
"use-multiple-paths": { "config": { "enabled": true } }
}
]
}
},
{
"peer-group-name": "BGP-PEER-GROUP-V6-P2",
"config": {
"peer-group-name": "BGP-PEER-GROUP-V6-P2",
"peer-as": 200
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV6_UNICAST",
"config": {
"afi-safi-name": "IPV6_UNICAST",
"enabled": true
},
"apply-policy": {
"config": {
"import-policy": [
"ALLOW"
],
"export-policy": [
"ALLOW"
]
}
},
"use-multiple-paths": { "config": { "enabled": true } }
}
]
}
}
]
},
"neighbors": {
"neighbor": [
{
"neighbor-address": "192.0.2.2",
"config": {
"neighbor-address": "192.0.2.2",
"peer-as": 200,
"enabled": true,
"peer-group": "BGP-PEER-GROUP-V4-P1"
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV4_UNICAST",
"config": {
"afi-safi-name": "IPV4_UNICAST",
"enabled": true
}
}
]
}
},
{
"neighbor-address": "2001:db8::2",
"config": {
"neighbor-address": "2001:db8::2",
"peer-as": 200,
"enabled": true,
"peer-group": "BGP-PEER-GROUP-V6-P1"
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV6_UNICAST",
"config": {
"afi-safi-name": "IPV6_UNICAST",
"enabled": true
}
}
]
}
},
{
"neighbor-address": "192.0.2.6",
"config": {
"neighbor-address": "192.0.2.6",
"peer-as": 200,
"enabled": true,
"peer-group": "BGP-PEER-GROUP-V4-P2"
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV4_UNICAST",
"config": {
"afi-safi-name": "IPV4_UNICAST",
"enabled": true
}
}
]
}
},
{
"neighbor-address": "2001:db8::6",
"config": {
"neighbor-address": "2001:db8::6",
"peer-as": 200,
"enabled": true,
"peer-group": "BGP-PEER-GROUP-V6-P2"
},
"afi-safis": {
"afi-safi": [
{
"afi-safi-name": "IPV6_UNICAST",
"config": {
"afi-safi-name": "IPV6_UNICAST",
"enabled": true
}
}
]
}
}
]
}
}
},
{
"identifier": "ISIS",
"name": "ISIS",
"config": {
"identifier": "ISIS",
"name": "ISIS"
},
"isis": {
"global": {
"config": {
"hello-padding": "DISABLE"
}
},
"interfaces": {
"interface": [
{
"interface-id": "port1",
"config": {
"interface-id": "port1",
"enabled": true
},
"levels": {
"level": [
{
"level-number": 2,
"config": {
"level-number": 2
}
}
]
}
},
{
"interface-id": "port2",
"config": {
"interface-id": "port2",
"enabled": true
},
"levels": {
"level": [
{
"level-number": 2,
"config": {
"level-number": 2
}
}
]
}
}
]
}
}
}
]
}
}
]
},
"routing-policy": {
"policy-definitions": {
"policy-definition": [
{
"name": "ALLOW",
"config": {
"name": "ALLOW"
},
"statements": {
"statement": [
{
"name": "20",
"config": {
"name": "20"
},
"actions": {
"config": {
"policy-result": "ACCEPT_ROUTE"
}
}
}
]
}
}
]
}
}
}