Router not assigning IP

May 8, 2008 at 04:34:48
Specs: Kubuntu 7.10, Intel 3.0 Ghz/512MB

Hello Everyone!
I have 3 PCs in a room, all connected by a router (with assigns IP to them). 2 PCs are installed with Windows XP and one is installed with Kubuntu 8.04. The problem is that the router sometimes fail to assign IP to this Linux PC and even upon restart many times the router still not assign IP. Can anyone help me that how can i correct this problem?
Thanks

See More: Router not assigning IP

Report •


#1
May 8, 2008 at 13:47:11

You do not provide a great deal of information (the router make or model, the type of connection for each computer, etc.) so the possibilities are many. Here are a few:

If all three of your computers are connecting to the router (configuring the network connection) using DHCP, is the router set up to provide three IP addresses?

Is the DHCP server on the router enabled?

Is your router configured to use WPA on wireless connections? If it is, and your Linux box uses a wireless connection, does it support WPA?

These are just a few shots in the dark, but I hope they help. If not, please post back with better information and we will continue to try to help.

If you are more interested in getting a stable connection for your Linux box than in discovering the cause of the issue, you could configure your Linux box to use a static IP address. With a static IP address, the Linux box will not use the DHCP server to get an address. Remember that each computer on your LAN must have its own IP address. No two computers connected to the router can have the same IP address. Since the router's DHCP server dynamically assigns IP addresses within a known range (you can find out what the range is in the router's configuration WEB page), any static IP address must reside outside the range used by the DHCP server. In oter words, if the DHCP server uses the first twenty IP addresses in the subnet (192.168.0.1 through 192.168.0.20), no static IP address can be assigned in this range. The first IP address available for static assignment would be 192.168.0.21.

HTH,

Ernie Registered Linux User 247790


Report •

#2
May 8, 2008 at 15:00:29

Look at router logs.

See IP lease times and any rules about mac addresses.

Try ifconfig and other linux tools to see what state the nic is in. Might have to up the connection or renew or release.

See linux for conflicts or known issues with the drivers.

"Best Practices", Event viewer, host file, perfmon, are in my top 10


Report •

#3
May 9, 2008 at 04:25:26

ernie!
Thanks a lot for your detailed answer. Your first shot was correct :) Yes All the computers connected to router and the router automatically assigns IP address to them (DHCP).
I will also try static IP but can you tell me that is there any command in linux to know that what rage of IPs are used by router?
OR
Is there any other solution? I will be very happy to apply any kind of working solution.
Thanks

Report •

Related Solutions

#4
May 9, 2008 at 08:23:58

You can find your router's DHCP address assignment range on its configuration WEB page. The router is your LAN's gateway to the Internet and it's LAN IP address is the same as your local computer's default gateway address.

Since your Linux box is unable to connect, I will give direction specific to Windows XP:

Open Control Panel

Open the Network Connections dialog.

ALT+Click the Local Area Network icon and select Status in the resulting context menu.

In the Status dialog select the Details tab.

Your router's IP address is the same as the Default Gateway address. Write it down for the next step.

Close all open dialogs then open a WEB browser window.

In the address bar, enter the Default Gateway IP address in the following form:

http://xxx.xxx.xxx (xxx.xxx.xxx represents the Default Geteway IP address written down earlier)

A password dialog will usually open.

Your router's user manual should include the default user name and password unless you have reset this information.

Log into your router's WEB page. From there you can navigate to the DHCP server's configuration page.

Unfortunately each router uses a different arrangement for the configuration WEB page. You should be able to learn where to look in your routers user manual. If you do not have a printed user manual, you should be able to go to the manufacturer's WEB site and download one (usually in pdf format).

I suggest you first confirm that the router's DHCP server is configured to provide enough IP addresses. The usual default configuration on most routers should normally be set to support more than three, but I may be wrong since I have used only two brands. If not, then you may want to try configuring the Linux computer to use a static IP address.

Remember that if the Linux box uses a wireless connection, the issue may not be related to the router at all, but to the Linux box's wireless configuration

Again, more information may prove helpful,

HTH,

Ernie Registered Linux User 247790


Report •

#5
May 9, 2008 at 09:00:50

ernie!
Thanks a lot for such a detailed answer. Tomorrow morning I will try my best to follow your instructions step by step and then I will tell you the results.
Thanks

Report •

#6
May 9, 2008 at 21:49:17

ernie!
How are you?
Today, when I turn on my PC and boot Linux,
fortunately the router successfully assigned
IP to it (as I told that sometimes it did).
I noted the following thugs;
IP Address (of my PC)
Subnet Mask
Broadcast
Gateway
DNS
Then I go to the netword setting
in "kcontrol" and put all these things
manually in the "Network Card Settings".
Then I restart my network card and I am
online again :)
I want to ask that: Am I doing right? or Is
there something else I have also to do?
And
If the problem happens again then will the
change of my IP Address solve the problem?
(and not changing the other things like DNS,
Broadcast)
I noted one more thing, that, all the static
IP settings are shown
in /etc/network/interfaces (which is
logical) but at the end of this file there
is an entry "auto eth0" and this entry is
confusing me a lot. Why this entry is there in
that file as I am using the static
addresses. Should I remove that entry or
not?
Thanks

Report •

#7
May 11, 2008 at 07:14:05

The one problem I see is that you used the IP address the DHCP server assigned to your computer (which must reside within the DHCP server assignment range). You should choose an IP address outside that range so the DHCP server will not assign it to another computer.

My other question is "Does your computer connect to the router using a wireless connection or is the connection wired with a CAT5 cable (Network Wire)? If the computer uses a wireless connection, the issue may not be related to DHCP at all.

Ernie Registered Linux User 247790


Report •


Ask Question