国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

ubuntu 設(shè)置靜態(tài)IP的實(shí)現(xiàn)方法

2019-11-02 16:14:51
字體:
供稿:網(wǎng)友

Ubuntu 設(shè)定靜態(tài)IP:

切換到root用戶,然后進(jìn)入/etc/network目錄。備份interfaces文件(備份文件是一個(gè)好習(xí)慣)

下面編輯interfaces文件,添加如下語句:

1 # Assgin static IP by eric on 26-SEP-20122 iface eth0 inet static3 address 192.168.196.135     #change to your static IP4 netmask 255.255.255.0      #change to your netmask5 gateway 192.168.196.255     #change to your getway6 #We must specify dns-nameserver here7 #in order to get internet access from host8 dns-nameservers 192.168.196.2559 auto eth0

編輯完成后的interfaces文件內(nèi)容如下:

root@ubuntu:/etc/network# cat interfaces# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopback#add by andy at 2014-08-14# Assgin static IP by eric on 26-SEP-2012iface eth0 inet staticaddress 192.168.196.135     #change to your static IPnetmask 255.255.255.0      #change to your netmaskgateway 192.168.196.255     #change to your getway#We must specify dns-nameserver here#in order to get internet access from hostdns-nameservers 192.168.196.255auto eth0

下一步就是重啟網(wǎng)卡:

root@ubuntu:/etc/network# /etc/init.d/networking restart重啟完成后,測試一下: root@ubuntu:/etc/network# ping www.baidu.com.cn PING www.a.shifen.com (220.181.112.244) 56(84) bytes of data. 64 bytes from 220.181.112.244: icmp_req=1 ttl=128 time=6.12 ms 64 bytes from 220.181.112.244: icmp_req=2 ttl=128 time=14.7 ms

OK。靜態(tài)IP設(shè)置完成。

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 乐昌市| 鹿邑县| 张掖市| 彩票| 米林县| 建昌县| 黔江区| 巴彦县| 长治市| 绥德县| 玉环县| 沅陵县| 若羌县| 平陆县| 仙居县| 通化县| 潮州市| 沁源县| 乌审旗| 中西区| 安达市| 岳阳市| 海南省| 连城县| 大化| 德化县| 雷州市| 双流县| 和政县| 常德市| 溧水县| 句容市| 廉江市| 新巴尔虎左旗| 张北县| 天柱县| 太仆寺旗| 阳山县| 沙坪坝区| 都江堰市| 肥乡县|