Skip to content

Commit

Permalink
zebra, doc: allow bandwidth up to 1 terabit/sec
Browse files Browse the repository at this point in the history
Allow bandwidth up to 1000000 Mb/s (ie. 1 Tb/s) and document it.

Signed-off-by: Philippe Guibert <[email protected]>
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
pguibert6WIND committed Jan 25, 2024
1 parent 1d3e071 commit 91039b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 2 additions & 3 deletions doc/user/zebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,9 @@ Standard Commands
Enable or disable multicast flag for the interface.


.. clicmd:: bandwidth (1-10000000)
.. clicmd:: bandwidth (1-1000000)


Set bandwidth value of the interface in kilobits/sec. This is for
Set bandwidth value of the interface in Megabits/sec. This is for
calculating OSPF cost. This command does not affect the actual device
configuration.

Expand Down
10 changes: 2 additions & 8 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -3932,7 +3932,7 @@ DEFUN (no_shutdown_if,

DEFUN (bandwidth_if,
bandwidth_if_cmd,
"bandwidth (1-100000)",
"bandwidth (1-1000000)",
"Set bandwidth informational parameter\n"
"Bandwidth in megabits\n")
{
Expand All @@ -3942,12 +3942,6 @@ DEFUN (bandwidth_if,

bandwidth = strtol(argv[idx_number]->arg, NULL, 10);

/* bandwidth range is <1-100000> */
if (bandwidth < 1 || bandwidth > 100000) {
vty_out(vty, "Bandwidth is invalid\n");
return CMD_WARNING_CONFIG_FAILED;
}

ifp->bandwidth = bandwidth;

/* force protocols to recalculate routes due to cost change */
Expand All @@ -3959,7 +3953,7 @@ DEFUN (bandwidth_if,

DEFUN (no_bandwidth_if,
no_bandwidth_if_cmd,
"no bandwidth [(1-100000)]",
"no bandwidth [(1-1000000)]",
NO_STR
"Set bandwidth informational parameter\n"
"Bandwidth in megabits\n")
Expand Down

0 comments on commit 91039b3

Please sign in to comment.