[How To] Change or set new IP address in FreeBSD

, , Leave a comment


  1. Use ifconfig -a command to get names of Ethernet interfaces
    ifconfig -a
  2. Use ifconfig command to set temporary IP address (till rebooting system).
    ifconfig re0 inet 202.54.1.22
  3. To setup IP address permanently open file /etc/rc.conf, then add or modify network information:
    vim /etc/rc.conf

    example:

    hostname="www.example.com"
    ifconfig_re0="inet 192.168.10.10 netmask 255.255.250.0"
  4. Run the /etc/netstart script.
    ./etc/netstart

re0 is Ethernet interface name, obtained by ifconfig -a command.

 

Leave a Reply