summaryrefslogtreecommitdiffstats
path: root/tests/topotests/bgp_ecmp_topo1/peer8
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
commit2c7cac91ed6e7db0f6937923d2b57f97dbdbc337 (patch)
treec05dc0f8e6aa3accc84e3e5cffc933ed94941383 /tests/topotests/bgp_ecmp_topo1/peer8
parentInitial commit. (diff)
downloadfrr-upstream.tar.xz
frr-upstream.zip
Adding upstream version 8.4.4.upstream/8.4.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/topotests/bgp_ecmp_topo1/peer8')
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer8/exa-send.py66
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg21
2 files changed, 87 insertions, 0 deletions
diff --git a/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py
new file mode 100755
index 0000000..6bef355
--- /dev/null
+++ b/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python2
+
+"""
+exa-send.py: Send a few testroutes with ExaBGP
+"""
+
+from sys import stdout, argv
+from time import sleep
+
+sleep(5)
+
+# 1st arg is peer number
+# 2nd arg is number of routes to send
+peer = int(argv[1])
+numRoutes = int(argv[2])
+if peer <= 10:
+ asnum = 99
+else:
+ asnum = peer + 100
+
+# Announce numRoutes equal routes per PE - different neighbor AS
+for i in range(0, numRoutes):
+ stdout.write(
+ "announce route 10.201.%s.0/24 med 100 next-hop 10.0.%i.%i origin igp\n"
+ % (i, (((peer - 1) / 5) + 1), peer + 100)
+ )
+ stdout.flush()
+
+# Announce numRoutes equal routes per PE - different neighbor AS, but same source AS
+for i in range(0, numRoutes):
+ stdout.write(
+ "announce route 10.202.%s.0/24 med 100 next-hop 10.0.%i.%i origin igp as-path [ %i 200 ]\n"
+ % (i, (((peer - 1) / 5) + 1), peer + 100, asnum)
+ )
+ stdout.flush()
+
+# Announce numRoutes equal routes with different med per PE and different neighbor AS
+for i in range(0, numRoutes):
+ stdout.write(
+ "announce route 10.203.%s.0/24 med %i next-hop 10.0.%i.%i origin igp\n"
+ % (i, peer, (((peer - 1) / 5) + 1), peer + 100)
+ )
+ stdout.flush()
+
+# Announce numRoutes equal routes with different med per PE and different neighbor AS, but same source AS
+for i in range(0, numRoutes):
+ stdout.write(
+ "announce route 10.204.%s.0/24 med %i next-hop 10.0.%i.%i origin igp as-path [ %i 200 ]\n"
+ % (i, peer, (((peer - 1) / 5) + 1), peer + 100, asnum)
+ )
+ stdout.flush()
+
+# Announce 2 different route per peer
+stdout.write(
+ "announce route 10.205.%i.0/24 next-hop 10.0.%i.%i origin igp\n"
+ % (peer, (((peer - 1) / 5) + 1), peer + 100)
+)
+stdout.write(
+ "announce route 10.206.%i.0/24 next-hop 10.0.%i.%i origin igp as-path [ %i 200 ]\n"
+ % (peer, (((peer - 1) / 5) + 1), peer + 100, asnum)
+)
+stdout.flush()
+
+# Loop endlessly to allow ExaBGP to continue running
+while True:
+ sleep(1)
diff --git a/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg
new file mode 100644
index 0000000..1cd1cd9
--- /dev/null
+++ b/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg
@@ -0,0 +1,21 @@
+group controller {
+
+ process announce-routes {
+ run "/etc/exabgp/exa-send.py 8 10";
+ }
+
+ process receive-routes {
+ run "/etc/exabgp/exa-receive.py 8";
+ receive-routes;
+ encoder text;
+ }
+
+ neighbor 10.0.2.1 {
+ router-id 10.0.2.108;
+ local-address 10.0.2.108;
+ local-as 99;
+ peer-as 100;
+ graceful-restart;
+ }
+
+}