Ubuntu拨号和路由切换(2)

使用如下命令启动 dhcpd

sudo /etc/init.d/dhcp restart
ps:/etc/init.d/dhcp {start|stop|restart|force-reload}
------------------------------------------------------
1.检查网络配置命令
$ ifconfig -a

2.配置DHCP客户端
$ sudo vi /etc/network/interfaces

加入下面这条配置命令后保存退出。

iface eth0 inet dhcp

3.重新启动networking服务,使新interfaces生效。

$ sudo /etc/init.d/networking restart

重新检查ifconfig,配置完成。

---------------------------------------------------------
本来一直用路由器连接上网的,
但昨天晚上一时兴起,
就按照wiki里的设置sudo pppoeconf设置拨号上网
然后今天起床时,发现上不了网了(路由器连接)
左上角网络连接标识为断开。。悲惨~~~

然后又使用拨号上网。。又是google、又是baidu、又在QQ群询问、又在irc求助、又在bbs发帖…………
折磨了一上午
最后好像是修改了/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider


然后再重新启动电脑就OK了。。
(其实我一早就修改了这个文件,但是只是log out,没有重启,悲惨~~~)

不过现在还有个问题就是那个网络管理小工具上还是显示无连接-。-||

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/27910.html