Cannot get network address via DHCP

Asked by Art Andersons

I've just installed Xubuntu 7.04 on a beater of a old computer. Think Celeron M. 256MB of RAM. On-board NIC. 30GB drive. Nothing fancy, just something to play with to better learn about Linux.

Wanting to get the OS on the computer as fast as possible. I decided to set the machine up at work. I wiped the drive prior to installation. Blew out all existing Windows partitions and tested the drive to make sure that there weren't any issues that would prevent me from installing 7.04.

Installation was a breeze. I had the machine up and running within :30. Downloaded all of the upgrades. Added some packages. I couldn't be happier.

That was until I brought it home.

I plugged it into my network at home. And nothing. The computer boots up and runs fine, but no network connection.

To give an idea of the network: I have Comcast. Their modem is plugged into my SMC Barricade (which assigns IP addresses via DHCP). There are three computers that are wired in to the router (two Macs, one XP). I also have two laptops (one MacBook, one OpenSuse). All get their addresses from the pool of IPs. And are able to use the internet, and the resources that I have on my network. No problems there.

This new box, doesn't seem to receive a DHCP assigned address.

My first thought was that the network settings were still those of my office. I went in, and changed the network setting to DHCP, and wiped out the search domains and DNS information. And restarted the machine. No network access.

I checked the lights at the back of the box. I have a power light and an occasional activity light (nothing steady). I checked the lights on the router. No link light. No activity light. Tested the cable. The cable passed the test. So I eliminated the cable, and the router from the equation.

Out of paranoia I even switched to a port that was working.

Went back to the box; and manually assigned my IP information based on the addressing scheme of my network. Rebooted and nothing.

Figured that maybe in transit the on-board NIC was damaged. There isn't any expansion slots on this machine so adding another NIC is out. I tried a USB wireless card. The card was found by the computer without issue. I added my network information to access my wireless. It found my router. Logged in, but no network access.

At this point, I thought that somewhere it was still retaining the settings from work. Since I didn't have anything on the machine I couldn't live without, I blew away the partitions, and reinstalled the OS again. This time leaving the NIC connected to the router. Install went off without a hitch, but no network access.

I gave up for the night.

Went to work the next day, computer in hand. Connected to the network at work. *BINGO* Network access. No problems.

Dragged the computer back home. No network access.

The only thing that I found at home was that when I used ifconfig -l, I noticed that the network address given for eth0 (NIC) was 169.x.x.x. And if memory serves me, that is a self-assigned IP. Yet at work, when I used ifconfig, I received the DHCP-assigned address for the computer.

I'm at a loss. Anyone have any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Art Andersons
Solved:
Last query:
Last reply:
Revision history for this message
- (a--deactivatedaccount) said :
#1

if you want to do it manually (static) you could try

sudo ifconfig eth0 IP_ADDRESS SUBNET_MASK up

(enter in interface card, ip addy and netmask above)

or try

sudo dhclient if using auto DHCP

Revision history for this message
Art Andersons (expensive-wino) said :
#2

Will try it when I get home. I will post the results as well.

On 7/11/07, Derry <email address hidden> wrote:
>
> Your question #9525 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/9525
>
> Status: Open => Answered
>
> Derry proposed the following answer:
> if you want to do it manually (static) you could try
>
> sudo ifconfig eth0 IP_ADDRESS SUBNET_MASK up
>
> (enter in interface card, ip addy and netmask above)
>
> or try
>
> sudo dhclient if using auto DHCP
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/9525/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/9525
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
"What country can preserve its liberties if its rulers are not warned from
time to time that their people preserve the spirit of resistance? Let them
take arms."
Thomas Jefferson
--

Art Andersons

Revision history for this message
Art Andersons (expensive-wino) said :
#3

Returned home.

First attempt was the sudo dhclient.

I don't have screen captures of this stuff. Basically, the return from that command was that LPF listened and sent on my eth0. It used the wrong subnet mask (255.255.255.255) on port 67 with intervals 5,8,11,7. No offers were received.

I tried the sudo ifconfig command. If I included the subnet mask, I received and invalid argument.

Cutting off the subnet to: sudo ifconfig 192.168.2.x, passed through without an error.

However, I tried pinging both my gateway and www.yahoo.com.

The gateway was never reached, and yahoo wasn't recognized as a valid host.

Which has gotten me thinking. In order for www.yahoo.com to be useful for a ping, the DNS needs to be resolved. Which means that the DNS settings are either blank; or not being honored. My case is the later. I manually put in DNS servers from my ISP in the Network Settings. As well as my static IP and related settings.

So I did a ifconfig -v. I noticed that my network settings were held correctly within there.

I figured that if the DNS isn't being resolved, and my IP address information is being held, than I would need to rely solely on IP addresses. I tried pinging my gateway again, and nothing.

It's almost as if the network settings are being held by the OS, but not being used by it.

Thoughts?

Revision history for this message
- (a--deactivatedaccount) said :
#4

can you print the results of

netstat -r

thanks

Revision history for this message
Art Andersons (expensive-wino) said :
#5

Here is some output.

Script started on Thu 12 Jul 2007 05:45:01 PM EDT
]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ sudo dhclient up

Password:

Internet Systems Consortium DHCP Client V3.0.4

Copyright 2004-2006 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device

up: ERROR while getting interface flags: No such device

up: ERROR while getting interface flags: No such device

Bind socket to interface: No such device

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ sudo if conconfig eth0-\ IP192.168.2.108 up

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ ifconfig -v

eth0 Link encap:Ethernet HWaddr 00:D0:B7:AA:47:07

          inet addr:192.168.2.108 Bcast:192.168.2.255 Mask:255.255.255.0

          UP BROADCAST MULTICAST MTU:1500 Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1232 (1.2 KiB) TX bytes:1232 (1.2 KiB)

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ pigng 192.168.2.1

PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.

From 192.168.2.108 icmp_seq=1 Destination Host Unreachable

From 192.168.2.108 icmp_seq=2 Destination Host Unreachable

From 192.168.2.108 icmp_seq=3 Destination Host Unreachable

--- 192.168.2.1 ping statistics ---

5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4017ms

, pipe 3

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ ping 192.168.2.108

PING 192.168.2.108 (192.168.2.108) 56(84) bytes of data.

64 bytes from 192.168.2.108: icmp_seq=1 ttl=64 time=0.207 ms

64 bytes from 192.168.2.108: icmp_seq=2 ttl=64 time=0.103 ms

--- 192.168.2.108 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1000ms

rtt min/avg/max/mdev = 0.103/0.155/0.207/0.052 ms

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ netstat -r

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

192.168.2.0 * 255.255.255.0 U 0 0 0 eth0

]0;aandersons@aandersons-desktop: ~aandersons@aandersons-desktop:~$ ipconfigexistt

exit

Script done on Thu 12 Jul 2007 05:48:40 PM EDT

Revision history for this message
- (a--deactivatedaccount) said :
#6

what's your defauly gateway?
try to add it with

sudo route add default gw 192.168.0.1 (for example)

Revision history for this message
Art Andersons (expensive-wino) said :
#7

Default gateway: 192.168.2.1.

Here's what happened:

Script started on Thu 12 Jul 2007 10:30:50 PM EDT
]0;root@aandersons-desktop: ~root@aandersons-desktop:~# usudo
-route add default gw 192.168.2.1
]0;root@aandersons-desktop: ~root@aandersons-desktop:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 127.0.0.1 icmp_seq=1 Destination Host Unreachable
From 127.0.0.1 icmp_seq=2 Destination Host Unreachable
From 127.0.0.1 icmp_seq=3 Destination Host Unreachable
From 127.0.0.1 icmp_seq=4 Destination Host Unreachable
From 127.0.0.1 icmp_seq=5 Destination Host Unreachable
From 127.0.0.1 icmp_seq=6 Destination Host Unreachable

--- 192.168.2.1 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7025ms
, pipe 3
]0;root@aandersons-desktop: ~root@aandersons-desktop:~# existt

Script done on Thu 12 Jul 2007 10:31:37 PM EDT

At present the machine is set to get an IP via DHCP. Does Linux self-assign
an IP if none is supplied, kinda like Windows? Meaning would it give itself
a 169.x.x.x address? Or would it default to the loopback of 127.0.0.1?

On 7/12/07, Derry <email address hidden> wrote:
>
> Your question #9525 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/9525
>
> Status: Open => Needs information
>
> Derry requested for more information:
> what's your defauly gateway?
> try to add it with
>
> sudo route add default gw 192.168.0.1 (for example)
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/9525
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
"What country can preserve its liberties if its rulers are not warned from
time to time that their people preserve the spirit of resistance? Let them
take arms."
Thomas Jefferson
--

Art Andersons

Revision history for this message
- (a--deactivatedaccount) said :
#8

As far as I can tell there is no communication between your new box (192.168.2.108)
and the gateway (192.168.2.1) all ICMP packets are getting dropped.

Are you sure the gateway router has enough DHCP IP releases in the pool?
Are you using MAC address filtering by any chance?

Revision history for this message
Art Andersons (expensive-wino) said :
#9

I was thinking that off the bat. I opened up the pool of addresses to 20 IPs. So there's plenty for this box (plus others).

The MAC address filtering is disabled.

First off, thanks for the help on this. My wife thinks that I should throw the damned computer out. I've been up there with it every night.

I'm really wondering if I'm an idiot. That I've overlooked something stupid.

I wish that I could find my Comcast info packet. I was thinking of dropping the router out of the equation and run straight into their modem. And see what happens. But I cannot remember if there were some network settings that I need to supply.

I have a Linux compatible wireless USB card. I've started to compile the driver for it. I was starting to wonder if trying another route to the internet would shed light on the problem.

The only other idea I had is to disconnect from my router. Grab a 5-port switch, plug that into the router, and then plug this box into the switch. And see what happens. I find it hard to believe that the signal would attenuate so much that it doesn't reach the router. But, I'm willing to play that game.

Revision history for this message
- (a--deactivatedaccount) said :
#10

Im really out of ideas at this stage, it's some odd configuration.

Im not familiar with comcast (im from Europe) you'll just have to try what you
said or try and go through the router settings with a fine comb.

Good Luck :)

Revision history for this message
Art Andersons (expensive-wino) said :
#11

Thanks, man.

You've been a help. I'm not giving up on this.

If I solve the problem, I'll post the solution.

Revision history for this message
Best Art Andersons (expensive-wino) said :
#12

OK. So maybe...I'm an idiot.

I've tried everything. Even different distros...and nothing.

FInally, tonight, I decide that this problem isn't worth it. I'm going to part out the machine; and buy something more current.

Right?

So I unplug the cable. And notice that the power light for the NIC is green. So it's getting power. I happen to jiggle the cord, and all of a sudden the link light comes on. I release the cord, and it goes off. I'm thinking...but I tested the cord.

Turns out the "cap" over the connector was not letting the connector seat properly. I removed the cap...and I have network access.

Maybe, I'm one of those people that shouldn't be allowed near computers.

I totally apologize for the headache that I created.

Revision history for this message
- (a--deactivatedaccount) said :
#13

haha a good ending to a tragic story :))