页面导航: 首页操作系统unix linux → 正文内容 取消pppoe自动拔号

ubuntu取消pppoe启动时自动拔号的设置方法

发布:dxy 字体:[增加 减小] 类型:转载
昨晚用pppoe拨号,今早回公司发现原先的dhcp设置不生效了,所以取消pppoe启动时自动拔号
解决方案:
sudo gedit /etc/network/interfaces
auto dsl-provider 改成 #auto dsl-provider
此外还将所有跟dsl相关的语句注释,重启,ok。
设置静态ip的方法:
Ubuntu的网络参数保存在文件 /etc/network/interfaces中,默认设置使用dhcp,内容如下:
# The primary network interface
auto eth0
iface eth0 inet dhcp
设置静态ip的方法如下:
(1)编辑 /etc/network/interfaces
1.1)将dhcp 一行屏蔽
# The primary network interface
auto eth0
#iface eth0 inet dhcp
1.2)添加和静态ip有关的参数
# 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,设置dns
nameserver 202.96.134.133
nameserver 202.106.0.20
(3)执行下面两个命令,启用新设置
$sudo ifdown eth0
$sudo ifup eth0
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行