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

Re: Marvell 88E80856 switching from static to dhcp configuration all on its own



On Thu, Jul 17, 2008 at 06:53:25PM -0700, Freddy Freeloader wrote:
...
>
> These troubleshooting suggestions really don't help explain to me why  
> dhclient would override the settings in /etc/network/interfaces for one  
> NIC and not the other though.  And why would it override manual  
> settings?  Isn't there some process watching the settings in  
> /etc/network/interfaces to stop just such a thing from happening, or  
> doesn't the driver and device itself record its state so that dhclient  
> wouldn't even attempt this unless there is some type of user override,  
> i.e. ifdown/ifup, /etc/init.d/networking restart, etc... ? 

so far as I know, interfaces is only read once, when it's needed, at
the time the interface is upped. Once it's up, that file's not
read. You can test this by upping an interface, commenting it out of
interfaces and then trying to down the interface (ifdown). It will
fail because it can't find the interface in the file. At least that's
how I remember it.


>
> There's something going on that I really don't understand here, and just  
> troubleshooting it at the level shown here doesn't seem to me that it  
> will answer my base questions.  Can anyone point me to documentation on  
> how this works, because I must be missing something. 
>
> Why wouldn't restarting networking not have killed dhclient after  
> /etc/network/interfaces was read, the NIC's configured, and all NIC's  
> were configured with a static IP address?  

dhclient doesn't care about /etc/network/interfaces at all. It just tries to get
dhcp lease over the specified interfaces. Why only the one interface?
because something is specifying that interface to dhclient. WHy
doesn't the process get killed? because the rest of the networking
system doesn't know about it. When you start networking, or do an
ifup, those scripts keep track of the dhclient that it starts by
pid. If dhclient is started by some other process, those scripts don't
know about it. At least, again, that's how I understand it. That comes
from just using them a lot, playing with it to see what it does. The
canonical answer is to be found in the code. 

best

A

Attachment: signature.asc
Description: Digital signature


Reply to: