Bug #3410
closednfd-status does not list all the routes
0%
Description
Example:
- use nfdc to set forwarding strategy for /org/openmhealth to be multicast
- use nfdc set two next hops for /org/openmhealth
- use nfd-status to check next hops, only the first added one will be listed
Updated by Junxiao Shi over 9 years ago
Can you give the EXACT commands you've executed, and the COMPLETE output of nfd-status
before and after the commands?
Updated by Alex Afanasyev over 9 years ago
If only one listed, then only one is added. At least my initial test does not confirm your problem.
Can you add specific steps to reproduce your problem?
Updated by Davide Pesavento over 9 years ago
- Subject changed from nfs-status will not list all the next hops to nfd-status will not list all the next hops
- Description updated (diff)
Updated by Haitao Zhang over 9 years ago
- Subject changed from nfd-status will not list all the next hops to nfd-status does not list all the routes
Steps to reproduce the problem:
nfd-start
sudo ndn-repo-ng (repo-ng uses /org/openmhealth as data prefix, and one item will be automatically added to FIB and RIB)
nfd-status (RIB will contain one route for /org/openmhealth)
nfdc add-nexthop /org/openmhealth [another faceid]
nfd-status (RIB still contains ONLY the old route for /org/openmhealth, the new added route is not there)
My question is, ndn-repo-ng prefix registration changes RIB, but nfdc does not. Is that a bug or not?
Updated by Vince Lehman over 9 years ago
haitao zhang wrote:
Steps to reproduce the problem:
nfdc add-nexthop /org/openmhealth
My question is, ndn-repo-ng prefix registration changes RIB, but nfdc does not. Is that a bug or not?
The add-nexthop
commmand in nfdc will only add a nexthop to the FIB and will not create a new route. To add a route to the RIB, use the register
command.
Updated by Alex Afanasyev over 9 years ago
Do not use add-nexthop.
As a side note, we may want to remove add-nexthop from nfdc, as it is really not intended to be used except by RIB manager.
Updated by Haitao Zhang over 9 years ago
I just did what you said, and there is another bug: If I used "nfdc register", the new next hop will not be listed in FIB, but the routing works.
Steps I produced problem:
nfd-start
sudo ndn-repo-ng (repo-ng uses /org/openmhealth as data prefix, and one item will be automatically added to FIB and RIB)
nfs-status (FIB will contain one next-hop for /org/openmhealth)
nfdc register /org/openmhealth [another faceid]
nfs-status (FIB still contains ONLY the old next hop for /org/openmhealth, the new added next hop is not there)
Updated by Alex Afanasyev about 9 years ago
I followed the steps and DO NOT confirm the problem:
Before running repo:
✔ 23:38 ~/Devel/ndn/repo-ng [ master | ✔ ] $ nfd-status -br
FIB:
/localhost/nfd/rib nexthops={faceid=260 (cost=0)}
/localhost/nfd nexthops={faceid=1 (cost=0)}
RIB:
/localhost/nfd/rib route={faceid=260 (origin=0 cost=0 ChildInherit)}
After running repo
✔ 23:38 ~/Devel/ndn/repo-ng [ master | ✔ ] $ nfd-status -br
FIB:
/localhost/nfd/rib nexthops={faceid=260 (cost=0)}
/localhost/repo/delete nexthops={faceid=266 (cost=0)}
/localhost/repo/insert%20check nexthops={faceid=266 (cost=0)}
/org/openmhealth nexthops={faceid=266 (cost=0)}
/localhost/repo/insert nexthops={faceid=266 (cost=0)}
/localhost/nfd nexthops={faceid=1 (cost=0)}
/localhost/repo/watch nexthops={faceid=266 (cost=0)}
RIB:
/localhost/repo/insert%20check route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/insert route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/delete route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/watch route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/nfd/rib route={faceid=260 (origin=0 cost=0 ChildInherit)}
/org/openmhealth route={faceid=266 (origin=0 cost=0 ChildInherit)}
Run of nfdc
✔ 23:39 ~/Devel/ndn/repo-ng [ master | ✔ ] $ nfdc register /org/openmhealth tcp://spurs.cs.ucla.edu
Successful in name registration: ControlParameters(Name: /org/openmhealth, FaceId: 270, Origin: 255, Cost: 0, Flags: 1, )
After nfdc:
✔ 23:39 ~/Devel/ndn/repo-ng [ master | ✔ ] $ nfd-status -br
FIB:
/localhost/nfd/rib nexthops={faceid=260 (cost=0)}
/localhost/repo/delete nexthops={faceid=266 (cost=0)}
/localhost/repo/insert%20check nexthops={faceid=266 (cost=0)}
/org/openmhealth nexthops={faceid=266 (cost=0), faceid=270 (cost=0)}
/localhost/repo/insert nexthops={faceid=266 (cost=0)}
/localhost/nfd nexthops={faceid=1 (cost=0)}
/localhost/repo/watch nexthops={faceid=266 (cost=0)}
RIB:
/localhost/repo/insert%20check route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/insert route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/delete route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/repo/watch route={faceid=266 (origin=0 cost=0 ChildInherit)}
/localhost/nfd/rib route={faceid=260 (origin=0 cost=0 ChildInherit)}
/org/openmhealth route={faceid=266 (origin=0 cost=0 ChildInherit), faceid=270 (origin=255 cost=0 ChildInherit)}
Updated by Junxiao Shi about 9 years ago
- Category set to Tools
- Status changed from New to Rejected
I am able to reproduce the issue by pasting (rather than typing) the commands into a console:
nfdc register /hello udp4://10.0.0.1
nfd-status -r | grep hello
nfdc register /hello udp4://10.0.0.2
nfd-status -r | grep hello
The output is:
shijunxiao@m0212:~$ nfdc register /hello udp4://10.0.0.1
Successful in name registration: ControlParameters(Name: /hello, FaceId: 262, Origin: 255, Cost: 0, Flags: 1, )
shijunxiao@m0212:~$ nfd-status -r | grep hello
/hello route={faceid=262 (origin=255 cost=0 ChildInherit)}
shijunxiao@m0212:~$ nfdc register /hello udp4://10.0.0.2
Successful in name registration: ControlParameters(Name: /hello, FaceId: 265, Origin: 255, Cost: 0, Flags: 1, )
shijunxiao@m0212:~$ nfd-status -r | grep hello
/hello route={faceid=262 (origin=255 cost=0 ChildInherit)}
If I type the last command, it returns:
shijunxiao@m0212:~$ nfd-status -r | grep hello
/hello route={faceid=262 (origin=255 cost=0 ChildInherit), faceid=265 (origin=255 cost=0 ChildInherit)}
This behavior is by design.
StatusDatasets, including the RIB dataset, is cached for 5 seconds after generation.
When nfd-status
is invoked multiple times within a short period of time, cached contents may be returned.