linux doesnt acquire IP from DHCP Server

Status
Not open for further replies.

iinfi

mekalodu
hi all,

i v 3 PCs
Machine 1:
dual booted with Cent OS and Win XP
this machine has 2 LAN Cards and 1 USB to Ethernet device
1 One Lan card connected to Internet gateway via reliance wimax
2 Second lan card connected to a laptop running win xp
3 Third USB to Ethernet device connected to my other linux box (Cent OS)
Machine 2:
laptop loaded with winxp (internet shared by machine 1)
Machine 3:
PC loaded with Cent OS (internet shared by machine 1)

now when machine 1 is booted with windows it acquires IP from reliance dhcp server and all 3 machines are able to share the internet connection without any issues!!
whn the same machine 1 is booted with linux it simply fails to acquire IP from reliance DHCP Servers.
whn on linux this machine 1 doesnt not detect the the USB to ethernet device so that line is unusable.
i configured DHCP on my machine 1 whn booted with linux jus to check things, and find that my machine 2 and machine 3 alternately are assigned IP addresses by my machine 1 on which i configured DHCP.

what is the reason that machine 1 when booted with linux doesnt acquire IP from reliance DHCP servers while the same machine does whn booted with windows. with neat-tui and selected the LAN and configured it to get IP n DNS from DHCP.
does this mean reliance doesnt support linux as OS. i think that is highly improbable.
i used the following commands without success.
service network restart
ifdown eth0
ifup eth0
dhclient
dhclient eth0

thanks for your patience ... can someone guide me frm here..

P.S. Lastly where can i find linux driver for my USB to Ethernet device?? if i want to write a driver for it, is it possible? how to go abt it?
 
Last edited:

manish646

Right off the assembly line
ya dude i am also suffering from similar type of problem

i am able to connect to wireless lan or lan simply and able to access the windows networked folder but not able to surf internet why......
 
OP
iinfi

iinfi

mekalodu
^^
goto /etc/resolv.conf and type
nameserver 208.67.222.222
save n exit
at root prompt type
service network restart
now try surfing the net
 
OP
iinfi

iinfi

mekalodu
^^
who??me??
i v set it up for DHCP already!!

still whn i boot with linux .. it doesnt acquire IP frm the ISP's DHCP server
 
Last edited:

mediator

Technomancer
CentOS? I had similar problem with Fedora 3,4,5. It was fine with Fedora 8 n onwards (dunno bt, the 6th and the 7th versions) with much improvement in "network manager". I guess this is your architecture.
And so I assume it is CentOS which is at fault. You may try a fedora 10 live CD to check. You can also give your "machine 1" a static IP.
 
OP
iinfi

iinfi

mekalodu
i cannot configure machine 1 to static as reliance dhcp server assigns IP to me via DHCP server and only then i can log into their page *reliancebroadband.co.in/ and thn get into www
i m not convinced that cent os is at fault. since i have another linux box i had made my machine 1 a DHCP server and machine 3 a client (also CENT OS). and it acquires IP gleefully from machine 1

below is my machine setup


*sites.google.com/site/techworldgroup/Home/config.jpg

sry .. image shack is not working properly .. hence posting this bulky image..
 
Last edited:

mediator

Technomancer
Man it seems you have chosen the longest path between Russia and Alaska. :D I mean if you wanna just share like that why not get a wifi router? Its simple, plain and easy!

Neways, I guess 123.237.149.10 is the IP u get on windows. Try it out on CentOS.
ifconfig eth0 123.237.149.10 netmask 255.255.255.0
ping 208.67.222.222
Also, did u make ur machine 1 a dhcp server on linux(CentOS)? If yes, then I guess CentOS to CentOS shud work gleefully anyways! :D

But I insist that you shud try out with a Fedora 10 Live CD or perhaps Ubuntu one whicheva latest u got.
Also your netmask is 255.255.252.0. You may bookmark this thread, just in case!
Neways nice image......was much more comprehendible! :D
 
OP
iinfi

iinfi

mekalodu
that IP frm reliance DHCP server keeps changing at every re-boot.
yes i had setup DHCP server on CENT OS only. understood that Cent OS to Cent OS wud work gleefully.
i jus made my windows on machine 1 also a DHCP server and the linux box acquires the IP without a hitch.
i dont have a live CD. i will see where i can get it from.
i have fedora 9 ... do u think installing it wud help??
do u think the ISP will block linux machines or anything of that sort??
 

mediator

Technomancer
Well thats great for CentOS then. Yes I think u shud check from fedora 9, if u wanna install it that is. Or y waste time on installing and instead get a live cd check out from it? Neways ur wish!

I checked last night and it seems many people are having this DHCP trouble even on windows! Some say reliance got the worst engineers! But in your case the problem seems to be on client side. I don't think ISP wud discriminate against linuxes. On a second thought, did u install any specific drivers on windows for the modem?
 
OP
iinfi

iinfi

mekalodu
will try n get a live CD.
no no drivers for the modem. its jus a simple white box ... i dont even knw whether you can call it a modem. cable frm my LAN card goes into it. will it still need drivers?? i really dont think so.
 
OP
iinfi

iinfi

mekalodu
hi
the million dollar issue has been resolved. i called a person from the ISP and he didnt have much clue abt linux but he told me LAN sud be in 10MB half duplex for the DHCP to assign IP address.
i changed it using the following command.
mii-tool -F 10baseT-HD
and eureka its started working.
can u plz tell me as to what difference it makes if i connect using 10MB half duplex or 100MB full... all i knw abt duplex n half-duplex is its definition. wat difference does it make to the server ??
thanks a lot for ur help ...
 

mediator

Technomancer
Lol, interesting thread man! I never count on what ISP guys say. But neways...
Here's my version from mii-tool and dmesg!

mii-tool -l
eth0: negotiated 100baseTx-FD flow-control, link ok
dmesg | grep eth0
ADDRCONF(NETDEV_UP): eth0: link is not ready
0000:00:19.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
I'm not sure, but I don't think half-duplex is the only requisite for dhcp. The interface usually advertises its medium and the parameters should be autodetected! But neways, congrats. It would be very kind of you if you post this question in some router related forums or fedora/centos forums and leave us with an exact answer if you get any! :)
Also, by any chance if u dlded or finally got fedora live cd, do check that tooo reflecting an answer here! :D
 
OP
iinfi

iinfi

mekalodu
nope i m sorry ... i didnt tell you ...
i v now installed RHCE 5 on my PC which i got frm my training center. the issue was the same.
this ISP guy was helpful.. even though he didnt know much abt linux he was trying something for abt an hour or so .. then he told me he normally changes the lan setting to 10Mbps HD in windows .... do i googled arnd abt how to do it in linux n ... eurekaaaa
 
OP
iinfi

iinfi

mekalodu
this is wat a person from linux forums had to say abt this issue
The question I would have is why is your nic hard set and not set to AUTO/AUTO?
If set to AUTO/AUTO it should have connected properly.

Here is the information in regards to the question you asked:

For Duplex to work properly one of 3 things has to be set:
Both sides have to be set at Half
Both Sides have to be set at Full
Both sides have to be set at Auto.

If one of these 3 setting is not set then Duplexing will not work and cause problems.

As to the speed if you are running at 100 and the otjher side is running at 10 you cannot talk. It would be like you are talking different languages. Thus both side need to be talking at the same speed.

Duplexing needs to be set the same to avoid collisions. Full duplex means you can send and receive at the same time. Half means you can do one or the other but not both at the same time. Thus is one side is set to full and the other to half the half side more then likely will never be able to get a word in as the full side will flood the connection because he can do both send and receive.

So if one side is not talking the same as the other side then there is no communication.

Now to uto settings.

With the speed set to auto it should be able to figure out what speed to talk at. Same with Duplex as long as both sides are set to auto. If one side is set to auto and the other is locked down then the auto will default to half. This is beacuse the auto side needs to know what the other side can handle in order to agree on the duplex setting.

Think of auto duplex liked a 3 way handshake of a new connection. Without the handshake there is no connection.

So now back to my original statement, "If set to AUTO/AUTO it should have connected properly"

Auto/Auto would have seen the line speed was 10. Duplex would have gotten no response to it's query thus setting itself to half. Thus you would have been set to 10/half and worked. There has to be a setting somewhere that tells the nic to come up in 100/full and not auto/auto which is the default setting by the way.
 
Status
Not open for further replies.
Top Bottom