Re: [PATCH] Re: IP4Config and routes



On Tuesday 08 of June 2010 23:08:01 Dan Williams wrote:
> On Tue, 2010-06-08 at 13:43 +0200, Jirka Klimes wrote:
> > On Saturday 05 of June 2010 04:58:36 Dan Williams wrote:
> > > On Wed, 2010-06-02 at 09:51 +0200, Simon Schampijer wrote:
> > > > On 12/18/2009 03:14 PM, Daniel Drake wrote:
> > > > > On Thu, 2009-12-17 at 14:22 -0800, Dan Williams wrote:
> > > > >> What would you expect the routing table to look like in your case?
> > > > >>  I suppose we could do a default route for link-local.  Not sure
> > > > >> if that will confuse apps that expect a default route to mean an
> > > > >> internet connection though.
> > > > > 
> > > > > I would expect the subnet route, as NM is creating already:
> > > > > 	dest=169.254.0.0
> > > > > 	gateway=0.0.0.0
> > > > > 	genmask=255.255.0.0
> > > > > 
> > > > > I would also like the routing table to either include a default 
route:
> > > > > 	dest=0.0.0
> > > > > 	gateway=0.0.0.0
> > > > > 	genmask=0.0.0.0
> > > > > 
> > > > > or a multicast one:
> > > > > 	dest=224.0.0.0
> > > > > 	gateway=0.0.0.0
> > > > > 	genmask=240.0.0.0
> > > > > 
> > > > > The routing table that NM is setting up now is reasonable, in my
> > > > > opinion, but there should be some way of customizing the behaviour
> > > > > in the settings object.
> > > > > 
> > > > > Daniel
> > > > 
> > > > Hi,
> > > > 
> > > > what is the status on this one? Was there a conclusion on whether NM
> > > > should set a default route for link local?
> > > 
> > > Creating a multicast route by default on link-local IPv4 connections
> > > seems reasonable.  Want to do a patch for that?  I'd say just add the
> > > desired route in aipd_get_ip4_config() in src/nm-device.c to the
> > > returned NMIP4Config object and then lets make sure the code that adds
> > > routes works correctly there.
> > 
> > The patch adds a multicast route as suggested by Dan.
> > 
> > destination=224.0.0.0
> > netmask=240.0.0.0
> > 
> > Daniel, does it work for your case?
> 
> Patch looks good; lets push it into master, NM_0_8_1, and
> NETWORKMANAGER_0_7 branches.  And something else I found today, the
> Fedora network scripts add a 169.254 route by default for IPv4
> connections even if they aren't LL-only.  Not sure why or if that's
> something we want to or why it was added to the Fedora initscripts in
> the first place, but might be worth finding out.

Committed to the three branches.
 
Regarding 169.254.0.0 route, I've searched a bit. It is part of initscripts 
quite a long time now (from RedHat 9.0).
/etc/sysconfig/network-scripts/ifup-eth:
# Add Zeroconf route.
if [ -z "${NOZEROCONF}" -a "${ISALIAS}" = "no" -a "${REALDEVICE}" != "lo" ]; 
then
    ip route add 169.254.0.0/16 dev ${REALDEVICE} metric $((1000 + $(cat 
/sys/class/net/${REALDEVICE}/ifindex))) scope link
fi
http://linux.dbw.org/notes/static-routes.txt  - last section.

I think that it was added as a response to Windows  Automatic Private IP 
Addressing(APIPA) feature when implementing zeroconf.

However, I don't know if Windows adds the route for all connections like 
initscripts does. I could try to find that.
I'm not sure if the route could cause problems, probably not. But having it 
just for LL-only connection looks cleaner.
There was a bug for creating it even for loopback, now 
corrected:https://bugzilla.redhat.com/show_bug.cgi?id=203591#c8

Switching off the zeroconf route:
http://kbase.redhat.com/faq/docs/DOC-8628

Jirka


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