[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DHCP Problems

Posted on 2005-05-15
20
Medium Priority
?
212 Views
Last Modified: 2010-03-18
I am unable to get my network card to obtain an IP address from my router. My wireless can connect and obtain an IP address without a problem. I've tested the network cable on another system and there are no problems.

I ran a network sniifer while my linux box was trying to obtain the IP address and found that the router was getting the request (router DHCP table reflects this as well) and was even giving a response.  It looks like my linux box just isn't receiving that response.

I have turned off the firewall and SELinux as well as flushed the iptables and the dhclient still times out.

Any help would be appreciated.
0
Comment
Question by:Shroder
  • 10
  • 9
20 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 14010359
i have this config in the cfg file of the card check if you have this file like this


[root@sony root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corp.|82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=08:00:46:99:47:F9
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
IPV6INIT=yes
0
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 2000 total points
ID: 14012515
What pablouruguay says is correct.

I would ask for other things to check also
* replace your lan cord and check it connects
* check that your firewall is effectively down with iptables -L -vn
* if you have dhcpcd you can try it
* you can try dhclient eth0 directly
* try with service network restart

and of course, check your land card is up.
ifconfig eth0 up


0
 

Author Comment

by:Shroder
ID: 14051972
None of this seems to be working. I know the lan cord is fine because I can hook up my laptop to it and the router is receiving the request from my linux box. I actually have another router that I have tested with a differnt lan cord and it still doesn't obtain a dhcp address. Atleast with that one I can set a static and the system sees the router. With the router I'm trying to connect to I can't even see it if I set my ip to static.

Is there anything else besides the firewall that could be dropping the packets? I can see the router receiving the request and replying from another computer but the linux box never receives the response.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14052936
let's see

try with

iptables -I INPUT -i eth0 -p tcp -j ACCEPT

and do a

service network restart
or
dhcpcd eth0

to check if the cause is a linux firewall.
0
 

Author Comment

by:Shroder
ID: 14053161
Still no luck.

One thing,  I don't actually have the dhcpd server setup. I don't think I need that in order for dhclient to work do I?

And I'm assuming dhcpcd was a typo. let me know if it wasn't.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14057287
I see

dhcpcd is more or less the same with dhclient.

dhcp "c" d is the dhcp client daemon which is used in some distros, while in other dhclient is used.

please try using dhclient instead dhcpcd
0
 

Author Comment

by:Shroder
ID: 14102360
That doesn't seem to work either.

I am getting an error at some point. I don't think its connected to running dhclient though.

Error:

netplugd[]: eth0: state INNING ... exited status 256
0
 

Author Comment

by:Shroder
ID: 14102457
Is there a log the linux firewall keeps that shows dropped packets and accepted packets?
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14102788
no, there is none. you should setup one.

but go for simplicity. turn firewall off and then try again

iptables -F
iptables -P INPUT ACCEPT

and then try
0
 

Author Comment

by:Shroder
ID: 14102905
How do I setup a log to show dropped/accepted packages?

I'll try those commands out
0
 

Author Comment

by:Shroder
ID: 14103400
That didn't seem to work either. I'm not sure what else could be stopping dhcp handshake then. If I set a static IP on one router I can ping and access the admin panel. On this same router I can't aquire a dhcp address though.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14103706
mmhh...

do you have a kernel without SELinux?
would you mind to try  without it?
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14103719
mmhh... looking at the error you had, it looks like a hardware error.

if you setup a static ip you told us you are able to ping and connect? (with wireless card turned off)
please post here the ouput of
ifconfig eth0
route -n
0
 

Author Comment

by:Shroder
ID: 14161584
Sorry for the delay. Its just nuts over here. Here is the output:

eth0      Link encap:Ethernet  HWaddr 00:A0:C9:1A:A7:D3
          inet6 addr: fe80::2a0:c9ff:fe1a:a7d3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:4482 (4.3 KiB)
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 lo


I can ping one of my routers, but I can't ping my wireless router.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14161896
mmhh.. let me see

other computers can get dhcp ip addresses?
are this same computer able to get ip address when in windows (ifit has windows, of course)
would you mind to try with a linux live cd like knoppix?

did you tried setting a static ip adress so you know the router lan port and your lan card is working if everything works with static ips?

0
 

Author Comment

by:Shroder
ID: 14167902
If I set a static ip while connected to the non-wireless linksys I am able to communicate with it. If I do the same with the wireless router I don't get anything. I can't get a dhcp address from either of them.

I'm using a local address of 192.168.1.x and a mask of 255.255.255.0

Before I was having my linux box connect to my window laptop and the only way I found that to work (where the linux box would actually get an address) was if I set my windows IP to 192.168.0.1 and a netmask of 255.255.255.0.

I need to use this distro and this installation. I'm trying to use it for a test server. I actually reinstalled the same distro (Fedora 3) on another hard drive and ran into the same problem as it is having now with a fresh install.

So at first I thought it sounded like a firewall problem. I can turn off the firewall though and it still has no luck. I've turned of SELinux as well (but then turned it back on afterwards).

I wondering if the route table has anything to do with it, but I also find it strange ethreal isn't even catching anything.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14168107
now we have more data to play with.

as I understand (and please correct me if i'm wrong) you have something like this:

Option A:
(internet)----(non-wireless-linksys)----(wireless-linksys)----(wired redhat via eth0)

Option B:
(internet)----(wireless-linksys)----(non-wireless-linksys)----(wired redhat via eth0)

in either options, the last one linksys box is the problem. it is not sending the dhcp ip address offer, or is misconfigured.

It could happend when you connect one box to another (parent) box, but you use the WAN port instead one of the LAN ports.

please advise or draw a more detailed configuration.

I'm sorry this is taking this much, but we're discovering aspects of your setup step by step. It would be better if you tell us the detailed (even with port numbers) layout of your connection. I strongly suspect you have something firewalled.
0
 

Author Comment

by:Shroder
ID: 14301564
The non-wireless-linksys is actually a remote router. I took it out to see if my linux box would have trouble with it.

Right now its

(internet)----(wireless-linksys)

My linux box has both a wireless card (which I'm connected to my router with right now) and a physical cable running down to the router.

It sounsd like its a firewall problem to me too, but with the commands you gave me above it sounds like I have turned off the firewall complete and allowed everything even if it wasn't.

Is there something I can install that will give me more information about my firewall settings/easier to change settings?
0
 

Author Comment

by:Shroder
ID: 14305325
Well I figured it out finally.  The cable wasn't crimped correctly. I tried it on my laptop again and it worked, but I noticed it was loose so I moved it a little and it lost the connection.

The thing that still gets me is the linux box could send out packets and when I connected the linux box to my other router, using a differnt cable, it was still unable to connect.  

Now that I got it working I can try reenabling the firewall/selinux and see if I can break it. :)

Thanks for all the help. It's gotten me a little familiar with linux security and how to handle it.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 14305702
Good!

thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question