LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2010, 10:52 AM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
How to stop/start network in Ubuntu 10.04


This should not be this difficult. I have a plain install of Ubuntu 10.04 64 bit with a wired network card. It picks up a private IP address from my router. It has an app called NetworkManager Applet 0.8 in the notification area of the panel. If I right click on this app and select "Disconnect" it does. ifconfig shows that the IP address is gone. I can then right click on the app again and "Auto eht0 and I am connected again and ifconfig shows the IP address restored. So far, so good.

I was testing a crossover cable to see how fast I could transfer files to/from my server - both machines have gigabit cards but my switch is only 100 Mb. I unplugged the PC from the router, hooked up the crossover cable to the server and found that I had no connectivity - the IP address was gone. Not wanting to mess with hard configuring IP addresses for the moment I connected the PC back to the router. When I unplugged the cable the app showed the networking disconnected icon. I tried right clicking on the app and unchecking [ ] Enable Networking then rechecking it. This works on my netbook running Ubuntu 9.04. No luck on 10.04 (and I had not tried the Auto eht0 as described above - did not discover that until later).

So then I tried to fix it from the command line.
Quote:
ken@taylor12:~$ sudo /etc/init.d/networking start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service networking start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start networking
networking stop/waiting
so I then tried
Quote:
ken@taylor12:~$ sudo service networking start
networking stop/waiting
but still no connectivity. A reboot got things back in order.

Then I did a little more testing.
Quote:
ken@taylor12:~$ sudo /etc/init.d/networking stop
* Deconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
and I am still connected.

Editing Connections within the NetworkManager Applet shows "Auto eth0 - last used never" even though I have used it. [Edit] Auto eth0 via the app appears to show information about my wired NIC.

ifconfig shows eht0 as active
Quote:
ken@taylor12:~$ ifconfig
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:2234 errors:0 dropped:0 overruns:0 frame:0
TX packets:2407 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1824427 (1.8 MB) TX bytes:404086 (404.0 KB)
Interrupt:17
Is this darned PC communicating by telepathy? I am at a loss. Thanks for any clarification you can offer.

Ken

Last edited by taylorkh; 07-18-2010 at 11:15 AM.
 
Old 07-18-2010, 11:31 AM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 221Reputation: 221Reputation: 221
You have four choices:

1) You can create a new network profile under System/Preferences/Network Connections with a static IP to use in tandem with the server, then select that from your applet when you directly connect.

2) Just use command-line ifconfig to put the interface up with a static IP when directly connecting to your server:
Code:
sudo ifconfig eth0 up 192.168.2.5 netmask 255.255.255.0
3) Install and configure a DHCP daemon on your server so that your machine will be given an IP when directly connected.

4) Figure out the correct way to use those needlessly complicated, distro-specific scripts that you are struggling with. (I can't help you with that one.)

I vote for options 1 or 2.

Last edited by foodown; 07-18-2010 at 11:38 AM.
 
1 members found this post helpful.
Old 07-18-2010, 11:55 AM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Thanks foodown,

The direct connect to the server is not the issue, just an example of how I got messing with the networking thing again today. In Red Hat it used to be simple "service network stop start or restart". Ubuntu seems to have made the process much more obscure (probably while trying to make it easier).

Ken
 
  


Reply



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
Start/Stop VBox on boot/shutdown Ubuntu Server 8.04 nlinecomputers Linux - Virtualization and Cloud 4 07-13-2010 07:51 AM
AWK- processing data inside start/stop pairs but ignoring start/stop lines cliffoij Programming 2 10-15-2008 06:17 AM
With Ubuntu 7.10 how would I use the CLI to start and stop the network card? dale504 Ubuntu 1 05-09-2008 09:05 PM
Start and stop a bash script based on network activity? creativetweak Linux - Software 8 05-04-2008 10:28 PM
Interrupt driven script for network start and stop MrUmunhum Linux - Networking 7 01-13-2008 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:20 AM.

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
Open Source Consulting | Domain Registration