FreeBSD IP設定相關

ifconfig [interface] [IP] netmask [netmask] alias
或者
ifconfig [interface] [IP/mask] alias
(似乎可以加在/etc/rc.net中成為開機設定,未嘗試)
要拿掉就用
ifconfig [interface] delete [IP]

在/etc/rc.conf寫類似下面的內容,每外加就依此類以推
ifconfig_lnc0="inet 192.168.30.3 netmask 255.255.255.0″
ifconfig_lnc0_alias0="inet 192.168.30.1 netmask 255.255.255.255″
ifconfig_lnc0_alias1="inet 192.168.30.2 netmask 255.255.255.255″

改過後ping看看外部網路,有可能會需要
route add default [IP]
重設default gateway

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s

%d 位部落客按了讚: