On 26 Feb 2002, Simon Wong wrote:

> On Tue, 2002-02-26 at 11:28, Matthew Palmer wrote:
> > I don't think it will help, actually.  Because the machine that needs to
> > know lonewolf's IP is the machine you're connecting to, which has no idea
> > that you've gotten that IP via DHCP, and hence can't have updated /etc/hosts
> > for it.
> 
> Sorry - I think I am being unclear :-(
> 
> I am SSHing TO lonewolf i.e.
> 
> Remote ---SSH---> Lonewolf(DHCP) (OK - it's a laptop).
> 
> So I need lonewolf to update it's /etc/hosts when it receives the IP via
> DHCP.  Then when the display is set "lonewolf:10.0" it can resolve
> itself.

Oops, brainfart.  Of course.  (The :10.0 should have twigged me).

> > You need to work out static mappings for your IP addresses, have the
> > machines which receive DHCP addresses automatically modify their hostnames,
> > or implement reverse DNS properly.  Not sure if SSH turns it's IPs into
> > hostnames via RDNS, so perhaps the last option might not help - but it's
> > still good practice.
> 
> The network I am on doesn't have dynamic DNS(?) so it will not register
> my hostname.

No, not dynamic DNS.  You get the IP from DHCP, and then either get the
hostname associated with that IP from DHCP or DNS, and then run
/sbin/hostname to set your hostname to whatever you were given.  Sure, you
no longer get called lonewolf, but if you're getting random IPs from DHCP
then you don't care too much about machine identities anyway (IMHO).

> I'm hoping that dhcp would be able to update the hosts file
> automatically.

That can be done too.  pump can certainly run an arbitrary script when it
gets/releases and address - if dhclient can't I'd find another dhcp client.

Oh, and can you trim your replies?  I don't need my .sig coming back at me
in your replies.


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer
[EMAIL PROTECTED]

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to