#define OSPF_ROUTER_PRIORITY_DEFAULT 1
#define OSPF_RETRANSMIT_INTERVAL_DEFAULT 5
#define OSPF_TRANSMIT_DELAY_DEFAULT 1
-#define OSPF_DEFAULT_BANDWIDTH 10000 /* Kbps */
+#define OSPF_DEFAULT_BANDWIDTH 10000 /* Mbps */
-#define OSPF_DEFAULT_REF_BANDWIDTH 100000 /* Kbps */
+#define OSPF_DEFAULT_REF_BANDWIDTH 100000 /* Mbps */
#define OSPF_POLL_INTERVAL_DEFAULT 60
#define OSPF_NEIGHBOR_PRIORITY_DEFAULT 0
}
/* If reference bandwidth is changed. */
- if ((refbw * 1000) == o->ref_bandwidth)
+ if ((refbw) == o->ref_bandwidth)
return CMD_SUCCESS;
- o->ref_bandwidth = refbw * 1000;
+ o->ref_bandwidth = refbw;
for (ALL_LIST_ELEMENTS_RO (o->area_list, i, oa))
for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
ospf6_interface_recalculate_cost (oi);
#define OSPF6_INTERFACE_PRIORITY 1
#define OSPF6_INTERFACE_TRANSDELAY 1
#define OSPF6_INTERFACE_INSTANCE_ID 0
-#define OSPF6_INTERFACE_BANDWIDTH 10000 /* Kbps */
-#define OSPF6_REFERENCE_BANDWIDTH 100000 /* Kbps */
+#define OSPF6_INTERFACE_BANDWIDTH 10000 /* Mbps */
+#define OSPF6_REFERENCE_BANDWIDTH 100000 /* Mbps */
#define OSPF6_INTERFACE_SSO_RETRY_INT 1
#define OSPF6_INTERFACE_SSO_RETRY_MAX 5
}
if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH)
- vty_out (vty, " auto-cost reference-bandwidth %d%s", ospf6->ref_bandwidth / 1000,
+ vty_out (vty, " auto-cost reference-bandwidth %d%s", ospf6->ref_bandwidth,
VNL);
/* LSA timers print. */
}
/* If reference bandwidth is changed. */
- if ((refbw * 1000) == ospf->ref_bandwidth)
+ if ((refbw) == ospf->ref_bandwidth)
return CMD_SUCCESS;
- ospf->ref_bandwidth = refbw * 1000;
+ ospf->ref_bandwidth = refbw;
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
ospf_if_recalculate_output_cost (ifp);
json_object_int_add(json_interface_sub, "ifIndex", ifp->ifindex);
json_object_int_add(json_interface_sub, "mtuBytes", ifp->mtu);
- json_object_int_add(json_interface_sub, "bandwidthKbit", ifp->bandwidth);
+ json_object_int_add(json_interface_sub, "bandwidthMbit", ifp->bandwidth);
json_object_string_add(json_interface_sub, "ifFlags", if_flag_dump(ifp->flags));
}
else
{
vty_out (vty, "%s is %s%s", ifp->name,
((is_up = if_is_operative(ifp)) ? "up" : "down"), VTY_NEWLINE);
- vty_out (vty, " ifindex %u, MTU %u bytes, BW %u Kbit %s%s",
+ vty_out (vty, " ifindex %u, MTU %u bytes, BW %u Mbit %s%s",
ifp->ifindex, ifp->mtu, ifp->bandwidth, if_flag_dump(ifp->flags),
VTY_NEWLINE);
}
vty_out (vty, "! Important: ensure reference bandwidth "
"is consistent across all routers%s", VTY_NEWLINE);
vty_out (vty, " auto-cost reference-bandwidth %d%s",
- ospf->ref_bandwidth / 1000, VTY_NEWLINE);
+ ospf->ref_bandwidth, VTY_NEWLINE);
}
/* SPF timers print. */
}
#endif /* HAVE_STRUCT_SOCKADDR_DL */
- /* Bandwidth in kbps */
+ /* Bandwidth in Mbps */
if (ifp->bandwidth != 0)
{
- vty_out(vty, " bandwidth %u kbps", ifp->bandwidth);
+ vty_out(vty, " bandwidth %u Mbps", ifp->bandwidth);
vty_out(vty, "%s", VTY_NEWLINE);
}
DEFUN (bandwidth_if,
bandwidth_if_cmd,
- "bandwidth <1-10000000>",
+ "bandwidth <1-100000>",
"Set bandwidth informational parameter\n"
- "Bandwidth in kilobits\n")
+ "Bandwidth in megabits\n")
{
struct interface *ifp;
unsigned int bandwidth;
ifp = (struct interface *) vty->index;
bandwidth = strtol(argv[0], NULL, 10);
- /* bandwidth range is <1-10000000> */
- if (bandwidth < 1 || bandwidth > 10000000)
+ /* bandwidth range is <1-100000> */
+ if (bandwidth < 1 || bandwidth > 100000)
{
vty_out (vty, "Bandwidth is invalid%s", VTY_NEWLINE);
return CMD_WARNING;
ALIAS (no_bandwidth_if,
no_bandwidth_if_val_cmd,
- "no bandwidth <1-10000000>",
+ "no bandwidth <1-100000>",
NO_STR
"Set bandwidth informational parameter\n"
- "Bandwidth in kilobits\n")
+ "Bandwidth in megabits\n")
static int
ip_address_install (struct vty *vty, struct interface *ifp,