linux dhcp question

bobby.quinne

Active Member
Joined
Jun 20, 2007
Messages
67
Reaction score
0
I have been struggling for months trying to get networking to run under linux. Windows works fine, plug in ethernet jack and it works no problem.

Previously running ifconfig would show only the loopback present. Now I can see eth0 and IP assigned. However pinging hosts or traceroute all fail. route cmd only shows localhost...do I need to add route entry for gateway ip I see under windows?

Many thanks
 
You need routes to your local subnets aswell. Ifconfig normally does this automagically.

If you want to connect to the outside world, a default gateway would also need to be present.
 
k, run the command that NOD said..
if that dont work. try slap in another NIC.

mayb could b prob with onboard NIC.
 
Which machine is the DHCP server? is this linux machine a client machine?
and if you want to access the internet then as Twiga suggested a gateway will need to be entered into your network config.
 
yea but the GW will b set by the DHCP, unless he hasn't spec the default GW in the DCHP scope.

Yeah..cause like I said route only shows loop back and nothing else. Will try adding it and see if it works this evening.
 
logged in as root and tried :

route add -net default gw $GATEWAYIP dev eth0

but receive : SICADDRT : No such process

Do I need to specifiy subnet mask for the gateway IP?
 
What is the ouput of ifconfig & route -nv respectively?
This will help us a lot :)

And what device (modem or linux box) is dishing out DHCP addresses?

P.S. How is Suse 10.3? I'm on 10.2 and it's amazing!
 
What is the ouput of ifconfig & route -nv respectively?
This will help us a lot :)

And what device (modem or linux box) is dishing out DHCP addresses?

P.S. How is Suse 10.3? I'm on 10.2 and it's amazing!

I am happiest on slackware personally. I've just struggled too long getting n/w to work I am just looking for quick soluton. Will grab output of cmd's to post.
 
ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:D4:4A:9B:A6
inet addr:172.16.31.222 Bcast:172.16.31.222 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5611 (5.4 Kb) TX bytes:6680 (6.5 Kb)
Interrupt:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2708 (2.6 Kb) TX bytes:2708 (2.6 Kb)

route -nv respectively?
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


And what device (modem or linux box) is dishing out DHCP addresses?
No idea honestly, building is wired for ethernet. ISP company never return my calls or mails I send. Let me grab nmap for win and scan the dhcp server.
 
Post ifconfig eth0 's output. If the IP assigned resembles 169.254.x.x, then it may be a bug in the device driver. Change (or add) the NIC if this is the case. I cant comment on how quickly bug fixes are released for OpenSuse, so you're on your own if this is the case.

Oops, ifconfig output already posted
 
Last edited:
eth0 Link encap:Ethernet HWaddr 00:164:4A:9B:A6
inet addr:172.16.31.222 Bcast:172.16.31.222 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5611 (5.4 Kb) TX bytes:6680 (6.5 Kb)
Interrupt:16

That broadcast address doesn't look right, how can your I.P. address and the broadcast address be the same? I think the netmask you're using is incorrect, hence the last address on the subnet is being calculated incorrectly.

I would test this manually with a static I.P.:
ifconfig eth0 172.16.31.222 netmask 255.255.255.0
route add default gw <insert gw address>

Then try pinging the gateway. If that works ping -b the broadcast address and see if everyone else on the LAN replies.
 
That broadcast address doesn't look right, how can your I.P. address and the broadcast address be the same? I think the netmask you're using is incorrect, hence the last address on the subnet is being calculated incorrectly.

I would test this manually with a static I.P.:
ifconfig eth0 172.16.31.222 netmask 255.255.255.0
route add default gw <insert gw address>

Then try pinging the gateway. If that works ping -b the broadcast address and see if everyone else on the LAN replies.

Can confirm subnet mask 255.255.255.255 is what is assign under windows. Tho will give your advice a try.
 
Top
Sign up to the MyBroadband newsletter
X