Skip to content
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

Update neighbor information at runtime #18

Open
jack-ullery opened this issue Dec 17, 2024 · 2 comments
Open

Update neighbor information at runtime #18

jack-ullery opened this issue Dec 17, 2024 · 2 comments

Comments

@jack-ullery
Copy link

jack-ullery commented Dec 17, 2024

Is your feature request related to a problem? Please describe.
I'm struggling to find a way to update neighbor information at runtime.

The two things I would like to do:

  1. Add a neighbor at runtime (duplicate of https://redmine.named-data.net/issues/4102)
  2. Change the link-cost for a pre-existing neighbor at runtime

Describe the solution you'd like
It would be great if nlsrc had a neighbor command for adding/removing/updating neighbor information.

The syntax could be something like:

nlsrc neighbor add [name] PREFIX [face-uri] FACEURI [link-cost] LINK_COST
    Command requests to add a neighbor. If a neighbor already exists with the same prefix and face-uri, it is updated with the specified link-cost
nlsrc neighbor destroy [name] PREFIX
    Command to manually destroy a neighbor. Even if the face is still active

Describe alternatives you've considered
I tried changing the cost of the routes manually using nfdc, but it seems that these new link costs did not propagate their way to NLSR.

For example, in a two node network, when I use nfdc to edit the following routes from:

prefix=/network/site/n2 nexthop=265 origin=nlsr cost=1 flags=capture expires=never
prefix=/localhop/network/nlsr/LSA nexthop=265 origin=nlsr cost=1 flags=capture expires=never
prefix=/localhop/network/nlsr/sync/v=11 nexthop=265 origin=nlsr cost=1 flags=capture expires=never
prefix=/advertised/prefix nexthop=265 origin=nlsr cost=1 flags=capture expires=3277s

to:

prefix=/network/site/n2 nexthop=265 origin=nlsr cost=100 flags=capture expires=never
prefix=/localhop/network/nlsr/LSA nexthop=265 origin=nlsr cost=100 flags=capture expires=never
prefix=/localhop/network/nlsr/sync/v=11 nexthop=265 origin=nlsr cost=100 flags=capture expires=never
prefix=/advertised/prefix nexthop=265 origin=nlsr cost=100 flags=capture expires=never

The routing table reported by nlsrc did not change:

Routing Table:
  Destination: /network/site/n2
    NextHop(Uri: udp4://10.0.1.21:6363, Cost: 1)

Additional context?
I'm probably not the first person to try and change a neighbor's link-cost at runtime. Did I miss some secret configuration somewhere? Maybe there is a duplicate issue for that I missed

@awlane
Copy link
Contributor

awlane commented Dec 17, 2024

Both of these are currently "intend to add" type features, we've mostly just had labor bottlenecks for people whose research work would align with implementing this. The current best method is bringing NLSR down briefly to add a new configuration before bringing it back up.

The "alternative" method is acting more or less as I'd expect- NFD face cost is not the same as the link cost is used for routing calculations; the latter is used to set the former.

@jack-ullery
Copy link
Author

Thank you for the quick reply! That makes perfect sense
I knew the alternative method was a long-shot. I'll restart NLSR like you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants