Repository navigation
Add support for ospf auto cost configuration #1693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
saba8814
wants to merge
4
commits into
main
Choose a base branch
from
add-support-for-ospf-auto-cost-configuration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a79ae88
confd: add OSPF auto-cost reference bandwidth
saba8814 3b3ea83
statd: report OSPF auto-cost reference bandwidth
saba8814 f1d5a88
test: add OSPF auto-cost reference bandwidth test
saba8814 a46aefa
doc: describe OSPF auto-cost reference bandwidth
saba8814 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| include::ospfv2.adoc[] | ||
|
|
||
| <<< | ||
|
|
||
| include::ospfv3.adoc[] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| === OSPFv2 Auto-Cost Reference Bandwidth | ||
|
|
||
| ifdef::topdoc[:imagesdir: {topdoc}../../test/case/routing/ospf_auto_cost] | ||
|
|
||
| ==== Description | ||
|
|
||
| Verifies that the OSPFv2 interface cost follows the configured auto-cost | ||
| reference bandwidth. The reference bandwidth must be the same on all | ||
| routers in an OSPF domain, so it is changed on both R1 and R2. | ||
|
|
||
| The cost of an interface is the reference bandwidth divided by the link | ||
| speed, with 1 as the lowest cost. A link of unknown speed, e.g., a virtual | ||
| link, counts as 10000 Mbit/s. On a 1 Gbit/s link the cost is: | ||
|
|
||
| |=== | ||
| | Reference bandwidth | Cost | ||
| | 100000 Mbit/s (default) | 100 | ||
| | 10000 Mbit/s | 10 | ||
| | 1000 Mbit/s | 1 | ||
| |=== | ||
|
|
||
| The test reads the link speed on each router to calculate the expected | ||
| cost, and reads the reference bandwidth back from the operational | ||
| datastore. | ||
|
|
||
| ==== Topology | ||
|
|
||
| image::topology.svg[OSPFv2 Auto-Cost Reference Bandwidth topology, align=center, scaledwidth=75%] | ||
|
|
||
| ==== Sequence | ||
|
|
||
| . Set up topology and attach to target DUTs | ||
| . Configure OSPFv2 on R1 and R2 | ||
| . Wait for OSPFv2 adjacency between R1 and R2 | ||
| . Verify default reference bandwidth 100000 Mbit/s and link cost | ||
| . Set reference bandwidth 10000 Mbit/s on R1 and R2 | ||
| . Verify reference bandwidth 10000 Mbit/s and link cost | ||
| . Set reference bandwidth 1000 Mbit/s on R1 and R2 | ||
| . Verify reference bandwidth 1000 Mbit/s and link cost | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| test.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| === OSPFv3 Auto-Cost Reference Bandwidth | ||
|
|
||
| ifdef::topdoc[:imagesdir: {topdoc}../../test/case/routing/ospf_auto_cost] | ||
|
|
||
| ==== Description | ||
|
|
||
| Verifies that the OSPFv3 interface cost follows the configured auto-cost | ||
| reference bandwidth. The reference bandwidth must be the same on all | ||
| routers in an OSPF domain, so it is changed on both R1 and R2. | ||
|
|
||
| The cost of an interface is the reference bandwidth divided by the link | ||
| speed, with 1 as the lowest cost. A link of unknown speed, e.g., a virtual | ||
| link, counts as 10000 Mbit/s. On a 1 Gbit/s link the cost is: | ||
|
|
||
| |=== | ||
| | Reference bandwidth | Cost | ||
| | 100000 Mbit/s (default) | 100 | ||
| | 10000 Mbit/s | 10 | ||
| | 1000 Mbit/s | 1 | ||
| |=== | ||
|
|
||
| The test reads the link speed on each router to calculate the expected | ||
| cost, and reads the reference bandwidth back from the operational | ||
| datastore. | ||
|
|
||
| ==== Topology | ||
|
|
||
| image::topology.svg[OSPFv3 Auto-Cost Reference Bandwidth topology, align=center, scaledwidth=75%] | ||
|
|
||
| ==== Sequence | ||
|
|
||
| . Set up topology and attach to target DUTs | ||
| . Configure OSPFv3 on R1 and R2 | ||
| . Wait for OSPFv3 adjacency between R1 and R2 | ||
| . Verify default reference bandwidth 100000 Mbit/s and link cost | ||
| . Set reference bandwidth 10000 Mbit/s on R1 and R2 | ||
| . Verify reference bandwidth 10000 Mbit/s and link cost | ||
| . Set reference bandwidth 1000 Mbit/s on R1 and R2 | ||
| . Verify reference bandwidth 1000 Mbit/s and link cost | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| test.py |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs the eyes of an expert, @jovatn how will this affect existing Styx installations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see now that the default is the same as the previous hard-coded value in Frr. So less critical, but maybe we should change the default? What do you think @jovatn ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit in a hurry now, but lets discuss next week if you think we should change.
We have not discussed this, but my main intention was to use FRR defaults as Infix defaults (see initial description)
Still, it is wise to lookup existing styx installations, although I believe/hope that adjustments (if needed) be done on appropriate repo than on mainline Infix.