Networking Forums

Networking Forums > Wireless Networking > Wireless Internet > How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?

Reply
Thread Tools Display Modes

How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?

 
 
for.fun@laposte.net
Guest
Posts: n/a

 
      08-24-2005, 03:34 PM
Hi everybody,

I am using a WRT54GS router connected to XP SP2 computers.

I would like all my computers have a static IP.
For each computer, I chose a unique IP but I then had the following
problem : under XP, if I choose a static IP, I also need to fix the DNS
addresses.

My problem is my provider updates the DNS addresses several time a day
so I need them to be updated automatically or I will sometimes lose the
name resolution.
So, the XP static IP option will not work for me !


Is there a way to fix the address on the router using a table which
would associate the IP with the computer's MAC address (so the router
DHCP will always give the same IP to a given computer) ?


Thanks in advance for your help.

 
Reply With Quote
 
 
 
 
Jeff Liebermann
Guest
Posts: n/a

 
      08-24-2005, 04:20 PM
On 24 Aug 2005 08:34:41 -0700, (E-Mail Removed) wrote:

>I am using a WRT54GS router connected to XP SP2 computers.
>
>I would like all my computers have a static IP.
>For each computer, I chose a unique IP but I then had the following
>problem : under XP, if I choose a static IP, I also need to fix the DNS
>addresses.


Correct.

>My problem is my provider updates the DNS addresses several time a day
>so I need them to be updated automatically or I will sometimes lose the
>name resolution.
>So, the XP static IP option will not work for me !


True. If you set up your ISP's DNS servers in the Windoze client, and
the ISP juggles DNS servers, then this will not work.

>Is there a way to fix the address on the router using a table which
>would associate the IP with the computer's MAC address (so the router
>DHCP will always give the same IP to a given computer) ?


No. Your options are:

1. Use the cacheing DNS server in the WRT54G and point your clients
DNS server to the WRT54G (192.168.1.1).

2. Use some other ISP's DNS servers. Many DNS servers allow public
access from the internet. It's condidered good form to ask the other
ISP if you can do this first, but everyone does this. I have the
local university and a local very big corporation as my backup DNS
servers. I suggest you download and play with Sam Spade 1.14:
http://www.blighty.com/products/spade/
or use one of the numerous online DNS tools such as:
http://www.dnsstuff.com
to find DNS servers and see if they are accessible.

3. Call your ISP's support people and ask them *WHY* they are
juggling DNS servers. It might be that they have a flakey DNS server
and are doing repairs.

4. If your ISP uses PPPoE or PPPoA, there *MIGHT* be a way for the
ISP to update your setting from their end. I'm too lazy to read the
RFC right now to check.

5. Use the WAN timeout feature to inititate a disconnect after
perhaps 5 minutes of inactivity. You'll get a new IP/DNS/Gateway mess
of IP's every time you disconnect. Unfortunately, you'll need to be
idle for 5 minutes in order for this to work. It's a rather dumb way
to do this, but it might work.


--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
AE6KS 831-336-2558
 
Reply With Quote
 
Duane Arnold
Guest
Posts: n/a

 
      08-24-2005, 05:11 PM
(E-Mail Removed) wrote in news:1124897681.541809.170210
@g44g2000cwa.googlegroups.com:

> Hi everybody,
>
> I am using a WRT54GS router connected to XP SP2 computers.
>
> I would like all my computers have a static IP.
> For each computer, I chose a unique IP but I then had the following
> problem : under XP, if I choose a static IP, I also need to fix the DNS
> addresses.
>
> My problem is my provider updates the DNS addresses several time a day
> so I need them to be updated automatically or I will sometimes lose the
> name resolution.


You know this for a fact? I myself don't have this problem with the ISP
in using static IP on the router. However, I am not sure about it because
the DNS IP(s) never change. However, you gave valid static DNS IP(s) that
belong to servers on the NIC setup and I don't see why the machines
couldn't continue to use those static DNS IP(s) to do name resolution to
IP while the router obtained different DNS IP(s). I am not for sure but
may be that will only come into play with the dynamic DNS IP(s) for the
DHCP server on the router in using its DHCP features to assign IP(s).
Again, I am not sure about it.

> So, the XP static IP option will not work for me !
>
>
> Is there a way to fix the address on the router using a table which
> would associate the IP with the computer's MAC address (so the router
> DHCP will always give the same IP to a given computer) ?
>


It's called the DHCP table. Once a table entry has been added to it
associating the MAC of the NIC to the DHCP IP assigned by the DHCP server
on the router, the router will issues the same DHCP IP to the NIC. On a
small LAN, the machines will get the same DHCP IP(s) assigned to the NIC
(s) and you could consider it to be static for what it's worth. Of
course, one could delete an entry out of the DHCP table and add more
computers and possibly get different IP for the machine that had the
entry deleted, because of the new machines being added. It's kind of like
a first come first served kind of thing.

Duane
 
Reply With Quote
 
Duane Arnold
Guest
Posts: n/a

 
      08-24-2005, 05:33 PM
Jeff Liebermann <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On 24 Aug 2005 08:34:41 -0700, (E-Mail Removed) wrote:
>
>>I am using a WRT54GS router connected to XP SP2 computers.
>>
>>I would like all my computers have a static IP.
>>For each computer, I chose a unique IP but I then had the following
>>problem : under XP, if I choose a static IP, I also need to fix the DNS
>>addresses.

>
> Correct.
>
>>My problem is my provider updates the DNS addresses several time a day
>>so I need them to be updated automatically or I will sometimes lose the
>>name resolution.
>>So, the XP static IP option will not work for me !

>
> True. If you set up your ISP's DNS servers in the Windoze client, and
> the ISP juggles DNS servers, then this will not work.
>


I was not sure about it and it seems like it will not work. However, if
one could use static IP(s) that the ISP provided, one could configure the
router to use the static IP(s) from the ISP and not have the router obtain
DHCP IP(s) from the ISP. I know AT&T once gave me static IP information and
I configured the router to use those IP(s). So, with that kind of setup,
one could use static IP(s) on the router I would think and not be bothered
with what the OP is going through, if I am in the ball park.


Duane
 
Reply With Quote
 
Derek Broughton
Guest
Posts: n/a

 
      08-24-2005, 06:02 PM
Jeff Liebermann wrote:

> On 24 Aug 2005 08:34:41 -0700, (E-Mail Removed) wrote:
>
>>Is there a way to fix the address on the router using a table which
>>would associate the IP with the computer's MAC address (so the router
>>DHCP will always give the same IP to a given computer) ?

>
> No. Your options are:


Not even with the sveasoft firmware? It's a pretty basic function of DHCP
servers, I would have thought there'd be a way.
>
> 3. Call your ISP's support people and ask them *WHY* they are
> juggling DNS servers. It might be that they have a flakey DNS server
> and are doing repairs.


I think he should do that in any case - DNS servers really shouldn't change
that much. I can see a round-robin system where they want to balance load
among a half-dozen or so servers, but _all_ (or at least most) of them
should still be available.

--
derek
 
Reply With Quote
 
Jeff Liebermann
Guest
Posts: n/a

 
      08-24-2005, 07:03 PM
On Wed, 24 Aug 2005 15:02:40 -0300, Derek Broughton
<(E-Mail Removed)> wrote:

>Not even with the sveasoft firmware? It's a pretty basic function of DHCP
>servers, I would have thought there'd be a way.


No. There is no feature or function of a DHCP server to prematurely
expire a lease. I would love to have this feature to force everyone
to renew their DHCP leases on command when I renumber a network.

You can try it yourself. Setup your router with a DHCP server using
whatever address you find useful such as 192.168.1.1. Connect with a
typical Windoze client which gets its IP address from the DHCP server
in the router. Now, dive into the routers DHCP server configuration
and change the /24 IP block to something like 192.168.111.1. This
should probably be done with a 2nd computah, but it will work using
just one machine. Now, do whatever you find entertaining on the
router to get the client to expire the lease prematurely and get a new
IP address in the correct /24 block. You can reboot, thrash,
broadcast, curse, or whatever, the stupid Windoze DHCP client will
just sit there on the wrong IP address until 50% of the lease time has
expired. It will then try to renew the lease and get a DHCPNAK which
will eventually convince it to ask for a new IP address. This is the
same as:
ipconfig /release
ipconfig /renew
My point is that the renewal has to be initiated by the client, not by
the DHCP server.

Methinks that PPPoE can force an update without also forcing a
disconnect. I know it can force a disconnect which automatically
requires that the PPPoE client get new IP/DNS/Gateway addresses. I
can see that on SBC dynamic DSL accounts where the IP address may
change several times a day for no obvious reason. However, I've also
noticed that the two DNS servers delivered never change.

>> 3. Call your ISP's support people and ask them *WHY* they are
>> juggling DNS servers. It might be that they have a flakey DNS server
>> and are doing repairs.


>I think he should do that in any case - DNS servers really shouldn't change
>that much. I can see a round-robin system where they want to balance load
>among a half-dozen or so servers, but _all_ (or at least most) of them
>should still be available.


Yeah. That's what I'm thinking. There's no obvious benefit to
juggling DNS server IP's. It will drive most client computahs nuts.
It would be nice to know what problem the OP is trying to solve.


--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
AE6KS 831-336-2558
 
Reply With Quote
 
Jeff Liebermann
Guest
Posts: n/a

 
      08-24-2005, 07:24 PM
On Wed, 24 Aug 2005 12:03:46 -0700, Jeff Liebermann
<(E-Mail Removed)> wrote:


>You can try it yourself. Setup your router with a DHCP server using
>whatever address you find useful such as 192.168.1.1. Connect with a
>typical Windoze client which gets its IP address from the DHCP server
>in the router. Now, dive into the routers DHCP server configuration
>and change the /24 IP block to something like 192.168.111.1. This
>should probably be done with a 2nd computah, but it will work using
>just one machine. Now, do whatever you find entertaining on the
>router to get the client to expire the lease prematurely and get a new
>IP address in the correct /24 block. You can reboot, thrash,
>broadcast, curse, or whatever, the stupid Windoze DHCP client will
>just sit there on the wrong IP address until 50% of the lease time has
>expired. It will then try to renew the lease and get a DHCPNAK which
>will eventually convince it to ask for a new IP address. This is the
>same as:
> ipconfig /release
> ipconfig /renew
>My point is that the renewal has to be initiated by the client, not by
>the DHCP server.


Well, I lied a bit. If your Windoze client has the "detect network
connections" check box set, rebooting the router will cause the
ethernet connection to disconnect. This signals Windoze clear the
DHCP assigned IP values and get a new set of IP/DNS/Gateway IP
addresses. This is the same effect as rebooting the router to get a
new set from the ISP. So, if we eliminated rebooting the router or
rebooting client as an option, the above DHCP test is still valid.


--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
AE6KS 831-336-2558
 
Reply With Quote
 
Derek Broughton
Guest
Posts: n/a

 
      08-25-2005, 11:57 AM
Jeff Liebermann wrote:

> On Wed, 24 Aug 2005 15:02:40 -0300, Derek Broughton
> <(E-Mail Removed)> wrote:
>
>>Not even with the sveasoft firmware? It's a pretty basic function of DHCP
>>servers, I would have thought there'd be a way.

>
> No. There is no feature or function of a DHCP server to prematurely
> expire a lease.


Not what I was suggesting. All DHCP servers I have used have an option to
offer IP "X" to MAC address "Y" - if the DHCP server in the Linksys could
do that (either with or without 3rd party firmware), then it would solve
his problem.

> My point is that the renewal has to be initiated by the client, not by
> the DHCP server.


Agreed. I was just going over dhclient documentation a couple of days ago,
and there was a note that some dhcp servers can ask you to give up your
lease, but they can't force it.
--
derek
 
Reply With Quote
 
David Taylor
Guest
Posts: n/a

 
      08-25-2005, 01:09 PM
> Not what I was suggesting. All DHCP servers I have used have an option to
> offer IP "X" to MAC address "Y" - if the DHCP server in the Linksys could
> do that (either with or without 3rd party firmware), then it would solve
> his problem.


You can certainly do that with the sveasoft option, it's generally
called a reservation. Don't know about the standard Linksys firmware as
I haven't used it in ages.

David.

 
Reply With Quote
 
Jeff Liebermann
Guest
Posts: n/a

 
      08-25-2005, 03:03 PM
On Thu, 25 Aug 2005 08:57:56 -0300, Derek Broughton
<(E-Mail Removed)> wrote:

>Not what I was suggesting. All DHCP servers I have used have an option to
>offer IP "X" to MAC address "Y" - if the DHCP server in the Linksys could
>do that (either with or without 3rd party firmware), then it would solve
>his problem.


That's called "static DHCP" where the MAC address of a client is
reserved for only that client. That works just fine for insuring that
the IP address does not change. However, it does NOT reserve the
gateway IP address, or the DNS IP addresses which are the current
problem. In other words, it would do nothing to solve the moving DNS
servers IP's.

>> My point is that the renewal has to be initiated by the client, not by
>> the DHCP server.


>Agreed. I was just going over dhclient documentation a couple of days ago,
>and there was a note that some dhcp servers can ask you to give up your
>lease, but they can't force it.


Yep. That's the problem. He could dive into the Sveasoft Alchemy
firmware in the WRT54G and write a script that checks for valid DNS
servers. All the tools are there. Something like:

#(@) dns-renew.sh
# Checks for valid DNS servers and renews the lease if invalid.
# Run from cron.
#
# Check if www.yahoo.com can be resolved. nslookup should ignore
# the local DNS cache. If not, there's probably an option to do
# fresh lookup.
# Nameserver is not specified so that it uses the DNS
# servers in the router.
if [ nslookup www.yahoo.com ]
do
# do nothing. the dns servers are valid.
sleep 60 # wait a minute and do it again.
else
# DNS lookup fails. Time to renew from ISP.
ifdown vlan1 # disconnect.
sleep 10 # snooze for 10 seconds.
ifup vlan1 # reconnect and renew.
done

I haven't tested this so use it at your own risk. With my miserable
programming abilities, it's probably buggy. My WRT54G reports the WAN
interfeace as vlan1 for some odd reason. This might be an artifact of
some of my tinkering. Run:
ifconfig
to get the real WAN interface name. Good luck.




--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
AE6KS 831-336-2558
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Register linux host with static IP dynamically in Windows DNS Daniel Alder Linux Networking 2 11-12-2008 10:38 AM
Implementing a IPv6 network with dynamically assigned static IPv6 addresses. Ashish Shukla Linux Networking 2 02-13-2007 02:59 PM
Static IPs and WRT54gs? Justin Wireless Internet 18 07-04-2006 09:13 PM
Static Ip's and BT - I have just recieved A BT router with 5 static IP Addresses. However, I want 5 computers in the office to use only one of the addresses. ery Difficult Question Nattasian Broadband 3 07-13-2004 08:55 AM
LinkSys Router and Static Addresses Buck Turgidson Linux Networking 2 12-14-2003 06:54 PM



1 2 3 4 5 6 7 8 9 10 11