[Xorp-users] questions about IPv6 get_link_local_address

David Balnaves david at utopia.cable.nu
Wed Oct 7 00:21:07 PDT 2009


Hi,

I think last time I asked about this I was told that in recent version
of XORP, ospfv3 should set the link local address automatically and
shouldn't see the error:
[ 2009/10/06 02:43:51  WARNING xorp_ospfv3:14690 OSPF +462
peer_manager.cc enabled ] link-local address must be configured on
eth0/eth0

In linux I see:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 1000
    link/ether 00:16:3e:55:1c:62 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.123/25 brd 192.168.1.127 scope global eth0
    inet6 fe80::216:3eff:fe55:1c62/64 scope link 
       valid_lft forever preferred_lft forever

I'm using the following test config:
protocols {
    ospf6 0 {
        router-id: 192.168.1.123
        ip-router-alert: false
        area 0.0.0.1 {
            area-type: "normal"
            interface eth0 {
                link-type: "broadcast"
                vif eth0 {
                    priority: 128
                    hello-interval: 9
                    router-dead-interval: 45
                    interface-cost: 1
                    retransmit-interval: 5
                    transit-delay: 1
                    passive: false
                    disable: false
                }
            }
        }
    }
}
interfaces {
    restore-original-config-on-shutdown: false
    interface eth0 {
        description: ""
        disable: false
        discard: false
        unreachable: false
        management: false
        vif eth0 {
            disable: false
            address 192.168.1.123 {
                prefix-length: 25
                disable: false
            }
            address 2002:7bf3:179f:0:216:3eff:fe55:1c62 {
                prefix-length: 64
                disable: false
            }
        }
    }
}


I've downloaded and built XORP 1.6 and I still seem to have the same
problem.  Sure, I can set the link-local address but this is undesirable
for a few reasons and I figure its best done automatically.  Am I right
in understanding that xorp should grab the link-local address
fe80::216:3eff:fe55:1c62 from linux via ifconfig/netlink/etc during
startup?

I've had a look through xrl_io.cc, and it appears that the following is
responsible for getting the link local address for OSPFv3:
template <>
bool
XrlIO<IPv6>::get_link_local_address(const string& interface, const
string& vif,
                                    IPv6& address)
{   
    debug_msg("Interface %s Vif %s\n", interface.c_str(), vif.c_str());

    const IfMgrVifAtom* fv = ifmgr_iftree().find_vif(interface, vif);
    if (fv == NULL)
        return false;

    IfMgrVifAtom::IPv6Map::const_iterator i;
    for (i = fv->ipv6addrs().begin(); i != fv->ipv6addrs().end(); i++) {
        if (i->second.addr().is_linklocal_unicast()) {
            address = i->second.addr();
            return true;
        }
    }

    return false;
}

Am I right in understanding that ifmgr_iftree().find_vif(interface, vif)
is getting the interfaces from the RIB, and then in turn looking at each
address on the interface?  Is anything from underlying linux interface
configuration inherited by the RIB?  Does this come back to the need for
xorp to listen to RA?  I'm not sure which part of the documentation to
find this information.  Any help/corrections appreciated.

David Balnaves



More information about the Xorp-users mailing list