Networking Forums

Networking Forums > Computer Networking > Linux Networking > accessing Linksys DHCP Client Table

Reply
Thread Tools Display Modes

accessing Linksys DHCP Client Table

 
 
Philip
Guest
Posts: n/a

 
      10-31-2008, 05:38 PM
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
 
Reply With Quote
 
 
 
 
david
Guest
Posts: n/a

 
      10-31-2008, 06:34 PM
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?
 
Reply With Quote
 
Philip
Guest
Posts: n/a

 
      10-31-2008, 08:16 PM
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.
 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      10-31-2008, 08:55 PM
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

 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      10-31-2008, 09:53 PM
Philip <(E-Mail Removed)> 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...
 
Reply With Quote
 
Philip
Guest
Posts: n/a

 
      10-31-2008, 10:05 PM
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.
 
Reply With Quote
 
david
Guest
Posts: n/a

 
      11-01-2008, 01:26 AM
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.
 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      11-01-2008, 09:39 AM
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
 
Reply With Quote
 
Philip
Guest
Posts: n/a

 
      11-01-2008, 01:22 PM
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.
 
Reply With Quote
 
Stan Bischof
Guest
Posts: n/a

 
      11-01-2008, 02:09 PM
Philip <(E-Mail Removed)> 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

 
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
Modify vpn client routing table with CMAK kwyap Windows Networking 1 03-23-2007 05:53 PM
Linksys Router Incomplete DHCP Clients Table Robert Stanley Wireless Networks 1 12-25-2005 11:57 AM
Why is DHCP table empty on Linksys router Al C. Linux Networking 5 08-27-2004 02:50 PM
DHCP client table question milton Wireless Internet 4 12-22-2003 08:37 PM
Linksys WRT55AG giving IP addresses to any DHCP Client? serge Wireless Internet 0 07-23-2003 05:38 PM



1 2 3 4 5 6 7 8 9 10 11