Re: Default Gateway with Manual Setting



On Tue, 2009-10-06 at 11:19 -0400, Gene Czarcinski wrote:
> On Tuesday 06 October 2009 10:45:50 Gene Czarcinski wrote:
> > On Tuesday 06 October 2009 10:03:45 Gene Czarcinski wrote:
> > > On Monday 05 October 2009 17:43:42 Dan Williams wrote:
> > > > On Mon, 2009-10-05 at 16:52 -0400, Gene Czarcinski wrote:
> > > > > On Monday 05 October 2009 16:33:21 Gene Czarcinski wrote:
> > > > > > I have not worked with koji before but I can give 134947 a try too.
> > > > >
> > > > > Downloaded and installed:
> > > > >
> > > > > Download/NetworkManager-0.7.996-4.git20091002.fc12.x86_64.rpm
> > > > > Download/NetworkManager-glib-0.7.996-4.git20091002.fc12.x86_64.rpm
> > > > > Download/NetworkManager-gnome-0.7.996-4.git20091002.fc12.x86_64.rpm
> > > > >
> > > > > Still does not work.
> > > >
> > > > Ok, are these system connections or user connections?  For the ones
> > > > where the "connection only" checkbox does not stick, is the "Available
> > > > to all users" checkbox also set?
> > >
> > > Absolutely ... all connections are "System" interfaces with the
> > > "Available to all users" checked.  The interface I am trying to set
> > > "connection only" may be a "private" network but it is a system-wide
> > > definition.
> > 
> > OK, something new.
> > 
> > I unchecked "Available to all users", applied, and restarted eth0 (I have
> >  it set to not start automatically in ifcfg-eth0).  I then edited and
> >  checked for "connection only".  Not only did the box stay checked but it
> >  worked ... the default route was no to 192.168.122.1 on eth1.
> > 
> > SO, the problem looks like it is only on system wide ("Available to all
> > users") interfaces.
> > 
> > I am going to go back to F11 and try this there too.
> 
> Yes, yes ... F11 is the same.
> 
> Unchecked the "Available to all users" box for the "private" network NIC and 
> then I could check the "connection only" box and the default route was 
> correct.

Ok, this makes me think it's more of an issue in the ifcfg-rh backend.
Unfortunately, the "connection only" thing is backed by a bit of
ugliness in the ifcfg files; the device name (!) of the device that
should receive the gateway is set in /etc/sysconfig/network like
GATEWAYDEV=eth0, which is how it had always been done in a pre-NM and
ifcfg-only world.  NM attempts to preserve that compatibility, and when
reading in connections, will match the DEVICE=XXX line in the actual
ifcfg file with the GATEWAYDEV=XXX line in /etc/sysconfig/network, and
if they *don't* match, that connection will never get the default route.
There's a bug here apparently.

This gets a bit hard, because device names aren't stable, and NM uses
the persistent MAC address of the device instead of the device name in
most cases.  Also the fact that connections/ifcfgs don't *have* to be
tied to a specific device, and the ifcfg-rh backend does not write out
DEVICE= lines specifically for that reason.  The ifcfg files are read
long before the device might actually be plugged into the system too,
which means we don't have any information to make that judgement at load
time.

So the best case is probably to treat GATEWAYDEV as legacy, and have a
new key on a *per-ifcfg* basis that prevents that ifcfg from ever having
the default route, like the checkbox states.  The ifcfg-rh backend would
still honor GATEWAYDEV if an ifcfg had the DEVICE=XXX line I guess.
Thoughts?  GATEWAYDEV simply isn't really flexible enough.

Dan




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