- 论坛徽章:
- 14
|
本帖最后由 royzs 于 2012-09-21 14:05 编辑
- # 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
- allow-hotplug eth0
- iface eth0 inet dhcp
- address 192.168.1.12
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- gateway 192.168.1.255
- dns-nameservers 219.141.136.10 202.106.0.20
复制代码 配置完这个IP之后- /etc/init.d/networking restart
复制代码 会提示一条警告,ifconfig能看到新配置的IP,但是上不了网
重启机器后IP就没有了,只剩下一个lo的IP,我查了很多资料,Debian就是这个配置IP的啊,到底是什么原因,我改成DHCP获取就正常了
已解决,gateway写错了 |
|