[Xorp-hackers] [Xorp-cvs] XORP cvs commit: xorp/ospf

Atanu Ghosh atanu at ICSI.Berkeley.EDU
Thu Feb 22 16:08:04 PST 2007


>>>>> "Hasso" == Hasso Tepper <hasso at linux.ee> writes:

    Hasso> Atanu Ghosh wrote:
    >> >>>>> "Hasso" == Hasso Tepper <hasso at linux.ee> writes:
    >> 
    Hasso> Kristian Larsson wrote:
    >> >> What is the range of interface IDs?  65k? 4m?  Isn't it better
    >> to >> start at the top and descend when allocating IDs for these
    >> pseudo >> interfaces?  We have routers with more than 1000
    >> interfaces...
    >> 
    Hasso> Me too. Btw, is "interface ID" something XORP
    Hasso> assigns/maintains or is it ifinde, or ... ?
    >>  The real interface index comes from the kernel, we are
    >> discussing a pseudo index that is generated for virtual links
    >> (that shouldn't clash with a real interface index).

    Hasso> So, interface ID used in OSPFv3 packets is equal to ifindex
    Hasso> for real interfaces? In this case I don't think you can avoid
    Hasso> potential race with such simple algorithms ;).

    Hasso> At least Linux doesn't reuse ifindexes until wrapped. Create
    Hasso> vlan (or any dynamic interface) => it has ifindex x; delete
    Hasso> it and create again => it has ifindex [x+1]. So, for
    Hasso> bulletproof implementation you have to do two things:

    Hasso> 1) While assigning pseudo index, check whether it's not use
    Hasso> already.  2) Handle the situation when real interface appears
    Hasso> with ifindex equal to pseudo index in use.

Done.

	Atanu.



More information about the Xorp-hackers mailing list