HowTo Change IP Address on FreeBSD?

Today I will  explain how to configure  network configuration in FreeBSD. So Lets begin:

  1. In the file /etc/rc.conf  we can set static  ip address and default gateway and etc. For example  you can set values as follows:

hostname=”tekbloq.com”
ifconfig_lnc0=”inet 192.168.0.2 netmask 255.255.255.0″
defaultrouter=”192.168.0.1″

      2. We have to restart two netif services  to make effective the changes:

/etc/rc.d/netif restart

      3. Save and close  /etc/rc.conf file. You can see new parameters with IFCONFIG .