我的上网方式,路由器+pc.
pc里面的网络接口,我第一次写成
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
dns-server 114.114.114.114
发现无法上网,改写成
auto eth0
iface eth0 inet dhcp
netmask 255.255.255.0
dns-server 114.114.114.114
就可以了,请问,在pc接路由器的环境下,只能在pc机上设置为dhcp吗?
请告知理由。
interfaces只能是dhcp吗?
- vickycq
- 帖子: 4507
- 注册时间: 2011-03-20 13:12
- 系统: Debian
- 来自: 山东省寿光县
- 联系:
Re: interfaces只能是dhcp吗?
添加一条网关设置试试whaha 写了: auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
dns-server 114.114.114.114
发现无法上网
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
欢迎所有 Debian GNU/Linux 用户
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: interfaces只能是dhcp吗?
http://manpages.ubuntu.com/manpages/xen ... ces.5.html只能在pc机上设置为dhcp吗?
METHODS
Both inet and inet6 address family interfaces can use the following methods (However they are not required):
The loopback Method
This method may be used to define the loopback interface.
The static Method
This method may be used to define ethernet interfaces with statically allocated addresses.
The dhcp Method
This method may be used to obtain an address via DHCP.
-
- 帖子: 304
- 注册时间: 2011-01-02 12:31
Re: interfaces只能是dhcp吗?
你的静态配置里面 gateway 哪去了?whaha 写了:我的上网方式,路由器+pc.
pc里面的网络接口,我第一次写成
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
dns-server 114.114.114.114
发现无法上网,改写成
auto eth0
iface eth0 inet dhcp
netmask 255.255.255.0
dns-server 114.114.114.114
就可以了,请问,在pc接路由器的环境下,只能在pc机上设置为dhcp吗?
请告知理由。