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

Re: Get to the bottom of what is running my networks



On Thu, Feb 16, 2012 at 1:22 AM, Harry Putnam <reader@newsguy.com> wrote:
> Tom H <tomh0665@gmail.com> writes:
>> On Wed, Feb 15, 2012 at 4:54 PM, Brian <ad44@cityscape.co.uk> wrote:
>>> On Wed 15 Feb 2012 at 12:57:24 -0500, Harry Putnam wrote:


>>>> Honestly it is confusing... surely there is some straight forward way
>>>> by now on this modern of a version of debian to simply work with the
>>>> tools that control networking...
>>>
>>> There is: ifupdown
>>
>> Since NM's active and therefore most probably controlling the
>> interfaces, the only interface defined in "/etc/network/interfaces"
>> will be "lo" and ifupdown won't work.
>>
>> If you've defined or uncommented an interface in
>> "/etc/network/interfaces" and you have "managed=false" in the ifupdown
>> section of "/etc/NetworkManager/NetworkManager.conf", ifupdown'll
>> work. I'm not sure what'll happen if you use ifupdown when you have
>> "managed=true" in this case.
>
> Thanks for that bit about network-manager.

You're welcome.


> At this point, I've removed network-manager completely and hope I am
> relying only on ifupdown tools to start/stop network.
>
> But still /etc/NetworkManager is there and contains a directory and
> file:
>
>  ls /etc/NetworkManager/system-connections/
>  Wired connection 2

NM's gone but it's config's still there.

You can check which packages are uninstalled but still have their
config hanging around with "aptitude search '?config-files'".

You can then run "apt-get purge <package>" to get rid of the config
one particular package or "apt-get purge $(aptitude search
'?config-files' -F '%p" to get rid of all the leftover configs.


> One thing I notice though, is that /etc/init.d/networking, which is
> part of the ifupdown pkgs, can stop the network but appears unable to
> start the network.  Is that normal?
>
> # /etc/init.d/networking stop
>
> OK, its stopped:
>
>   route -n
>   Kernel IP routing table
>  Destination  Gateway  Genmask  Flags Metric Ref    Use Iface
>
> But /etc/init.d/networking start
>
>  # /etc/init.d/networking start
>  Configuring network interfaces...done.
>
> Now check:
>
>   route -n
>  Kernel IP routing table
>  Destination  Gateway  Genmask  Flags Metric Ref    Use Iface
>
> Nothing is up
>
> Of course, I can start/stop each with
>
>  ifup eth0  (or eth1)
>
> But shouldn't they start with `/etc/init.d/networking start'
> when I have something like this in /etc/network/interfaces:
>
>  # The loopback network interface
>  auto lo
>  iface lo inet loopback
>
>  # The primary network interface
>  allow-hotplug eth0
>  iface eth0 inet dhcp
>
>  # a secondary network interface
>  allow-hotplug eth1
>  iface eth1 inet dhcp

"/etc/init.d/networking" calls "ifup -a" and "ifdown -a".

"ifup -a"/"ifup --all" is the same as "ifup --allow=auto".

Since eth0 and eth1 are marked "allow-hotplug", they aren't affected
by "/etc/init.d/networking start" but they're affected by
"/etc/init.d/networking stop" because the "-a" in "ifdown -a" really
means "all interfaces", including, IIRC "lo".

If you want to bring eth0 and eth1 up in one command, use "ifup
--allow=hotplug".

To use "/etc/init.d/networking", you can either change "allow-hotplug"
to "auto" (or "allow-auto") or add "auto"/"allow-auto" lines to the
"allow-hotplug" ones (I've never tried the latter but Bob Proulx
suggested it recently).


Reply to: