www.smartbusinesschoices.com

Leading Business and Technology,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

accessing Linksys DHCP Client Table
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux Networking  
View previous topic :: View next topic  
Author Message
Philip
Guest






PostPosted: Fri Oct 31, 2008 11:38 pm    Post subject: accessing Linksys DHCP Client Table Reply with quote

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
Back to top
david
Guest






PostPosted: Fri Oct 31, 2008 11:38 pm    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

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

Quote:
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?
Back to top
Rick Jones
Guest






PostPosted: Fri Oct 31, 2008 11:38 pm    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Philip <none@nospam.net> wrote:
Quote:
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... Smile
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Back to top
Philip
Guest






PostPosted: Sat Nov 01, 2008 2:16 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

david wrote:
Quote:
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.
Back to top
david
Guest






PostPosted: Sat Nov 01, 2008 2:26 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

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

Quote:
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.
Back to top
Robert Harris
Guest






PostPosted: Sat Nov 01, 2008 2:55 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Philip wrote:
Quote:
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
Back to top
Philip
Guest






PostPosted: Sat Nov 01, 2008 4:05 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Robert Harris wrote:
Quote:
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?

Quote:
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.
Back to top
Robert Harris
Guest






PostPosted: Sat Nov 01, 2008 3:39 pm    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Philip wrote:
Quote:
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
Back to top
Philip
Guest






PostPosted: Sat Nov 01, 2008 7:22 pm    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Robert Harris wrote:
Quote:
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.
Back to top
Stan Bischof
Guest






PostPosted: Sat Nov 01, 2008 8:09 pm    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Philip <none@nospam.net> wrote:
Quote:

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
Back to top
Philip
Guest






PostPosted: Sun Nov 02, 2008 7:53 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Stan Bischof wrote:
Quote:
Philip <none@nospam.net> 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!
Back to top
Philip
Guest






PostPosted: Sat Nov 15, 2008 8:36 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

Philip wrote:
Quote:
Stan Bischof wrote:
Philip <none@nospam.net> 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!
I upgraded all my boxes to Fedora 9 and ran across the avahi mDNS

capability, which is the Linux version of the Zeroconf spec. So now I
can get at every local Linux box using the *.local domain. Now if only I
could get the one windows box to play nicely. I hear that Apple has
Bonjour for windows. Hmmm, not sure I am ready to try that yet.
Back to top
Moe Trin
Guest






PostPosted: Sun Nov 16, 2008 2:02 am    Post subject: Re: accessing Linksys DHCP Client Table Reply with quote

On Fri, 14 Nov 2008, in the Usenet newsgroup comp.os.linux.networking, in
article <cDuTk.73$%O2.9@newsfe20.iad>, Philip wrote:

Quote:
Philip <none@nospam.net> wrote:

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

20 years ago (yes, before Linux), this was solved several ways in the
boot scripts. The most common way we still use is 'run levels'. The
system defaults to (example) run-level 3 (CLI login) and gets a static
IP address. If the user selects a different run-level via the boot
loader (LILO or GRUB) such as 4, the boot scripts invoke a DHCP process.

Quote:
I upgraded all my boxes to Fedora 9 and ran across the avahi mDNS

Be VERY careful with that - make sure /etc/resolv.conf does not have a
domain or search line, either of which exposes you to domain spoofing.
Apple warned against this in section 7 of their proposal for Multicast
DNS (mDNS), but most people ignore it because convenience is much more
important than security.

Quote:
capability, which is the Linux version of the Zeroconf spec.

No. 'Zeroconf' is the mechanism for obtaining a 169.254.x.x IP address
when your system can't find a DHCP server. Apple invented it as
"Rendezvous" or "Bonjour in 1997, and microsoft adopted in in 1998 to
let networking sorta work when some MSCE has so screwed up the DHCP
server configuration that even windoze doesn't work.

Avahi is a free adaptation of the proposed Apple multicast DNS service
that lost out to the (incompatible) microsoft proposal (documented in
RFC4795). They are incompatible because they use different multicast
IP addresses (224.0.0.251 or FF02::FB for Apple, 224.0.0.252 or
FF02::1:3 for microsoft) and port numbers (5353 for Apple, 5355 for
microsoft), and somewhat different data formats. Both proposals
recognized the enormous security hole (DNS spoofing) they were creating
and provided suggestions to alleviate the hole (Apple = .local as the
top level domain ONLY, microsoft = "single label names" which really
translates to unqualified hostnames WITHOUT DOTS), but neither proposal
_required_ these suggestions. They also recommended using some form of
authentication - also not adopted.

Quote:
So now I can get at every local Linux box using the *.local domain.
Now if only I could get the one windows box to play nicely. I hear
that Apple has Bonjour for windows. Hmmm, not sure I am ready to try
that yet.

Microsoft compatibility strikes again. I wouldn't have a windoze
box on my network, but the solution I've heard of is Samba.

Old guy
Back to top
Display posts from previous:   
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux Networking  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum