summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-07 20:00:11 +0200
committerGitHub <noreply@github.com>2024-05-07 20:00:11 +0200
commit9353c9790b367b21cba5000f2c904ed41c29f8d7 (patch)
treeef6ae121b12042f07e561734f17a4084d8d33bbe /smoketest/scripts/cli
parentabc327ebc9e77910b29c1a0fa32f757c51574971 (diff)
parent637a73e35ff716441df0430b2308d685707b2ca0 (diff)
downloadvyos-1x-9353c9790b367b21cba5000f2c904ed41c29f8d7.tar.gz
vyos-1x-9353c9790b367b21cba5000f2c904ed41c29f8d7.zip
Merge pull request #3422 from HollyGurza/T6082
bgp: T6082: Allow the same local-as and remote-as in one peer group
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 03daa34aa..ea2f561a4 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -1330,6 +1330,27 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'neighbor {ext_neighbors[1]} remote-as external', conf)
self.assertIn(f'neighbor {ext_neighbors[1]} peer-group {ext_pg_name}', conf)
+ def test_bgp_29_peer_group_remote_as_equal_local_as(self):
+ self.cli_set(base_path + ['system-as', ASN])
+ self.cli_set(base_path + ['peer-group', 'OVERLAY', 'local-as', f'{int(ASN) + 1}'])
+ self.cli_set(base_path + ['peer-group', 'OVERLAY', 'remote-as', f'{int(ASN) + 1}'])
+ self.cli_set(base_path + ['peer-group', 'OVERLAY', 'address-family', 'l2vpn-evpn'])
+
+ self.cli_set(base_path + ['peer-group', 'UNDERLAY', 'address-family', 'ipv4-unicast'])
+
+ self.cli_set(base_path + ['neighbor', '10.177.70.62', 'peer-group', 'UNDERLAY'])
+ self.cli_set(base_path + ['neighbor', '10.177.70.62', 'remote-as', 'external'])
+
+ self.cli_set(base_path + ['neighbor', '10.177.75.1', 'peer-group', 'OVERLAY'])
+ self.cli_set(base_path + ['neighbor', '10.177.75.2', 'peer-group', 'OVERLAY'])
+
+ self.cli_commit()
+
+ conf = self.getFRRconfig(f'router bgp {ASN}')
+
+ self.assertIn(f'neighbor OVERLAY remote-as {int(ASN) + 1}', conf)
+ self.assertIn(f'neighbor OVERLAY local-as {int(ASN) + 1}', conf)
+
def test_bgp_99_bmp(self):
target_name = 'instance-bmp'
target_address = '127.0.0.1'