文章詳情頁
FreeBSD設(shè)置IP地址、網(wǎng)關(guān)、DNS的方法
瀏覽:86日期:2022-06-03 16:44:43
說明:
IP:192.168.21.173
子網(wǎng)掩碼:255.255.255.0
網(wǎng)關(guān):192.168.21.2
DNS:8.8.8.8
8.8.4.4
1、設(shè)置IP地址、網(wǎng)關(guān)
ee /etc/rc.conf #編輯
ifconfig_em0="inet 192.168.21.173 netmask 255.255.255.0" #設(shè)置IP地址,子網(wǎng)掩碼
defaultrouter="192.168.21.2" #設(shè)置網(wǎng)關(guān)
hostname="FreeBSD" #設(shè)置主機名字
esc 回車,再按a保存
2、設(shè)置DNS
ee /etc/resolv.conf #編輯
nameserver 8.8.8.8
nameserver 8.8.4.4
esc 回車,再按a保存
sh /etc/rc #重啟網(wǎng)絡(luò)
/etc/netstart #重啟網(wǎng)絡(luò)
現(xiàn)在FreeBSD已經(jīng)可以上網(wǎng)了!
IP:192.168.21.173
子網(wǎng)掩碼:255.255.255.0
網(wǎng)關(guān):192.168.21.2
DNS:8.8.8.8
8.8.4.4
1、設(shè)置IP地址、網(wǎng)關(guān)
ee /etc/rc.conf #編輯
ifconfig_em0="inet 192.168.21.173 netmask 255.255.255.0" #設(shè)置IP地址,子網(wǎng)掩碼
defaultrouter="192.168.21.2" #設(shè)置網(wǎng)關(guān)
hostname="FreeBSD" #設(shè)置主機名字
esc 回車,再按a保存
2、設(shè)置DNS
ee /etc/resolv.conf #編輯
nameserver 8.8.8.8
nameserver 8.8.4.4
esc 回車,再按a保存
sh /etc/rc #重啟網(wǎng)絡(luò)
/etc/netstart #重啟網(wǎng)絡(luò)
現(xiàn)在FreeBSD已經(jīng)可以上網(wǎng)了!
相關(guān)文章:
排行榜