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

[Bug 239609] Please add full set of zeroconf routes to each interface



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=239609





--- Comment #7 from Lennart Poettering <lpoetter redhat com>  2008-09-03 19:00:47 EDT ---
(In reply to comment #4)
> Linux is fine with multiple routes to the same network. The route that was
> created last wins. Of course, that means you cannot reach any link-local hosts
> on the network that was attached first, but I guess that is OK. 

I need to correct myself here. Linux doesn't allow multiple routes to the same
destination with the same metric.

An elegant way to work around this is by adding the ifindex to the 1000. i.e.
Something like this:

ip route add 169.254.0.0/16 dev eth0 metric $((1000 + `cat
/sys/class/net/eth0/ifindex`)) scope link

The second route (i.e. the default one) only needs to be there if we have an
IPv4ll address assigned. I can thus create it in the avahi-autoipd package, it
doesn't need to be set globally.

Thus I only ask you to replace this line in the network scripts:

 ip route replace 169.254.0.0/16 dev ${REALDEVICE}

by this one:

  ip route add 169.254.0.0/16 dev ${REALDEVICE} metric $((1000 + `cat
/sys/class/net/${REALDEVICE}/ifindex`)) scope link

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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