Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 20:14:43 -0500
From:      Steve Bertrand <steve@ibctech.ca>
To:        Nikolaj Thygesen <mailinglist@diamondbox.dk>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Assigning static ip address
Message-ID:  <4994C983.20607@ibctech.ca>
In-Reply-To: <49947FC4.4000400@diamondbox.dk>
References:  <49947FC4.4000400@diamondbox.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Nikolaj Thygesen wrote:
> Hi list,
> 
>    I've been experimenting and googling for hours w/ no luck. All I want
> to do is run dhcp and then replace the ip address of the interface with
> a new static ip afterwards. 

I've been following this thread all day, but I still don't understand
exactly what you are trying to accomplish.

>From what I understand (and correct me if I'm wrong):

- you are working on a FreeBSD host system
- you have a DHCP server on the network, but it is not on this host
- you want to use all of the DHCP assigned parameters on the host, but
you want to have a static IP on the host you are working on that is
different than the one assigned to you

If that is correct, then you really only have two options:

- do an #ifconfig, and in the configuration on the DHCP server, specify
a directly assigned IP address to your MAC address. This way, DHCP
server will feed you the same 'static' (aka permanent lease) address to
you, and will also provide you with all other configuration parameters, or;

- do not configure the IP address on the host via rc.conf. Let dhclient
do its job, and have the system run a script at bootup with the
requirement that 'network' setup is done, and that will set ONLY the IP
address.

It would help if you could specify what platform the DHCP server is
running on, and whether you have control of it or not.

It is important that you don't set a static IP address on your host that
the DHCP server has in its lease pool. If you do, it may/will cause IP
conflicts on the network.

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4994C983.20607>