LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-21-2012, 06:15 AM   #1
dugave_111
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Rep: Reputation: 0
Please help! DHCP client doesn't get IP


Hi!

I've just switched my internet provider. The new one has a cable modem that is working in default bridge mode. The idea is to connect just one PC, and sure enough, it works.
If I connect my XP laptop and leave lan settings on automatic, I get an IP, dns, and gateway right away.

But, I have a small LAN and I use ubuntu box as a router, before I've also used slackware, both with pppoe connection. This time I need the card to get the IP using DHCP, just like it works 'out of the box' with XP machine.


I've tried putting this in my etc/network/interface file:

auto eth1
iface eth1 inet dhcp

but it didn't work.

Since I still have an old internet provider active, I've tried using the modem/router from that one to see if I would get an IP, and I did.

So, my conclusion is that the I need to somehow tweak the dhcp client in ubuntu (fresh install 12.1 server) to work with this modem (like it does with XP pc), but I have no idea how to even start troubleshooting this and fix it.

Can anyone help me?

I'm not a complete newbie, but I'm far from being a guru, so a detailed help would be great.

Thanks!
 
Old 11-21-2012, 09:17 AM   #2
mandyapenguin
Member
 
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 106

Rep: Reputation: Disabled
Quote:
I've tried putting this in my etc/network/interface file:

auto eth1
iface eth1 inet dhcp

but it didn't work.
try
Code:
dhclient -r eth1
dhclient eth1
Also make sure that cable is connected using below command
Code:
mii-tool
 
Old 11-21-2012, 11:27 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,059

Rep: Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759
Typically cable ISPs will only provide one IP address based upon the MAC of the device connect to the MODEM. When switching boxes are you resetting power on the MODEM?
 
Old 11-22-2012, 02:18 AM   #4
dugave_111
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Typically cable ISPs will only provide one IP address based upon the MAC of the device connect to the MODEM. When switching boxes are you resetting power on the MODEM?
That was exactly it!! I actually figured it out last night. why the f*ck haven't they told me that, it could have saved ma so much time.
I've installed the box at least 3 times during the last day and a half. Couple of ubuntu servers, one slackware...but the box just wouldn't
get the ip form DHCP since the first machine I plug in was my XP laptop - I did it for a test when the guy form the provider was at my place.

Still angry...

First, before ordering internet from them, I insisted that the modem/router needs to be capable of working in bridge mode - they said: 'no problem'. The modem/router that they (provider) brought with them couldn't go into bridge mode - I spent at least 3 hours with him trying things out, talking to his colleagues on the phone - finally they found someone who actually understood what I was talking about. He suggested I take this cheaper modem that has ONLY bridge mode. I told him about my setup and everything, he really could have told me about modem locking to a first PC MAC.

Anyway, the problem was never in my box, but in modem itself. As soon as I turn the power of and on again, the box got it's IP right away.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux DHCP client unsuccessful on a windows DHCP served network tom1080 Linux - Newbie 1 12-16-2009 12:37 PM
[SOLVED] DHCP client which starts initially as daemon and doesn't exit on failure 10110111 Linux - Networking 3 11-06-2008 03:51 PM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 01:54 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 06:18 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 12:24 PM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration