ubuntu取消pppoe啟動(dòng)時(shí)自動(dòng)拔號(hào)的設(shè)置方法
更新時(shí)間:2008年09月12日 00:25:24 作者:
昨晚用pppoe撥號(hào),今早回公司發(fā)現(xiàn)原先的dhcp設(shè)置不生效了,所以取消pppoe啟動(dòng)時(shí)自動(dòng)拔號(hào)
解決方案:
sudo gedit /etc/network/interfaces
auto dsl-provider 改成 #auto dsl-provider
此外還將所有跟dsl相關(guān)的語(yǔ)句注釋?zhuān)貑?,ok。
設(shè)置靜態(tài)ip的方法:
Ubuntu的網(wǎng)絡(luò)參數(shù)保存在文件 /etc/network/interfaces中,默認(rèn)設(shè)置使用dhcp,內(nèi)容如下:
# The primary network interface
auto eth0
iface eth0 inet dhcp
設(shè)置靜態(tài)ip的方法如下:
(1)編輯 /etc/network/interfaces
1.1)將dhcp 一行屏蔽
# The primary network interface
auto eth0
#iface eth0 inet dhcp
1.2)添加和靜態(tài)ip有關(guān)的參數(shù)
# The primary network interface
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
(2)編輯 /etc/resolv.conf,設(shè)置dns
nameserver 202.96.134.133
nameserver 202.106.0.20
(3)執(zhí)行下面兩個(gè)命令,啟用新設(shè)置
$sudo ifdown eth0
$sudo ifup eth0
sudo gedit /etc/network/interfaces
auto dsl-provider 改成 #auto dsl-provider
此外還將所有跟dsl相關(guān)的語(yǔ)句注釋?zhuān)貑?,ok。
設(shè)置靜態(tài)ip的方法:
Ubuntu的網(wǎng)絡(luò)參數(shù)保存在文件 /etc/network/interfaces中,默認(rèn)設(shè)置使用dhcp,內(nèi)容如下:
# The primary network interface
auto eth0
iface eth0 inet dhcp
設(shè)置靜態(tài)ip的方法如下:
(1)編輯 /etc/network/interfaces
1.1)將dhcp 一行屏蔽
# The primary network interface
auto eth0
#iface eth0 inet dhcp
1.2)添加和靜態(tài)ip有關(guān)的參數(shù)
# The primary network interface
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
(2)編輯 /etc/resolv.conf,設(shè)置dns
nameserver 202.96.134.133
nameserver 202.106.0.20
(3)執(zhí)行下面兩個(gè)命令,啟用新設(shè)置
$sudo ifdown eth0
$sudo ifup eth0
相關(guān)文章
解決Linux中ROOT用戶刪除普通用戶報(bào)普通用戶已登錄問(wèn)題
今天在Linux某普通用戶上配置系統(tǒng),因?yàn)槲募`刪,我想刪除系統(tǒng)安裝文件,重新解壓安裝,但是考慮到該系統(tǒng)生成的配置文件可能會(huì)對(duì)后來(lái)的某些功能造成影響,因此便想刪除該普通用戶,在操作過(guò)程中遇到了好多問(wèn)題,下面小編給大家分享問(wèn)題描述及解決辦法,一起看看吧2017-03-03