[How To] Change or set new IP address in FreeBSD
|- Use ifconfig -a command to get names of Ethernet interfaces
ifconfig -a
- Use ifconfig command to set temporary IP address (till rebooting system).
ifconfig re0 inet 202.54.1.22
- 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"
- Run the /etc/netstart script.
./etc/netstart
re0 is Ethernet interface name, obtained by ifconfig -a command.