Jul
14
2010
0

How to set static IP on Freebsd

1) Edit config file

vi /etc/rc.conf

2) Depends how many interfaces exist is possible to set each one for (em0, em1em2, em…)

#Interface 1 with default gateway for 192.168.0.1
ifconfig_em0="inet 192.168.0.10 netmask 255.255.255.0"
defaultrouter="192.168.0.1"

#Interface 2

ifconfig_em1="inet 192.168.2.10 netmask 255.255.255.0"

3) Save that file “rc.conf” and restart network init

# /etc/rc.d/netif restart && /etc/rc.d/routing restart
Written by doutdex in: FreeBSD | Tags: , , ,