How to keep a static IP and let DNS addresses be dynamical..

Archived from groups: alt.internet.wireless (More info?)

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.
15 answers Last reply
More about static addresses dynamical
  1. Archived from groups: alt.internet.wireless (More info?)

    On 24 Aug 2005 08:34:41 -0700, for.fun@laposte.net 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 jeffl@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  2. Archived from groups: alt.internet.wireless (More info?)

    Jeff Liebermann wrote:

    > On 24 Aug 2005 08:34:41 -0700, for.fun@laposte.net 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
  3. Archived from groups: alt.internet.wireless (More info?)

    On Wed, 24 Aug 2005 15:02:40 -0300, Derek Broughton
    <news@pointerstop.ca> 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 jeffl@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  4. Archived from groups: alt.internet.wireless (More info?)

    On Wed, 24 Aug 2005 12:03:46 -0700, Jeff Liebermann
    <jeffl@comix.santa-cruz.ca.us> 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 jeffl@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  5. Archived from groups: alt.internet.wireless (More info?)

    for.fun@laposte.net 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 :)
  6. Archived from groups: alt.internet.wireless (More info?)

    Jeff Liebermann <jeffl@comix.santa-cruz.ca.us> wrote in
    news:tu6pg1lmdmack9r7ibcvtkdjgtahsl48t7@4ax.com:

    > On 24 Aug 2005 08:34:41 -0700, for.fun@laposte.net 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 :)
  7. Archived from groups: alt.internet.wireless (More info?)

    Jeff Liebermann wrote:

    > On Wed, 24 Aug 2005 15:02:40 -0300, Derek Broughton
    > <news@pointerstop.ca> 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
  8. Archived from groups: alt.internet.wireless (More info?)

    On Thu, 25 Aug 2005 08:57:56 -0300, Derek Broughton
    <news@pointerstop.ca> 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@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  9. Archived from groups: alt.internet.wireless (More info?)

    > 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.
  10. Archived from groups: alt.internet.wireless (More info?)

    Jeff Liebermann wrote:

    > On Thu, 25 Aug 2005 08:57:56 -0300, Derek Broughton
    > <news@pointerstop.ca> 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.

    That didn't sound like the OP's problem.

    He 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) ?

    He wanted to give his local machines fixed (or at least predictable) IPS.
    Seems to me that this would do the job - along with your previous
    suggestion to set the local computers' DNS server to the router.
    --
    derek
  11. Archived from groups: alt.internet.wireless (More info?)

    On Thu, 25 Aug 2005 13:45:18 -0300, Derek Broughton
    <news@pointerstop.ca> wrote:

    >Jeff Liebermann wrote:
    >
    >> On Thu, 25 Aug 2005 08:57:56 -0300, Derek Broughton
    >> <news@pointerstop.ca> 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.
    >
    >That didn't sound like the OP's problem.
    >
    >He 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) ?

    >He wanted to give his local machines fixed (or at least predictable) IPS.
    >Seems to me that this would do the job - along with your previous
    >suggestion to set the local computers' DNS server to the router.

    Please go up one paragraph where he wrote:
    "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."

    What you quoted was his proposed solution to the moving DNS servers
    supplied by his ISP. That solution (static DHCP) will not do anything
    for the moving DNS server problem. Note that one of my proposed
    solutions is to simply ignore the shifting DNS servers and find a
    different DNS server that doesn't change. That should best be done in
    the WRT54G WAN config, but could also be setup in the client PC's.

    Incidentally, this is a great example of why I wanna know what the
    problem that the OP is trying to solve, and not the place where the OP
    thinks they are stuck.


    --
    Jeff Liebermann jeffl@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  12. Archived from groups: alt.internet.wireless (More info?)

    Jeff Liebermann wrote:

    > Please go up one paragraph where he wrote:
    > "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."
    >
    > What you quoted was his proposed solution to the moving DNS servers
    > supplied by his ISP.

    First, he said:
    > I would like all my computers have a static IP.

    So the solution is to use the "static" DHCP. Fix one problem at a time.

    _Then_ he said:
    > problem : under XP, if I choose a static IP, I also need to fix the DNS
    > addresses.

    which is resolved by simply fixing the DNS address as the address of the
    router (I'm not certain that even matters, because I would think _that's_
    the address the DHCP server is going to give the clients).

    Implicit in the whole problem is that allowing DHCP to issue dynamic address
    to the XP systems never resulted in problems - so the router should be _at
    least_ as capable as an XP system of handling the odd situation at the
    ISP's end.

    You _don't_ always need to understand a whole problem to solve it. Solve
    the bits you know, and most of the time the rest falls into place.
    --
    derek
  13. Archived from groups: alt.internet.wireless (More info?)

    > That's called "static DHCP" where the MAC address of a client is

    Oxymoron that one, Static Dynamic Host Configuration Protocol. :)
  14. Archived from groups: alt.internet.wireless (More info?)

    On Thu, 25 Aug 2005 16:28:29 GMT, David Taylor <djtaylor@bigfoot.com>
    wrote:

    >> That's called "static DHCP" where the MAC address of a client is
    >
    >Oxymoron that one, Static Dynamic Host Configuration Protocol. :)

    Yeah, I agree. I didn't invent the term. It's still better than
    SBC's mutation of static IP over PPPTP called "sticky static IP".
    There's also the misuse of NAT which really should be called PAT (port
    address translation). Then there's the total confusion between the
    various types of bridges, client adapters, game adapters, workgroup
    bridges, and other CPE equipment. Probably more but I don't wanna
    think about it.

    Customer: I think SBC switched me to a static IP account.
    Me: Huh? How can you tell?
    Customer: I can hear static on the phone.
    Me: Put the microfilter back on where it belongs.


    --
    Jeff Liebermann jeffl@comix.santa-cruz.ca.us
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    AE6KS 831-336-2558
  15. Archived from groups: alt.internet.wireless (More info?)

    Thanks Jeff, Derek, David and Duane for your posts.

    I react to all your articles :

    First of all, I wanted to give you more details about my ISP :
    He does not provide us a standard DSL modem but a modem called
    "Freebox" which is specific to Free (the ISP) => I know that Free build
    the internal hardware itself.
    On the input, we plug the phone line and on the ouput, we plug the VoIP
    phone, the TV and the Internet (RJ45). This is called triple-play and I
    suppose you have the same kind of modem in the US.
    Thanks to this system, I suppose that Free can manage the DNS entries
    as it likes and eventually does not respect DHCP standards.
    Two years ago, I tried using a standard DSL modem (a DSL PCI card)
    configured with DHCP and I always had name resolution problems => I had
    to reload the configuration like I do with the WRT54GS.


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

    It seems to be a very good idea.
    I will try it this evening.


    > 2. I suggest you download and play with Sam Spade 1.14:
    > http://www.blighty.com/product s/spade/
    > or use one of the numerous online DNS tools such as:
    > http://www.dnsstuff.com

    Jeff, I post a request about DNS servers in the other thread I
    initiated in this forum so just forget it.


    > 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 do not believe they will do something but I will try posting a
    request to them.


    > 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.

    I suppose that the DHCP table is not implemented in the WRT54GS router
    Linksys firmware and should be run on a DHCP server computer (like they
    do in big companies)
    As far as I am concerned, I won't do this because this is a lot of
    administration's job !
    Anyway, perhaps there is a more recent Linksys firmware which manages
    DHCP tables => I have a look.


    > 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.

    OK, I will try running Sveasoft because everybody here seems to think
    it's much better than the Linksys one.
    Anyway, if Sveasoft implements DHCP tables, it would be excellent !
Ask a new question

Read More

Static IP Windows XP Wireless Networking