In FreeBSD we have the "ndp -p" and "ndp -r" to display the Prefixes
and the default router entries learned from Router Advertisements.
Is there an equivalent command in Linux?
I tried "ip neighbor" but that doesn't display the entries related to RA.
On Thu, 23 Jun 2022, Dheeraj Kandula wrote:
In FreeBSD we have the "ndp -p" and "ndp -r" to display the Prefixes and the default router entries learned from Router Advertisements.
Is there an equivalent command in Linux?
I tried "ip neighbor" but that doesn't display the entries related to RA.
Maybe "ip -6 route" has (some of) what you're looking for?
--
Povl Ole
Thanks Povl.
In the "ip neighbor" output, I see entries listed with "router". Maybe it
is a RA Default router learnt entry.
From net/ipv6/addrconf.c:
Dheeraj Kandula <dkandula@gmail.com> writes:
Thanks Povl.
In the "ip neighbor" output, I see entries listed with "router". Maybe it is a RA Default router learnt entry.
Nope. That's the 'router' flag in the neigbour advertisment. Lots of systems will set this flag without sending RAs. Linux will set it if forwarding is enable on the interface where the NA is going out.
From net/ipv6/addrconf.c:
/* send unsolicited NA if enabled */
if (send_na &&
(ifp->idev->cnf.ndisc_notify ||
dev_net(dev)->ipv6.devconf_all->ndisc_notify)) {
ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifp->addr,
/*router=*/ !!ifp->idev->cnf.forwarding,
/*solicited=*/ false, /*override=*/ true,
/*inc_opt=*/ true);
}
Bjørn
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 429 |
Nodes: | 16 (2 / 14) |
Uptime: | 112:22:29 |
Calls: | 9,055 |
Calls today: | 2 |
Files: | 13,395 |
Messages: | 6,016,192 |