Re: laptop,dhcp,fixed addresses
On Thursday 14 April 2005 16:01, Matt Price wrote:
...
> I'm intrigued by the ocmments in your dns files like:
> ; Special for work portable - must be allocated by dhcp because of
> ; Work - it uses the mac address to find this address.
>
> Do you have some trick that enables you to move between locations
> without changing the network interface? On my laptop I have the
> following ocnfiguration:
Actually this machine is a windows 2000 portable, but that shouldn't matter
much. At work, it is allocated an ip address via dhcp. This will be a
number in the ip address range that my company owns (i) When I get home, the
file causes dhcp to allocate the fixed ip address of 192.168.0.25. I used to
need this (although I don't anymore) because I was creating a secure tunnel
through my firewall and needed to port forward to it.
>
> # The first network card - this entry was created during the Debian
> installation
> iface dynamic inet dhcp
>
> # when connecting via another laptop, use dhcp;
> # otherwise use the static configuration
> auto eth0
> iface eth0 inet static
> address 192.168.2.198
> netmask 255.255.255.0
> broadcast 192.168.2.255
> gateway 192.168.2.1
>
> iface net-sidsmith inet static
> address 128.100.34.173
> netmask 255.255.255.0
> network 128.100.34.0
> broadcast 128.100.34.127
> gateway 128.100.34.1
>
>
> and then this little script I wrote brings one up and the other down:
>
> ifdown -a
> ifup eth0=net-sidsmith
> ifup lo
>
> do you have a trick that somehow avoids such manipulation?
>
> m
I am not sure I understand what you are trying to do here. I have shown you
how to get a machine to a known ip address when it connects via dhcp. What
is the case here that you are trying to solve? Are you on a network with no
dhcp server?
--
Alan Chandler
http://www.chandlerfamily.org.uk
Reply to: