On Wed, 24 Jan 2007 04:57:51 +0530 "Anil Kumar" <anil123@xxxxxxxxx> wrote: > Hi, > Thanks for reply. Yes, i am talking about ifIndex returned by SIOCGIFINDEX. > > Let me describe my system and issue. > > On my router system i have two cards (blades) > > NP-Blade - one blade has network processor to handle data traffic > at line rate. This > blade is not running linux and has itw own > TCP/UDP/IP stack. The network > interfaces of router are on this blade. The > software on this board assigns > ifIndex to these network interfaces as 1,2,3 .... > 10, as there are ten > network interfaces on the board. NP-blade and > CP-blade use IP > for communication. > > CP-Blade -second blade is intel processor based, where we are > running routing > protocols ( OSPF, RIP , BGP , ISIS, LDP, RSVP) > and linux is running on it. > These protocols use socket layer of Linux to get > protocol messages > from other routers in the network. We are > creating virtual software interfaces > of "network interfaces" in > NP-blade on CP-Blade. Now, when we are creating > these interfaces > in CP-blade the ifIndex assigned by linux are > not same as what we have > assigned on NP-blade. Also, in linux it depends > in which sequence we > create network interfaces and ifIndex get > assigned. Say, In linux > if we create an interface and delete it and > bring up again, then we will > get different ifIndex. > > For software/system point of view we have to keep > NP-blade ifIndex fixed and > NP-blade assumes that ifIndex coming from CP-blade is > 1,2,3 ...10. CP-blade > routing protocols creating forwarding table use ifIndex > as assigned by Linux > to calculate ifIndex of next-hop router etc. So, when > CP-blade is sending routing > update to NP-blade we have to do mapping so that next-hop > index, sent to > NP-blade is what CP-blade is expecting. > > To avoid this mapping we thought better solution > will be to force NP-blade > ifIndex to linux on CP-blade when creating interfaces and > on CP-blade we don't > need to do any mapping of IfIndex from CP-blade ifIndex > to NP-blade ifIndex. > But in Linux using ioctl we are not able to find any > option to set ifIndex. > > Regards, > Anil Use the name rather than the ifindex. -- Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html