From 891198130de26842c0ae161f2e1aab586d806782 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Tue, 3 Nov 2026 11:58:13 +0000 Subject: [PATCH 01/16] RT-1.21: Update README for BGP TCP MSS and PMTUD * Define what transport/state/tcp-mss reports: the configured MSS, or optionally the MSS in use when no MSS is configured. Checks on the in-use value now apply only when a value is reported. * RT-1.21.2: set the DUT1 port-2 MTU so that DUT1 port-1 is the smallest MTU on the path, and document the multihop reachability setup. * Use RFC 5398 ASNs, add Canonical OC per subtest, pass/fail criteria and cleanup, and extend the path coverage. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 257 ++++++++++++++++-- 1 file changed, 231 insertions(+), 26 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index c66da3f7e21..9282074c924 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -1,52 +1,257 @@ -# RT-1.21: BGP TCP MSS and PMTUD +# RT-1.21: BGP TCP MSS and PMTUD ## Summary -* Validate changes in TCP MSS value is allowed and takes effect. -* Validate DUT's PMTUD compliance. +This test validates that the router supports the TCP maximum segment size (MSS) +and path MTU discovery (PMTUD) settings for BGP sessions: -## Topology +* Configuration and state of the TCP MSS on IPv4 and IPv6 eBGP neighbors + (`transport/config/tcp-mss` and `transport/state/tcp-mss`) +* Configuration and state of PMTUD on an iBGP neighbor with TCP MD5 + authentication (`transport/config/mtu-discovery` and + `transport/state/mtu-discovery`) +* `transport/state/tcp-mss` reports the configured MSS. When no MSS is + configured, it may instead report the MSS in use on the TCP session. +* TODO: Add IPv6 link-local BGP neighbors if they are required. -* ATE:port1 <-> port1:DUT1:Port2 <-> port1:DUT2 +### Testbed type -## Procedure +* [TESTBED_DUT_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/dutdutate.testbed) -* Establish BGP sessions as follows: - * ATE:port1 --- eBGP-IPv4/IPv6 ---- DUT1:port1. - * ATE:port1 ---- iBGP IPv4 ---- DUT2:port1. -* Verify that the default TCP MSS value is set below the default interface MTU value. -* Change the Interface MTU on the DUT1:port1 port as well as ATE:port1 to 5040B -* Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. -* Re-establish the EBGP sessions by tcp reset. -* Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. -* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port1. -* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port1 MTU is set at 5040B as well. -* Enable PMTUD on DUT2:port1. -* Re-establish the IBGP sessions by tcp reset. -* Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. +### Topology + +```mermaid +graph LR + ATE["ATE"] <-->|"port-1 to port-1"| DUT1["DUT1"] + DUT1 <-->|"port-2 to port-1"| DUT2["DUT2"] +``` + +### DUT and OTG properties + +| Device | Port | IPv4 | IPv6 | AS | +| :----- | :----- | :----------- | :---------------------- | :---- | +| DUT1 | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | +| DUT1 | Port 2 | 192.0.2.5/30 | N/A | 64500 | +| DUT2 | Port 1 | 192.0.2.6/30 | N/A | 64501 | +| ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | + +### Procedure + +#### Initial Setup: + +* Connect ATE port-1 to DUT1 port-1, and DUT1 port-2 to DUT2 port-1. +* Configure the DUT and ATE interfaces per the table above. + +### RT-1.21.1: TCP MSS on eBGP sessions + +* Establish IPv4 and IPv6 eBGP sessions between ATE port-1 (AS `64501`) and + DUT1 port-1 (AS `64500`). +* If DUT1 reports `transport/state/tcp-mss` for the eBGP neighbors before an + MSS is configured, verify that the value is non-zero and below the MTU of + DUT1 port-1. +* Set the MTU of DUT1 port-1 and ATE port-1 to 5040 bytes. +* Configure `transport/config/tcp-mss` to 4096 on the IPv4 and IPv6 eBGP + neighbors on DUT1. +* Re-establish the eBGP sessions, for example by restarting the ATE BGP + peers. +* Verify that both sessions are `ESTABLISHED` and that + `transport/state/tcp-mss` is 4096 for both neighbors. + +#### Canonical OC + +```json +{ + "interfaces": { + "interface": [ + { + "name": "port1", + "config": { + "name": "port1", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + } + ] + }, + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2" + }, + "transport": { + "config": { + "tcp-mss": 4096 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2" + }, + "transport": { + "config": { + "tcp-mss": 4096 + } + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +### RT-1.21.2: PMTUD on a multihop iBGP session with TCP MD5 + +* Remove the BGP and MTU configuration of RT-1.21.1 from DUT1, so that DUT1 + port-1 returns to the default MTU of 1500 bytes. +* Provide reachability between ATE port-1 and DUT2 port-1 for a multihop + session, for example with IS-IS between ATE port-1 and DUT1 and a static + route on DUT2 to `192.0.2.2/32` through DUT1. +* Establish an IPv4 iBGP session with TCP MD5 authentication between ATE + port-1 (AS `64501`) and DUT2 port-1 (AS `64501`), two hops apart through + DUT1. +* Set the MTU of ATE port-1, DUT1 port-2 and DUT2 port-1 to 5040 bytes, and + leave DUT1 port-1 at 1500 bytes, so that DUT1 port-1 is the smallest MTU on + the path. +* Set `transport/config/mtu-discovery` to `true` on the iBGP neighbor on + DUT2. +* Re-establish the iBGP session. +* Verify that the session is `ESTABLISHED` and that + `transport/state/mtu-discovery` is `true`. +* If DUT2 reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS is + configured), verify that the value is non-zero and below 1500, which shows + that PMTUD has adjusted the MSS to the path. + +#### Canonical OC + +```json +{ + "interfaces": { + "interface": [ + { + "name": "port1", + "config": { + "name": "port1", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + } + ] + }, + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-as": 64501, + "auth-password": "md5-test-password" + }, + "transport": { + "config": { + "mtu-discovery": true + } + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +#### Test pass fail criteria + +* If any of the below conditions are not met, test should be declared as a + "FAIL": + 1. A BGP session is not `ESTABLISHED` after it is re-established + 2. `transport/state/tcp-mss` is not 4096 for the eBGP neighbors in + `RT-1.21.1` + 3. A reported `transport/state/tcp-mss` is zero or not below the limit in + `RT-1.21.1` or `RT-1.21.2` + 4. `transport/state/mtu-discovery` is not `true` on DUT2 in `RT-1.21.2` + +### Cleanup + +* Remove the BGP, IS-IS, static route and MTU configurations from DUT1 and + DUT2 and stop OTG protocols to restore the baseline state. ## OpenConfig Path and RPC Coverage + ```yaml paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/auth-password: + /interfaces/interface/config/mtu: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state: + + # TODO: Propose a leaf that reports the MSS in use on the session to + # openconfig/public, similar to timers/state/negotiated-hold-time. + # /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/negotiated-tcp-mss: rpcs: gnmi: - gNMI.Subscribe: gNMI.Set: + replace: true + delete: true + gNMI.Subscribe: + on_change: true ``` -## Canonical OC -```json -{} -``` - ## Minimum DUT platform requirement -N/A +* FFF From 2a18b036344c0d226862ac1e6d533abf7fae6f02 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Tue, 3 Nov 2026 12:49:20 +0000 Subject: [PATCH 02/16] RT-1.21: Add summary TODO for the in-use MSS leaf --- feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 9282074c924..7482d82582f 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -12,6 +12,8 @@ and path MTU discovery (PMTUD) settings for BGP sessions: `transport/state/mtu-discovery`) * `transport/state/tcp-mss` reports the configured MSS. When no MSS is configured, it may instead report the MSS in use on the TCP session. +* TODO: Verify the MSS in use on the session once OpenConfig adds a leaf + for it, as proposed in the OpenConfig Path and RPC Coverage section. * TODO: Add IPv6 link-local BGP neighbors if they are required. ### Testbed type From ac33b9f134091244ebdac463d6f98141da903c24 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Tue, 3 Nov 2026 13:23:53 +0000 Subject: [PATCH 03/16] RT-1.21: Tighten MSS range checks and clarify state semantics * Summary: state/tcp-mss reports the applied configuration, in the same way as timers/state/hold-time. * RT-1.21.1: an MSS reported without configuration must be between the TCP default MSS (536 for IPv4, 1220 for IPv6) and the MTU minus 40/60. * RT-1.21.2: the PMTUD check now uses 536 to 1460. --- .../bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 7482d82582f..208e51629f2 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -10,8 +10,9 @@ and path MTU discovery (PMTUD) settings for BGP sessions: * Configuration and state of PMTUD on an iBGP neighbor with TCP MD5 authentication (`transport/config/mtu-discovery` and `transport/state/mtu-discovery`) -* `transport/state/tcp-mss` reports the configured MSS. When no MSS is - configured, it may instead report the MSS in use on the TCP session. +* `transport/state/tcp-mss` reports the configured MSS (the applied + configuration), in the same way as `timers/state/hold-time`. When no MSS + is configured, it may instead report the MSS in use on the TCP session. * TODO: Verify the MSS in use on the session once OpenConfig adds a leaf for it, as proposed in the OpenConfig Path and RPC Coverage section. * TODO: Add IPv6 link-local BGP neighbors if they are required. @@ -49,8 +50,9 @@ graph LR * Establish IPv4 and IPv6 eBGP sessions between ATE port-1 (AS `64501`) and DUT1 port-1 (AS `64500`). * If DUT1 reports `transport/state/tcp-mss` for the eBGP neighbors before an - MSS is configured, verify that the value is non-zero and below the MTU of - DUT1 port-1. + MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of DUT1 port-1 minus + 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). * Set the MTU of DUT1 port-1 and ATE port-1 to 5040 bytes. * Configure `transport/config/tcp-mss` to 4096 on the IPv4 and IPv6 eBGP neighbors on DUT1. @@ -147,8 +149,8 @@ graph LR * Verify that the session is `ESTABLISHED` and that `transport/state/mtu-discovery` is `true`. * If DUT2 reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS is - configured), verify that the value is non-zero and below 1500, which shows - that PMTUD has adjusted the MSS to the path. + configured), verify that the value is at least 536 and at most 1460, which + shows that PMTUD has adjusted the MSS to the 1500-byte path. #### Canonical OC @@ -217,7 +219,7 @@ graph LR 1. A BGP session is not `ESTABLISHED` after it is re-established 2. `transport/state/tcp-mss` is not 4096 for the eBGP neighbors in `RT-1.21.1` - 3. A reported `transport/state/tcp-mss` is zero or not below the limit in + 3. A reported `transport/state/tcp-mss` is outside the range given in `RT-1.21.1` or `RT-1.21.2` 4. `transport/state/mtu-discovery` is not `true` on DUT2 in `RT-1.21.2` From c2d8aef286c5ff729cbd532f9618f304d4debe77 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Tue, 3 Nov 2026 15:52:35 +0000 Subject: [PATCH 04/16] RT-1.21: Address review comments on scope and coverage * Remove the IPv6 link-local and in-use MSS leaf TODOs. * List only the tcp-mss and mtu-discovery paths in the coverage section. * Remove the platform restriction (N/A). --- feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 208e51629f2..87154c1551c 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -13,9 +13,6 @@ and path MTU discovery (PMTUD) settings for BGP sessions: * `transport/state/tcp-mss` reports the configured MSS (the applied configuration), in the same way as `timers/state/hold-time`. When no MSS is configured, it may instead report the MSS in use on the TCP session. -* TODO: Verify the MSS in use on the session once OpenConfig adds a leaf - for it, as proposed in the OpenConfig Path and RPC Coverage section. -* TODO: Add IPv6 link-local BGP neighbors if they are required. ### Testbed type @@ -235,17 +232,10 @@ paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/auth-password: - /interfaces/interface/config/mtu: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state: - - # TODO: Propose a leaf that reports the MSS in use on the session to - # openconfig/public, similar to timers/state/negotiated-hold-time. - # /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/negotiated-tcp-mss: rpcs: gnmi: @@ -258,4 +248,4 @@ rpcs: ## Minimum DUT platform requirement -* FFF +N/A From ddaedd35ecb1445db6ca2247d5ceb93d32985ed3 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Wed, 4 Nov 2026 10:26:06 +0000 Subject: [PATCH 05/16] RT-1.21: Use a single DUT (TESTBED_DUT_ATE_2LINKS) * eBGP IPv4/IPv6 on ATE port-1 and iBGP IPv4 with TCP MD5 on ATE port-2, both to the same DUT. Remove DUT2, IS-IS and the static route. * RT-1.21.1: state/tcp-mss must equal config/tcp-mss. * RT-1.21.2: the MSS in use must fit the 1500-byte MTU of ATE port-2. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 76 +++++++++---------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 87154c1551c..e65e46d623f 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -16,47 +16,48 @@ and path MTU discovery (PMTUD) settings for BGP sessions: ### Testbed type -* [TESTBED_DUT_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/dutdutate.testbed) +* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) ### Topology ```mermaid graph LR - ATE["ATE"] <-->|"port-1 to port-1"| DUT1["DUT1"] - DUT1 <-->|"port-2 to port-1"| DUT2["DUT2"] + ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] + ATE <-->|"port-2: iBGP IPv4 with TCP MD5"| DUT ``` ### DUT and OTG properties | Device | Port | IPv4 | IPv6 | AS | | :----- | :----- | :----------- | :---------------------- | :---- | -| DUT1 | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | -| DUT1 | Port 2 | 192.0.2.5/30 | N/A | 64500 | -| DUT2 | Port 1 | 192.0.2.6/30 | N/A | 64501 | +| DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | +| DUT | Port 2 | 192.0.2.5/30 | N/A | 64500 | | ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | +| ATE | Port 2 | 192.0.2.6/30 | N/A | 64500 | ### Procedure #### Initial Setup: -* Connect ATE port-1 to DUT1 port-1, and DUT1 port-2 to DUT2 port-1. +* Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. * Configure the DUT and ATE interfaces per the table above. ### RT-1.21.1: TCP MSS on eBGP sessions * Establish IPv4 and IPv6 eBGP sessions between ATE port-1 (AS `64501`) and - DUT1 port-1 (AS `64500`). -* If DUT1 reports `transport/state/tcp-mss` for the eBGP neighbors before an - MSS is configured, verify that the value is at least the TCP default MSS - (536 for IPv4 and 1220 for IPv6) and at most the MTU of DUT1 port-1 minus - 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of DUT1 port-1 and ATE port-1 to 5040 bytes. + DUT port-1 (AS `64500`). +* If the DUT reports `transport/state/tcp-mss` for the eBGP neighbors before + an MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of DUT port-1 minus 40 + bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). +* Set the MTU of DUT port-1 and ATE port-1 to 5040 bytes. * Configure `transport/config/tcp-mss` to 4096 on the IPv4 and IPv6 eBGP - neighbors on DUT1. + neighbors on the DUT. * Re-establish the eBGP sessions, for example by restarting the ATE BGP peers. * Verify that both sessions are `ESTABLISHED` and that - `transport/state/tcp-mss` is 4096 for both neighbors. + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for both + neighbors. #### Canonical OC @@ -127,27 +128,20 @@ graph LR } ``` -### RT-1.21.2: PMTUD on a multihop iBGP session with TCP MD5 +### RT-1.21.2: PMTUD on an iBGP session with TCP MD5 -* Remove the BGP and MTU configuration of RT-1.21.1 from DUT1, so that DUT1 - port-1 returns to the default MTU of 1500 bytes. -* Provide reachability between ATE port-1 and DUT2 port-1 for a multihop - session, for example with IS-IS between ATE port-1 and DUT1 and a static - route on DUT2 to `192.0.2.2/32` through DUT1. * Establish an IPv4 iBGP session with TCP MD5 authentication between ATE - port-1 (AS `64501`) and DUT2 port-1 (AS `64501`), two hops apart through - DUT1. -* Set the MTU of ATE port-1, DUT1 port-2 and DUT2 port-1 to 5040 bytes, and - leave DUT1 port-1 at 1500 bytes, so that DUT1 port-1 is the smallest MTU on - the path. -* Set `transport/config/mtu-discovery` to `true` on the iBGP neighbor on - DUT2. + port-2 (AS `64500`) and DUT port-2 (AS `64500`). +* Set the MTU of DUT port-2 to 5040 bytes, and leave ATE port-2 at 1500 + bytes, so that the ATE side of the link has the smaller MTU. +* Set `transport/config/mtu-discovery` to `true` on the iBGP neighbor on the + DUT. * Re-establish the iBGP session. * Verify that the session is `ESTABLISHED` and that `transport/state/mtu-discovery` is `true`. -* If DUT2 reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS is - configured), verify that the value is at least 536 and at most 1460, which - shows that PMTUD has adjusted the MSS to the 1500-byte path. +* If the DUT reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS + is configured), verify that the value is at least 536 and at most 1460, + which shows that the MSS in use fits the 1500-byte MTU of ATE port-2. #### Canonical OC @@ -156,9 +150,9 @@ graph LR "interfaces": { "interface": [ { - "name": "port1", + "name": "port2", "config": { - "name": "port1", + "name": "port2", "type": "iana-if-type:ethernetCsmacd", "mtu": 5040 } @@ -185,10 +179,10 @@ graph LR "neighbors": { "neighbor": [ { - "neighbor-address": "192.0.2.2", + "neighbor-address": "192.0.2.6", "config": { - "neighbor-address": "192.0.2.2", - "peer-as": 64501, + "neighbor-address": "192.0.2.6", + "peer-as": 64500, "auth-password": "md5-test-password" }, "transport": { @@ -214,16 +208,16 @@ graph LR * If any of the below conditions are not met, test should be declared as a "FAIL": 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. `transport/state/tcp-mss` is not 4096 for the eBGP neighbors in - `RT-1.21.1` + 2. `transport/state/tcp-mss` does not equal `transport/config/tcp-mss` + (4096) for the eBGP neighbors in `RT-1.21.1` 3. A reported `transport/state/tcp-mss` is outside the range given in `RT-1.21.1` or `RT-1.21.2` - 4. `transport/state/mtu-discovery` is not `true` on DUT2 in `RT-1.21.2` + 4. `transport/state/mtu-discovery` is not `true` in `RT-1.21.2` ### Cleanup -* Remove the BGP, IS-IS, static route and MTU configurations from DUT1 and - DUT2 and stop OTG protocols to restore the baseline state. +* Remove the BGP and MTU configurations from the DUT and stop OTG protocols + to restore the baseline state. ## OpenConfig Path and RPC Coverage From c3b0a7c605bf2bf044ed6e90a905b7cbaaa5351e Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 12:25:29 +0000 Subject: [PATCH 06/16] RT-1.21: Record session resets on MSS change; clarify PMTUD scope * RT-1.21.1: record whether applying the MSS resets the eBGP sessions (reported only, not a pass/fail criterion). * RT-1.21.2: rename to PMTUD configuration and state, and note that the single-DUT testbed cannot verify the PMTUD behavior. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index e65e46d623f..c44b08bdd7f 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -50,9 +50,16 @@ graph LR an MSS is configured, verify that the value is at least the TCP default MSS (536 for IPv4 and 1220 for IPv6) and at most the MTU of DUT port-1 minus 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of DUT port-1 and ATE port-1 to 5040 bytes. +* Set the MTU of DUT port-1 and ATE port-1 to 5040 bytes, and verify that + both sessions are `ESTABLISHED`. +* Record `state/established-transitions` for both eBGP neighbors. * Configure `transport/config/tcp-mss` to 4096 on the IPv4 and IPv6 eBGP neighbors on the DUT. +* Record whether applying the MSS reset the sessions, that is, whether + `state/established-transitions` increased or `state/session-state` left + `ESTABLISHED` within 30 seconds of the change. This shows whether the + configuration change is disruptive. It is reported only and is not a + pass/fail criterion. * Re-establish the eBGP sessions, for example by restarting the ATE BGP peers. * Verify that both sessions are `ESTABLISHED` and that @@ -128,7 +135,13 @@ graph LR } ``` -### RT-1.21.2: PMTUD on an iBGP session with TCP MD5 +### RT-1.21.2: PMTUD configuration and state on an iBGP session with TCP MD5 + +PMTUD lowers the TCP segment size when a router between the BGP peers reports, +with an ICMP Fragmentation Needed or Packet Too Big message, that a packet is +too big for its next link. This testbed has no router between the DUT and the +ATE, so this subtest verifies the PMTUD configuration and state, not the PMTUD +behavior. * Establish an IPv4 iBGP session with TCP MD5 authentication between ATE port-2 (AS `64500`) and DUT port-2 (AS `64500`). @@ -141,7 +154,7 @@ graph LR `transport/state/mtu-discovery` is `true`. * If the DUT reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS is configured), verify that the value is at least 536 and at most 1460, - which shows that the MSS in use fits the 1500-byte MTU of ATE port-2. + which shows that the DUT uses the smaller MSS advertised by ATE port-2. #### Canonical OC From 282a5474e4ec2ebec4ad5704ba3f6d0cfca68f7d Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 12:30:15 +0000 Subject: [PATCH 07/16] RT-1.21: Clarify that the RT-1.21.1 MSS applies only to the eBGP neighbors --- feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index c44b08bdd7f..f3b947e93d6 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -152,9 +152,11 @@ behavior. * Re-establish the iBGP session. * Verify that the session is `ESTABLISHED` and that `transport/state/mtu-discovery` is `true`. -* If the DUT reports `transport/state/tcp-mss` for the iBGP neighbor (no MSS - is configured), verify that the value is at least 536 and at most 1460, - which shows that the DUT uses the smaller MSS advertised by ATE port-2. +* If the DUT reports `transport/state/tcp-mss` for the iBGP neighbor, verify + that the value is at least 536 and at most 1460, which shows that the DUT + uses the smaller MSS advertised by ATE port-2. No MSS is configured on the + iBGP neighbor: the 4096 set in RT-1.21.1 is configured only on the eBGP + neighbors on port-1, so it does not need to be removed. #### Canonical OC From cf036ea1ef4e6412b1aaf0852122c715e75a4a74 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 14:56:44 +0000 Subject: [PATCH 08/16] RT-1.21: Cover eBGP and iBGP at the neighbor and peer-group levels * Add IPv6 iBGP on port-2; MSS and PMTUD are tested on all four neighbors (eBGP and iBGP, IPv4 and IPv6). * RT-1.21.1: neighbor level. RT-1.21.2: peer-group level, with the neighbors inheriting the peer-group values. * Add the peer-group tcp-mss and mtu-discovery paths to the coverage. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 223 ++++++++++++------ 1 file changed, 151 insertions(+), 72 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index f3b947e93d6..eead71e51d3 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -5,14 +5,21 @@ This test validates that the router supports the TCP maximum segment size (MSS) and path MTU discovery (PMTUD) settings for BGP sessions: -* Configuration and state of the TCP MSS on IPv4 and IPv6 eBGP neighbors - (`transport/config/tcp-mss` and `transport/state/tcp-mss`) -* Configuration and state of PMTUD on an iBGP neighbor with TCP MD5 - authentication (`transport/config/mtu-discovery` and - `transport/state/mtu-discovery`) +* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and + `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` + and `transport/state/mtu-discovery`), at the neighbor level and at the + peer-group level +* IPv4 and IPv6 eBGP sessions, and IPv4 and IPv6 iBGP sessions with TCP MD5 + authentication * `transport/state/tcp-mss` reports the configured MSS (the applied - configuration), in the same way as `timers/state/hold-time`. When no MSS - is configured, it may instead report the MSS in use on the TCP session. + configuration, including a value inherited from the peer group), in the + same way as `timers/state/hold-time`. When no MSS is configured, it may + instead report the MSS in use on the TCP session. +* PMTUD lowers the TCP segment size when a router between the BGP peers + reports, with an ICMP Fragmentation Needed or Packet Too Big message, that + a packet is too big for its next link. This testbed has no router between + the DUT and the ATE, so the test verifies the PMTUD configuration and + state, not the PMTUD behavior. ### Testbed type @@ -23,7 +30,7 @@ and path MTU discovery (PMTUD) settings for BGP sessions: ```mermaid graph LR ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] - ATE <-->|"port-2: iBGP IPv4 with TCP MD5"| DUT + ATE <-->|"port-2: iBGP IPv4 and IPv6 with TCP MD5"| DUT ``` ### DUT and OTG properties @@ -31,9 +38,9 @@ graph LR | Device | Port | IPv4 | IPv6 | AS | | :----- | :----- | :----------- | :---------------------- | :---- | | DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | -| DUT | Port 2 | 192.0.2.5/30 | N/A | 64500 | +| DUT | Port 2 | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | | ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | -| ATE | Port 2 | 192.0.2.6/30 | N/A | 64500 | +| ATE | Port 2 | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64500 | ### Procedure @@ -41,30 +48,37 @@ graph LR * Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. * Configure the DUT and ATE interfaces per the table above. +* Configure BGP on the DUT (AS `64500`) with two peer groups: + * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP + neighbors on ATE port-1. + * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP + neighbors on ATE port-2, with TCP MD5 authentication. +* Configure the matching BGP peers on the ATE, and verify that all four + sessions are `ESTABLISHED`. -### RT-1.21.1: TCP MSS on eBGP sessions +### RT-1.21.1: TCP MSS and PMTUD at the neighbor level -* Establish IPv4 and IPv6 eBGP sessions between ATE port-1 (AS `64501`) and - DUT port-1 (AS `64500`). -* If the DUT reports `transport/state/tcp-mss` for the eBGP neighbors before - an MSS is configured, verify that the value is at least the TCP default MSS - (536 for IPv4 and 1220 for IPv6) and at most the MTU of DUT port-1 minus 40 - bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of DUT port-1 and ATE port-1 to 5040 bytes, and verify that - both sessions are `ESTABLISHED`. -* Record `state/established-transitions` for both eBGP neighbors. -* Configure `transport/config/tcp-mss` to 4096 on the IPv4 and IPv6 eBGP - neighbors on the DUT. +* If the DUT reports `transport/state/tcp-mss` for the neighbors before an + MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port minus + 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). +* Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 + bytes, and verify that all four sessions are `ESTABLISHED`. +* Record `state/established-transitions` for all four neighbors. +* Configure `transport/config/tcp-mss` to 4096 on all four neighbors. * Record whether applying the MSS reset the sessions, that is, whether `state/established-transitions` increased or `state/session-state` left `ESTABLISHED` within 30 seconds of the change. This shows whether the configuration change is disruptive. It is reported only and is not a pass/fail criterion. -* Re-establish the eBGP sessions, for example by restarting the ATE BGP +* Set `transport/config/mtu-discovery` to `true` on all four neighbors. +* Re-establish the four sessions, for example by restarting the ATE BGP peers. -* Verify that both sessions are `ESTABLISHED` and that - `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for both - neighbors. +* Verify that all four sessions are `ESTABLISHED`, and that for all four + neighbors `transport/state/tcp-mss` equals `transport/config/tcp-mss` + (4096) and `transport/state/mtu-discovery` is `true`. +* Remove `transport/config/tcp-mss` and `transport/config/mtu-discovery` + from the four neighbors. #### Canonical OC @@ -79,6 +93,14 @@ graph LR "type": "iana-if-type:ethernetCsmacd", "mtu": 5040 } + }, + { + "name": "port2", + "config": { + "name": "port2", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } } ] }, @@ -108,7 +130,8 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096 + "tcp-mss": 4096, + "mtu-discovery": true } } }, @@ -119,7 +142,32 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096 + "tcp-mss": 4096, + "mtu-discovery": true + } + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6" + }, + "transport": { + "config": { + "tcp-mss": 4096, + "mtu-discovery": true + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6" + }, + "transport": { + "config": { + "tcp-mss": 4096, + "mtu-discovery": true } } } @@ -135,45 +183,24 @@ graph LR } ``` -### RT-1.21.2: PMTUD configuration and state on an iBGP session with TCP MD5 +### RT-1.21.2: TCP MSS and PMTUD at the peer-group level -PMTUD lowers the TCP segment size when a router between the BGP peers reports, -with an ICMP Fragmentation Needed or Packet Too Big message, that a packet is -too big for its next link. This testbed has no router between the DUT and the -ATE, so this subtest verifies the PMTUD configuration and state, not the PMTUD -behavior. - -* Establish an IPv4 iBGP session with TCP MD5 authentication between ATE - port-2 (AS `64500`) and DUT port-2 (AS `64500`). -* Set the MTU of DUT port-2 to 5040 bytes, and leave ATE port-2 at 1500 - bytes, so that the ATE side of the link has the smaller MTU. -* Set `transport/config/mtu-discovery` to `true` on the iBGP neighbor on the - DUT. -* Re-establish the iBGP session. -* Verify that the session is `ESTABLISHED` and that +* Repeat RT-1.21.1, but configure the settings on the peer groups instead of + the neighbors: set `transport/config/tcp-mss` to 4000 and + `transport/config/mtu-discovery` to `true` on `EBGP-PEERS` and + `IBGP-PEERS`, with neither setting configured on the neighbors. +* Re-establish the four sessions. +* Verify that all four sessions are `ESTABLISHED`, and that for both peer + groups `transport/state/tcp-mss` is 4000 and `transport/state/mtu-discovery` is `true`. -* If the DUT reports `transport/state/tcp-mss` for the iBGP neighbor, verify - that the value is at least 536 and at most 1460, which shows that the DUT - uses the smaller MSS advertised by ATE port-2. No MSS is configured on the - iBGP neighbor: the 4096 set in RT-1.21.1 is configured only on the eBGP - neighbors on port-1, so it does not need to be removed. +* Verify that all four neighbors inherit the peer-group values: + `transport/state/tcp-mss` is 4000 and `transport/state/mtu-discovery` is + `true`. #### Canonical OC ```json { - "interfaces": { - "interface": [ - { - "name": "port2", - "config": { - "name": "port2", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - } - ] - }, "network-instances": { "network-instance": [ { @@ -191,22 +218,69 @@ behavior. "name": "BGP" }, "bgp": { - "neighbors": { - "neighbor": [ + "peer-groups": { + "peer-group": [ { - "neighbor-address": "192.0.2.6", + "peer-group-name": "EBGP-PEERS", "config": { - "neighbor-address": "192.0.2.6", - "peer-as": 64500, - "auth-password": "md5-test-password" + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "tcp-mss": 4000, + "mtu-discovery": true + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 }, "transport": { "config": { + "tcp-mss": 4000, "mtu-discovery": true } } } ] + }, + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-group": "EBGP-PEERS" + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "EBGP-PEERS" + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6", + "peer-group": "IBGP-PEERS", + "auth-password": "md5-test-password" + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "IBGP-PEERS", + "auth-password": "md5-test-password" + } + } + ] } } } @@ -220,14 +294,15 @@ behavior. #### Test pass fail criteria -* If any of the below conditions are not met, test should be declared as a +* If any of the below conditions occur, the test should be declared as a "FAIL": 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. `transport/state/tcp-mss` does not equal `transport/config/tcp-mss` - (4096) for the eBGP neighbors in `RT-1.21.1` - 3. A reported `transport/state/tcp-mss` is outside the range given in - `RT-1.21.1` or `RT-1.21.2` - 4. `transport/state/mtu-discovery` is not `true` in `RT-1.21.2` + 2. `transport/state/tcp-mss` is not 4096 for a neighbor in `RT-1.21.1`, or + not 4000 for a peer group or neighbor in `RT-1.21.2` + 3. `transport/state/mtu-discovery` is not `true` for a neighbor in + `RT-1.21.1`, or for a peer group or neighbor in `RT-1.21.2` + 4. A `transport/state/tcp-mss` reported before any MSS is configured is + outside the range given in `RT-1.21.1` ### Cleanup @@ -241,10 +316,14 @@ paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/mtu-discovery: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/mtu-discovery: rpcs: gnmi: From 1af08825ceb343189fddb802bf7992ad644ad8a7 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 15:13:26 +0000 Subject: [PATCH 09/16] RT-1.21: Remove TCP MD5 authentication from the iBGP sessions MD5 is not part of this feature and is covered by RT-1.1. --- .../bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index eead71e51d3..862cd909baa 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -9,8 +9,7 @@ and path MTU discovery (PMTUD) settings for BGP sessions: `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` and `transport/state/mtu-discovery`), at the neighbor level and at the peer-group level -* IPv4 and IPv6 eBGP sessions, and IPv4 and IPv6 iBGP sessions with TCP MD5 - authentication +* IPv4 and IPv6 eBGP and iBGP sessions * `transport/state/tcp-mss` reports the configured MSS (the applied configuration, including a value inherited from the peer group), in the same way as `timers/state/hold-time`. When no MSS is configured, it may @@ -30,7 +29,7 @@ and path MTU discovery (PMTUD) settings for BGP sessions: ```mermaid graph LR ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] - ATE <-->|"port-2: iBGP IPv4 and IPv6 with TCP MD5"| DUT + ATE <-->|"port-2: iBGP IPv4 and IPv6"| DUT ``` ### DUT and OTG properties @@ -52,7 +51,7 @@ graph LR * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP neighbors on ATE port-1. * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP - neighbors on ATE port-2, with TCP MD5 authentication. + neighbors on ATE port-2. * Configure the matching BGP peers on the ATE, and verify that all four sessions are `ESTABLISHED`. @@ -268,16 +267,14 @@ graph LR "neighbor-address": "192.0.2.6", "config": { "neighbor-address": "192.0.2.6", - "peer-group": "IBGP-PEERS", - "auth-password": "md5-test-password" + "peer-group": "IBGP-PEERS" } }, { "neighbor-address": "2001:db8::192:0:2:6", "config": { "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "IBGP-PEERS", - "auth-password": "md5-test-password" + "peer-group": "IBGP-PEERS" } } ] From a189fcac0697eb040571f5b9dbb2f081ffb452e8 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 15:41:36 +0000 Subject: [PATCH 10/16] RT-1.21: Add TODO to remove MD5 from the test code --- feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 862cd909baa..57caeffdee5 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -19,6 +19,9 @@ and path MTU discovery (PMTUD) settings for BGP sessions: a packet is too big for its next link. This testbed has no router between the DUT and the ATE, so the test verifies the PMTUD configuration and state, not the PMTUD behavior. +* TODO: The current test code configures TCP MD5 authentication on the + iBGP neighbor. Remove it when the code is updated to this README; BGP + MD5 authentication is covered by RT-1.1. ### Testbed type From 4712b3234e64fce542b98f0bc37e9aa00328f41f Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 19:49:58 +0000 Subject: [PATCH 11/16] RT-1.21: Separate the MSS and PMTUD subtests * RT-1.21.1: MSS at the neighbor level. * RT-1.21.2: MSS at the peer-group level, inherited by the neighbors. * RT-1.21.3: PMTUD at the neighbor and peer-group levels, with no MSS configured. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 128 +++++++++++++----- 1 file changed, 96 insertions(+), 32 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 57caeffdee5..2451bf04a16 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -58,7 +58,7 @@ graph LR * Configure the matching BGP peers on the ATE, and verify that all four sessions are `ESTABLISHED`. -### RT-1.21.1: TCP MSS and PMTUD at the neighbor level +### RT-1.21.1: TCP MSS at the neighbor level * If the DUT reports `transport/state/tcp-mss` for the neighbors before an MSS is configured, verify that the value is at least the TCP default MSS @@ -73,14 +73,12 @@ graph LR `ESTABLISHED` within 30 seconds of the change. This shows whether the configuration change is disruptive. It is reported only and is not a pass/fail criterion. -* Set `transport/config/mtu-discovery` to `true` on all four neighbors. * Re-establish the four sessions, for example by restarting the ATE BGP peers. -* Verify that all four sessions are `ESTABLISHED`, and that for all four - neighbors `transport/state/tcp-mss` equals `transport/config/tcp-mss` - (4096) and `transport/state/mtu-discovery` is `true`. -* Remove `transport/config/tcp-mss` and `transport/config/mtu-discovery` - from the four neighbors. +* Verify that all four sessions are `ESTABLISHED`, and that + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for all + four neighbors. +* Remove `transport/config/tcp-mss` from the four neighbors. #### Canonical OC @@ -132,8 +130,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096, - "mtu-discovery": true + "tcp-mss": 4096 } } }, @@ -144,8 +141,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096, - "mtu-discovery": true + "tcp-mss": 4096 } } }, @@ -156,8 +152,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096, - "mtu-discovery": true + "tcp-mss": 4096 } } }, @@ -168,8 +163,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4096, - "mtu-discovery": true + "tcp-mss": 4096 } } } @@ -185,19 +179,17 @@ graph LR } ``` -### RT-1.21.2: TCP MSS and PMTUD at the peer-group level +### RT-1.21.2: TCP MSS at the peer-group level -* Repeat RT-1.21.1, but configure the settings on the peer groups instead of - the neighbors: set `transport/config/tcp-mss` to 4000 and - `transport/config/mtu-discovery` to `true` on `EBGP-PEERS` and - `IBGP-PEERS`, with neither setting configured on the neighbors. +* Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` and + `IBGP-PEERS`, with no MSS configured on the neighbors. The MTU of all four + ports stays at 5040 bytes from RT-1.21.1. * Re-establish the four sessions. -* Verify that all four sessions are `ESTABLISHED`, and that for both peer - groups `transport/state/tcp-mss` is 4000 and - `transport/state/mtu-discovery` is `true`. -* Verify that all four neighbors inherit the peer-group values: - `transport/state/tcp-mss` is 4000 and `transport/state/mtu-discovery` is - `true`. +* Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 4000 for both peer groups, and that all four + neighbors inherit it (`transport/state/tcp-mss` is 4000). +* Remove `transport/config/tcp-mss` from both peer groups, and remove the MTU + configuration from the four ports so that they return to the default MTU. #### Canonical OC @@ -230,8 +222,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4000, - "mtu-discovery": true + "tcp-mss": 4000 } } }, @@ -243,8 +234,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4000, - "mtu-discovery": true + "tcp-mss": 4000 } } } @@ -292,6 +282,80 @@ graph LR } ``` +### RT-1.21.3: PMTUD at the neighbor and peer-group levels + +No MSS is configured in this subtest, and all four ports use the default MTU. + +* Set `transport/config/mtu-discovery` to `true` on all four neighbors. +* Re-establish the four sessions. +* Verify that all four sessions are `ESTABLISHED` and that + `transport/state/mtu-discovery` is `true` for all four neighbors. +* Remove `transport/config/mtu-discovery` from the neighbors, and set it to + `true` on the peer groups `EBGP-PEERS` and `IBGP-PEERS` instead. +* Re-establish the four sessions. +* Verify that all four sessions are `ESTABLISHED`, that + `transport/state/mtu-discovery` is `true` for both peer groups, and that + all four neighbors inherit it. + +#### Canonical OC + +```json +{ + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "mtu-discovery": true + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "mtu-discovery": true + } + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + #### Test pass fail criteria * If any of the below conditions occur, the test should be declared as a @@ -299,8 +363,8 @@ graph LR 1. A BGP session is not `ESTABLISHED` after it is re-established 2. `transport/state/tcp-mss` is not 4096 for a neighbor in `RT-1.21.1`, or not 4000 for a peer group or neighbor in `RT-1.21.2` - 3. `transport/state/mtu-discovery` is not `true` for a neighbor in - `RT-1.21.1`, or for a peer group or neighbor in `RT-1.21.2` + 3. `transport/state/mtu-discovery` is not `true` for a neighbor or peer + group in `RT-1.21.3` 4. A `transport/state/tcp-mss` reported before any MSS is configured is outside the range given in `RT-1.21.1` From d1db33b3fbb9fb6a10aa6b889d4d82fcaeab8805 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Fri, 6 Nov 2026 20:06:27 +0000 Subject: [PATCH 12/16] RT-1.21: Use two subtests, one for MSS and one for PMTUD * RT-1.21.1: MSS at the neighbor level, then at the peer-group level. * RT-1.21.2: PMTUD at the neighbor level, then at the peer-group level. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 205 +++++++++--------- 1 file changed, 104 insertions(+), 101 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 2451bf04a16..17b81279e89 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -58,7 +58,7 @@ graph LR * Configure the matching BGP peers on the ATE, and verify that all four sessions are `ESTABLISHED`. -### RT-1.21.1: TCP MSS at the neighbor level +### RT-1.21.1: TCP MSS at the neighbor and peer-group levels * If the DUT reports `transport/state/tcp-mss` for the neighbors before an MSS is configured, verify that the value is at least the TCP default MSS @@ -66,22 +66,36 @@ graph LR 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). * Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 bytes, and verify that all four sessions are `ESTABLISHED`. -* Record `state/established-transitions` for all four neighbors. -* Configure `transport/config/tcp-mss` to 4096 on all four neighbors. -* Record whether applying the MSS reset the sessions, that is, whether - `state/established-transitions` increased or `state/session-state` left - `ESTABLISHED` within 30 seconds of the change. This shows whether the - configuration change is disruptive. It is reported only and is not a - pass/fail criterion. -* Re-establish the four sessions, for example by restarting the ATE BGP - peers. -* Verify that all four sessions are `ESTABLISHED`, and that - `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for all - four neighbors. -* Remove `transport/config/tcp-mss` from the four neighbors. +* Neighbor level: + * Record `state/established-transitions` for all four neighbors. + * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. + * Record whether applying the MSS reset the sessions, that is, whether + `state/established-transitions` increased or `state/session-state` + left `ESTABLISHED` within 30 seconds of the change. This shows whether + the configuration change is disruptive. It is reported only and is not + a pass/fail criterion. + * Re-establish the four sessions, for example by restarting the ATE BGP + peers. + * Verify that all four sessions are `ESTABLISHED`, and that + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for + all four neighbors. + * Remove `transport/config/tcp-mss` from the four neighbors. +* Peer-group level: + * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` + and `IBGP-PEERS`, with no MSS configured on the neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 4000 for both peer groups, and that all + four neighbors inherit it (`transport/state/tcp-mss` is 4000). + * Remove `transport/config/tcp-mss` from both peer groups. +* Remove the MTU configuration from the four ports so that they return to the + default MTU. #### Canonical OC +The neighbor-level and peer-group-level values are configured in separate +steps, not at the same time. + ```json { "interfaces": { @@ -121,12 +135,41 @@ graph LR "name": "BGP" }, "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + } + ] + }, "neighbors": { "neighbor": [ { "neighbor-address": "192.0.2.2", "config": { - "neighbor-address": "192.0.2.2" + "neighbor-address": "192.0.2.2", + "peer-group": "EBGP-PEERS" }, "transport": { "config": { @@ -137,7 +180,8 @@ graph LR { "neighbor-address": "2001:db8::192:0:2:2", "config": { - "neighbor-address": "2001:db8::192:0:2:2" + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "EBGP-PEERS" }, "transport": { "config": { @@ -148,7 +192,8 @@ graph LR { "neighbor-address": "192.0.2.6", "config": { - "neighbor-address": "192.0.2.6" + "neighbor-address": "192.0.2.6", + "peer-group": "IBGP-PEERS" }, "transport": { "config": { @@ -159,7 +204,8 @@ graph LR { "neighbor-address": "2001:db8::192:0:2:6", "config": { - "neighbor-address": "2001:db8::192:0:2:6" + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "IBGP-PEERS" }, "transport": { "config": { @@ -179,20 +225,30 @@ graph LR } ``` -### RT-1.21.2: TCP MSS at the peer-group level +### RT-1.21.2: PMTUD at the neighbor and peer-group levels + +No MSS is configured in this subtest, and all four ports use the default MTU. -* Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` and - `IBGP-PEERS`, with no MSS configured on the neighbors. The MTU of all four - ports stays at 5040 bytes from RT-1.21.1. -* Re-establish the four sessions. -* Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 4000 for both peer groups, and that all four - neighbors inherit it (`transport/state/tcp-mss` is 4000). -* Remove `transport/config/tcp-mss` from both peer groups, and remove the MTU - configuration from the four ports so that they return to the default MTU. +* Neighbor level: + * Set `transport/config/mtu-discovery` to `true` on all four neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED` and that + `transport/state/mtu-discovery` is `true` for all four neighbors. + * Remove `transport/config/mtu-discovery` from the four neighbors. +* Peer-group level: + * Set `transport/config/mtu-discovery` to `true` on the peer groups + `EBGP-PEERS` and `IBGP-PEERS`. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/mtu-discovery` is `true` for both peer groups, and + that all four neighbors inherit it. + * Remove `transport/config/mtu-discovery` from both peer groups. #### Canonical OC +The neighbor-level and peer-group-level values are configured in separate +steps, not at the same time. + ```json { "network-instances": { @@ -222,7 +278,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4000 + "mtu-discovery": true } } }, @@ -234,7 +290,7 @@ graph LR }, "transport": { "config": { - "tcp-mss": 4000 + "mtu-discovery": true } } } @@ -247,6 +303,11 @@ graph LR "config": { "neighbor-address": "192.0.2.2", "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "mtu-discovery": true + } } }, { @@ -254,6 +315,11 @@ graph LR "config": { "neighbor-address": "2001:db8::192:0:2:2", "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "mtu-discovery": true + } } }, { @@ -261,70 +327,6 @@ graph LR "config": { "neighbor-address": "192.0.2.6", "peer-group": "IBGP-PEERS" - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "IBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -### RT-1.21.3: PMTUD at the neighbor and peer-group levels - -No MSS is configured in this subtest, and all four ports use the default MTU. - -* Set `transport/config/mtu-discovery` to `true` on all four neighbors. -* Re-establish the four sessions. -* Verify that all four sessions are `ESTABLISHED` and that - `transport/state/mtu-discovery` is `true` for all four neighbors. -* Remove `transport/config/mtu-discovery` from the neighbors, and set it to - `true` on the peer groups `EBGP-PEERS` and `IBGP-PEERS` instead. -* Re-establish the four sessions. -* Verify that all four sessions are `ESTABLISHED`, that - `transport/state/mtu-discovery` is `true` for both peer groups, and that - all four neighbors inherit it. - -#### Canonical OC - -```json -{ - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 }, "transport": { "config": { @@ -333,10 +335,10 @@ No MSS is configured in this subtest, and all four ports use the default MTU. } }, { - "peer-group-name": "IBGP-PEERS", + "neighbor-address": "2001:db8::192:0:2:6", "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "IBGP-PEERS" }, "transport": { "config": { @@ -361,10 +363,11 @@ No MSS is configured in this subtest, and all four ports use the default MTU. * If any of the below conditions occur, the test should be declared as a "FAIL": 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. `transport/state/tcp-mss` is not 4096 for a neighbor in `RT-1.21.1`, or - not 4000 for a peer group or neighbor in `RT-1.21.2` - 3. `transport/state/mtu-discovery` is not `true` for a neighbor or peer - group in `RT-1.21.3` + 2. In `RT-1.21.1`, `transport/state/tcp-mss` is not 4096 for a neighbor at + the neighbor level, or not 4000 for a peer group or neighbor at the + peer-group level + 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `true` for a + neighbor or peer group 4. A `transport/state/tcp-mss` reported before any MSS is configured is outside the range given in `RT-1.21.1` From 66b18bf0f30940915a2bbe407e7f0bdbaa59bf56 Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Mon, 9 Nov 2026 12:44:52 +0000 Subject: [PATCH 13/16] RT-1.21: Add the neighbor-level override at the peer-group level With the MSS (RT-1.21.1) or PMTUD (RT-1.21.2) set on the peer groups, override it on one neighbor of each peer group and verify that only that neighbor changes, while the other neighbors keep the peer-group value. --- .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 72 ++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 17b81279e89..c5015d1d821 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -9,6 +9,8 @@ and path MTU discovery (PMTUD) settings for BGP sessions: `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` and `transport/state/mtu-discovery`), at the neighbor level and at the peer-group level +* A value set on a neighbor overrides the peer-group value for that neighbor + only. The other neighbors in the peer group keep the peer-group value. * IPv4 and IPv6 eBGP and iBGP sessions * `transport/state/tcp-mss` reports the configured MSS (the applied configuration, including a value inherited from the peer group), in the @@ -87,14 +89,24 @@ graph LR * Verify that all four sessions are `ESTABLISHED`, that `transport/state/tcp-mss` is 4000 for both peer groups, and that all four neighbors inherit it (`transport/state/tcp-mss` is 4000). - * Remove `transport/config/tcp-mss` from both peer groups. + * Neighbor-level override: keep the peer-group MSS, and set + `transport/config/tcp-mss` to 1400 on one neighbor in each peer group + (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that + it is still 4000 for the two IPv6 neighbors and both peer groups. + * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from + both peer groups. * Remove the MTU configuration from the four ports so that they return to the default MTU. #### Canonical OC -The neighbor-level and peer-group-level values are configured in separate -steps, not at the same time. +The block below shows the neighbor-level override step: the peer groups use +an MSS of 4000, and the IPv4 neighbors override it with 1400. In the +neighbor-level step, the four neighbors use 4096 instead, and the peer groups +have no MSS. ```json { @@ -173,7 +185,7 @@ steps, not at the same time. }, "transport": { "config": { - "tcp-mss": 4096 + "tcp-mss": 1400 } } }, @@ -182,11 +194,6 @@ steps, not at the same time. "config": { "neighbor-address": "2001:db8::192:0:2:2", "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 4096 - } } }, { @@ -197,7 +204,7 @@ steps, not at the same time. }, "transport": { "config": { - "tcp-mss": 4096 + "tcp-mss": 1400 } } }, @@ -206,11 +213,6 @@ steps, not at the same time. "config": { "neighbor-address": "2001:db8::192:0:2:6", "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 4096 - } } } ] @@ -242,12 +244,23 @@ No MSS is configured in this subtest, and all four ports use the default MTU. * Verify that all four sessions are `ESTABLISHED`, that `transport/state/mtu-discovery` is `true` for both peer groups, and that all four neighbors inherit it. - * Remove `transport/config/mtu-discovery` from both peer groups. + * Neighbor-level override: keep PMTUD enabled on the peer groups, and + set `transport/config/mtu-discovery` to `false` on one neighbor in + each peer group (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/mtu-discovery` is `false` for the two IPv4 neighbors, + and that it is still `true` for the two IPv6 neighbors and both peer + groups. + * Remove `transport/config/mtu-discovery` from the two IPv4 neighbors and + from both peer groups. #### Canonical OC -The neighbor-level and peer-group-level values are configured in separate -steps, not at the same time. +The block below shows the neighbor-level override step: PMTUD is enabled on +the peer groups and disabled on the IPv4 neighbors. In the neighbor-level +step, it is enabled on the four neighbors instead, and not configured on the +peer groups. ```json { @@ -306,7 +319,7 @@ steps, not at the same time. }, "transport": { "config": { - "mtu-discovery": true + "mtu-discovery": false } } }, @@ -315,11 +328,6 @@ steps, not at the same time. "config": { "neighbor-address": "2001:db8::192:0:2:2", "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": true - } } }, { @@ -330,7 +338,7 @@ steps, not at the same time. }, "transport": { "config": { - "mtu-discovery": true + "mtu-discovery": false } } }, @@ -339,11 +347,6 @@ steps, not at the same time. "config": { "neighbor-address": "2001:db8::192:0:2:6", "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": true - } } } ] @@ -364,10 +367,11 @@ steps, not at the same time. "FAIL": 1. A BGP session is not `ESTABLISHED` after it is re-established 2. In `RT-1.21.1`, `transport/state/tcp-mss` is not 4096 for a neighbor at - the neighbor level, or not 4000 for a peer group or neighbor at the - peer-group level - 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `true` for a - neighbor or peer group + the neighbor level, not 1400 for a neighbor with the override, or not + 4000 for a peer group or any other neighbor at the peer-group level + 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `false` for a + neighbor with the override, or not `true` for a peer group or any + other neighbor 4. A `transport/state/tcp-mss` reported before any MSS is configured is outside the range given in `RT-1.21.1` From 24e94d3717eeefd7d6d4f13002662067d66e47aa Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Wed, 11 Nov 2026 10:16:52 +0000 Subject: [PATCH 14/16] RT-1.22: Add BGP TCP MSS test README Moves the MSS test plan to a new test, RT-1.22, in feature/bgp/otg_tests/bgp_tcp_mss. RT-1.21 (bgp_tcp_mss_path_mtu) is left unchanged. --- feature/bgp/otg_tests/bgp_tcp_mss/README.md | 262 +++++++++++ .../otg_tests/bgp_tcp_mss/metadata.textproto | 8 + .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 408 ++---------------- testregistry.textproto | 5 + 4 files changed, 300 insertions(+), 383 deletions(-) create mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/README.md create mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/README.md b/feature/bgp/otg_tests/bgp_tcp_mss/README.md new file mode 100644 index 00000000000..1dc2bf0adad --- /dev/null +++ b/feature/bgp/otg_tests/bgp_tcp_mss/README.md @@ -0,0 +1,262 @@ +# RT-1.22: BGP TCP MSS + +## Summary + +This test validates that the router supports the TCP maximum segment size (MSS) +setting for BGP sessions: + +* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and + `transport/state/tcp-mss`) at the neighbor level and at the peer-group + level +* A value set on a neighbor overrides the peer-group value for that neighbor + only. The other neighbors in the peer group keep the peer-group value. +* IPv4 and IPv6 eBGP and iBGP sessions +* `transport/state/tcp-mss` reports the configured MSS (the applied + configuration, including a value inherited from the peer group), in the + same way as `timers/state/hold-time`. When no MSS is configured, it may + instead report the MSS in use on the TCP session. + +Path MTU discovery (PMTUD) is covered by RT-1.21. + +### Testbed type + +* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) + +### Topology + +```mermaid +graph LR + ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] + ATE <-->|"port-2: iBGP IPv4 and IPv6"| DUT +``` + +### DUT and OTG properties + +| Device | Port | IPv4 | IPv6 | AS | +| :----- | :----- | :----------- | :---------------------- | :---- | +| DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | +| DUT | Port 2 | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | +| ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | +| ATE | Port 2 | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64500 | + +### Procedure + +#### Initial Setup: + +* Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. +* Configure the DUT and ATE interfaces per the table above. +* Configure BGP on the DUT (AS `64500`) with two peer groups: + * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP + neighbors on ATE port-1. + * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP + neighbors on ATE port-2. +* Configure the matching BGP peers on the ATE, and verify that all four + sessions are `ESTABLISHED`. + +### RT-1.22.1: TCP MSS at the neighbor and peer-group levels + +* If the DUT reports `transport/state/tcp-mss` for the neighbors before an + MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port minus + 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). +* Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 + bytes, and verify that all four sessions are `ESTABLISHED`. +* Neighbor level: + * Record `state/established-transitions` for all four neighbors. + * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. + * Record whether applying the MSS reset the sessions, that is, whether + `state/established-transitions` increased or `state/session-state` + left `ESTABLISHED` within 30 seconds of the change. This shows whether + the configuration change is disruptive. It is reported only and is not + a pass/fail criterion. + * Re-establish the four sessions, for example by restarting the ATE BGP + peers. + * Verify that all four sessions are `ESTABLISHED`, and that + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for + all four neighbors. + * Remove `transport/config/tcp-mss` from the four neighbors. +* Peer-group level: + * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` + and `IBGP-PEERS`, with no MSS configured on the neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 4000 for both peer groups, and that all + four neighbors inherit it (`transport/state/tcp-mss` is 4000). + * Neighbor-level override: keep the peer-group MSS, and set + `transport/config/tcp-mss` to 1400 on one neighbor in each peer group + (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that + it is still 4000 for the two IPv6 neighbors and both peer groups. + * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from + both peer groups. +* Remove the MTU configuration from the four ports so that they return to the + default MTU. + +#### Canonical OC + +The block below shows the neighbor-level override step: the peer groups use +an MSS of 4000, and the IPv4 neighbors override it with 1400. In the +neighbor-level step, the four neighbors use 4096 instead, and the peer groups +have no MSS. + +```json +{ + "interfaces": { + "interface": [ + { + "name": "port1", + "config": { + "name": "port1", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + }, + { + "name": "port2", + "config": { + "name": "port2", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + } + ] + }, + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + } + ] + }, + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "EBGP-PEERS" + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6", + "peer-group": "IBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "IBGP-PEERS" + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +#### Test pass fail criteria + +* If any of the below conditions occur, the test should be declared as a + "FAIL": + 1. A BGP session is not `ESTABLISHED` after it is re-established + 2. `transport/state/tcp-mss` is not 4096 for a neighbor at the neighbor + level, not 1400 for a neighbor with the override, or not 4000 for a + peer group or any other neighbor at the peer-group level + 3. A `transport/state/tcp-mss` reported before any MSS is configured is + outside the range given in `RT-1.22.1` + +### Cleanup + +* Remove the BGP and MTU configurations from the DUT and stop OTG protocols + to restore the baseline state. + +## OpenConfig Path and RPC Coverage + +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: + +rpcs: + gnmi: + gNMI.Set: + replace: true + delete: true + gNMI.Subscribe: + on_change: true +``` + +## Minimum DUT platform requirement + +N/A diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto b/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto new file mode 100644 index 00000000000..c36aceeb08e --- /dev/null +++ b/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto @@ -0,0 +1,8 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "8764301d-6146-4a31-ac8f-5d1568e3f5fe" +plan_id: "RT-1.22" +description: "BGP TCP MSS" +testbed: TESTBED_DUT_ATE_2LINKS +tags: TAGS_AGGREGATION diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index c5015d1d821..c66da3f7e21 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -1,410 +1,52 @@ -# RT-1.21: BGP TCP MSS and PMTUD +# RT-1.21: BGP TCP MSS and PMTUD ## Summary -This test validates that the router supports the TCP maximum segment size (MSS) -and path MTU discovery (PMTUD) settings for BGP sessions: +* Validate changes in TCP MSS value is allowed and takes effect. +* Validate DUT's PMTUD compliance. -* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and - `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` - and `transport/state/mtu-discovery`), at the neighbor level and at the - peer-group level -* A value set on a neighbor overrides the peer-group value for that neighbor - only. The other neighbors in the peer group keep the peer-group value. -* IPv4 and IPv6 eBGP and iBGP sessions -* `transport/state/tcp-mss` reports the configured MSS (the applied - configuration, including a value inherited from the peer group), in the - same way as `timers/state/hold-time`. When no MSS is configured, it may - instead report the MSS in use on the TCP session. -* PMTUD lowers the TCP segment size when a router between the BGP peers - reports, with an ICMP Fragmentation Needed or Packet Too Big message, that - a packet is too big for its next link. This testbed has no router between - the DUT and the ATE, so the test verifies the PMTUD configuration and - state, not the PMTUD behavior. -* TODO: The current test code configures TCP MD5 authentication on the - iBGP neighbor. Remove it when the code is updated to this README; BGP - MD5 authentication is covered by RT-1.1. +## Topology -### Testbed type +* ATE:port1 <-> port1:DUT1:Port2 <-> port1:DUT2 -* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) +## Procedure -### Topology - -```mermaid -graph LR - ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] - ATE <-->|"port-2: iBGP IPv4 and IPv6"| DUT -``` - -### DUT and OTG properties - -| Device | Port | IPv4 | IPv6 | AS | -| :----- | :----- | :----------- | :---------------------- | :---- | -| DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | -| DUT | Port 2 | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | -| ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | -| ATE | Port 2 | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64500 | - -### Procedure - -#### Initial Setup: - -* Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. -* Configure the DUT and ATE interfaces per the table above. -* Configure BGP on the DUT (AS `64500`) with two peer groups: - * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP - neighbors on ATE port-1. - * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP - neighbors on ATE port-2. -* Configure the matching BGP peers on the ATE, and verify that all four - sessions are `ESTABLISHED`. - -### RT-1.21.1: TCP MSS at the neighbor and peer-group levels - -* If the DUT reports `transport/state/tcp-mss` for the neighbors before an - MSS is configured, verify that the value is at least the TCP default MSS - (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port minus - 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 - bytes, and verify that all four sessions are `ESTABLISHED`. -* Neighbor level: - * Record `state/established-transitions` for all four neighbors. - * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. - * Record whether applying the MSS reset the sessions, that is, whether - `state/established-transitions` increased or `state/session-state` - left `ESTABLISHED` within 30 seconds of the change. This shows whether - the configuration change is disruptive. It is reported only and is not - a pass/fail criterion. - * Re-establish the four sessions, for example by restarting the ATE BGP - peers. - * Verify that all four sessions are `ESTABLISHED`, and that - `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for - all four neighbors. - * Remove `transport/config/tcp-mss` from the four neighbors. -* Peer-group level: - * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` - and `IBGP-PEERS`, with no MSS configured on the neighbors. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 4000 for both peer groups, and that all - four neighbors inherit it (`transport/state/tcp-mss` is 4000). - * Neighbor-level override: keep the peer-group MSS, and set - `transport/config/tcp-mss` to 1400 on one neighbor in each peer group - (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that - it is still 4000 for the two IPv6 neighbors and both peer groups. - * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from - both peer groups. -* Remove the MTU configuration from the four ports so that they return to the - default MTU. - -#### Canonical OC - -The block below shows the neighbor-level override step: the peer groups use -an MSS of 4000, and the IPv4 neighbors override it with 1400. In the -neighbor-level step, the four neighbors use 4096 instead, and the peer groups -have no MSS. - -```json -{ - "interfaces": { - "interface": [ - { - "name": "port1", - "config": { - "name": "port1", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - }, - { - "name": "port2", - "config": { - "name": "port2", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - } - ] - }, - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - }, - { - "peer-group-name": "IBGP-PEERS", - "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - } - ] - }, - "neighbors": { - "neighbor": [ - { - "neighbor-address": "192.0.2.2", - "config": { - "neighbor-address": "192.0.2.2", - "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:2", - "config": { - "neighbor-address": "2001:db8::192:0:2:2", - "peer-group": "EBGP-PEERS" - } - }, - { - "neighbor-address": "192.0.2.6", - "config": { - "neighbor-address": "192.0.2.6", - "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "IBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -### RT-1.21.2: PMTUD at the neighbor and peer-group levels - -No MSS is configured in this subtest, and all four ports use the default MTU. - -* Neighbor level: - * Set `transport/config/mtu-discovery` to `true` on all four neighbors. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED` and that - `transport/state/mtu-discovery` is `true` for all four neighbors. - * Remove `transport/config/mtu-discovery` from the four neighbors. -* Peer-group level: - * Set `transport/config/mtu-discovery` to `true` on the peer groups - `EBGP-PEERS` and `IBGP-PEERS`. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/mtu-discovery` is `true` for both peer groups, and - that all four neighbors inherit it. - * Neighbor-level override: keep PMTUD enabled on the peer groups, and - set `transport/config/mtu-discovery` to `false` on one neighbor in - each peer group (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/mtu-discovery` is `false` for the two IPv4 neighbors, - and that it is still `true` for the two IPv6 neighbors and both peer - groups. - * Remove `transport/config/mtu-discovery` from the two IPv4 neighbors and - from both peer groups. - -#### Canonical OC - -The block below shows the neighbor-level override step: PMTUD is enabled on -the peer groups and disabled on the IPv4 neighbors. In the neighbor-level -step, it is enabled on the four neighbors instead, and not configured on the -peer groups. - -```json -{ - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 - }, - "transport": { - "config": { - "mtu-discovery": true - } - } - }, - { - "peer-group-name": "IBGP-PEERS", - "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 - }, - "transport": { - "config": { - "mtu-discovery": true - } - } - } - ] - }, - "neighbors": { - "neighbor": [ - { - "neighbor-address": "192.0.2.2", - "config": { - "neighbor-address": "192.0.2.2", - "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": false - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:2", - "config": { - "neighbor-address": "2001:db8::192:0:2:2", - "peer-group": "EBGP-PEERS" - } - }, - { - "neighbor-address": "192.0.2.6", - "config": { - "neighbor-address": "192.0.2.6", - "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": false - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "IBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -#### Test pass fail criteria - -* If any of the below conditions occur, the test should be declared as a - "FAIL": - 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. In `RT-1.21.1`, `transport/state/tcp-mss` is not 4096 for a neighbor at - the neighbor level, not 1400 for a neighbor with the override, or not - 4000 for a peer group or any other neighbor at the peer-group level - 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `false` for a - neighbor with the override, or not `true` for a peer group or any - other neighbor - 4. A `transport/state/tcp-mss` reported before any MSS is configured is - outside the range given in `RT-1.21.1` - -### Cleanup - -* Remove the BGP and MTU configurations from the DUT and stop OTG protocols - to restore the baseline state. +* Establish BGP sessions as follows: + * ATE:port1 --- eBGP-IPv4/IPv6 ---- DUT1:port1. + * ATE:port1 ---- iBGP IPv4 ---- DUT2:port1. +* Verify that the default TCP MSS value is set below the default interface MTU value. +* Change the Interface MTU on the DUT1:port1 port as well as ATE:port1 to 5040B +* Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. +* Re-establish the EBGP sessions by tcp reset. +* Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. +* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port1. +* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port1 MTU is set at 5040B as well. +* Enable PMTUD on DUT2:port1. +* Re-establish the IBGP sessions by tcp reset. +* Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. ## OpenConfig Path and RPC Coverage - ```yaml paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/mtu-discovery: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/mtu-discovery: rpcs: gnmi: - gNMI.Set: - replace: true - delete: true gNMI.Subscribe: - on_change: true + gNMI.Set: ``` +## Canonical OC +```json +{} +``` + ## Minimum DUT platform requirement N/A diff --git a/testregistry.textproto b/testregistry.textproto index 8c70be5386a..7c03d2db45b 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -886,6 +886,11 @@ test: { readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md" exec: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go" } +test: { + id: "RT-1.22" + description: "BGP TCP MSS" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss/README.md" +} test: { id: "RT-1.23" description: "BGP AFI SAFI OC DEFAULTS" From 3f12569a8b502f153aa58f47af50b9a6d53265fb Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Wed, 11 Nov 2026 11:51:46 +0000 Subject: [PATCH 15/16] RT-1.21: Test PMTUD through a looped network instance Goes back to one RT-1.21 test for both MSS and PMTUD, and removes the RT-1.22 folder. The test uses the TESTBED_DUT_1_LOOP_2_ATE testbed: a loop cable joins the DEFAULT network instance, where BGP runs, to a TRANSIT network instance, which is a router between the DUT BGP speaker and ATE port-1. RT-1.21.2 lowers the MTU of that router's link to ATE port-1 and verifies that large BGP UPDATEs still arrive. --- feature/bgp/otg_tests/bgp_tcp_mss/README.md | 262 ---------- .../otg_tests/bgp_tcp_mss/metadata.textproto | 8 - .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 470 +++++++++++++++++- testregistry.textproto | 5 - 4 files changed, 445 insertions(+), 300 deletions(-) delete mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/README.md delete mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/README.md b/feature/bgp/otg_tests/bgp_tcp_mss/README.md deleted file mode 100644 index 1dc2bf0adad..00000000000 --- a/feature/bgp/otg_tests/bgp_tcp_mss/README.md +++ /dev/null @@ -1,262 +0,0 @@ -# RT-1.22: BGP TCP MSS - -## Summary - -This test validates that the router supports the TCP maximum segment size (MSS) -setting for BGP sessions: - -* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and - `transport/state/tcp-mss`) at the neighbor level and at the peer-group - level -* A value set on a neighbor overrides the peer-group value for that neighbor - only. The other neighbors in the peer group keep the peer-group value. -* IPv4 and IPv6 eBGP and iBGP sessions -* `transport/state/tcp-mss` reports the configured MSS (the applied - configuration, including a value inherited from the peer group), in the - same way as `timers/state/hold-time`. When no MSS is configured, it may - instead report the MSS in use on the TCP session. - -Path MTU discovery (PMTUD) is covered by RT-1.21. - -### Testbed type - -* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) - -### Topology - -```mermaid -graph LR - ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] - ATE <-->|"port-2: iBGP IPv4 and IPv6"| DUT -``` - -### DUT and OTG properties - -| Device | Port | IPv4 | IPv6 | AS | -| :----- | :----- | :----------- | :---------------------- | :---- | -| DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | -| DUT | Port 2 | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | -| ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | -| ATE | Port 2 | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64500 | - -### Procedure - -#### Initial Setup: - -* Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. -* Configure the DUT and ATE interfaces per the table above. -* Configure BGP on the DUT (AS `64500`) with two peer groups: - * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP - neighbors on ATE port-1. - * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP - neighbors on ATE port-2. -* Configure the matching BGP peers on the ATE, and verify that all four - sessions are `ESTABLISHED`. - -### RT-1.22.1: TCP MSS at the neighbor and peer-group levels - -* If the DUT reports `transport/state/tcp-mss` for the neighbors before an - MSS is configured, verify that the value is at least the TCP default MSS - (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port minus - 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 - bytes, and verify that all four sessions are `ESTABLISHED`. -* Neighbor level: - * Record `state/established-transitions` for all four neighbors. - * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. - * Record whether applying the MSS reset the sessions, that is, whether - `state/established-transitions` increased or `state/session-state` - left `ESTABLISHED` within 30 seconds of the change. This shows whether - the configuration change is disruptive. It is reported only and is not - a pass/fail criterion. - * Re-establish the four sessions, for example by restarting the ATE BGP - peers. - * Verify that all four sessions are `ESTABLISHED`, and that - `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for - all four neighbors. - * Remove `transport/config/tcp-mss` from the four neighbors. -* Peer-group level: - * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` - and `IBGP-PEERS`, with no MSS configured on the neighbors. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 4000 for both peer groups, and that all - four neighbors inherit it (`transport/state/tcp-mss` is 4000). - * Neighbor-level override: keep the peer-group MSS, and set - `transport/config/tcp-mss` to 1400 on one neighbor in each peer group - (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that - it is still 4000 for the two IPv6 neighbors and both peer groups. - * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from - both peer groups. -* Remove the MTU configuration from the four ports so that they return to the - default MTU. - -#### Canonical OC - -The block below shows the neighbor-level override step: the peer groups use -an MSS of 4000, and the IPv4 neighbors override it with 1400. In the -neighbor-level step, the four neighbors use 4096 instead, and the peer groups -have no MSS. - -```json -{ - "interfaces": { - "interface": [ - { - "name": "port1", - "config": { - "name": "port1", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - }, - { - "name": "port2", - "config": { - "name": "port2", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - } - ] - }, - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - }, - { - "peer-group-name": "IBGP-PEERS", - "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - } - ] - }, - "neighbors": { - "neighbor": [ - { - "neighbor-address": "192.0.2.2", - "config": { - "neighbor-address": "192.0.2.2", - "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:2", - "config": { - "neighbor-address": "2001:db8::192:0:2:2", - "peer-group": "EBGP-PEERS" - } - }, - { - "neighbor-address": "192.0.2.6", - "config": { - "neighbor-address": "192.0.2.6", - "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "IBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -#### Test pass fail criteria - -* If any of the below conditions occur, the test should be declared as a - "FAIL": - 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. `transport/state/tcp-mss` is not 4096 for a neighbor at the neighbor - level, not 1400 for a neighbor with the override, or not 4000 for a - peer group or any other neighbor at the peer-group level - 3. A `transport/state/tcp-mss` reported before any MSS is configured is - outside the range given in `RT-1.22.1` - -### Cleanup - -* Remove the BGP and MTU configurations from the DUT and stop OTG protocols - to restore the baseline state. - -## OpenConfig Path and RPC Coverage - -```yaml -paths: - ## Config Parameter Coverage - /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: - - ## Telemetry Parameter Coverage - /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: - -rpcs: - gnmi: - gNMI.Set: - replace: true - delete: true - gNMI.Subscribe: - on_change: true -``` - -## Minimum DUT platform requirement - -N/A diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto b/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto deleted file mode 100644 index c36aceeb08e..00000000000 --- a/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto +++ /dev/null @@ -1,8 +0,0 @@ -# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto -# proto-message: Metadata - -uuid: "8764301d-6146-4a31-ac8f-5d1568e3f5fe" -plan_id: "RT-1.22" -description: "BGP TCP MSS" -testbed: TESTBED_DUT_ATE_2LINKS -tags: TAGS_AGGREGATION diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index c66da3f7e21..664657d7b3f 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -1,52 +1,472 @@ -# RT-1.21: BGP TCP MSS and PMTUD +# RT-1.21: BGP TCP MSS and PMTUD ## Summary -* Validate changes in TCP MSS value is allowed and takes effect. -* Validate DUT's PMTUD compliance. +This test validates that the router supports the TCP maximum segment size (MSS) +and path MTU discovery (PMTUD) settings for BGP sessions: -## Topology +* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and + `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` + and `transport/state/mtu-discovery`), at the neighbor level and at the + peer-group level +* A value set on a neighbor overrides the peer-group value for that neighbor + only. The other neighbors in the peer group keep the peer-group value. +* IPv4 and IPv6 eBGP and iBGP sessions +* `transport/state/tcp-mss` reports the configured MSS (the applied + configuration, including a value inherited from the peer group), in the + same way as `timers/state/hold-time`. When no MSS is configured, it may + instead report the MSS in use on the TCP session. +* PMTUD lowers the TCP segment size when a router between the BGP peers + reports, with an ICMP Fragmentation Needed or Packet Too Big message, that + a packet is too big for its next link. To have such a router with one DUT, + a loop link joins two network instances of the DUT: BGP runs in the + `DEFAULT` network instance, and the network instance `TRANSIT` is the + router between the DUT BGP speaker and ATE port-1. +* TODO: The current test code configures TCP MD5 authentication on the + iBGP neighbor. Remove it when the code is updated to this README; BGP + MD5 authentication is covered by RT-1.1. -* ATE:port1 <-> port1:DUT1:Port2 <-> port1:DUT2 +### Testbed type -## Procedure +* [TESTBED_DUT_1_LOOP_2_ATE](https://github.com/openconfig/featureprofiles/blob/main/topologies/dut_1_loop_2_ate.testbed) -* Establish BGP sessions as follows: - * ATE:port1 --- eBGP-IPv4/IPv6 ---- DUT1:port1. - * ATE:port1 ---- iBGP IPv4 ---- DUT2:port1. -* Verify that the default TCP MSS value is set below the default interface MTU value. -* Change the Interface MTU on the DUT1:port1 port as well as ATE:port1 to 5040B -* Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. -* Re-establish the EBGP sessions by tcp reset. -* Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. -* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port1. -* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port1 MTU is set at 5040B as well. -* Enable PMTUD on DUT2:port1. -* Re-establish the IBGP sessions by tcp reset. -* Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. +### Topology + +```mermaid +graph LR + A1["ATE port-1: iBGP IPv4 and IPv6"] <-->|"DUT port-1"| T["DUT: TRANSIT"] + T <-->|"loop link: DUT port-2 to port-3"| D["DUT: DEFAULT, BGP"] + D <-->|"DUT port-4"| A2["ATE port-2: eBGP IPv4 and IPv6"] +``` + +### DUT and OTG properties + +| Device | Port | Instance | IPv4 | IPv6 | AS | +| :----- | :----- | :------- | :------------ | :---------------------- | :---- | +| ATE | Port 1 | | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64500 | +| DUT | Port 1 | TRANSIT | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | | +| DUT | Port 2 | TRANSIT | 192.0.2.9/30 | 2001:db8::192:0:2:9/126 | | +| DUT | Port 3 | DEFAULT | 192.0.2.10/30 | 2001:db8::192:0:2:a/126 | 64500 | +| DUT | Port 4 | DEFAULT | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | +| ATE | Port 2 | | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64501 | + +### Procedure + +#### Initial Setup: + +* Connect ATE port-1 to DUT port-1, DUT port-2 to DUT port-3, and DUT port-4 + to ATE port-2. The loop link from DUT port-2 to DUT port-3 can be a cable + or a cross-connect through an optical circuit switch (OCS). +* Configure the DUT and ATE interfaces per the table above. DUT port-1 and + port-2 are in the network instance `TRANSIT` of type `L3VRF`, which has no + routing protocol and routes between its two ports. DUT port-3 and port-4 + are in the `DEFAULT` network instance. +* In the `DEFAULT` network instance, configure static routes to the ATE + port-1 subnets `192.0.2.0/30` and `2001:db8::192:0:2:0/126`, with the DUT + port-2 addresses `192.0.2.9` and `2001:db8::192:0:2:9` as next hops. + Packets to ATE port-1 then leave on DUT port-3, cross the loop link, and + are routed by `TRANSIT`. +* Configure a routing policy that accepts all routes. +* Configure BGP on the DUT (AS `64500`) in the `DEFAULT` network instance + with two peer groups, which both use the routing policy as their import + and export policy: + * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP + neighbors on ATE port-2, which are directly connected to DUT port-4. + * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP + neighbors on ATE port-1. These sessions run between the DUT port-3 + addresses and the ATE port-1 addresses, through `TRANSIT`. +* Configure the matching BGP peers on the ATE. The ATE port-1 peers use the + DUT port-3 addresses as their peer addresses and DUT port-1 as their + gateway. Verify that all four sessions are `ESTABLISHED`. + +### RT-1.21.1: TCP MSS at the neighbor and peer-group levels + +* If the DUT reports `transport/state/tcp-mss` for the neighbors before an + MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port + towards the neighbor (port-3 or port-4) minus 40 bytes for IPv4 or 60 + bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). +* Set the MTU of the four DUT ports and the two ATE ports to 5040 bytes, and + verify that all four sessions are `ESTABLISHED`. +* Neighbor level: + * Record `state/established-transitions` for all four neighbors. + * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. + * Record whether applying the MSS reset the sessions, that is, whether + `state/established-transitions` increased or `state/session-state` + left `ESTABLISHED` within 30 seconds of the change. This shows whether + the configuration change is disruptive. It is reported only and is not + a pass/fail criterion. + * Re-establish the four sessions, for example by restarting the ATE BGP + peers. + * Verify that all four sessions are `ESTABLISHED`, and that + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for + all four neighbors. + * Remove `transport/config/tcp-mss` from the four neighbors. +* Peer-group level: + * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` + and `IBGP-PEERS`, with no MSS configured on the neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 4000 for both peer groups, and that all + four neighbors inherit it (`transport/state/tcp-mss` is 4000). + * Neighbor-level override: keep the peer-group MSS, and set + `transport/config/tcp-mss` to 1400 on one neighbor in each peer group + (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that + it is still 4000 for the two IPv6 neighbors and both peer groups. + * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from + both peer groups. +* Remove the MTU configuration from the six ports so that they return to + the default MTU. + +#### Canonical OC + +The block below shows the neighbor-level override step: the peer groups use +an MSS of 4000, and the IPv4 neighbors override it with 1400. In the +neighbor-level step, the four neighbors use 4096 instead, and the peer groups +have no MSS. + +```json +{ + "interfaces": { + "interface": [ + { + "name": "port1", + "config": { + "name": "port1", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + }, + { + "name": "port2", + "config": { + "name": "port2", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + }, + { + "name": "port3", + "config": { + "name": "port3", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + }, + { + "name": "port4", + "config": { + "name": "port4", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + } + ] + }, + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + } + ] + }, + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-group": "IBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "IBGP-PEERS" + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6", + "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "EBGP-PEERS" + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +### RT-1.21.2: PMTUD at the neighbor and peer-group levels + +No MSS is configured in this subtest, and all ports use the default MTU unless +a step sets it. + +* Neighbor level: + * Set the IPv4 and IPv6 MTU of DUT port-1 to 1400 bytes. The MTU of ATE + port-1 is 1500 bytes, so the iBGP sessions use an MSS for 1500-byte + packets, which are too big for the link from `TRANSIT` to ATE port-1. + * Set `transport/config/mtu-discovery` to `true` on all four neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED` and that + `transport/state/mtu-discovery` is `true` for all four neighbors. + * Start a packet capture on ATE port-1. Advertise 2000 IPv4 prefixes + (`100.64.0.0/24` onwards) and 2000 IPv6 prefixes (`2001:db8:1::/64` + onwards), all with the same path attributes, from the eBGP peers on + ATE port-2. The DUT then sends BGP UPDATE messages of more than 1400 + bytes to the iBGP peers on ATE port-1. + * Verify that the iBGP peers on ATE port-1 receive all 2000 IPv4 + prefixes and all 2000 IPv6 prefixes, and that all four sessions are + still `ESTABLISHED`. The DUT can only deliver them if it lowers its + segment size after `TRANSIT` reports the 1400-byte MTU. + * Verify in the capture that the DUT (`192.0.2.10` and + `2001:db8::192:0:2:a`) sent IPv4 and IPv6 packets of more than 1280 + bytes, which shows that it uses the 1400-byte path MTU and not a + smaller default, and that none of its IPv4 packets is an IP fragment. + * Withdraw the prefixes, and remove the MTU configuration from DUT + port-1. + * Remove `transport/config/mtu-discovery` from the four neighbors. +* Peer-group level: + * Set `transport/config/mtu-discovery` to `true` on the peer groups + `EBGP-PEERS` and `IBGP-PEERS`. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/mtu-discovery` is `true` for both peer groups, and + that all four neighbors inherit it. + * Neighbor-level override: keep PMTUD enabled on the peer groups, and + set `transport/config/mtu-discovery` to `false` on one neighbor in + each peer group (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/mtu-discovery` is `false` for the two IPv4 neighbors, + and that it is still `true` for the two IPv6 neighbors and both peer + groups. + * Remove `transport/config/mtu-discovery` from the two IPv4 neighbors and + from both peer groups. + +#### Canonical OC + +The block below shows the neighbor-level override step: PMTUD is enabled on +the peer groups and disabled on the IPv4 neighbors. In the neighbor-level +step, it is enabled on the four neighbors instead, and not configured on the +peer groups. + +```json +{ + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "mtu-discovery": true + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "mtu-discovery": true + } + } + } + ] + }, + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-group": "IBGP-PEERS" + }, + "transport": { + "config": { + "mtu-discovery": false + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "IBGP-PEERS" + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6", + "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "mtu-discovery": false + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "EBGP-PEERS" + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +#### Test pass fail criteria + +* If any of the below conditions occur, the test should be declared as a + "FAIL": + 1. A BGP session is not `ESTABLISHED` after it is re-established + 2. In `RT-1.21.1`, `transport/state/tcp-mss` is not 4096 for a neighbor at + the neighbor level, not 1400 for a neighbor with the override, or not + 4000 for a peer group or any other neighbor at the peer-group level + 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `false` for a + neighbor with the override, or not `true` for a peer group or any + other neighbor + 4. In `RT-1.21.2`, with the 1400-byte MTU on DUT port-1, an iBGP peer on + ATE port-1 does not receive all the prefixes, or a session does not + stay `ESTABLISHED` + 5. In `RT-1.21.2`, the capture on ATE port-1 has no IPv4 or no IPv6 + packet of more than 1280 bytes from the DUT, or has an IPv4 fragment + from the DUT + 6. A `transport/state/tcp-mss` reported before any MSS is configured is + outside the range given in `RT-1.21.1` + +### Cleanup + +* Remove the BGP, routing policy, static route, network instance and MTU + configurations from the DUT and stop OTG protocols to restore the + baseline state. ## OpenConfig Path and RPC Coverage + ```yaml paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/mtu-discovery: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/mtu-discovery: rpcs: gnmi: - gNMI.Subscribe: gNMI.Set: + replace: true + delete: true + gNMI.Subscribe: + on_change: true ``` -## Canonical OC -```json -{} -``` - ## Minimum DUT platform requirement N/A diff --git a/testregistry.textproto b/testregistry.textproto index 7c03d2db45b..8c70be5386a 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -886,11 +886,6 @@ test: { readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md" exec: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go" } -test: { - id: "RT-1.22" - description: "BGP TCP MSS" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss/README.md" -} test: { id: "RT-1.23" description: "BGP AFI SAFI OC DEFAULTS" From 1853eff0c9a14afe64cd5a2ba7facfe0bb1ba18b Mon Sep 17 00:00:00 2001 From: Sneha Shankar Date: Thu, 12 Nov 2026 16:16:33 +0000 Subject: [PATCH 16/16] RT-1.22: Add the BGP TCP MSS test plan Adds RT-1.22 in a new folder, feature/bgp/otg_tests/bgp_tcp_mss: the TCP MSS on a single DUT (TESTBED_DUT_ATE_2LINKS), at the neighbor and peer-group levels, with the neighbor-level override. RT-1.21 (bgp_tcp_mss_path_mtu) is restored to its version on main and still covers PMTUD. --- feature/bgp/otg_tests/bgp_tcp_mss/README.md | 262 ++++++++++ .../otg_tests/bgp_tcp_mss/metadata.textproto | 8 + .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 470 +----------------- testregistry.textproto | 5 + 4 files changed, 300 insertions(+), 445 deletions(-) create mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/README.md create mode 100644 feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/README.md b/feature/bgp/otg_tests/bgp_tcp_mss/README.md new file mode 100644 index 00000000000..1dc2bf0adad --- /dev/null +++ b/feature/bgp/otg_tests/bgp_tcp_mss/README.md @@ -0,0 +1,262 @@ +# RT-1.22: BGP TCP MSS + +## Summary + +This test validates that the router supports the TCP maximum segment size (MSS) +setting for BGP sessions: + +* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and + `transport/state/tcp-mss`) at the neighbor level and at the peer-group + level +* A value set on a neighbor overrides the peer-group value for that neighbor + only. The other neighbors in the peer group keep the peer-group value. +* IPv4 and IPv6 eBGP and iBGP sessions +* `transport/state/tcp-mss` reports the configured MSS (the applied + configuration, including a value inherited from the peer group), in the + same way as `timers/state/hold-time`. When no MSS is configured, it may + instead report the MSS in use on the TCP session. + +Path MTU discovery (PMTUD) is covered by RT-1.21. + +### Testbed type + +* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) + +### Topology + +```mermaid +graph LR + ATE["ATE"] <-->|"port-1: eBGP IPv4 and IPv6"| DUT["DUT"] + ATE <-->|"port-2: iBGP IPv4 and IPv6"| DUT +``` + +### DUT and OTG properties + +| Device | Port | IPv4 | IPv6 | AS | +| :----- | :----- | :----------- | :---------------------- | :---- | +| DUT | Port 1 | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | 64500 | +| DUT | Port 2 | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | +| ATE | Port 1 | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64501 | +| ATE | Port 2 | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64500 | + +### Procedure + +#### Initial Setup: + +* Connect ATE port-1 to DUT port-1, and ATE port-2 to DUT port-2. +* Configure the DUT and ATE interfaces per the table above. +* Configure BGP on the DUT (AS `64500`) with two peer groups: + * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP + neighbors on ATE port-1. + * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP + neighbors on ATE port-2. +* Configure the matching BGP peers on the ATE, and verify that all four + sessions are `ESTABLISHED`. + +### RT-1.22.1: TCP MSS at the neighbor and peer-group levels + +* If the DUT reports `transport/state/tcp-mss` for the neighbors before an + MSS is configured, verify that the value is at least the TCP default MSS + (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port minus + 40 bytes for IPv4 or 60 bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). +* Set the MTU of DUT port-1, DUT port-2, ATE port-1 and ATE port-2 to 5040 + bytes, and verify that all four sessions are `ESTABLISHED`. +* Neighbor level: + * Record `state/established-transitions` for all four neighbors. + * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. + * Record whether applying the MSS reset the sessions, that is, whether + `state/established-transitions` increased or `state/session-state` + left `ESTABLISHED` within 30 seconds of the change. This shows whether + the configuration change is disruptive. It is reported only and is not + a pass/fail criterion. + * Re-establish the four sessions, for example by restarting the ATE BGP + peers. + * Verify that all four sessions are `ESTABLISHED`, and that + `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for + all four neighbors. + * Remove `transport/config/tcp-mss` from the four neighbors. +* Peer-group level: + * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` + and `IBGP-PEERS`, with no MSS configured on the neighbors. + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 4000 for both peer groups, and that all + four neighbors inherit it (`transport/state/tcp-mss` is 4000). + * Neighbor-level override: keep the peer-group MSS, and set + `transport/config/tcp-mss` to 1400 on one neighbor in each peer group + (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). + * Re-establish the four sessions. + * Verify that all four sessions are `ESTABLISHED`, that + `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that + it is still 4000 for the two IPv6 neighbors and both peer groups. + * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from + both peer groups. +* Remove the MTU configuration from the four ports so that they return to the + default MTU. + +#### Canonical OC + +The block below shows the neighbor-level override step: the peer groups use +an MSS of 4000, and the IPv4 neighbors override it with 1400. In the +neighbor-level step, the four neighbors use 4096 instead, and the peer groups +have no MSS. + +```json +{ + "interfaces": { + "interface": [ + { + "name": "port1", + "config": { + "name": "port1", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + }, + { + "name": "port2", + "config": { + "name": "port2", + "type": "iana-if-type:ethernetCsmacd", + "mtu": 5040 + } + } + ] + }, + "network-instances": { + "network-instance": [ + { + "name": "DEFAULT", + "config": { + "name": "DEFAULT" + }, + "protocols": { + "protocol": [ + { + "identifier": "BGP", + "name": "BGP", + "config": { + "identifier": "BGP", + "name": "BGP" + }, + "bgp": { + "peer-groups": { + "peer-group": [ + { + "peer-group-name": "EBGP-PEERS", + "config": { + "peer-group-name": "EBGP-PEERS", + "peer-as": 64501 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + }, + { + "peer-group-name": "IBGP-PEERS", + "config": { + "peer-group-name": "IBGP-PEERS", + "peer-as": 64500 + }, + "transport": { + "config": { + "tcp-mss": 4000 + } + } + } + ] + }, + "neighbors": { + "neighbor": [ + { + "neighbor-address": "192.0.2.2", + "config": { + "neighbor-address": "192.0.2.2", + "peer-group": "EBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:2", + "config": { + "neighbor-address": "2001:db8::192:0:2:2", + "peer-group": "EBGP-PEERS" + } + }, + { + "neighbor-address": "192.0.2.6", + "config": { + "neighbor-address": "192.0.2.6", + "peer-group": "IBGP-PEERS" + }, + "transport": { + "config": { + "tcp-mss": 1400 + } + } + }, + { + "neighbor-address": "2001:db8::192:0:2:6", + "config": { + "neighbor-address": "2001:db8::192:0:2:6", + "peer-group": "IBGP-PEERS" + } + } + ] + } + } + } + ] + } + } + ] + } +} +``` + +#### Test pass fail criteria + +* If any of the below conditions occur, the test should be declared as a + "FAIL": + 1. A BGP session is not `ESTABLISHED` after it is re-established + 2. `transport/state/tcp-mss` is not 4096 for a neighbor at the neighbor + level, not 1400 for a neighbor with the override, or not 4000 for a + peer group or any other neighbor at the peer-group level + 3. A `transport/state/tcp-mss` reported before any MSS is configured is + outside the range given in `RT-1.22.1` + +### Cleanup + +* Remove the BGP and MTU configurations from the DUT and stop OTG protocols + to restore the baseline state. + +## OpenConfig Path and RPC Coverage + +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: + +rpcs: + gnmi: + gNMI.Set: + replace: true + delete: true + gNMI.Subscribe: + on_change: true +``` + +## Minimum DUT platform requirement + +N/A diff --git a/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto b/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto new file mode 100644 index 00000000000..c36aceeb08e --- /dev/null +++ b/feature/bgp/otg_tests/bgp_tcp_mss/metadata.textproto @@ -0,0 +1,8 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "8764301d-6146-4a31-ac8f-5d1568e3f5fe" +plan_id: "RT-1.22" +description: "BGP TCP MSS" +testbed: TESTBED_DUT_ATE_2LINKS +tags: TAGS_AGGREGATION diff --git a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 664657d7b3f..c66da3f7e21 100644 --- a/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -1,472 +1,52 @@ -# RT-1.21: BGP TCP MSS and PMTUD +# RT-1.21: BGP TCP MSS and PMTUD ## Summary -This test validates that the router supports the TCP maximum segment size (MSS) -and path MTU discovery (PMTUD) settings for BGP sessions: +* Validate changes in TCP MSS value is allowed and takes effect. +* Validate DUT's PMTUD compliance. -* Configuration and state of the TCP MSS (`transport/config/tcp-mss` and - `transport/state/tcp-mss`) and of PMTUD (`transport/config/mtu-discovery` - and `transport/state/mtu-discovery`), at the neighbor level and at the - peer-group level -* A value set on a neighbor overrides the peer-group value for that neighbor - only. The other neighbors in the peer group keep the peer-group value. -* IPv4 and IPv6 eBGP and iBGP sessions -* `transport/state/tcp-mss` reports the configured MSS (the applied - configuration, including a value inherited from the peer group), in the - same way as `timers/state/hold-time`. When no MSS is configured, it may - instead report the MSS in use on the TCP session. -* PMTUD lowers the TCP segment size when a router between the BGP peers - reports, with an ICMP Fragmentation Needed or Packet Too Big message, that - a packet is too big for its next link. To have such a router with one DUT, - a loop link joins two network instances of the DUT: BGP runs in the - `DEFAULT` network instance, and the network instance `TRANSIT` is the - router between the DUT BGP speaker and ATE port-1. -* TODO: The current test code configures TCP MD5 authentication on the - iBGP neighbor. Remove it when the code is updated to this README; BGP - MD5 authentication is covered by RT-1.1. +## Topology -### Testbed type +* ATE:port1 <-> port1:DUT1:Port2 <-> port1:DUT2 -* [TESTBED_DUT_1_LOOP_2_ATE](https://github.com/openconfig/featureprofiles/blob/main/topologies/dut_1_loop_2_ate.testbed) +## Procedure -### Topology - -```mermaid -graph LR - A1["ATE port-1: iBGP IPv4 and IPv6"] <-->|"DUT port-1"| T["DUT: TRANSIT"] - T <-->|"loop link: DUT port-2 to port-3"| D["DUT: DEFAULT, BGP"] - D <-->|"DUT port-4"| A2["ATE port-2: eBGP IPv4 and IPv6"] -``` - -### DUT and OTG properties - -| Device | Port | Instance | IPv4 | IPv6 | AS | -| :----- | :----- | :------- | :------------ | :---------------------- | :---- | -| ATE | Port 1 | | 192.0.2.2/30 | 2001:db8::192:0:2:2/126 | 64500 | -| DUT | Port 1 | TRANSIT | 192.0.2.1/30 | 2001:db8::192:0:2:1/126 | | -| DUT | Port 2 | TRANSIT | 192.0.2.9/30 | 2001:db8::192:0:2:9/126 | | -| DUT | Port 3 | DEFAULT | 192.0.2.10/30 | 2001:db8::192:0:2:a/126 | 64500 | -| DUT | Port 4 | DEFAULT | 192.0.2.5/30 | 2001:db8::192:0:2:5/126 | 64500 | -| ATE | Port 2 | | 192.0.2.6/30 | 2001:db8::192:0:2:6/126 | 64501 | - -### Procedure - -#### Initial Setup: - -* Connect ATE port-1 to DUT port-1, DUT port-2 to DUT port-3, and DUT port-4 - to ATE port-2. The loop link from DUT port-2 to DUT port-3 can be a cable - or a cross-connect through an optical circuit switch (OCS). -* Configure the DUT and ATE interfaces per the table above. DUT port-1 and - port-2 are in the network instance `TRANSIT` of type `L3VRF`, which has no - routing protocol and routes between its two ports. DUT port-3 and port-4 - are in the `DEFAULT` network instance. -* In the `DEFAULT` network instance, configure static routes to the ATE - port-1 subnets `192.0.2.0/30` and `2001:db8::192:0:2:0/126`, with the DUT - port-2 addresses `192.0.2.9` and `2001:db8::192:0:2:9` as next hops. - Packets to ATE port-1 then leave on DUT port-3, cross the loop link, and - are routed by `TRANSIT`. -* Configure a routing policy that accepts all routes. -* Configure BGP on the DUT (AS `64500`) in the `DEFAULT` network instance - with two peer groups, which both use the routing policy as their import - and export policy: - * `EBGP-PEERS` (peer AS `64501`) containing the IPv4 and IPv6 eBGP - neighbors on ATE port-2, which are directly connected to DUT port-4. - * `IBGP-PEERS` (peer AS `64500`) containing the IPv4 and IPv6 iBGP - neighbors on ATE port-1. These sessions run between the DUT port-3 - addresses and the ATE port-1 addresses, through `TRANSIT`. -* Configure the matching BGP peers on the ATE. The ATE port-1 peers use the - DUT port-3 addresses as their peer addresses and DUT port-1 as their - gateway. Verify that all four sessions are `ESTABLISHED`. - -### RT-1.21.1: TCP MSS at the neighbor and peer-group levels - -* If the DUT reports `transport/state/tcp-mss` for the neighbors before an - MSS is configured, verify that the value is at least the TCP default MSS - (536 for IPv4 and 1220 for IPv6) and at most the MTU of the DUT port - towards the neighbor (port-3 or port-4) minus 40 bytes for IPv4 or 60 - bytes for IPv6 (1460 and 1440 for a 1500-byte MTU). -* Set the MTU of the four DUT ports and the two ATE ports to 5040 bytes, and - verify that all four sessions are `ESTABLISHED`. -* Neighbor level: - * Record `state/established-transitions` for all four neighbors. - * Configure `transport/config/tcp-mss` to 4096 on all four neighbors. - * Record whether applying the MSS reset the sessions, that is, whether - `state/established-transitions` increased or `state/session-state` - left `ESTABLISHED` within 30 seconds of the change. This shows whether - the configuration change is disruptive. It is reported only and is not - a pass/fail criterion. - * Re-establish the four sessions, for example by restarting the ATE BGP - peers. - * Verify that all four sessions are `ESTABLISHED`, and that - `transport/state/tcp-mss` equals `transport/config/tcp-mss` (4096) for - all four neighbors. - * Remove `transport/config/tcp-mss` from the four neighbors. -* Peer-group level: - * Set `transport/config/tcp-mss` to 4000 on the peer groups `EBGP-PEERS` - and `IBGP-PEERS`, with no MSS configured on the neighbors. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 4000 for both peer groups, and that all - four neighbors inherit it (`transport/state/tcp-mss` is 4000). - * Neighbor-level override: keep the peer-group MSS, and set - `transport/config/tcp-mss` to 1400 on one neighbor in each peer group - (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/tcp-mss` is 1400 for the two IPv4 neighbors, and that - it is still 4000 for the two IPv6 neighbors and both peer groups. - * Remove `transport/config/tcp-mss` from the two IPv4 neighbors and from - both peer groups. -* Remove the MTU configuration from the six ports so that they return to - the default MTU. - -#### Canonical OC - -The block below shows the neighbor-level override step: the peer groups use -an MSS of 4000, and the IPv4 neighbors override it with 1400. In the -neighbor-level step, the four neighbors use 4096 instead, and the peer groups -have no MSS. - -```json -{ - "interfaces": { - "interface": [ - { - "name": "port1", - "config": { - "name": "port1", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - }, - { - "name": "port2", - "config": { - "name": "port2", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - }, - { - "name": "port3", - "config": { - "name": "port3", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - }, - { - "name": "port4", - "config": { - "name": "port4", - "type": "iana-if-type:ethernetCsmacd", - "mtu": 5040 - } - } - ] - }, - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - }, - { - "peer-group-name": "IBGP-PEERS", - "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 - }, - "transport": { - "config": { - "tcp-mss": 4000 - } - } - } - ] - }, - "neighbors": { - "neighbor": [ - { - "neighbor-address": "192.0.2.2", - "config": { - "neighbor-address": "192.0.2.2", - "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:2", - "config": { - "neighbor-address": "2001:db8::192:0:2:2", - "peer-group": "IBGP-PEERS" - } - }, - { - "neighbor-address": "192.0.2.6", - "config": { - "neighbor-address": "192.0.2.6", - "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "tcp-mss": 1400 - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "EBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -### RT-1.21.2: PMTUD at the neighbor and peer-group levels - -No MSS is configured in this subtest, and all ports use the default MTU unless -a step sets it. - -* Neighbor level: - * Set the IPv4 and IPv6 MTU of DUT port-1 to 1400 bytes. The MTU of ATE - port-1 is 1500 bytes, so the iBGP sessions use an MSS for 1500-byte - packets, which are too big for the link from `TRANSIT` to ATE port-1. - * Set `transport/config/mtu-discovery` to `true` on all four neighbors. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED` and that - `transport/state/mtu-discovery` is `true` for all four neighbors. - * Start a packet capture on ATE port-1. Advertise 2000 IPv4 prefixes - (`100.64.0.0/24` onwards) and 2000 IPv6 prefixes (`2001:db8:1::/64` - onwards), all with the same path attributes, from the eBGP peers on - ATE port-2. The DUT then sends BGP UPDATE messages of more than 1400 - bytes to the iBGP peers on ATE port-1. - * Verify that the iBGP peers on ATE port-1 receive all 2000 IPv4 - prefixes and all 2000 IPv6 prefixes, and that all four sessions are - still `ESTABLISHED`. The DUT can only deliver them if it lowers its - segment size after `TRANSIT` reports the 1400-byte MTU. - * Verify in the capture that the DUT (`192.0.2.10` and - `2001:db8::192:0:2:a`) sent IPv4 and IPv6 packets of more than 1280 - bytes, which shows that it uses the 1400-byte path MTU and not a - smaller default, and that none of its IPv4 packets is an IP fragment. - * Withdraw the prefixes, and remove the MTU configuration from DUT - port-1. - * Remove `transport/config/mtu-discovery` from the four neighbors. -* Peer-group level: - * Set `transport/config/mtu-discovery` to `true` on the peer groups - `EBGP-PEERS` and `IBGP-PEERS`. - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/mtu-discovery` is `true` for both peer groups, and - that all four neighbors inherit it. - * Neighbor-level override: keep PMTUD enabled on the peer groups, and - set `transport/config/mtu-discovery` to `false` on one neighbor in - each peer group (the IPv4 neighbors 192.0.2.2 and 192.0.2.6). - * Re-establish the four sessions. - * Verify that all four sessions are `ESTABLISHED`, that - `transport/state/mtu-discovery` is `false` for the two IPv4 neighbors, - and that it is still `true` for the two IPv6 neighbors and both peer - groups. - * Remove `transport/config/mtu-discovery` from the two IPv4 neighbors and - from both peer groups. - -#### Canonical OC - -The block below shows the neighbor-level override step: PMTUD is enabled on -the peer groups and disabled on the IPv4 neighbors. In the neighbor-level -step, it is enabled on the four neighbors instead, and not configured on the -peer groups. - -```json -{ - "network-instances": { - "network-instance": [ - { - "name": "DEFAULT", - "config": { - "name": "DEFAULT" - }, - "protocols": { - "protocol": [ - { - "identifier": "BGP", - "name": "BGP", - "config": { - "identifier": "BGP", - "name": "BGP" - }, - "bgp": { - "peer-groups": { - "peer-group": [ - { - "peer-group-name": "EBGP-PEERS", - "config": { - "peer-group-name": "EBGP-PEERS", - "peer-as": 64501 - }, - "transport": { - "config": { - "mtu-discovery": true - } - } - }, - { - "peer-group-name": "IBGP-PEERS", - "config": { - "peer-group-name": "IBGP-PEERS", - "peer-as": 64500 - }, - "transport": { - "config": { - "mtu-discovery": true - } - } - } - ] - }, - "neighbors": { - "neighbor": [ - { - "neighbor-address": "192.0.2.2", - "config": { - "neighbor-address": "192.0.2.2", - "peer-group": "IBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": false - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:2", - "config": { - "neighbor-address": "2001:db8::192:0:2:2", - "peer-group": "IBGP-PEERS" - } - }, - { - "neighbor-address": "192.0.2.6", - "config": { - "neighbor-address": "192.0.2.6", - "peer-group": "EBGP-PEERS" - }, - "transport": { - "config": { - "mtu-discovery": false - } - } - }, - { - "neighbor-address": "2001:db8::192:0:2:6", - "config": { - "neighbor-address": "2001:db8::192:0:2:6", - "peer-group": "EBGP-PEERS" - } - } - ] - } - } - } - ] - } - } - ] - } -} -``` - -#### Test pass fail criteria - -* If any of the below conditions occur, the test should be declared as a - "FAIL": - 1. A BGP session is not `ESTABLISHED` after it is re-established - 2. In `RT-1.21.1`, `transport/state/tcp-mss` is not 4096 for a neighbor at - the neighbor level, not 1400 for a neighbor with the override, or not - 4000 for a peer group or any other neighbor at the peer-group level - 3. In `RT-1.21.2`, `transport/state/mtu-discovery` is not `false` for a - neighbor with the override, or not `true` for a peer group or any - other neighbor - 4. In `RT-1.21.2`, with the 1400-byte MTU on DUT port-1, an iBGP peer on - ATE port-1 does not receive all the prefixes, or a session does not - stay `ESTABLISHED` - 5. In `RT-1.21.2`, the capture on ATE port-1 has no IPv4 or no IPv6 - packet of more than 1280 bytes from the DUT, or has an IPv4 fragment - from the DUT - 6. A `transport/state/tcp-mss` reported before any MSS is configured is - outside the range given in `RT-1.21.1` - -### Cleanup - -* Remove the BGP, routing policy, static route, network instance and MTU - configurations from the DUT and stop OTG protocols to restore the - baseline state. +* Establish BGP sessions as follows: + * ATE:port1 --- eBGP-IPv4/IPv6 ---- DUT1:port1. + * ATE:port1 ---- iBGP IPv4 ---- DUT2:port1. +* Verify that the default TCP MSS value is set below the default interface MTU value. +* Change the Interface MTU on the DUT1:port1 port as well as ATE:port1 to 5040B +* Configure IP TCP MSS value of 4096 bytes on the DUT1:port1. +* Re-establish the EBGP sessions by tcp reset. +* Verify that the TCP MSS value is set to 4096 bytes for the IPv4 and IPv6 EBGP sessions. +* Establish iBGP session with MD5 enabled between ATE:port1 and DUT2:port1. +* Ensure that the MTU on the DUT1:port1 towards ATE1:port1 is left at default (1500B) while the ATE1:port1 interface towards DUT1:port1 is set at 5040B. Please also make sure that the DUT2:port1 MTU is set at 5040B as well. +* Enable PMTUD on DUT2:port1. +* Re-establish the IBGP sessions by tcp reset. +* Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. ## OpenConfig Path and RPC Coverage - ```yaml paths: ## Config Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/config/mtu-discovery: ## Telemetry Parameter Coverage /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/tcp-mss: - /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state/mtu-discovery: rpcs: gnmi: - gNMI.Set: - replace: true - delete: true gNMI.Subscribe: - on_change: true + gNMI.Set: ``` +## Canonical OC +```json +{} +``` + ## Minimum DUT platform requirement N/A diff --git a/testregistry.textproto b/testregistry.textproto index 8c70be5386a..7c03d2db45b 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -886,6 +886,11 @@ test: { readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md" exec: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go" } +test: { + id: "RT-1.22" + description: "BGP TCP MSS" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_tcp_mss/README.md" +} test: { id: "RT-1.23" description: "BGP AFI SAFI OC DEFAULTS"