Re: primary and secondary ip addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Which source IP is used by the kernel is determined primary by your routing tables.

The requirements for an IP address to be allowed to be used in the routing table is that the IP address does exists on any of your interfaces, either as primary or secondary.

When you add/delete a primary address to a interface the kernel automatically adds/deletes routes accordingly, including source IP address selection.

This does not help, since if I want to use my secondary IP address instead of my primary, I cannot delete the primary otherwise all of my secondary IPs are lost as well (and since I can only have only one primary IP address).

If the routing table does not have information about which source IP address to use for this traffic then the kernel searches the interface for a valid primary address.

I update all the routing entries and eventually things start to work again. The problem is that:
-If I use a secondary IP and try to invalidate the primary (i.e. by removing its routing table entry), it takes about 500ms for the actual change (data packets sent on the secondary IP instead of the primary) to take effect.
-If I try to update the primary address directly without creating any secondary IP, then it still takes about 300ms for the change to take place.


I honestly do not understand what harm could do to have more than one primary address, especially on different subnets.

Cheers,
Andrea

Regards
Henrik


-
: 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux