|
|
我和室友用TP link r402的路由器共享上网
windows下无论dhcp还是静态ip都没有问题
用knoppix的livecd也可以正常dhcp,
但是gentoo无论dhcp还是静态ip就是不行!!
我的网卡是Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet NIC
gentoo下根据官方linux驱动将r8169换成r8168的mod,问题依旧
其他问题:
1).将hostname改为mytemple而非localhost,无效
2).重新emerge dhcpcd,无效
3).曾经成功起来过两次,但是大多数时候不行,现在一次也不行。
而且当时是把resolv.conf里的nameserver注释后重启,之后emerge需要手动去掉注释才能解析域名。
我的配置文件:
/etc/conf.d/net
#我设置为静态ip时用这两行,同样ip在windows下没问题
config_eth0=("192.168.1.102 netmask 255.255.255.0")
routes_eth0=("default via 192.168.1.1")
#我设置为动态dhcp用这两行
config_eth0=("dhcp")
dhcp_eth0="nodns nontp nonis"
/etc/resolv.conf
#这个似乎是之前的dhcp产生的
# Generated by dhcpcd for interface eth0
nameserver 202.98.96.68
nameserver 61.139.2.69
开机过程显示:
Starting eth0
Bringing up eth0
dhcp
Running dhcpcd ...
err,eth0: timed out
warn,eth0: using IPV4LL address 169.254.246.102
进系统后重新dhcpcd -d eth0显示:
info, eth0: dhcpcd 3.2.3 starting
info, eth0: hardware address = 00:1f:d0:83:b4:b8
info, eth0: DUID = 00:01:00:01:10:68:ba:31:00:1f:d0:83:b4:b8
info, eth0: broadcasting for a lease
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: waiting for 20 seconds
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
debug, eth0: sending DHCP_DISCOVER with xid 0x648912f8
info, eth0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-eth0.info'
debug, eth0: sending ARP probe #1
debug, eth0: sending ARP probe #2
debug, eth0: sending ARP probe #3
debug, eth0: sending ARP claim #1
debug, eth0: sending ARP claim #2
info, eth0: adding IP address 169.254.87.179/16
debug, eth0: no dns information to write
debug, eth0: forking to background
info, eth0: exiting
实在找不到原因了,请指教!
thanks! |
|