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

  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.

Related

[How To] set or change the IP address on FreeBSD

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.