文章詳情頁
FreeBSD設(shè)置IP地址、網(wǎng)關(guān)、DNS的方法
瀏覽:118日期: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è)置主機(jī)名字
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è)置主機(jī)名字
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)文章:
1. 在FreeBSD 8.1下搭建Git服務(wù)器步驟2. Win7怎么查看計算機(jī)的IP地址、子網(wǎng)掩碼和默認(rèn)網(wǎng)關(guān)?3. 在FreeBSD上搭建Mac的文件及time machine備份服務(wù)4. FreeBSD FTP 的架設(shè)教程5. Freebsd+IPFW結(jié)合使用防小規(guī)模DDOS攻擊的配置方法6. freebsd 分區(qū)的相關(guān)知識總結(jié)7. FreeBSD常用指令整理(學(xué)習(xí)筆記)8. FreeBSD系統(tǒng)下安裝字體的步驟詳解9. freebsd用法配置匯總10. freebsd7.0安裝系統(tǒng)圖解(最新版)
排行榜
