ospf: the metric in [110/n] is the path cost, not a literal 0 #1722
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1722
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1116-2000"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
show ip routeprinted[110/0]for every OSPF route regardless of topology, so the metric column could not distinguish two paths and could not be checked againstshow ip ospf interface.Rule (device): brackets read
[administrative distance/metric]; for an OSPF route the metric is the distance to the router advertising the network plus that network link's own cost (RFC 2328 §16.1, second stage), with a loopback stub link at cost 0 (§12.4.1). Sources: https://www.cisco.com/E-Learning/bulk/public/tac/cim/cib/using_cisco_ios_software/cmdrefs/show_ip_route.htm, http://cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/15986-admin-distance.pdf, https://www.rfc-editor.org/rfc/rfc2328.txtAlso fixed behind it: a hop was charged as both interfaces' costs summed; RFC 2328 §16.1 prices a path by the costs the sending routers advertise.
adjacencyIndex()now builds a directed list fromcostA/costB, so an asymmetric link costs what each end says it costs.Changes:
engine/ospf.js(directed costs,stubCost()),engine/simulator.js(metric = distance + destination link),engine/device.js(metricon every route row),engine/cli.js(prints[distance/metric]),docs/CLI.md,research/ospf-route-metric.md, andtest/ospf-route-metric.test.js;test/ospf.test.jsandtest/protocol-regression.test.jsasserted the old arithmetic and now assert the device's numbers.Gates:
node scripts/syntax-check.jsOK (359 files);npm test— 288 suites, 10311 assertions, 0 failed.[110/n]is the path cost, not a literal 0