[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command to Display Prefixes and Default router entries in Linux



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


Reply to: