accessing Linksys DHCP Client Table - Networking

This is a discussion on accessing Linksys DHCP Client Table - Networking ; I use a Linksys WRT54G router for my home LAN. My Fedora server uses a static IP. However, my XP box hosts the printer and uses DHCP to get its IP. Every so often the XP address changes and the ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: accessing Linksys DHCP Client Table

  1. accessing Linksys DHCP Client Table

    I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    static IP. However, my XP box hosts the printer and uses DHCP to get its
    IP. Every so often the XP address changes and the Fedora box hosts file
    has to be updated to access the printer.

    Has anyone got a ready solution to access the router's DHCP Client Table
    and update a hosts file?

    I could write a script, but I thought I'd check to see if there is not
    already a solution out there.

    Phil

  2. Re: accessing Linksys DHCP Client Table

    On Fri, 31 Oct 2008 11:38:53 -0700, Philip rearranged some electrons to
    say:

    > I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    > static IP. However, my XP box hosts the printer and uses DHCP to get its
    > IP. Every so often the XP address changes and the Fedora box hosts file
    > has to be updated to access the printer.
    >
    > Has anyone got a ready solution to access the router's DHCP Client Table
    > and update a hosts file?
    >
    > I could write a script, but I thought I'd check to see if there is not
    > already a solution out there.
    >
    > Phil


    Why not make the XP box static?

  3. Re: accessing Linksys DHCP Client Table

    david wrote:
    > On Fri, 31 Oct 2008 11:38:53 -0700, Philip rearranged some electrons to
    > say:
    >
    >> I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    >> static IP. However, my XP box hosts the printer and uses DHCP to get its
    >> IP. Every so often the XP address changes and the Fedora box hosts file
    >> has to be updated to access the printer.
    >>
    >> Has anyone got a ready solution to access the router's DHCP Client Table
    >> and update a hosts file?
    >>
    >> I could write a script, but I thought I'd check to see if there is not
    >> already a solution out there.
    >>
    >> Phil

    >
    > Why not make the XP box static?

    I guess I could do that, but a I have a linux laptop in a different room
    that I occasionally ssh into from the Fedora box, so a solution for that
    would still be needed.

  4. Re: accessing Linksys DHCP Client Table

    Philip wrote:
    > I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    > static IP. However, my XP box hosts the printer and uses DHCP to get its
    > IP. Every so often the XP address changes and the Fedora box hosts file
    > has to be updated to access the printer.
    >
    > Has anyone got a ready solution to access the router's DHCP Client Table
    > and update a hosts file?
    >
    > I could write a script, but I thought I'd check to see if there is not
    > already a solution out there.
    >
    > Phil


    Does the router's DNS resolve your XP box's IP address? If so, then you
    don't need to update your hosts file. If not, then use wget to download
    the status page from the router containing its client table and use grep
    and cut (or awk or perl) to get the XP box's address. The exact details
    are probably model and firmware dependent.

    Robert


  5. Re: accessing Linksys DHCP Client Table

    Philip wrote:
    > I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    > static IP. However, my XP box hosts the printer and uses DHCP to get its
    > IP. Every so often the XP address changes and the Fedora box hosts file
    > has to be updated to access the printer.


    > Has anyone got a ready solution to access the router's DHCP Client Table
    > and update a hosts file?


    > I could write a script, but I thought I'd check to see if there is not
    > already a solution out there.


    I have no idea about the particulars, but perhaps the Fedora server
    with the staic IP can be a DDNS server for your home domain and act as
    a caching server for other domains.

    That or pickup one of those (old?) networked print servers?

    Is there a way in the linksys dhcp server config to say "give this IP
    to this MAC" and then use the XP box's MAC address? Then it is still
    DHCP but it always gets the same IP.

    That it should ever get a different IP off of your linksys seems
    awfully strange - implies (to me anyway) that someone else is
    occasionally getting in there and getting an IP.

    rick jones
    --
    oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

  6. Re: accessing Linksys DHCP Client Table

    Robert Harris wrote:
    > Philip wrote:
    >> I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    >> static IP. However, my XP box hosts the printer and uses DHCP to get its
    >> IP. Every so often the XP address changes and the Fedora box hosts file
    >> has to be updated to access the printer.
    >>
    >> Has anyone got a ready solution to access the router's DHCP Client Table
    >> and update a hosts file?
    >>
    >> I could write a script, but I thought I'd check to see if there is not
    >> already a solution out there.
    >>
    >> Phil

    >
    > Does the router's DNS resolve your XP box's IP address?


    No, the WRT54G, AFAIK does not include the DHCP clients in it DNS
    tables. I have my resolv.conf including a "nameserver 192.168.1.1"
    record, but calls to dig or ping with the hostname in the Client Table
    come up empty.

    Unless I am doing something wrong?

    > If so, then you
    > don't need to update your hosts file. If not, then use wget to download
    > the status page from the router containing its client table and use grep
    > and cut (or awk or perl) to get the XP box's address. The exact details
    > are probably model and firmware dependent.


    Sounds like the script was was hoping to avoid. Oh well, it can't be
    that hard.

  7. Re: accessing Linksys DHCP Client Table

    On Fri, 31 Oct 2008 14:16:32 -0700, Philip rearranged some electrons to
    say:

    > david wrote:
    >> On Fri, 31 Oct 2008 11:38:53 -0700, Philip rearranged some electrons to
    >> say:
    >>
    >>> I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    >>> static IP. However, my XP box hosts the printer and uses DHCP to get
    >>> its IP. Every so often the XP address changes and the Fedora box hosts
    >>> file has to be updated to access the printer.
    >>>
    >>> Has anyone got a ready solution to access the router's DHCP Client
    >>> Table and update a hosts file?
    >>>
    >>> I could write a script, but I thought I'd check to see if there is not
    >>> already a solution out there.
    >>>
    >>> Phil

    >>
    >> Why not make the XP box static?

    > I guess I could do that, but a I have a linux laptop in a different room
    > that I occasionally ssh into from the Fedora box, so a solution for that
    > would still be needed.


    Huh? If you make all of your boxes static, then you have no issues.

  8. Re: accessing Linksys DHCP Client Table

    Philip wrote:
    > Robert Harris wrote:
    >> Philip wrote:
    >>> I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    >>> static IP. However, my XP box hosts the printer and uses DHCP to get its
    >>> IP. Every so often the XP address changes and the Fedora box hosts file
    >>> has to be updated to access the printer.
    >>>
    >>> Has anyone got a ready solution to access the router's DHCP Client Table
    >>> and update a hosts file?
    >>>
    >>> I could write a script, but I thought I'd check to see if there is not
    >>> already a solution out there.
    >>>
    >>> Phil

    >>
    >> Does the router's DNS resolve your XP box's IP address?

    >
    > No, the WRT54G, AFAIK does not include the DHCP clients in it DNS
    > tables. I have my resolv.conf including a "nameserver 192.168.1.1"
    > record, but calls to dig or ping with the hostname in the Client Table
    > come up empty.
    >
    > Unless I am doing something wrong?
    >
    >> If so, then you
    >> don't need to update your hosts file. If not, then use wget to download
    >> the status page from the router containing its client table and use grep
    >> and cut (or awk or perl) to get the XP box's address. The exact details
    >> are probably model and firmware dependent.

    >
    > Sounds like the script was was hoping to avoid. Oh well, it can't be
    > that hard.


    Another thing you may well be able to do is to tell your router to grant
    a constant IP address to your XP box (based on its ethernet MAC
    address) every time.

    Robert

  9. Re: accessing Linksys DHCP Client Table

    Robert Harris wrote:
    > Philip wrote:
    >> Robert Harris wrote:
    >>> Philip wrote:
    >>>> I use a Linksys WRT54G router for my home LAN. My Fedora server uses a
    >>>> static IP. However, my XP box hosts the printer and uses DHCP to get its
    >>>> IP. Every so often the XP address changes and the Fedora box hosts file
    >>>> has to be updated to access the printer.
    >>>>
    >>>> Has anyone got a ready solution to access the router's DHCP Client Table
    >>>> and update a hosts file?
    >>>>
    >>>> I could write a script, but I thought I'd check to see if there is not
    >>>> already a solution out there.
    >>>>
    >>>> Phil
    >>> Does the router's DNS resolve your XP box's IP address?

    >> No, the WRT54G, AFAIK does not include the DHCP clients in it DNS
    >> tables. I have my resolv.conf including a "nameserver 192.168.1.1"
    >> record, but calls to dig or ping with the hostname in the Client Table
    >> come up empty.
    >>
    >> Unless I am doing something wrong?
    >>
    >>> If so, then you
    >>> don't need to update your hosts file. If not, then use wget to download
    >>> the status page from the router containing its client table and use grep
    >>> and cut (or awk or perl) to get the XP box's address. The exact details
    >>> are probably model and firmware dependent.

    >> Sounds like the script was was hoping to avoid. Oh well, it can't be
    >> that hard.

    >
    > Another thing you may well be able to do is to tell your router to grant
    > a constant IP address to your XP box (based on its ethernet MAC
    > address) every time.


    The router dhcp server does not have that feature. However, that said,
    generally it will give a client the same IP every time, until some
    occasional event (not sure what) causes it to give the IP to a different
    client. Then I have the problem.

    I could go for static IPs for all, but the laptop would have be
    reconfigured every time I take it out of the home.

    I googled around a lot on this, too. There appears to be no magic hidden
    feature in the stock version WRT54G to make it include its DHCP clients
    table in its cached DNS, unless you have the open-source linux version
    of the router. Looks like the script is the way to go.

    Thanks for all the suggestions. Helped me learn more about DNS stuff.

  10. Re: accessing Linksys DHCP Client Table

    Philip wrote:
    >
    > The router dhcp server does not have that feature. However, that said,
    > generally it will give a client the same IP every time, until some
    > occasional event (not sure what) causes it to give the IP to a different
    > client. Then I have the problem.
    >
    > I could go for static IPs for all, but the laptop would have be
    > reconfigured every time I take it out of the home.
    >


    Then leave everything DHCP ( it is afterall much more portable/convenient),
    set the router up as a WAP rather than a router. Turn off DHCP server on
    your router and instead use a dhcp server on your server.
    Set your dhcp server to allocate IP's based on MAC
    and then you are all set to go. Your machines are set to DHCP so
    are fully poratble, but you always know where they are on your
    network.

    After all - you have a server so you may as well use it!

    Stan


  11. Re: accessing Linksys DHCP Client Table

    Stan Bischof wrote:
    > Philip wrote:
    >> The router dhcp server does not have that feature. However, that said,
    >> generally it will give a client the same IP every time, until some
    >> occasional event (not sure what) causes it to give the IP to a different
    >> client. Then I have the problem.
    >>
    >> I could go for static IPs for all, but the laptop would have be
    >> reconfigured every time I take it out of the home.
    >>

    >
    > Then leave everything DHCP ( it is afterall much more portable/convenient),
    > set the router up as a WAP rather than a router. Turn off DHCP server on
    > your router and instead use a dhcp server on your server.
    > Set your dhcp server to allocate IP's based on MAC
    > and then you are all set to go. Your machines are set to DHCP so
    > are fully poratble, but you always know where they are on your
    > network.
    >
    > After all - you have a server so you may as well use it!
    >
    > Stan
    >

    That is a good idea, but I am not ready to run the server 24/7 as it has
    a noisy fan and sits in a bedroom. I will replace the fan in a few weeks
    and maybe I'll give that a try.

    Thanks!

  12. Re: accessing Linksys DHCP Client Table

    Here's outline of how to do a script:
    (for Linksys BEFSR41 )

    get Linksys DHCP table with:

    wget --user="" --password="admin"
    result in file ./DHCPTable.htm

    In the file the addresses are not in an HTML but a JavaScript array: