bgp_confederation_test - openconfig/featureprofiles GitHub Wiki
This test suite ensures that the router supports BGP Autonomous System Confederations (RFC 5065) for IPv4 and IPv6 unicast:
- Confederation configuration and state (
identifierandmember-as) - External eBGP, iBGP, and confederation-eBGP session establishment
-
AS_PATH(AS_CONFED_SEQUENCEandAS_SEQ) propagation and traffic forwarding across confederation, iBGP, and external eBGP peers
graph LR
R1["ATE router R1 (AS 64510)"]
subgraph Confed["Confederation 64500"]
DUT["DUT (Member-AS 64501)"] <-->|"iBGP"| R2["ATE router R2 (AS 64501)"]
DUT <-->|"confederation-eBGP"| R3["ATE router R3 (AS 64502)"]
end
R1 <-->|"External eBGP"| DUT
| Device | Port | IPv4 | IPv6 | AS | Confederation ID | Member-AS | Router ID |
|---|---|---|---|---|---|---|---|
| DUT | Port 1, 2, 3 | 192.0.2.1/30, 192.0.2.5/30, 192.0.2.9/30 | 2001:db8::1/126, 2001:db8::5/126, 2001:db8::9/126 | 64501 | 64500 | 64502 | 192.0.2.254 |
| ATE R1 | Port 1 | 192.0.2.2/30 | 2001:db8::2/126 | 64510 | N/A | N/A | 192.0.2.2 |
| ATE R2 | Port 2 | 192.0.2.6/30 | 2001:db8::6/126 | 64501 | 64500 | N/A | 192.0.2.6 |
| ATE R3 | Port 3 | 192.0.2.10/30 | 2001:db8::a/126 | 64502 | 64500 | 64501 | 192.0.2.10 |
All advertised BGP routes on OTG have the below specs:
| Name | ATE Port | IPv4 Prefix | IPv6 Prefix | AS_PATH |
|---|---|---|---|---|
| EXT | Port 1 | 203.0.113.0/26 | 2001:db8:100::/48 | AS_SEQ [64510] |
| IBGP | Port 2 | 198.51.100.0/26 | 2001:db8:200::/48 | empty |
| CONFED | Port 3 | 198.51.100.64/26 | 2001:db8:300::/48 | AS_CONFED_SEQUENCE [64502] |
- Connect DUT port-1, port-2, and port-3 to OTG port-1, port-2, and port-3.
- Configure OTG interfaces, BGP peers (R1 eBGP AS
64510, R2 iBGP AS64501, R3 confederation-eBGP AS64502), route ranges, and IPv4/IPv6 traffic flows per the tables above, and start OTG protocols. - Configure DUT interfaces and BGP in the
DEFAULTnetwork instance with global AS64501, router ID192.0.2.254, confederation identifier64500, member-as[64502], and IPv4/IPv6 unicast neighbors for R1, R2, and R3.
- Verify DUT BGP global AS (
64501), confederation identifier (64500), and member-as ([64502]). - Verify all 6 IPv4 and IPv6 BGP sessions are
ESTABLISHED.
- Advertise the
CONFEDroute prefixes (198.51.100.64/26,2001:db8:300::/48) from ATE R3 (port-3). - Verify in the DUT
loc-riband on ATE R2 (port-2) that theCONFEDroutes are received withAS_CONFED_SEQUENCE [64502]. - Verify IPv4 and IPv6 traffic from port-2 to port-3 passes without loss.
- Advertise the
IBGProute prefixes (198.51.100.0/26,2001:db8:200::/48) from ATE R2 (port-2). - Verify on ATE R3 (port-3) that the
IBGProutes are received withAS_CONFED_SEQUENCE [64501]. - Verify IPv4 and IPv6 traffic from port-3 to port-2 passes without loss.
- Verify ATE R1 (port-1) receives the
CONFEDandIBGProutes withAS_SEQ [64500](AS_CONFED_SEQUENCEremoved). - Verify IPv4 and IPv6 traffic from port-1 to port-2 and port-3 passes without loss.
- Advertise the
EXTroute prefixes (203.0.113.0/26,2001:db8:100::/48) from ATE R1 (port-1). - Verify ATE R3 (port-3) receives the
EXTroutes withAS_CONFED_SEQUENCE [64501], AS_SEQ [64510]and ATE R2 (port-2) receives theEXTroutes withAS_SEQ [64510]. - Verify IPv4 and IPv6 traffic from port-2 and port-3 to port-1 passes without loss.
- Verify BGP confederation state and session establishment on the DUT
- Advertise the BGP route ranges from OTG and collect the RIB and learned route attributes on the DUT and OTG
- Start traffic flows, wait 30 seconds, stop traffic flows, and collect RX/TX packet counts
- If any of the below conditions are not met, test should be declared as a
"FAIL":
- Count of BGP sessions in the
ESTABLISHEDstate is less than 6 - DUT confederation state (
as,identifier,member-as) or receivedAS_PATHattributes do not match the expected values inRT-1.111.1throughRT-1.111.5 - Traffic flow packet loss is greater than 1%
- Count of BGP sessions in the
- Remove BGP and interface configurations from the DUT and stop OTG protocols to restore the baseline state.
{
"network-instances": {
"network-instance": [
{
"config": {
"name": "DEFAULT",
"type": "openconfig-network-instance-types:DEFAULT_INSTANCE"
},
"name": "DEFAULT",
"protocols": {
"protocol": [
{
"bgp": {
"global": {
"confederation": {
"config": {
"identifier": 64500,
"member-as": [
64502
]
}
},
"config": {
"as": 64501,
"router-id": "192.0.2.254"
}
}
},
"config": {
"identifier": "openconfig-policy-types:BGP",
"name": "BGP"
},
"identifier": "openconfig-policy-types:BGP",
"name": "BGP"
}
]
}
}
]
}
}paths:
## Config Parameter Coverage
/network-instances/network-instance/protocols/protocol/bgp/global/config/as:
/network-instances/network-instance/protocols/protocol/bgp/global/config/router-id:
/network-instances/network-instance/protocols/protocol/bgp/global/confederation/config/identifier:
/network-instances/network-instance/protocols/protocol/bgp/global/confederation/config/member-as:
## Telemetry Parameter Coverage
/network-instances/network-instance/protocols/protocol/bgp/global/state/as:
/network-instances/network-instance/protocols/protocol/bgp/global/confederation/state/identifier:
/network-instances/network-instance/protocols/protocol/bgp/global/confederation/state/member-as:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/state/attr-index:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/state/attr-index:
/network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as-path/as-segment/state/type:
/network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as-path/as-segment/state/member:
rpcs:
gnmi:
gNMI.Set:
replace: true
delete: true
gNMI.Subscribe:
on_change: true- FFF