LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1463|回复: 19

在Gentoo下的几个网络问题

[复制链接]
发表于 2006-6-13 23:21:41 | 显示全部楼层 |阅读模式
一个是DHCP的问题,我从windows回到Gentoo下时,dhcpcd总是通过不了,一定要先回到FC5下DHCP一次,回到Gentoo下网络才通得了。

学校原来分配给我们的是192.168段的,最近换成59.77段的,说是教科网的。换IP后我在windows下几乎正常,在Linux下就只能进少数几个网站,比如google、baidu和学校的网站,Linuxsir上不来,yum通不了,emerge 也通不了,实在痛苦。

这两个问题请大家帮帮忙。



另,再问一下,Linux下有IE核心的浏览器吗?学校的查分系统需要IE核心的,这让我以后怎么删掉windows啊。
 楼主| 发表于 2006-6-14 22:25:34 | 显示全部楼层
不会没人回帖吧,如果哪里找得到的话麻烦告诉我,我搜不到啊,关键字出现太多了。
回复 支持 反对

使用道具 举报

发表于 2006-6-16 07:36:41 | 显示全部楼层
fc能行的gentoo没理由不行的,把配置文件都贴出来就有人回了。
linux下没IE
回复 支持 反对

使用道具 举报

发表于 2006-6-16 11:53:44 | 显示全部楼层
后一个不能上网站的问题,估计和MTU有关。你把MTU的值改小一点试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-16 12:14:59 | 显示全部楼层
对不起啊,我实在不知道是哪些配置文件的问题,现在把我能想到的都贴出来,希望各位大哥不要嫌烦。

PS:网页打不开的问题已解决,(学校的网络问题),不过现在emerge 还是通不了。

下windows,直接上gentoo是这样:

  1. ZERO shidq # /etc/init.d/net.eth0 start
  2. * Starting eth0
  3. *   Bringing up eth0
  4. *     dhcp
  5. *       Running dhcpcd ...
  6. Error, timed out waiting for a valid DHCP server response                 [ !! ]
复制代码


  1. shidq@ZERO ~ $ /sbin/ifconfig
  2. eth0      Link encap:Ethernet  HWaddr 00:F0:4C:87:1E:39
  3.           inet6 addr: fe80::2f0:4cff:fe87:1e39/64 Scope:Link
  4.           UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
  5.           RX packets:121 errors:0 dropped:0 overruns:0 frame:0
  6.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  7.           collisions:0 txqueuelen:1000
  8.           RX bytes:7655 (7.4 Kb)  TX bytes:0 (0.0 b)
  9.           Interrupt:225 Base address:0x2000

  10. lo        Link encap:Local Loopback
  11.           inet addr:127.0.0.1  Mask:255.0.0.0
  12.           inet6 addr: ::1/128 Scope:Host
  13.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  14.           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
  15.           TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
  16.           collisions:0 txqueuelen:0
  17.           RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)
复制代码


/etc/resolv.conf:
  1. # Generated by dhcpcd for interface eth0
  2. search shq3.fzu.edu.cn
  3. nameserver 210.34.48.34
  4. nameserver 202.101.98.55
复制代码


/etc/conf.d/net:
  1. # This blank configuration will automatically use DHCP for any net.*
  2. # scripts in /etc/init.d.  To create a more complete configuration,
  3. # please review /etc/conf.d/net.example and save your configuration
  4. # in /etc/conf.d/net (this file :]!).
  5. moduls_eth0=( "nvnet" )
  6. #config_eth0=( "192.168.8.45" )
  7. #config_eth0=( "192.168.8.45 netmask 255.255.255.0" )
  8. config_eth0=( "dhcp" )
复制代码


/etc/conf.d/dhcp:
  1. # /etc/conf.d/dhcp: config file for /etc/init.d/dhcp

  2. # Configure which interface or interfaces to for dhcp to listen on
  3. # list all interfaces space separated. If this is not specified then
  4. # we listen on all interfaces.
  5. #IFACE=""

  6. # Insert any other dhcp options - see the man page for a full list.
  7. #DHCPD_OPTS=""


  8. # If you wish to run dhcp in a chroot, run:
  9. # ebuild /var/db/pkg/net-misc/<dhcp version>/<dhcp-version>.ebuild config
  10. # and un-comment the following line.
  11. # You can specify a different chroot directory but MAKE SURE it's empty.
  12. #CHROOT="/chroot/dhcp"

  13. # If you need name resolution under a chroot, you need to ensure that
  14. # you have a working /etc/resolv.conf in your chroot and you
  15. # uncomment the following:
  16. #export LD_PRELOAD="/usr/lib/libresolv.so /usr/lib/libnss_dns.so"
复制代码


从FC5回到gentoo是这样:
  1. ZERO shidq # /etc/init.d/net.eth0 start
  2. * Starting eth0
  3. *   Bringing up eth0
  4. *     dhcp
  5. *       Running dhcpcd ...                                               [ ok ] *       eth0 received address 59.77.243.49
复制代码

  1. ZERO xgl-coffee # ifconfig
  2. eth0      Link encap:Ethernet  HWaddr 00:F0:4C:87:1E:39
  3.           inet addr:59.77.243.49  Bcast:59.77.243.255  Mask:255.255.255.0
  4.           inet6 addr: fe80::2f0:4cff:fe87:1e39/64 Scope:Link
  5.           UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
  6.           RX packets:2953 errors:0 dropped:0 overruns:0 frame:0
  7.           TX packets:630 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1000
  9.           RX bytes:481266 (469.9 Kb)  TX bytes:108004 (105.4 Kb)
  10.           Interrupt:225 Base address:0x2000

  11. lo        Link encap:Local Loopback
  12.           inet addr:127.0.0.1  Mask:255.0.0.0
  13.           inet6 addr: ::1/128 Scope:Host
  14.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  15.           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
  16.           TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
  17.           collisions:0 txqueuelen:0
  18.           RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)
复制代码


附件是我的/etc/init.d/net.eth0和/etc/init.d/dhcp

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2006-6-16 14:48:39 | 显示全部楼层
如果你觉得有必要用windows就不要删
你用的是哪个镜像,注意置顶有国内镜像
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-16 16:15:33 | 显示全部楼层
我用的是默认的,速度算快了,难道现在不行了?
我换下试试。
回复 支持 反对

使用道具 举报

发表于 2006-6-17 23:15:16 | 显示全部楼层
你本机没起DHCP服务吧,本机是没必要起DHCP服务的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-18 16:59:09 | 显示全部楼层
当然,我是直接

#emerge dhcpcd
#rc-update add dhcp default
回复 支持 反对

使用道具 举报

发表于 2006-6-19 06:41:11 | 显示全部楼层
dhcp 是dhcp服务,应该停掉。我推测你的机器在激活网卡时,找DHCP服务器时先找到自己了,但自己并没有相关信息,得不到合法IP,最后超时。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表