[Babel-users] Next Hop TLV meaning
Lorenzo Ghiro
lorenzo.ghiro at studenti.unitn.it
Tue Dec 6 15:52:46 UTC 2016
Hi everybody, once again I need your help! :)
I do not understand the meaning of "next-hop" TLV for a subsequent Update.
I built a very basic network with two Babel nodes connected via a wired
link. Host1 interface's address is 1.1.1.1, Host2 interface's address is
2.2.2.2
Well, consider that after some time host1 installed the route 2.2.2.2/32,
learned via host2, therefore next-hop for that route is 2.2.2.2. Here below
I put the output that I get from a printf* put into flushupdates before
calling really_send_update
host1> Time:661.531458 Sending UpdateC for learned route<Prefix:2.2.2.2/32
> - NH:2.2.2.2 - contribute: 2>
*[when invoking printf, a babel_route *route is available, so I believe I
am not doing wrong in getting the NH as shown in this little piece of code
> printf("%ld.%06ld\t Sending UpdateC for learned route<Prefix:%s - NH:%s
> - contribute: %i>\n",
> now.tv_sec, now.tv_usec,
> format_prefix(route->src->prefix, route->src->plen),
> format_address(route->nexthop), (1 + total_contribute));
]
At host2 side I expect that, receiving the just sent update, the preceding
NH TLV should carry the address 2.2.2.2, but instead, as you can see I get
1.1.1.1 (actually the source address of this packet)
host2> Time: 661.532299 Received nh 1.1.1.1 (1) from
> fe80::e43d:3ff:feeb:bf58 on h2-eth0.
> host2> Time: 661.532299 Received update for 2.2.2.2/32 from
> fe80::e43d:3ff:feeb:bf58 on h2-eth0.
Although this result complies with the RFC
<<The next-hop address for this update is taken from the last preceding
Next Hop TLV with a matching address family in the same packet; if no
such TLV exists, it is taken from the network-layer source address of
this packet>>
nevertheless I do not understand why it works like this :(
What should I do put the route's next-hop into update messages? I should
put the "route->nexthop" into a subtlv? Or I just need to better understand
the use of already present next-hop TLV?
Thank you and best regards,
Lorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/babel-users/attachments/20161206/150bb50f/attachment.html>
More information about the Babel-users
mailing list