LinuxSir.cn,穿越时空的Linuxsir!

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

关于安装时设置网络

[复制链接]
发表于 2004-9-5 10:19:17 | 显示全部楼层 |阅读模式
使用LiveCD安装,在设置网络时卡住了
2.4的内核认不出我的网卡,于是改用SMP启动,认出了

首先ping不通
例:#ping -c 3 www.yahoo.com
ping:unknown host www.yahoo.com
于是#net-setup
选了1 USE DHCP to auto-detect my network settings
系统提示Type "ifconfig" to make sure
#ifconfig  《---注意以下与官方手册上显示的有所不同
lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1744 (1.7 Kb)  TX bytes:1744 (1.7 Kb)

再试#ifconfig eth0 〈〈---以下与官方手册上显示的有所不同
eth0      Link encap:Ethernet  HWaddr 00:B0:5C:A0:0F:51  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:3540 (3.4 Kb)
          Interrupt:5 Base address:0xe800
#dhcpcd eth0
再#ping -c 3 www.yahoo.com
错误同上,现在该怎么办?

PS:我是通过路由器上网的(NOT hub),路由器开了DHCP服务
详情看这里
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=137509
问题其实差不多,只要其中的一个系统解决了另一个就很好办了




:help
 楼主| 发表于 2004-9-5 16:09:28 | 显示全部楼层
我用已装好的gentoo(2。6。5)(stage3)设置网络


按照官方手册上所说的改
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly.  Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"


# For setting the default gateway
#
#gateway="eth0/192.168.0.1"

然后
#rc-update add net.eth0 default
重起后
*Bringing eth0 up...
*Failed to bring eth0 up
*ERRORroblem starting needed services "netmount" was not started
这时该怎么办?
 楼主| 发表于 2004-9-5 16:11:36 | 显示全部楼层
等等。我发现错误了
 楼主| 发表于 2004-9-5 17:02:27 | 显示全部楼层
忘了把这行注释掉了
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

注释掉后重新
#rc-update add net.eth0 default
重起后问题依旧:
*Bringing eth0 up...
*Failed to bring eth0 up
*ERRORroblem starting needed services "netmount" was not started
晕~~~~~

附:我的#rc-update show
            bootmisc | boot                  
             checkfs | boot                  
           checkroot | boot                  
               clock | boot                  
         consolefont | boot                  
         crypto-loop |                        
          domainname |      default           
                 gpm |      default           
              hdparm |                        
            hostname | boot                  
             keymaps | boot                  
               local |      default nonetwork
          localmount | boot                  
             modules | boot                  
            net.eth0 |      default           
              net.lo | boot                  
            netmount |      default           
                nscd |                        
             numlock |                        
           rmnologin | boot                  
              rsyncd |                        
              serial | boot                  
                sshd |                        
           syslog-ng |      default           
             urandom | boot                  
:help
发表于 2004-9-5 17:27:16 | 显示全部楼层
看来还是网卡驱动不对了
用livecd启动后lsmod 看看加载的模块有没有网卡的
然后编译内核 把网卡编译成模块
#modprobe 网卡模块
再ping 只要能解析地址就能上网的
或者用#links www.gentoo.org
 楼主| 发表于 2004-9-5 18:05:41 | 显示全部楼层
我的网卡驱动直接编在内核里,没编成模块,难道一定要编成模块吗?
驱动能认出我的网卡芯片为via-rhine,MAC为00-b0-5c-a0-0f-51(在加载服务前显示)
发表于 2004-9-5 18:07:15 | 显示全部楼层
用什么方式上网的?
如果是ADSL什么的,就不要用dhcp了
 楼主| 发表于 2004-9-5 18:19:05 | 显示全部楼层
ADSL的帐号设在路由器上(192.168.1.1),并开了DHCP服务
发表于 2004-9-5 18:23:31 | 显示全部楼层
#dhcpcd eth0以后再ifconfig看到什么?
 楼主| 发表于 2004-9-5 19:03:41 | 显示全部楼层
最初由 Raphael 发表
#dhcpcd eth0以后再ifconfig看到什么?


#dhcpcd eth0
#ifconfig
lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1848 (1.8 Kb)  TX bytes:1848 (1.8 Kb)
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:B0:5C:A0:0F:51  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:635 (635.0 b)  TX bytes:4720 (4.6 Kb)
          Interrupt:5 Base address:0x9000

还是老样子
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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