Assigning static ip address

Gonzalo Nemmi gnemmi at gmail.com
Thu Feb 12 13:19:57 PST 2009


On Thursday 12 February 2009 6:00:04 pm 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 looking at the
> /etc/dhclient.conf man pages, but they don't seem to help. I can do it
> from rc.conf like:
>
>     ifconfig_em0="inet 1.2.3.4"
>
> but then I loose all the other dhcp parameters like dns and stuff. Is it
> really that hard???
>
>     thanks - Nikolaj

Could you plase configure your /etc/rc.conf file to something like this?

ifconfig_ed0="inet 192.168.1.105  netmask 255.255.255.0"
defaultrouter="192.168.1.1"

Where "defaultrouter" is the IP of your dhcp server and tell me what happens?

Regards
-- 
Blessings
Gonzalo Nemmi


More information about the freebsd-questions mailing list