2011年2月18日 星期五

在FreeBSD中修改ip

因為有需求,所以爬文學習。因為走過了,所以留下足跡。

-----------------------------------------------------------------------------------------
  1. 修改:/etc/rc.conf
  2. 在ifconfig_lnc0="inet xxx.xxx.xxx.xxx netmask 255.255.255.0"
  3. defaultrouter="xxx.xxx.xxx.xxx (gateway ip address)"
  4. 之後重新啟動網路卡:/etc/init.d/networking restart   /etc/rc.d/netif restart
  5. 或者可以使用ifconfig rl0 down                        ifconfig rl0 up