# linux doesnt acquire IP from DHCP Server



## iinfi (Nov 27, 2008)

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?


----------



## manish646 (Nov 27, 2008)

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......


----------



## iinfi (Nov 27, 2008)

^^
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


----------



## MetalheadGautham (Nov 27, 2008)

and you need to set the type of connection as DHCP if you haven't already done so.


----------



## iinfi (Nov 28, 2008)

^^
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


----------



## iinfi (Nov 29, 2008)

no clue anyone??


----------



## mediator (Nov 30, 2008)

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.


----------



## iinfi (Nov 30, 2008)

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..


----------



## mediator (Nov 30, 2008)

Man it seems you have chosen the longest path between Russia and Alaska.  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! 

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!


----------



## iinfi (Nov 30, 2008)

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 (Nov 30, 2008)

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?


----------



## iinfi (Dec 1, 2008)

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.


----------



## iinfi (Dec 3, 2008)

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 (Dec 3, 2008)

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!


----------



## iinfi (Dec 4, 2008)

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


----------



## mediator (Dec 4, 2008)

CentOS or RHCE both the same almost. But neways.....congrats hun!


----------



## iinfi (Dec 4, 2008)

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:
> ...


----------



## mediator (Dec 4, 2008)

Yup, that confirms it up nicely and the ISP guy told what he did practically, as they do always.


----------

