LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2010, 01:08 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,637

Rep: Reputation: 112Reputation: 112
Stop and restart Ethernet connection Ubuntu 9.10


If I uncheck and recheck "Enable Networking" in the Network Manager Applet 0.7.996 I would expect the wired network to disconnect (which it does) and reconnect (which it does NOT). So I tried

sudo ifdown eth0 and got
Quote:
Ignoring unknown interface eth0=eth0.
ifconfig tells me
Quote:
eth0 Link encap:Ethernet HWaddr 00:25:64:e8:18:2c
inet addr:192.168.0.112 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::225:64ff:fee8:182c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1986 errors:0 dropped:0 overruns:0 frame:0
TX packets:2148 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1637275 (1.6 MB) TX bytes:318050 (318.0 KB)
Interrupt:17
so I am at a loss. How do I stop and restart the network interface short of rebooting the machine?

TIA,

Ken
 
Old 03-08-2010, 01:27 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
You can't do both at the same time.
Did you apply and close the network manager after unchecking the Enable Networking box ?
 
Old 03-08-2010, 01:48 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
How do I stop and restart the network interface short of rebooting the machine?
For the 'buntus:

sudo /etc/init.d/networking restart

And it'll apply the conditions you have specified in your /etc/network/interfaces file, which is generally more reliable than using "Network Manager".

If you prefer the GUI, wicd is a very good replacement for NM, and I recommend it. You'll need to add the wicd repository to /etc/apt/sources.lst before you can install it.

deb http://apt.wicd.net [ grumpy | hardy | karmic ] extras
 
Old 03-08-2010, 01:59 PM   #4
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,637

Original Poster
Rep: Reputation: 112Reputation: 112
Actually I did not open the network manager - at least when testing. I right click on the network icon uncheck "Enable Networking". The list goes away. I then right click again and check "Enable Networking". The network never comes back.

This works fine on the wireless connection on my netbook running Ubuntu 9.04. Just checked - it also works fine with a wired connection on the netbook.

I did notice that the wired connection is called "Auto eht0" on the netbook and ifdown --help states in part
Quote:
-a, --all de/configure all interfaces marked "auto"
So let me post this and try -a and also see if I can figure out if my desktop eth0 is "auto"

Ken
 
Old 03-08-2010, 02:18 PM   #5
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,637

Original Poster
Rep: Reputation: 112Reputation: 112
OK, so it seems that ifdown and ifup are not the proper command. So I tried your suggestion tredegar. Here is what I have experienced.

I unchecked then rechecked Enable Networking then ran the buntu command. The network never came back until I rebooted.

I made a change to "Wired connection 1" with the Network Manager applet then ran the buntu command. The change was not recognized. I did see this on the first execution of the command after reboot.
Quote:
[sudo] password for ken:
* Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
[ OK ]
Subsequent times it does not complain about eth0(?)
And my /etc/network/interfaces file contains
Quote:
auto lo
iface lo inet loopback
no eth0
So where is eth0 coming from? According to ifconfig it is the interface which I am using.

Ken
 
Old 03-08-2010, 02:23 PM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
That first quote you give is some kind of clue.
"Ignoring unknown interface eth0=eth0."

Somewhere eth0 is defined as eth0=eth0

?
 
Old 03-08-2010, 02:33 PM   #7
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
What is in /etc/udev/rules.d/70-persistent-net-rules?

By the way, network manager completely ignores /etc/network/interfaces - that file is used only if you configure networking manually.

Last edited by jay73; 03-08-2010 at 02:38 PM.
 
Old 03-08-2010, 02:34 PM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,637

Original Poster
Rep: Reputation: 112Reputation: 112
But where is it defined (or not properly defined)? Interestingly the entry in the Network Connections dialog shows "Network Connection 1" - my wired connection - as Last Used "never". However, Network Connection 1 is where I have defined the static IP address of the machine and it does in fact get that IP address.

I am going out for a walk.

Ken
 
Old 03-08-2010, 02:44 PM   #9
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Quote:
Originally Posted by taylorkh View Post
I am going out for a walk.
Ken


I know what you mean.
 
Old 03-08-2010, 04:24 PM   #10
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,637

Original Poster
Rep: Reputation: 112Reputation: 112
So I found a site which explains how to setup networking in Ubuntu. I added the following to /etc/network/interfaces
Quote:
auto eth0
iface eth0 inet static
address 192.168.0.112
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.25
I can restart this using
Quote:
sudo /etc/init.d/networking restart
ifconfig will show me the IP address I assign. However, when I changed the IP address to something different than Network Manager had (for testing) it killed the connection pending a reboot.

Well - enough of this horse manure - I tested Network Manager on Lucid Lynx alpha 3 and it works as expected. I hope Canonical leaves it alone when they go into production.

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you stop auto dialup connection at bootup on Ubuntu 7.10? tritan_3 Linux - Newbie 1 03-02-2008 02:31 PM
(Ubuntu) Ethernet connection duplex stuck on half, cannot change to ful skyhopper88 Linux - Wireless Networking 2 02-14-2007 04:32 PM
how can i start, stop or restart Paxmaster Slackware 3 11-27-2004 02:31 PM
Activating my ethernet makes my internet connection stop working ElijahLofgren Linux - Networking 1 02-05-2004 12:08 AM
Start Stop Restart Services Sifvion Slackware 6 09-14-2002 04:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration