LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Kubuntu networking randomly doesn't start on boot, and needs restart (https://www.linuxquestions.org/questions/linux-networking-3/kubuntu-networking-randomly-doesnt-start-on-boot-and-needs-restart-481246/)

andy-k 09-07-2006 07:58 AM

Kubuntu networking randomly doesn't start on boot, and needs restart
 
I'm getting a minor problem with Kubuntu Dapper, but it's quite an annoying one.

Sometimes the internet works straight from the off, sometimes there is no internet, until i go into System Settings > System Services > Admin Mode and restart Networking.

Then the internet works again instantly. It was showing as start on boot 'no' so i changed it to yes but either setting doesn't seem to make any difference.

I'm stuck for suggestions really as the keywords i have to use in Google produce quite wide-ranging and unrelated results about networking.

camorri 09-07-2006 09:11 AM

To help diagnose your problem, it would help if you described the hardware configuration. At this point we have no idea what you have.

There are some commands you can use to find out what is working and what is not. But until we know what you have it is a shot in the dark.

andy-k 09-07-2006 09:50 AM

Kubuntu 6.06.1 LTS alternate, using the onboard LAN on an ASUS A8N-SLI SE mobo which uses an 'nVidia nForce4 built-in Gigabit MAC with external PHY'.

My modem is a D-Link DSL-504T router connected to the onboard LAN on my motherboard, and it's configured (out of necessity) by specifying my ISP's primary and secondary DNS nameservers.

I should mention that i have been experiencing this problem since install, so any changes i've made to get the internet working properly with my router has not caused it.

camorri 09-07-2006 10:10 AM

OK, when it fails, open a konsole and do a command '/sbin/ifconfig' and post the results. I want to see if you have an IP address at the time of failure. If you do have an IP address, do some pinging. At a konsole try to ping your router. If that works, try pinging the DNS servers, or even www.google.com. Post how far you can get. Also do a command 'netstat -r' and post the results.

Most routers provide some status displays. If you can connect to the router when it fails, have a look there at the status of the ISP side.

andy-k 09-07-2006 07:19 PM

I'm fairly sure it's not the router at fault, as this never happens in Windows, plus restarting networking in system services gets everything back to normal.

Here's the information you requested when all is not fine on boot:

Code:

andy@kubuntu:~$ /sbin/ifconfig

eth0      Link encap:Ethernet  HWaddr 00:15:F2:4C:D1:50
          inet6 addr: fe80::215:f2ff:fe4c:d150/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)
          Interrupt:225 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:172 (172.0 b)  TX bytes:172 (172.0 b)

andy@kubuntu:~$ ping 192.168.1.1
connect: Network is unreachable

andy@kubuntu:~$ ping www.google.com
ping: unknown host www.google.com

andy@kubuntu:~$ netstat -r
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface

And here are the same tests after i've restarted networking in system services, or if i'm lucky occasionally to get it to work on boot:

Code:

andy@kubuntu:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:15:F2:4C:D1:50
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:f2ff:fe4c:d150/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:143 errors:0 dropped:0 overruns:0 frame:0
          TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:62648 (61.1 KiB)  TX bytes:22021 (21.5 KiB)
          Interrupt:225 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:172 (172.0 b)  TX bytes:172 (172.0 b)

andy@kubuntu:~$ netstat -r
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
192.168.1.0    *              255.255.255.0  U        0 0          0 eth0
default        192.168.1.1    0.0.0.0        UG        0 0          0 eth0

Can ping the router and google without any problems.

camorri 09-08-2006 09:44 AM

At the point of failure you do not have an IP address. Note the field called inet addr: in the non working ifconfig output. Now the problem becomes, how to figure out why not. I'm assuming at this point you are running DHCP, with this setting your machine requests an IP address form a DHCP server. What machine in your network is performing this task? Do you have a router? If yes, would you post the make and model information.

I had a problem like this and traced it to a cable that was a little flacky, once in a while it just didn't work.

andy-k 09-08-2006 02:46 PM

I don't have a home network of any type. My setup is just my one desktop pc connected to a router now, which is also my modem. This is a D-Link DSL-504T router connected to the onboard LAN on my motherboard, and it's configured (out of necessity) by specifying my ISP's primary and secondary DNS nameservers.

This post explains some problems regarding this model of router, excpet my only problem is the networking not starting on boot, leaving me without internet:

http://www3.dslreports.com/forum/rem...4917~mode=flat

From what i understand when i set up the router, an ip starts at 192.168.1.1, and every 604000 seconds it changes to the next ip. The range i've set is 192.168.1.1 to 192.168.1.33.

I must stress that this modem/router works flawlessly in Windows and i am only finding this problem with Kubuntu. But that's fine, because i understand that Linux often needs a bit of tinkering to get things working properly. Even better with advice from someone helpful and knowledgeable such as yourself Cliff.

camorri 09-08-2006 04:32 PM

Quote:

I don't have a home network of any type.
From what you have told me, yes you do have a network, all be it a modem/router and one attached system.

I had a read through that long post. It seems to me these are two different problems. The post has mostly to do with DNS issues, and your problem form what you have posted is you don't have an IP address when your system starts up. IP addresses can be static, where you assign them, or you can have a DHCP server, like your D-link router, or you configure a DHCP server in linux.

I hear you very clearly when you tell me winbloze always works. Only problem here is that doesn't help us get closer to identifying the problem with Kununtu.

I went to D-links site and could find no documentation for the 504T. Is this an older product?
Have you ever updated the firmware for it? The other thread has a lot to say about the firmware, and the symptoms there do not point to a linux issue.

If I were you, I would assign an IP address to the linux system, outside the range of the DHCP server, say 192.168.1.50 Try that, and see if things work any better. If you never take the machine to other sites, having a fixed IP address should work just fine.

On my network ( home ) I have 3 desktops and 4 laptops that come and go. I use fixed addresses on the desktops. The laptops are set for DHCP.

andy-k 09-08-2006 06:31 PM

Quote:

Originally Posted by camorri
From what you have told me, yes you do have a network, all be it a modem/router and one attached system.

I had a read through that long post. It seems to me these are two different problems. The post has mostly to do with DNS issues, and your problem form what you have posted is you don't have an IP address when your system starts up. IP addresses can be static, where you assign them, or you can have a DHCP server, like your D-link router, or you configure a DHCP server in linux.

I hear you very clearly when you tell me winbloze always works. Only problem here is that doesn't help us get closer to identifying the problem with Kununtu.

I went to D-links site and could find no documentation for the 504T. Is this an older product?
Have you ever updated the firmware for it? The other thread has a lot to say about the firmware, and the symptoms there do not point to a linux issue.

If I were you, I would assign an IP address to the linux system, outside the range of the DHCP server, say 192.168.1.50 Try that, and see if things work any better. If you never take the machine to other sites, having a fixed IP address should work just fine.

On my network ( home ) I have 3 desktops and 4 laptops that come and go. I use fixed addresses on the desktops. The laptops are set for DHCP.

Hi Cliff. Thanks for the help so far. I'm using Linux 95% of the time at the moment, and this issue is the final niggle to get over to let me ditch Windows for good.

You are right, the DSL-504T is an older product and i think D-Link discontinued it now, but it's still sold. I upgraded to the latest (and last) firmware earlier this year, which was dated as late 2004.

Here are a couple of links to detailed spec information:

http://support.dlink.com/products/vi...id=DSL%2D504T#
http://shopping.zdnet.co.uk/0,39033137,21848302,00.htm
http://www.broadbandbuyer.co.uk/Shop...?ProductID=912

I would like to try assigning an IP address to the linux system as you suggest, outside the range of the DHCP server. How can i do this?

And also, i can't be sure if my ISP is issuing me a DHCP or static IP. Or does this not matter when we are talking about IPs issued by the DHCP on my router?

camorri 09-08-2006 07:36 PM

Quote:

I would like to try assigning an IP address to the linux system as you suggest, outside the range of the DHCP server. How can i do this?
In Kubuntu, go to start-->System-->Networking Tools and click. The system should start up an application with several tabs visible. The first is called Devices. There is a drop down box to select the 'localhost' or eth0, at least it is eth0 on my system. Select your ehternet card, and click on Configure. You are prompted for your password, enter it. You should get an Interface Properties display. The top box on your system is probably set to DHCP, click the drop down, and pick static IP address. Key in the IP address, sub-net mask, and Gateway address. As root or you can use sudo, do an 'ifconfig eth0 down' and then do an 'ifconfig eth0 up' and give it a try. Notice you can run ping and traceroute, port scan netstat all from this tool.

Quote:

And also, i can't be sure if my ISP is issuing me a DHCP or static IP. Or does this not matter when we are talking about IPs issued by the DHCP on my router?
Understand your router has two sides, the one that talks to your ISP, and the other talks to your system(s). The job of any router is to forward packets from one media segment to another based on a routing table. I don't know how your ISP needs that side set up, but since it works, there is no need to muck with it. If you want to know, connect to your router with a browser. You need to know the IP address of the router on your systems side. Usually the documentation will tell you what it was when shipped new. Basically, you open a web browser, and in the URL bar type the IP address of the router and press send. The router will return a sign in page asking for a user and password. The defaults are in the documentation. If you don't have a hard copy book, look on any CD's that came with it for a PDF file for setup. The default config, user, password should be in there. Failing that, go to D-links site and look for a "Support" link. Most makers keep the doc online.

Today a lot of the ISP's assign a IP address to your router on their side, DHCP, but not all do. Some use static IP addresses. If that were the case you would have had to go into the router config and enter it. If you never did, then it has to be DHCP.

No, it does not matter which way the ISP side works.

andy-k 09-09-2006 09:28 AM

Ok i've done as you suggested and rebooted twice so far to check everything works on boot. So far i have two boots, two successful internet connections. This is great news! :)

http://www.media.e7even.com/images/networking.png

I will continue to test it today, but all the signs are good so far. I can't thank you enough Cliff, you've explained things clearly and in a way someone less experienced could understand easily.

Thanks so much!

So to recap, if anyone else comes across this post having had the same problems:

K Menu > 'System Settings' > 'Network Settings' > Root Password > Select 'eth0' > 'Configure Interface' > Select 'Manual' > Enter an IP > Click 'OK' > Click 'Apply' > All done!

uselpa 09-09-2006 03:41 PM

I have had a similar problem with a Zyxel router acting as DHCP host. It sometimes responded too slowly for Debian-based systems (funny...). Anyway the solution was to increase the timeout of the dhcp client, so that it waited a little longer for the 'slow' router to respond. On that Debian machine I used dhclient, and the timeout is a setting in dhclient.conf (see the man page).


All times are GMT -5. The time now is 09:36 PM.