LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-21-2008, 06:48 AM   #1
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Rep: Reputation: 30
Local LAN IP address suddenly changed


Hi!

I have been running a LAN configuration with several computers and one server box. This server must be accessible from outside of the LAN which is why I forwarded the needed ports on my router to the correct machine.

Unfortunately I forgot to lock the local IP (for the sake of example, say 192.168.1.5) to the MAC address of my server network card. Despite this I was convinced that the local IP would not change unless the router or the server were restarted.

Nonetheless I had a situation just a couple of hours ago when I was remotely connected to my server and the server or the router seemed to be fed up with the current configuration and allocated a new IP for the server (let's say 192.168.1.7) just out of the blue. Server's previous IP (192.168.1.5) was at this point left unused.

This of course broke my port forwarding configuration and my remote connection was lost.

I have now reserved the IP to the server MAC, but I nonetheless wonder, why would such an event happen? There was certainly no need to reallocate the IP as far as I could see: Neither the router nor the server were restarted and there were no remote connections besides mine at the time. Neither was their any reason not to allocate the server to the same IP as it had used before.

Or am I missing something here?

PS. My router is a NETGEAR WGR614v9 and I was running Ubuntu on the server when this occured.
 
Old 10-21-2008, 09:16 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,229

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Probably the lease ran out. To fix this, set your server up with a static IP address, don't use DHCP for a server.

Most routers you can control the range of IP addresses they give out. Set it up for the number of boxes that are using DHCP plus one or two more, so if you have five, set the range to eight. Then set a static IP for your server outside the range of DHCP addresses. This is how I have my network, server always has the same IP address. No moving targets...
 
Old 10-22-2008, 02:50 AM   #3
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Original Poster
Rep: Reputation: 30
Thank you for your answer and suggestions!

But I am still unsure as to why a different IP was allocated: AFAIK there was no reason for the router *not* to assign the same IP as the server machine used before, even if the lease ran out and a new DHCP request was sent.
 
Old 10-22-2008, 10:02 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,229

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Just a guess, is it possible the router issued that IP to another machine? The rest is up to the router, and its code. Because of problems like this, running static IP's makes sense for servers.

You might want to have a look to see if there are any code updates for your router. Check out the manufacturers web site.
 
Old 10-22-2008, 10:28 AM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by MasterOfTheWind View Post
Thank you for your answer and suggestions!

But I am still unsure as to why a different IP was allocated: AFAIK there was no reason for the router *not* to assign the same IP as the server machine used before, even if the lease ran out and a new DHCP request was sent.
The router will send whatever IP it wants...true that the request will come in for the same IP...and the router is likley to give the same IP out...but it isn't surprising that it didn't. As you stated, there was no reason for the router *not* to assign the same IP, but there is no reason (as far as the router is concerned) *to* assign the same ip.

It happens.

I agree with camorri; you should have a static IP set for servers/printers that are accessed all the time.

-C
 
  


Reply



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
system time suddenly changed selva_pondy Linux - Hardware 7 10-28-2007 11:44 AM
File permission suddenly changed daemonkl *BSD 8 10-16-2007 01:18 AM
start menu has suddenly changed pomelo Mandriva 3 11-21-2003 03:24 PM
vim suddenly changed colors??? spyghost Linux - Software 5 08-27-2003 10:13 AM
changed local net address nfs is hanging at boot spooge Linux - Networking 2 08-20-2003 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration