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

Hasso Tepper hasso at linux.ee
Thu Feb 22 02:52:05 PST 2007


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).

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

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

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


regards,

-- 
Hasso Tepper 



More information about the Xorp-hackers mailing list