LinuxSir.cn,穿越时空的Linuxsir!

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

第一次装Arch,请问如何激活网卡,通过路由器上网?

[复制链接]
发表于 2006-11-4 11:43:19 | 显示全部楼层 |阅读模式
用了很久ubuntu,被Arch的简洁和轻便所着迷,今天第一次装Arch,有一些问题不解,请各位老鸟指导。
[我的安装情况]
我是通过CDROM,选择base安装的

[目前情况]
Arch系统成功启动,我是通过一个路由器共享上网的,但现在ping不通,网络连不上

[已知和解决问题有关的信息]
经lsmod命令探测出我的网卡的mod是via_rhine

[问题]
请问我还需要提供什么信息才能有助于你帮我诊断?
我怎么才能上网?
怎么把我的光盘当成我的软件库?好直接从光盘安装


谢谢!

[我的rc.conf]
#
# /etc/rc.conf - Main Configuration for Arch Linux

#

#
# -----------------------------------------------------------------------

# LOCALIZATION

# -----------------------------------------------------------------------

#
# LOCALE: available languages can be listed with the 'locale -a' command

# HARDWARECLOCK: set to "UTC" or "localtime"

# TIMEZONE: timezones are found in /usr/share/zoneinfo

# KEYMAP: keymaps are found in /usr/share/kbd/keymaps

# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)

# CONSOLEMAP: found in /usr/share/kbd/unimaps

# USECOLOR: use ANSI color sequences in startup messages

#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USEcolor="yes"


#
# -----------------------------------------------------------------------

# HARDWARE

# -----------------------------------------------------------------------

#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"

# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()

#
# Modules to load at boot-up (in this order)

#   - prefix a module with a ! to blacklist it

#
MODULES=(via_rhine)
# Scan for LVM volume groups at startup, required if you use
LVM
USELVM="no"


#
# -----------------------------------------------------------------------

# NETWORKING

# -----------------------------------------------------------------------

#
HOSTNAME="Hong"

#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES

#   - prefix an entry in INTERFACES with a ! to disable it

#   - no hyphens in your interface names - Bash doesn't like it

#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")

#
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo

eth0)

#
# Routes to start at boot-up (in this order)

# Declare each route then list in ROUTES

#   - prefix an entry in ROUTES with a ! to disable it

#
gateway="defaults gw 192.168.18.1"
ROUTES=(!gateway)

#
# Enable these network profiles at boot-up.  These are only useful

# if you happen to need multiple network configurations (ie, laptop users)

#   - set to 'menu' to present a menu during boot-up (dialog package required)

#   - prefix an entry with a ! to disable it

#
# Network profiles are found in /etc/network-profiles

#
#NET_PROFILES=(main)


#
# -----------------------------------------------------------------------

# DAEMONS

# -----------------------------------------------------------------------

#
# Daemons to start at boot-up (in this order)

#   - prefix a daemon with a ! to disable it

#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng !hotplug !pcmcia network

netfs crond)



# End of file
 楼主| 发表于 2006-11-4 13:04:34 | 显示全部楼层
查了一点资料,大概理出了一点头绪:
关于能否上网,有两点:1,是网卡驱动装了没有2,配置网络

现在请问如何知道我的网卡模块载入了没有?
还有象我这种通过路由器共享上网的如何配置网络?
回复 支持 反对

使用道具 举报

发表于 2006-11-4 13:11:58 | 显示全部楼层
我的配置 rc.conf
lo="lo 127.0.0.1"
eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-4 14:00:45 | 显示全部楼层
Post by tpxc
我的配置 rc.conf
lo="lo 127.0.0.1"
eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)

谢谢你的提示,我参考了你的配置弄了一下,ping 的时候显示
connetc:unreachable network


我运行了lshwd命令,显示有网卡,是不是已经载入了呢?
00:12.0 Ethernet controller: VIA Technologies|VT6102 [Rhine II 10/100] (via-rhine)

00:00.0 Host bridge: VIA Technologies Inc|CPU to PCI Bridge (via-agp)

00:01.0 PCI bridge: VIA Technologies Inc|PCI-to-PCI Bridge (AGP 2.0/3.0) (via-agp)

00:0f.0 IDE interface: VIA Technologies|VT82C586 IDE [Apollo] (snd_via82xx)

00:10.0 USB Controller: VIA Technologies|VT82C586B USB (uhci_hcd)

00:10.1 USB Controller: VIA Technologies|VT82C586B USB (uhci_hcd)

00:10.2 USB Controller: VIA Technologies|VT82C586B USB (uhci_hcd)

00:10.4 USB Controller: VIA Technologies Inc|VT8235 USB Enhanced Controller (ehci-hcd)

00:11.0 ISA bridge: VIA Technologies Inc|VT8237 PCI-to-ISA Bridge (i2c-viapro)
00:11.5 Multimedia audio controller: VIA Technologies, Inc.|L7VTA v1.0 Motherboard (KT400-8235) (snd-via82xx)


01:00.0 VGA compatible controller: VIA Technologies Inc|KM400 Graphics Adapter (vesa)

004:002 USB Vendor Specific Class: USB20 Camera     (unknown)

004:001 USB Hub: Virtual|Hub (hub)

003:001 USB Hub: Virtual|Hub (hub)

001:001 USB Hub: Virtual|Hub (hub)

002:001 USB Hub: Virtual|Hub (hub)
---:--- Mouse: Generic PS/2 Wheel Mouse [/dev/psaux] (msintellips/2)
回复 支持 反对

使用道具 举报

发表于 2006-11-4 15:48:26 | 显示全部楼层
sudo pppoe-setup   
sudo pppoe-start
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-4 18:00:40 | 显示全部楼层
Post by freethirsty
sudo pppoe-setup   
sudo pppoe-start

谢谢提醒,不过我想freethirsty兄可能没明白我的情况,我是通过路由器共享上网的
,不需要拨号连接了。现在的问题是不知我的网卡模块灾入了没有,详细情况可以看我上面贴出的信息。
回复 支持 反对

使用道具 举报

发表于 2006-11-4 18:12:25 | 显示全部楼层
MODULES=(!usbserial)
我这样可搞得8139或NF2集成那个什么VIA芯片的网卡。还有你的IP和网关现在是用指定方式(就是不用路由)
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
改为eth0="dhcp"(路由方式用)

其实路由方式下指定也上得。
看好你的IP和网关,DNS之类。
rc.conf
resolv.conf 设DNS
hosts 设主机名#与这里的主机名对应。HOSTNAME="Hong"
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-4 21:17:40 | 显示全部楼层
Post by freethirsty
sudo pppoe-setup   
sudo pppoe-start

谢谢,现在的问题是我的网卡没法激活,我在
/etc/rc.conf
中修改了
MOUDLES=(via_rhine)

结果都没效果,我还尝试在/etc/modprobe中增加这么一行
alias etho via_rhine

结果也是一样没用,哪位高手相指引一下
回复 支持 反对

使用道具 举报

发表于 2006-11-4 21:28:28 | 显示全部楼层
root用户,命令行执行
modprobe via_rhine
modprobe -l | grep via
回复 支持 反对

使用道具 举报

发表于 2006-11-4 23:28:01 | 显示全部楼层
gateway="defaults gw 192.168.18.1"
ROUTES=(!gateway)

改成这个样子 ROUTES=(gateway)
回复 支持 反对

使用道具 举报

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

本版积分规则

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