On Oct 13, 2011, at 6:09 PM, Lorenzo Colitti wrote: > On Mon, Oct 10, 2011 at 14:16, Curtis Villamizar <[email protected]> wrote: > Random number selection for router-id and this sort of recovery would > solve the zero config OSPF issue related to router-id selection. > > Not yet solved in existing zospf draft (afaik) but solvable. > > zOSPF says what do do in the case of collisions if the router with duplicate > ID is on the same link, but not if it is elsewhere. However, I think it can > be made to work like this: > > 1. On startup, choose the router ID you had on last boot (if available) or a > random number. > 2. Start OSPF with this router ID. > 3. If you see a hello packet from a neighbour with your own router ID, you > have a collision on the local link. Change it and back off. > 4. If you see a router LSA listing you as a neighbour, but the router ID that > originated this LSA is not a neighbour of yours, you have a duplicate router > ID. Change it and back off. > > Are there any cases this does not cover?
On number 3, there is a race condition. If the router took some time to boot, this takes care of itself; if this is a flash restart (OSPF started up within one or two HELLO intervals of going down) there is some possibility that the neighbor simply has some old state. Note that the OSPF Spec has the router initially send a HELLO and then start looking for HELLOs from peers that announce it; it would be good for OSPF to instead wait for one HELLO interval so that it sees the HELLOs from other routers on the LAN before announcing itself if it's not sure about the uniqueness of its RID. On number 4, that would be a Router LSA or Network LSA; in a LAN subnet, the RIDs of the routers in the subnet are in the Network LSA. > As to what to do if there is a collision, I'm not sure. zOSPF says what you > and your neighbours should do if the colliding router is on your link, but I > don't know if that's enough if the colliding router is elsewhere. Any OSPF > experts know the answer to this? What the router needs to do is (1) NOT send an LSA using the RID into the LS database, as this will confuse everyone else (2) it would be good etiquette to announce one more HELLO in which it lists no neighbors so that all of its neighbors, and especially the DR, think it's going down. That way it doesn't get into the Network LSA, or if it already did, it will be removed. (3) It has to change its RID and start from the beginning. The good news is that it now has some subset of the LSA Database, so the second exchange will be somewhat quicker, and it already knows who the DR is in at least that subnet. "Random number" is a good description of the source for the RID. MAC Addresses and equipment serial numbers tend to be reasonable seeds, and a router will usually have more than one such. If it used one MAC address and that didn't play, it might try another. If push comes to shove, a call to random() is probably in order. _______________________________________________ homenet mailing list [email protected] https://www.ietf.org/mailman/listinfo/homenet
