Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: Jeff Liebermann <jeffl@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 08:03:46 -0700
On Thu, 25 Aug 2005 08:57:56 -0300, Derek Broughton
<news@xxxxxxxxxxxxxx> 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 jeffl@xxxxxxxxxxxxxxxxxxxxxx
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
AE6KS 831-336-2558
.
- Follow-Ups:
- References:
- How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: for . fun
- Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: Jeff Liebermann
- Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: Derek Broughton
- Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: Jeff Liebermann
- Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- From: Derek Broughton
- How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- Prev by Date: Wireless access point question
- Next by Date: wep problems
- Previous by thread: Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- Next by thread: Re: How to keep a static IP and let DNS addresses be dynamically updated on Linksys WRT54GS ?
- Index(es):
Relevant Pages
|
Loading