FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-07-2011, 12:42 AM
"Dan B."
 
Default How to "ifdown ..." on squeeze?

On a new installation of squeeze, ifdown no longer works as it used
to (on my old Debian system).

When ifconfig lists an interface "eth0", neither "ifdown eth0" nor
"ifdown eth" takes the interface down. The attempts yield:
"ifdown: interface eth0 not configured" and
"ifdown: interface eth not configured".

How does one take an interface down on squeeze?

(My old system's /etc/network/interfaces had:
...
auto eth0
iface eth0 inet dhcp
On my squeeze system, it's:
...
allow-hotplug eth0
(with a commented-out line:
#NetworkManager#iface eth0 inet dhcp
)
)



Also: The reason I was trying to take it down and back up was to
trigger a fresh DHCP query and corresponding host-name configuration.
What's the preferred way of doing that?


Thanks,
Daniel



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4EB7376B.9080304@kempt.net">http://lists.debian.org/4EB7376B.9080304@kempt.net
 
Old 11-07-2011, 03:40 AM
Tom H
 
Default How to "ifdown ..." on squeeze?

On Sun, Nov 6, 2011 at 8:42 PM, Dan B. <danb@kempt.net> wrote:
>
> On a new installation of squeeze, ifdown no longer works as it used
> to (on my old Debian system).
>
> When ifconfig lists an interface "eth0", neither "ifdown eth0" nor
> "ifdown eth" takes the interface down. *The attempts yield:
> *"ifdown: interface eth0 not configured" and
> *"ifdown: interface eth not configured".
>
> How does one take an interface down on squeeze?
>
> (My old system's /etc/network/interfaces had:
> *...
> *auto eth0
> *iface eth0 inet dhcp
> On my squeeze system, it's:
> *...
> *allow-hotplug eth0
> (with a commented-out line:
> *#NetworkManager#iface eth0 inet dhcp
> )
> )
>
> Also: *The reason I was trying to take it down and back up was to
> trigger a fresh DHCP query and corresponding host-name configuration.

When NM controls your connections, NICs aren't defined in
"/etc/network/interfaces", by default; you can change that behavior by
changing the "managed" variable of the "ifupdown" section of
"/etc/NetworkManager/networkmanager.conf".

You can also use "nmcli" to take down and bring up your NIC.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=Syh1vwQDeFq1Dxchs-i82GqBZ5cKh-p+X6r+s_41v8wLg@mail.gmail.com">http://lists.debian.org/CAOdo=Syh1vwQDeFq1Dxchs-i82GqBZ5cKh-p+X6r+s_41v8wLg@mail.gmail.com
 
Old 11-07-2011, 06:17 AM
Bob Proulx
 
Default How to "ifdown ..." on squeeze?

Tom H wrote:
> Dan B. wrote:
> > On a new installation of squeeze, ifdown no longer works as it used
> > to (on my old Debian system).

This is because by default with a GNOME desktop installed Debian has
switched away from ifupdown and over to NetworkManager because GNOME
by default specifies NetworkManager. If you don't install GNOME then
you won't get NetworkManager and the behavior will be traditional
Debian ifupdown. There is a lot of discussion about this in the
mailing list archives. It has been controversial.

> > When ifconfig lists an interface "eth0", neither "ifdown eth0" nor
> > "ifdown eth" takes the interface down. The attempts yield:
> > "ifdown: interface eth0 not configured" and
> > "ifdown: interface eth not configured".
> >
> > How does one take an interface down on squeeze?

The expected tool on a GNOME system would be by using the
NetworkManager GUI with the mouse or as Tom writes, 'nmcli' from the
command line. Something like this:

# nmcli conn down id 'Auto eth0'
# nmcli conn up id 'Auto eth0'

> > (with a commented-out line:
> > #NetworkManager#iface eth0 inet dhcp

For the background of that comment see the bug report here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530024#49

> > Also: The reason I was trying to take it down and back up was to
> > trigger a fresh DHCP query and corresponding host-name configuration.
>
> When NM controls your connections, NICs aren't defined in
> "/etc/network/interfaces", by default; you can change that behavior by
> changing the "managed" variable of the "ifupdown" section of
> "/etc/NetworkManager/networkmanager.conf".
>
> You can also use "nmcli" to take down and bring up your NIC.

My recommendation is to edit that commented out line and remove it
from NetworkManager's control and return it to ifupdown's control.
See the mailing list archives for lots of discussion of this issue.

See this next reference for the details of that particular line.

http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_basic_syntax_of_etc_network_inte rfaces

Bob
 
Old 11-07-2011, 10:54 AM
Harry Putnam
 
Default How to "ifdown ..." on squeeze?

Tom H <tomh0665@gmail.com> writes:

> You can also use "nmcli" to take down and bring up your NIC.

Can you show a usage of bringing up/down the network?

With this in /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

That does mean that ifupdown is not in charge .. right?

------- --------- ---=--- --------- --------

It seems not to work here. For example:

Man page shows
nmcli con list (to get a list of CONFIGURED connections;
wrapped for mail):

NAME UUID
Wired connection 1 897c8cd7-b708-4ee4-9123-fcb6d7917edd

TYPE TIMESTAMP-REAL
802-3-ethernet Fri 28 Oct 2011 04:28:21 AM CDT

Ok fine... so far, but then:

nmcli con down uuid 897c8cd7-b708-4ee4-9123-fcb6d7917edd
Warning: Connection not active

------- --------- ---=--- --------- --------

Huh? Supposedly all connections were listed in the `list' cmd.

We've taken the exact UUID shown and yet are told that connection is
not in use... but no others are listed.

And then (wrapped for mail):

nmcli nm status
RUNNING STATE WIFI-HARDWARE WIFI
running disconnected enabled enabled

WWAN-HARDWARE WWAN
enabled disabled

But of course, I am live:

ping -c1 google.com
PING google.com (74.125.225.82) 56(84) bytes of data.
64 bytes from ord08s07-in-f18.1e100.net (74.125.225.82):
icmp_req=1 ttl=54 time=15.8 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.833/15.833/15.833/0.000 ms

------- --------- ---=--- --------- --------

Is there no sure file and simple way to bring a network up/down?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87hb2gqhb2.fsf@newsguy.com">http://lists.debian.org/87hb2gqhb2.fsf@newsguy.com
 
Old 11-07-2011, 03:28 PM
Tom H
 
Default How to "ifdown ..." on squeeze?

On Mon, Nov 7, 2011 at 2:17 AM, Bob Proulx <bob@proulx.com> wrote:
> Tom H wrote:
>> Dan B. wrote:
>> > On a new installation of squeeze, ifdown no longer works as it used
>> > to (on my old Debian system).
>
> This is because by default with a GNOME desktop installed Debian has
> switched away from ifupdown and over to NetworkManager because GNOME
> by default specifies NetworkManager. *If you don't install GNOME then
> you won't get NetworkManager and the behavior will be traditional
> Debian ifupdown. *There is a lot of discussion about this in the
> mailing list archives. *It has been controversial.

NM's a GNOME project application so it's normal that they've made
GNOME default to it...

NM's only controversial because there are people who oppose change not
matter why it might be. The NM developers haven't done themselves any
favors by not providing server-type features like bonding...


>> > When ifconfig lists an interface "eth0", neither "ifdown eth0" nor
>> > "ifdown eth" takes the interface down. *The attempts yield:
>> > *"ifdown: interface eth0 not configured" and
>> > *"ifdown: interface eth not configured".
>> >
>> > How does one take an interface down on squeeze?
>
> The expected tool on a GNOME system would be by using the
> NetworkManager GUI with the mouse or as Tom writes, 'nmcli' from the
> command line. *Something like this:
>
> *# nmcli conn down id 'Auto eth0'
> *# nmcli conn up id 'Auto eth0'

I gave a CLI answer because the request was for ifupdown so I assumed
a CLI method was being sought. The NM GUI's definitely the way to go
if you have a GUI.


>> > Also: *The reason I was trying to take it down and back up was to
>> > trigger a fresh DHCP query and corresponding host-name configuration.
>>
>> When NM controls your connections, NICs aren't defined in
>> "/etc/network/interfaces", by default; you can change that behavior by
>> changing the "managed" variable of the "ifupdown" section of
>> "/etc/NetworkManager/networkmanager.conf".
>>
>> You can also use "nmcli" to take down and bring up your NIC.
>
> My recommendation is to edit that commented out line and remove it
> from NetworkManager's control and return it to ifupdown's control.

You have to be careful with editing "/etc/network/interfaces". If you
don't have "managed" set to "true" in
"/etc/NetworkManager/nm-system-settings.conf" or
"/etc/NetworkManager/networkmanager.conf" (depending on the NM
version), the interface won't be managed by NM. So, if
"/etc/init.d/networking" isn't enabled too (if that's possible),
NICs'll have to be brought up manually with "ifup".


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SxZ8L9vZqLuq3GxkYqqG4E=UGvwAiRJ5+euu3b8NFoO6 Q@mail.gmail.com">http://lists.debian.org/CAOdo=SxZ8L9vZqLuq3GxkYqqG4E=UGvwAiRJ5+euu3b8NFoO6 Q@mail.gmail.com
 
Old 11-07-2011, 04:46 PM
Tom H
 
Default How to "ifdown ..." on squeeze?

On Mon, Nov 7, 2011 at 6:54 AM, Harry Putnam <reader@newsguy.com> wrote:
> Tom H <tomh0665@gmail.com> writes:
>>

>> You can also use "nmcli" to take down and bring up your NIC.
>
> Can you show a usage of bringing up/down the network?
>
> With this in */etc/NetworkManager/NetworkManager.conf

>
> *[main]
> *plugins=ifupdown,keyfile
>
> *[ifupdown]
> *managed=false
>
> That does mean that ifupdown is not in charge .. right?

No. It means that ifupdown is in charge rather than NM - as long as you have the interfaces listed in "/etc/network/interfaces". See my previous email.



> It seems not to work here. *For example:
>
> Man page shows
> nmcli con list (to get a list of CONFIGURED connections;
> wrapped for mail):
>
> *NAME * * * * * * * * * * *UUID

> *Wired connection 1 * * * *897c8cd7-b708-4ee4-9123-fcb6d7917edd
>
> * TYPE * * * * * * *TIMESTAMP-REAL
> *802-3-ethernet * *Fri 28 Oct 2011 04:28:21 AM CDT
>
> Ok fine... so far, but then:

>
> *nmcli con down uuid 897c8cd7-b708-4ee4-9123-fcb6d7917edd
> *Warning: Connection not active
>
> ------- * * * *--------- * * * ---=--- * * * --------- * * *--------
>
> Huh? *Supposedly all connections were listed in the `list' cmd.

>
> We've taken the exact UUID shown and yet are told that connection is
> not in use... but no others are listed.
>
> And then (wrapped for mail):
>
> * nmcli nm status
> *RUNNING * * * * STATE * * * * * WIFI-HARDWARE * WIFI

> *running * * * * disconnected * *enabled * * * * enabled
>
> WWAN-HARDWARE * WWAN
> enabled * * * * disabled
>
> But of course, I am live:
>
> * ping -c1 google.com

> *PING google.com (74.125.225.82) 56(84) bytes of data.
> *64 bytes from ord08s07-in-f18.1e100.net (74.125.225.82):
> *icmp_req=1 ttl=54 time=15.8 ms

>
> *--- google.com ping statistics ---
> *1 packets transmitted, 1 received, 0% packet loss, time 0ms
> *rtt min/avg/max/mdev = 15.833/15.833/15.833/0.000 ms
>

> ------- * * * *--------- * * * ---=--- * * * --------- * * *--------
>
> Is there no sure file and simple way to bring a network up/down?

Bob showed a good way of using nmcli in a previous email. I've used it with connection names in the past but never with UUIDs but it should work if you've set up "/etc/network/interfaces" and "/etc/NetworkManager/..." properly.
 
Old 11-07-2011, 04:48 PM
Bob Proulx
 
Default How to "ifdown ..." on squeeze?

Tom H wrote:
> Bob Proulx wrote:
> > Tom H wrote:
> >> Dan B. wrote:
> >> > On a new installation of squeeze, ifdown no longer works as it used
> >> > to (on my old Debian system).
> >
> > This is because by default with a GNOME desktop installed Debian has
> > switched away from ifupdown and over to NetworkManager because GNOME
> > by default specifies NetworkManager. If you don't install GNOME then
> > you won't get NetworkManager and the behavior will be traditional
> > Debian ifupdown. There is a lot of discussion about this in the
> > mailing list archives. It has been controversial.
>
> NM's a GNOME project application so it's normal that they've made
> GNOME default to it...

Yes. But why should a low level operation such as a network
management process be part of a desktop manager? That is part of the
fundamental design problem. Instead the operating system should
handle it and the desktop should interface to it. GNOME subsuming the
task itself pushes GNOME further into being an operating system
itself. It muddies the modularity between the component parts and
pushes everything all into one pile. That isn't good design.

> NM's only controversial because there are people who oppose change not
> matter why it might be. The NM developers haven't done themselves any
> favors by not providing server-type features like bonding...

No. NM is controversial because it stops networking in the middle of
an upgrade.(!?) When the upgrade was being performed logged in over
the network with ssh this kills the upgrade and prevents you from
logging in again to fix it. You can only go touch the hardware and
fix it. Which is very, very, *very*, bad. I was burned by this. The
latest version may have fixed that grave bug but any time you make
that kind of mistake then you deserve to be publicly flogged for it
for a long time regardless of whether a fix is now, after all of this
time, available in a new release which may or may not be available in
Stable.

NM is controversial when it crashes at the drop of a hat. It often
can't connect, can't connect, and then the process dies and needs to
be restarted. Sometimes this seems to cause dbus to need to be
restarted. Repeat this several times until it stops crashing. This
is on Stable which isn't GNOME 3 and so there may be a fix available
in the later code but it won't be available to Stable for a while.

NM is controversial because it only handles a subset of networking
cases but takes over the functionality for everything anyway.

I will stop there.

> >> > When ifconfig lists an interface "eth0", neither "ifdown eth0" nor
> >> > "ifdown eth" takes the interface down. The attempts yield:
> >> > "ifdown: interface eth0 not configured" and
> >> > "ifdown: interface eth not configured".
> >> >
> >> > How does one take an interface down on squeeze?
> >
> > The expected tool on a GNOME system would be by using the
> > NetworkManager GUI with the mouse or as Tom writes, 'nmcli' from the
> > command line. Something like this:
> >
> > # nmcli conn down id 'Auto eth0'
> > # nmcli conn up id 'Auto eth0'
>
> I gave a CLI answer because the request was for ifupdown so I assumed
> a CLI method was being sought. The NM GUI's definitely the way to go
> if you have a GUI.

I thought your suggestion of nmcli was great. Except there wasn't an
example given along with it. That was the only missing part. (Using
the GUI is fine too.) Examples are really useful and for things that
aren't quite obvious such as the need to identify the interface by
"Auto eth0" instead of simply "eth0". That is *yet another* annoying
aspect of NM. :-)

> >> > Also: The reason I was trying to take it down and back up was to
> >> > trigger a fresh DHCP query and corresponding host-name configuration.
> >>
> >> When NM controls your connections, NICs aren't defined in
> >> "/etc/network/interfaces", by default; you can change that behavior by
> >> changing the "managed" variable of the "ifupdown" section of
> >> "/etc/NetworkManager/networkmanager.conf".
> >>
> >> You can also use "nmcli" to take down and bring up your NIC.
> >
> > My recommendation is to edit that commented out line and remove it
> > from NetworkManager's control and return it to ifupdown's control.
>
> You have to be careful with editing "/etc/network/interfaces". If you
> don't have "managed" set to "true" in
> "/etc/NetworkManager/nm-system-settings.conf" or
> "/etc/NetworkManager/networkmanager.conf" (depending on the NM
> version), the interface won't be managed by NM.

It is perfectly fine for you to recommend the opposite position. In
which case please simply state it as such. Just say that you
recommend people stick with NetworkManager. Just say that people
should accept it and learn how to drive it fully. That is fine. We
each are entitled to our respective opinions and recommendations.

But in the above response it reads like you are correcting or
improving or clarifying what I said. But you are not. Instead you
are working at cross purposes to it. Please don't do that. Following
the thread it might lead someone to flipflop the control back and
forth to and from NM and become really confused.

Having interfaces not managed by NM isn't a problem. Having
interfaces *not* managed by NM is my desired state! It is the entire
purpose for removing that comment and taking back control of the
interface from NM. It is why I explicitly said that it would remove
the device from NM's control and return it to ifupdown's control.
Setting the MN variable to "managed" would recreate the problem state
of NM controlling the interface and is undesirable for that reason.

> So, if "/etc/init.d/networking" isn't enabled too (if that's
> possible), NICs'll have to be brought up manually with "ifup".

s/manually/automatically/

You mean brought up /automatically/ by ifupdown. :-) :-) Like it
works if you don't have GNOME installed. As it has worked for years
and years. As it still continues to work.

A warning would be that without a completely consistent configuration
some programs such as Evolution will assume that the network is
offline even when it is online and they won't function correctly.
Fortunately there are very few programs that tightly coupled to
NetworkManager. I am only aware of problems in Evolution.

Note that if you don't install GNOME but instead install one of the
other window managers (I could call them "light weight" because by
comparison to GNOME they are light weight but they are both getting
pretty heavy these days) such as LXDE or XFCE then neither of those
pull in NetworkManager. In those cases interfaces are handled by
ifupdown just as in previous Debian releases. NetworkManager isn't a
Debian dependency. NetworkManager is a GNOME dependency.

Bob
 
Old 11-07-2011, 05:18 PM
Stefan Monnier
 
Default How to "ifdown ..." on squeeze?

>> NM's only controversial because there are people who oppose change not
>> matter why it might be. The NM developers haven't done themselves any
>> favors by not providing server-type features like bonding...

No, it's also controversial for other reasons. In my case, I have
issues with it because it was designed for the "there's exactly one
user" case. The "multi-user" case (as well as the "nobody is logged in"
case) were only bolted on later and AFAIK those still don't really work
right (e.g. last I tried you can only have one nm-applet running at
a time).
The problem here is that GNU/Linux is a multi-user system, so NM's basic
design was fundamentally wrong, and it can be difficult to fix such
problem after the fact.


Stefan "whose machines often have more than 1 user logged"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jwvmxc7vm1r.fsf-monnier+gmane.linux.debian.user@gnu.org">http://lists.debian.org/jwvmxc7vm1r.fsf-monnier+gmane.linux.debian.user@gnu.org
 
Old 11-07-2011, 05:31 PM
Camaleón
 
Default How to "ifdown ..." on squeeze?

On Mon, 07 Nov 2011 11:28:37 -0500, Tom H wrote:

(...)

> NM's only controversial because there are people who oppose change not
> matter why it might be. The NM developers haven't done themselves any
> favors by not providing server-type features like bonding...

(...)

Just a quick "okay, but...".

I have to fully agree with other user's opinions in this regard.

Is not that users are opposing to any change regardless the benefits it
can provide but NM has been -during many time (years?)- buggy and
experienced an erratic behaviour and networking is a key piece of every
desktop (no need to mention servers).

So when users are seeing that their network settings are not applied or
that they are deleted or overriden, or DHCP is not working well or... is
when they complain :-)

Today we can say we have a quite good NM service but we've been wandering
in a dark age not so long ago.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.11.07.18.31.08@gmail.com">http://lists.debian.org/pan.2011.11.07.18.31.08@gmail.com
 
Old 11-07-2011, 07:16 PM
Harry Putnam
 
Default How to "ifdown ..." on squeeze?

Tom H <tomh0665@gmail.com> writes:

>> [main]
>> plugins=ifupdown,keyfile
>>
>> [ifupdown]
>> managed=false
>>
>> That does mean that ifupdown is not in charge .. right?
>
> No. It means that ifupdown is in charge rather than NM - as long as you
> have the interfaces listed in "/etc/network/interfaces". See my previous
> email.

Boy is that not apparent.

But at least I can now follow what is happening. ifupdown will
indeed bring up or down my network... I must have `interfaces' at
least close to right?

------- --------- ---=--- --------- --------

/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

------- --------- ---=--- --------- --------

/etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

------- --------- ---=--- --------- --------

Dan, with what is above in /etc/network/interfaces and
/etc/NetworkManager/NetworkManager.conf

Does ifup and ifdown then work?

I'm not sure if you'd need a reboot or what... hopefully not. Can
anyone say if you change over from one method to another... what it
takes to get the OS to recognize that fact?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87bosn8z8x.fsf@newsguy.com">http://lists.debian.org/87bosn8z8x.fsf@newsguy.com
 

Thread Tools




All times are GMT. The time now is 09:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org