Skip to content

Commit

Permalink
Merge pull request #15165 from vjardin/ospf_ptmp_unumbered
Browse files Browse the repository at this point in the history
tests: ospf point-to-multipoint and prefix-suppress
  • Loading branch information
ton31337 authored Jan 23, 2024
2 parents 5435d96 + bab32ec commit 3ab8fc1
Show file tree
Hide file tree
Showing 14 changed files with 623 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# OSPFv2 (IPv4) Topology Test Unumbered (point-to-multipoint over Ethernet)

## Topology

SW1 SW2
\___________________/ \___________________/
| |
| |
| eth0:10.0.10.1/32 | eth0:10.0.20.1/32
+---------+---------+ +---------+---------+
| R1 | | R2 |
| FRRouting | | FRRouting |
| RID: 10.0.255.1 | | RID: 10.0.255.2 |
+---------+---------+ +---------+---------+
| eth1:10.1.1.2/32 | eth1:10.1.2.2/32
\______ ___________/
\ /
\ /
~~~~~~~~~~~~~~~~~~
~~ SW4 ~~
~~ Switch ~~
~~ ~~
~~~~~~~~~~~~~~~~~~
|
| eth0:10.1.3.2/32 (unumbered)
+---------+---------+
| R3 |
| FRRouting |
| RID: 10.0.255.3 |
+---------+---------+
| eth0:10.0.30.1/24
|
~~~~~~~~~~~~~~~~~~
~~ SW3 ~~
~~ Switch ~~
~~ ~~
~~~~~~~~~~~~~~~~~~

## FRR Configuration

See full config from r1 / r2 / r3 subdirectories
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"10.0.10.1\/32":{"routeType":"N","transit":false,"cost":10,"area":"0.0.0.0"},"10.0.20.1\/32":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"},"10.0.30.0\/24":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"}}
11 changes: 11 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/r1/ospfd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!
interface r1-eth1
ip ospf network point-to-multipoint
ip ospf hello-interval 2
ip ospf dead-interval 10
ip ospf prefix-suppress 10.1.1.2
!
router ospf
ospf router-id 10.0.255.1
network 0.0.0.0/0 area 0
!
122 changes: 122 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/r1/v4_route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"10.0.10.1\/32": [
{
"prefix": "10.0.10.1\/32",
"prefixLen": 32,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"distance": 110,
"metric": 10,
"table": 254,
"internalStatus": 0,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.0.10.1\/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.0.10.1\/32",
"prefixLen": 32,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.0.20.1\/32": [
{
"prefix": "10.0.20.1\/32",
"prefixLen": 32,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 110,
"metric": 20,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.0.30.0\/24": [
{
"prefix": "10.0.30.0\/24",
"prefixLen": 24,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 110,
"metric": 20,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.1.1.2\/32": [
{
"prefix": "10.1.1.2\/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.1.1.2\/32",
"prefixLen": 32,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
!
interface r1-eth0
ip address 10.0.10.1/32
!
interface r1-eth1
ip address 10.1.1.2/32
!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"10.0.10.1\/32":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"},"10.0.20.1\/32":{"routeType":"N","transit":false,"cost":10,"area":"0.0.0.0"},"10.0.30.0\/24":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"}}
11 changes: 11 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/r2/ospfd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!
interface r2-eth1
ip ospf network point-to-multipoint
ip ospf hello-interval 2
ip ospf dead-interval 10
ip ospf prefix-suppress 10.1.2.2
!
router ospf
ospf router-id 10.0.255.2
network 0.0.0.0/0 area 0
!
122 changes: 122 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/r2/v4_route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"10.0.10.1\/32": [
{
"prefix": "10.0.10.1\/32",
"prefixLen": 32,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 110,
"metric": 20,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.0.20.1\/32": [
{
"prefix": "10.0.20.1\/32",
"prefixLen": 32,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"distance": 110,
"metric": 10,
"table": 254,
"internalStatus": 0,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.0.20.1\/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.0.20.1\/32",
"prefixLen": 32,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.0.30.0\/24": [
{
"prefix": "10.0.30.0\/24",
"prefixLen": 24,
"protocol": "ospf",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 110,
"metric": 20,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
],
"10.1.2.2\/32": [
{
"prefix": "10.1.2.2\/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 0,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
},
{
"prefix": "10.1.2.2\/32",
"prefixLen": 32,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
!
interface r2-eth0
ip address 10.0.20.1/32
!
interface r2-eth1
ip address 10.1.2.2/32
!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"10.0.10.1\/32":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"},"10.0.20.1\/32":{"routeType":"N","transit":false,"cost":20,"area":"0.0.0.0"},"10.0.30.0\/24":{"routeType":"N","transit":false,"cost":10,"area":"0.0.0.0"}}
11 changes: 11 additions & 0 deletions tests/topotests/ospf_unnumbered_point_to_multipoint/r3/ospfd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!
interface r3-eth1
ip ospf network point-to-multipoint
ip ospf hello-interval 2
ip ospf dead-interval 10
ip ospf prefix-suppress 10.1.3.2
!
router ospf
ospf router-id 10.0.255.3
network 0.0.0.0/0 area 0
!
Loading

0 comments on commit 3ab8fc1

Please sign in to comment.