对不起啊,我实在不知道是哪些配置文件的问题,现在把我能想到的都贴出来,希望各位大哥不要嫌烦。
PS:网页打不开的问题已解决,(学校的网络问题),不过现在emerge 还是通不了。
下windows,直接上gentoo是这样:
- ZERO shidq # /etc/init.d/net.eth0 start
- * Starting eth0
- * Bringing up eth0
- * dhcp
- * Running dhcpcd ...
- Error, timed out waiting for a valid DHCP server response [ !! ]
复制代码
- shidq@ZERO ~ $ /sbin/ifconfig
- eth0 Link encap:Ethernet HWaddr 00:F0:4C:87:1E:39
- inet6 addr: fe80::2f0:4cff:fe87:1e39/64 Scope:Link
- UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:121 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:7655 (7.4 Kb) TX bytes:0 (0.0 b)
- Interrupt:225 Base address:0x2000
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:2 errors:0 dropped:0 overruns:0 frame:0
- TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)
复制代码
/etc/resolv.conf:
- # Generated by dhcpcd for interface eth0
- search shq3.fzu.edu.cn
- nameserver 210.34.48.34
- nameserver 202.101.98.55
复制代码
/etc/conf.d/net:
- # This blank configuration will automatically use DHCP for any net.*
- # scripts in /etc/init.d. To create a more complete configuration,
- # please review /etc/conf.d/net.example and save your configuration
- # in /etc/conf.d/net (this file :]!).
- moduls_eth0=( "nvnet" )
- #config_eth0=( "192.168.8.45" )
- #config_eth0=( "192.168.8.45 netmask 255.255.255.0" )
- config_eth0=( "dhcp" )
复制代码
/etc/conf.d/dhcp:
- # /etc/conf.d/dhcp: config file for /etc/init.d/dhcp
- # Configure which interface or interfaces to for dhcp to listen on
- # list all interfaces space separated. If this is not specified then
- # we listen on all interfaces.
- #IFACE=""
- # Insert any other dhcp options - see the man page for a full list.
- #DHCPD_OPTS=""
- # If you wish to run dhcp in a chroot, run:
- # ebuild /var/db/pkg/net-misc/<dhcp version>/<dhcp-version>.ebuild config
- # and un-comment the following line.
- # You can specify a different chroot directory but MAKE SURE it's empty.
- #CHROOT="/chroot/dhcp"
- # If you need name resolution under a chroot, you need to ensure that
- # you have a working /etc/resolv.conf in your chroot and you
- # uncomment the following:
- #export LD_PRELOAD="/usr/lib/libresolv.so /usr/lib/libnss_dns.so"
复制代码
从FC5回到gentoo是这样:
- ZERO shidq # /etc/init.d/net.eth0 start
- * Starting eth0
- * Bringing up eth0
- * dhcp
- * Running dhcpcd ... [ ok ] * eth0 received address 59.77.243.49
复制代码
- ZERO xgl-coffee # ifconfig
- eth0 Link encap:Ethernet HWaddr 00:F0:4C:87:1E:39
- inet addr:59.77.243.49 Bcast:59.77.243.255 Mask:255.255.255.0
- inet6 addr: fe80::2f0:4cff:fe87:1e39/64 Scope:Link
- UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:2953 errors:0 dropped:0 overruns:0 frame:0
- TX packets:630 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:481266 (469.9 Kb) TX bytes:108004 (105.4 Kb)
- Interrupt:225 Base address:0x2000
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:2 errors:0 dropped:0 overruns:0 frame:0
- TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)
复制代码
附件是我的/etc/init.d/net.eth0和/etc/init.d/dhcp |