summaryrefslogtreecommitdiffstats
path: root/tests/topotests/bgp_features/r2
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_features/r2
parentInitial commit. (diff)
downloadfrr-2c7cac91ed6e7db0f6937923d2b57f97dbdbc337.tar.xz
frr-2c7cac91ed6e7db0f6937923d2b57f97dbdbc337.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_features/r2')
-rw-r--r--tests/topotests/bgp_features/r2/bgp_delayopen_neighbor.json6
-rw-r--r--tests/topotests/bgp_features/r2/bgp_delayopen_summary_connect.json11
-rw-r--r--tests/topotests/bgp_features/r2/bgp_delayopen_summary_established.json11
-rw-r--r--tests/topotests/bgp_features/r2/bgp_delayopen_summary_shutdown.json11
-rw-r--r--tests/topotests/bgp_features/r2/bgp_shutdown_summary.json19
-rw-r--r--tests/topotests/bgp_features/r2/bgp_summary.json27
-rw-r--r--tests/topotests/bgp_features/r2/bgpd.conf41
-rw-r--r--tests/topotests/bgp_features/r2/ospf6d.conf21
-rw-r--r--tests/topotests/bgp_features/r2/ospf_neighbor.json16
-rw-r--r--tests/topotests/bgp_features/r2/ospfd.conf26
-rw-r--r--tests/topotests/bgp_features/r2/show_bgp.json349
-rw-r--r--tests/topotests/bgp_features/r2/show_bgp_metric_test.json57
-rw-r--r--tests/topotests/bgp_features/r2/zebra.conf28
13 files changed, 623 insertions, 0 deletions
diff --git a/tests/topotests/bgp_features/r2/bgp_delayopen_neighbor.json b/tests/topotests/bgp_features/r2/bgp_delayopen_neighbor.json
new file mode 100644
index 0000000..a74da03
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_delayopen_neighbor.json
@@ -0,0 +1,6 @@
+{
+ "192.168.201.2":{
+ "remoteAs":65200,
+ "bgpTimerDelayOpenTimeMsecs":60000
+ }
+}
diff --git a/tests/topotests/bgp_features/r2/bgp_delayopen_summary_connect.json b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_connect.json
new file mode 100644
index 0000000..c2b42ec
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_connect.json
@@ -0,0 +1,11 @@
+{
+"ipv4Unicast":{
+ "as":65000,
+ "peers":{
+ "192.168.201.2":{
+ "remoteAs":65200,
+ "state":"Connect"
+ }
+ }
+}
+}
diff --git a/tests/topotests/bgp_features/r2/bgp_delayopen_summary_established.json b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_established.json
new file mode 100644
index 0000000..77b6944
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_established.json
@@ -0,0 +1,11 @@
+{
+"ipv4Unicast":{
+ "as":65000,
+ "peers":{
+ "192.168.201.2":{
+ "remoteAs":65200,
+ "state":"Established"
+ }
+ }
+}
+}
diff --git a/tests/topotests/bgp_features/r2/bgp_delayopen_summary_shutdown.json b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_shutdown.json
new file mode 100644
index 0000000..8f9476a
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_delayopen_summary_shutdown.json
@@ -0,0 +1,11 @@
+{
+"ipv4Unicast":{
+ "as":65000,
+ "peers":{
+ "192.168.201.2":{
+ "remoteAs":65200,
+ "state":"Idle (Admin)"
+ }
+ }
+}
+}
diff --git a/tests/topotests/bgp_features/r2/bgp_shutdown_summary.json b/tests/topotests/bgp_features/r2/bgp_shutdown_summary.json
new file mode 100644
index 0000000..b789263
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_shutdown_summary.json
@@ -0,0 +1,19 @@
+{
+"ipv4Unicast":{
+ "routerId":"192.168.0.2",
+ "as":65000,
+ "vrfName":"default",
+ "peerCount":2,
+ "peers":{
+ "192.168.0.1":{
+ "remoteAs":65000,
+ "state":"Active"
+ },
+ "192.168.201.2":{
+ "remoteAs":65200,
+ "state":"Established"
+ }
+ },
+ "totalPeers":2
+}
+}
diff --git a/tests/topotests/bgp_features/r2/bgp_summary.json b/tests/topotests/bgp_features/r2/bgp_summary.json
new file mode 100644
index 0000000..30e0ef4
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgp_summary.json
@@ -0,0 +1,27 @@
+{
+"ipv4Unicast":{
+ "routerId":"192.168.0.2",
+ "as":65000,
+ "vrfName":"default",
+ "peerCount":2,
+ "peers":{
+ "192.168.0.1":{
+ "hostname":"r1",
+ "remoteAs":65000,
+ "outq":0,
+ "inq":0,
+ "pfxRcd":8,
+ "state":"Established"
+ },
+ "192.168.201.2":{
+ "hostname":"r5",
+ "remoteAs":65200,
+ "outq":0,
+ "inq":0,
+ "pfxRcd":2,
+ "state":"Established"
+ }
+ },
+ "totalPeers":2
+}
+}
diff --git a/tests/topotests/bgp_features/r2/bgpd.conf b/tests/topotests/bgp_features/r2/bgpd.conf
new file mode 100644
index 0000000..99cec98
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/bgpd.conf
@@ -0,0 +1,41 @@
+!
+hostname r2
+log file bgpd.log
+!
+router bgp 65000
+ bgp router-id 192.168.0.2
+ timers bgp 3 10
+ coalesce-time 0
+ bgp log-neighbor-changes
+ no bgp ebgp-requires-policy
+ neighbor 192.168.0.1 remote-as 65000
+ neighbor 192.168.0.1 timers 3 10
+ neighbor 192.168.0.1 description Router R1 (iBGP)
+ neighbor 192.168.0.1 update-source lo
+ neighbor 192.168.0.1 timers connect 5
+ neighbor 192.168.201.2 remote-as 65200
+ neighbor 192.168.201.2 timers 3 10
+ neighbor 192.168.201.2 description Router R5 (eBGP AS 65200)
+ neighbor 192.168.201.2 timers connect 5
+ !
+ address-family ipv4 unicast
+ network 192.168.0.0/24
+ network 192.168.1.0/24
+ network 192.168.2.0/24
+ network 192.168.3.0/24
+ network 192.168.7.0/24
+ network 192.168.8.0/24
+ neighbor 192.168.201.2 route-map testmap-in in
+ neighbor 192.168.201.2 route-map testmap-out out
+ exit-address-family
+!
+!
+!
+route-map testmap-in permit 999
+!
+route-map testmap-out permit 999
+!
+!
+line vty
+!
+
diff --git a/tests/topotests/bgp_features/r2/ospf6d.conf b/tests/topotests/bgp_features/r2/ospf6d.conf
new file mode 100644
index 0000000..7fe5356
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/ospf6d.conf
@@ -0,0 +1,21 @@
+log file ospf6d.log
+!
+! debug ospf6 neighbor
+!
+interface r2-lo
+!
+interface r2-eth1
+ ipv6 ospf6 priority 5
+!
+interface r2-eth2
+ ipv6 ospf6 priority 10
+!
+router ospf6
+ ospf6 router-id 192.168.0.2
+ log-adjacency-changes
+ interface r2-lo area 0.0.0.0
+ interface r2-eth1 area 0.0.0.0
+ interface r2-eth2 area 0.0.0.0
+!
+line vty
+!
diff --git a/tests/topotests/bgp_features/r2/ospf_neighbor.json b/tests/topotests/bgp_features/r2/ospf_neighbor.json
new file mode 100644
index 0000000..47bb57c
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/ospf_neighbor.json
@@ -0,0 +1,16 @@
+{
+ "neighbors":{
+ "192.168.0.1":[
+ {
+ "priority":10,
+ "converged":"Full"
+ }
+ ],
+ "192.168.0.3":[
+ {
+ "priority":5,
+ "converged":"Full"
+ }
+ ]
+ }
+}
diff --git a/tests/topotests/bgp_features/r2/ospfd.conf b/tests/topotests/bgp_features/r2/ospfd.conf
new file mode 100644
index 0000000..7f043c9
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/ospfd.conf
@@ -0,0 +1,26 @@
+log file ospfd.log
+!
+! debug ospf event
+! debug ospf zebra
+!
+int r2-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 5
+!
+int r2-eth2
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
+router ospf
+ ospf router-id 192.168.0.2
+ log-adjacency-changes
+ network 192.168.0.0/20 area 0.0.0.0
+ timers throttle spf 0 0 0
+ timers lsa min-arrival 10
+ timers throttle lsa all 0
+ refresh timer 10
+!
+line vty
+!
diff --git a/tests/topotests/bgp_features/r2/show_bgp.json b/tests/topotests/bgp_features/r2/show_bgp.json
new file mode 100644
index 0000000..830d5a9
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/show_bgp.json
@@ -0,0 +1,349 @@
+{
+ "vrfName": "default",
+ "routerId": "192.168.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 65000,
+ "routes": { "0.0.0.0/0": [
+ {
+ "pathFrom":"internal",
+ "prefix":"0.0.0.0",
+ "prefixLen":0,
+ "network":"0.0.0.0\/0",
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"65100",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.101.2",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.0.0/24": [
+ {
+ "pathFrom":"external",
+ "prefix":"192.168.0.0",
+ "prefixLen":24,
+ "network":"192.168.0.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.1.0/24": [
+ {
+ "valid":true,
+ "pathFrom":"internal",
+ "prefix":"192.168.1.0",
+ "prefixLen":24,
+ "network":"192.168.1.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ },
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.1.0",
+ "prefixLen":24,
+ "network":"192.168.1.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.2.0/24": [
+ {
+ "valid":true,
+ "pathFrom":"internal",
+ "prefix":"192.168.2.0",
+ "prefixLen":24,
+ "network":"192.168.2.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ },
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.2.0",
+ "prefixLen":24,
+ "network":"192.168.2.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.3.0/24": [
+ {
+ "valid":true,
+ "pathFrom":"internal",
+ "prefix":"192.168.3.0",
+ "prefixLen":24,
+ "network":"192.168.3.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ },
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.3.0",
+ "prefixLen":24,
+ "network":"192.168.3.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.6.0/24": [
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"internal",
+ "prefix":"192.168.6.0",
+ "prefixLen":24,
+ "network":"192.168.6.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.7.0/24": [
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.7.0",
+ "prefixLen":24,
+ "network":"192.168.7.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.8.0/24": [
+ {
+ "valid":true,
+ "pathFrom":"internal",
+ "prefix":"192.168.8.0",
+ "prefixLen":24,
+ "network":"192.168.8.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ },
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.8.0",
+ "prefixLen":24,
+ "network":"192.168.8.0\/24",
+ "metric":0,
+ "weight":32768,
+ "peerId":"(unspec)",
+ "path":"",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "hostname":"r2",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.101.0/24": [
+ {
+ "pathFrom":"internal",
+ "prefix":"192.168.101.0",
+ "prefixLen":24,
+ "network":"192.168.101.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"65100",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.101.2",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.102.0/24": [
+ {
+ "pathFrom":"internal",
+ "prefix":"192.168.102.0",
+ "prefixLen":24,
+ "network":"192.168.102.0\/24",
+ "metric":0,
+ "locPrf":100,
+ "weight":0,
+ "peerId":"192.168.0.1",
+ "path":"65100",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.101.2",
+ "hostname":"r1",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.201.0/24": [
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.201.0",
+ "prefixLen":24,
+ "network":"192.168.201.0\/24",
+ "metric":0,
+ "weight":0,
+ "peerId":"192.168.201.2",
+ "path":"65200",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.201.2",
+ "hostname":"r5",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+],"192.168.202.0/24": [
+ {
+ "valid":true,
+ "bestpath":true,
+ "pathFrom":"external",
+ "prefix":"192.168.202.0",
+ "prefixLen":24,
+ "network":"192.168.202.0\/24",
+ "metric":0,
+ "weight":0,
+ "peerId":"192.168.201.2",
+ "path":"65200",
+ "origin":"IGP",
+ "nexthops":[
+ {
+ "ip":"192.168.201.2",
+ "hostname":"r5",
+ "afi":"ipv4",
+ "used":true
+ }
+ ]
+ }
+] } }
diff --git a/tests/topotests/bgp_features/r2/show_bgp_metric_test.json b/tests/topotests/bgp_features/r2/show_bgp_metric_test.json
new file mode 100644
index 0000000..960f13d
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/show_bgp_metric_test.json
@@ -0,0 +1,57 @@
+{
+ "routerId": "192.168.0.2",
+ "routes": {
+ "192.168.2.0/24": [
+ {
+ "valid":true,
+ "prefix":"192.168.2.0",
+ "prefixLen":24,
+ "metric":0,
+ "nexthops":[
+ {
+ "ip":"192.168.0.1",
+ "used":true
+ }
+ ]
+ },
+ {
+ "valid":true,
+ "prefix":"192.168.2.0",
+ "prefixLen":24,
+ "metric":0,
+ "nexthops":[
+ {
+ "ip":"0.0.0.0",
+ "used":true
+ }
+ ]
+ }
+],"192.168.101.0/24": [
+ {
+ "prefix":"192.168.101.0",
+ "prefixLen":24,
+ "metric":101,
+ "peerId":"192.168.0.1"
+ }
+],"192.168.102.0/24": [
+ {
+ "prefix":"192.168.102.0",
+ "prefixLen":24,
+ "metric":0,
+ "peerId":"192.168.0.1"
+ }
+],"192.168.201.0/24": [
+ {
+ "prefix":"192.168.201.0",
+ "prefixLen":24,
+ "metric":222,
+ "peerId":"192.168.201.2"
+ }
+],"192.168.202.0/24": [
+ {
+ "prefix":"192.168.202.0",
+ "prefixLen":24,
+ "metric":0,
+ "peerId":"192.168.201.2"
+ }
+] } }
diff --git a/tests/topotests/bgp_features/r2/zebra.conf b/tests/topotests/bgp_features/r2/zebra.conf
new file mode 100644
index 0000000..1d427da
--- /dev/null
+++ b/tests/topotests/bgp_features/r2/zebra.conf
@@ -0,0 +1,28 @@
+!
+hostname r2
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.2/32
+ ipv6 address fc00::2/128
+!
+interface r2-eth0
+ description SW7 Stub Network
+ ip address 192.168.7.1/24
+ ipv6 address fc00:0:0:7::1/64
+!
+interface r2-eth1
+ description SW0 R1-R2 OSPF & BGP Network
+ ip address 192.168.1.2/24
+ ipv6 address fc00:0:0:1::2/64
+!
+interface r2-eth2
+ description SW1 R2-R3 OSPF Network
+ ip address 192.168.2.1/24
+ ipv6 address fc00:0:0:2::1/64
+!
+interface r2-eth3
+ description SW5 R2-R5 eBGP Network
+ ip address 192.168.201.1/24
+ ipv6 address fc00:200:0:1::1/64
+!