ubuntu系统网络连接两分钟左右就中断
(1)这是ifconfig的内容
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:1350 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:1350 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:143006 (143.0 KB) 发送字节:143006 (143.0 KB)
wlan0 Link encap:以太网 硬件地址 2c:33:7a:19:a1:81
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:3854 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:2587 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:964471 (964.4 KB) 发送字节:439527 (439.5 KB)
(2)这是interfaces的静态设置(连接的是学校的校园网)
interfaces(5) file used by ifup(8) and ifdown(8)
#lo接口在系统启动时会自动被配置
auto lo
#将lo设置为本地环回接口
iface lo inet loopback
#the primary network interface
#eth0(以太网接口)在系统启动时会被自动配置
auto etho
#将eth0设置为动态ip配置
iface eth0 inet static
address 10.11.184.152
netmask 255.255.224.0
gateway 10.11.191.254
(3)将ip设置为动态ip
interfaces(5) file used by ifup(8) and ifdown(8)
#lo接口在系统启动时会自动被配置
auto lo
#将lo设置为本地环回接口
iface lo inet loopback
#the primary network interface
#eth0(以太网接口)在系统启动时会被自动配置
auto etho
#将eth0设置为动态ip配置
iface eth0 inet dhcp