Re: How to ifdown ... on squeeze?

2011-11-07 Thread Harry Putnam
Tom H tomh0...@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 1897c8cd7-b708-4ee4-9123-fcb6d7917edd 
  
   TYPE  TIMESTAMP-REAL
  802-3-ethernetFri 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 disconnectedenabled 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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87hb2gqhb2@newsguy.com



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Tom H
On Mon, Nov 7, 2011 at 2:17 AM, Bob Proulx b...@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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=SxZ8L9vZqLuq3GxkYqqG4E=ugvwairj5+euu3b8nfo...@mail.gmail.com



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Tom H
On Mon, Nov 7, 2011 at 6:54 AM, Harry Putnam rea...@newsguy.com wrote:
 Tom H tomh0...@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 1897c8cd7-b708-4ee4-9123-fcb6d7917edd

   TYPE  TIMESTAMP-REAL
  802-3-ethernetFri 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 disconnectedenabled 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.


Re: How to ifdown ... on squeeze?

2011-11-07 Thread Bob Proulx
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 

Re: How to ifdown ... on squeeze?

2011-11-07 Thread Stefan Monnier
 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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/jwvmxc7vm1r.fsf-monnier+gmane.linux.debian.u...@gnu.org



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Camaleón
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.11.07.18.31...@gmail.com



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Harry Putnam
Tom H tomh0...@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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87bosn8z8x@newsguy.com



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Dan B.

Bob Proulx wrote:

Tom H wrote:

Dan B. wrote:

...

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


...

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.

 ...

Thanks.  Yes, I'll probably take control back to normal Linux commands.

Daniel


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

Archive: http://lists.debian.org/4eb850d1.3000...@kempt.net



Re: How to ifdown ... on squeeze?

2011-11-07 Thread Dan B.

Tom H wrote:

...
NM's only controversial because there are people who oppose change not
matter why it might be. ...


So are you lumping people who oppose having things break out from under
them, such as, say, someone installing a new release and finding that
standard Unix(?)/Linux networking commands no longer work, into your
people who oppose change [no] matter why category?


As Bob wrote elsewhere), a more (newbie-)user-friendly layer (e.g., GNOME
components) should call the standard interface, not break it.

Daniel


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

Archive: http://lists.debian.org/4eb85316.40...@kempt.net



Re: How to ifdown ... on squeeze?

2011-11-06 Thread Tom H
On Sun, Nov 6, 2011 at 8:42 PM, Dan B. d...@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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=syh1vwqdefq1dxchs-i82gqbz5ckh-p+x6r+s_41v8...@mail.gmail.com



Re: How to ifdown ... on squeeze?

2011-11-06 Thread Bob Proulx
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_interfaces

Bob


signature.asc
Description: Digital signature