LinuxSir.cn,穿越时空的Linuxsir!

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

archlinux静态ip地址连不了网.求高人指点

[复制链接]
发表于 2008-7-9 20:20:01 | 显示全部楼层 |阅读模式
问题是连不了网。

描述一下哈。。。

(1).锐捷认证成功

#ruijie
XRGSupplicant 1.1.1
Ruijie Network CopyRight 2004-2005
Please input your user name:
Please input your password:
Use DHCP,1-Use,0-UnUse(Default: 0):
Use default auth parameter,0-Use 1-UnUse(Default: 0):
Searching server...
Connecting server...
Authenticating...
7月1日起,为了招生工作的需要,夜间免费流量策略暂停。
Authenticate SUCCESSFULLY!
Please input 'unauth' to LogOff:xrgsu exit!

(2).ifconfig里有内容。

#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0BB:98:A0:5D  
          inet addr:10.92.6.19  Bcast:10.92.6.254  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:550 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:51704 (50.4 Kb)  TX bytes:2701 (2.6 Kb)
          Interrupt:11 Base address:0xec00
lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5376 (5.2 Kb)  TX bytes:5376 (5.2 Kb)

(3). 我的rc.conf配置文件

#less /etc/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/consoletrans
# 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=(slhc ac97_bus snd-mixer-oss snd-pcm-oss snd-seq-oss snd-seq-device snd-seq-midi-event snd-seq snd-page-alloc snd-pcm snd-rawmidi snd-timer snd snd-ac97-codec snd-ens1371 soundcore)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# ---------------
# NETWORKING
# ----------------
#
HOSTNAME="myhost"
#
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available
# interfaces.
#
# 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 10.92.6.19 netmask 255.255.255.0 broadcast 10.92.6.254"
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="default gw 10.92.6.254"
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 network netfs crond)

# End of file



(4). 我的/etc/resolv.conf里的内容。

#search <yourdomain.tld>
nameserver <202.206.32.1>
nameserver <202.206.32.2>

# End of file
#


(5). 我的/etc/hosts里的内容。

# /etc/hosts: static lookup table for host names
#

#<ip-address>        <hostname.domain.org>        <hostname>
127.0.0.1        myhost.domain.org        myhost
# End of file


(6).使用route命令时
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.92.6.0       *               255.255.255.0   U     0      0        0 eth0


补充一下,我用的静态ip.
当我ping 自己时,有返回。
当我ping 其他的地址时(DNS)都没返回,所以上不了网。怎么半啊?
发表于 2008-7-9 20:37:10 | 显示全部楼层
把 ROUTES=(!gateway) 上的 ! 去掉

然后执行
# /etc/rc.d/network restart

试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-9 20:46:27 | 显示全部楼层
试过了,执行#/etc/rc.d/network restart 时报错了.如下
:: Stopping Network    [BUSY]    [FAIL]
SIOCDELRT: No such process
:: Starting Network    [BUSY]    [FAIL]
SIOCADDRT: No such process
但是加上那个叹号就不报错.
怎么解决啊.我连xorg还没安上呢.同学们看我玩字符界面佩服的不行.哈哈.
我好象进入图形界面啊.
回复 支持 反对

使用道具 举报

发表于 2008-7-9 21:42:40 | 显示全部楼层
典型的dns解析不了的症状
resolve.conf格式错了,改成
#search <yourdomain.tld>
nameserver 202.206.32.1
nameserver 202.206.32.2

# End of file
#
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-9 22:48:19 | 显示全部楼层
是个明显的错误,见笑了,
改成这样
#search <yourdomain.tld>
nameserver 202.206.32.1
nameserver 202.206.32.2
还是不行啊.ping 什么都不通,显示
unkonw host
到底是哪里还有错啊.我就郁闷了....
回复 支持 反对

使用道具 举报

发表于 2008-7-9 23:20:57 | 显示全部楼层
其实已经很明显

eth0="eth0 10.92.6.19 netmask 255.255.255.0 broadcast 10.92.6.254"
这个就比较奇怪,按一般情况来说,广播地址broadcast应该是 10.92.6.255才对,怀疑楼主混淆了广播地址和网关的概念。

还有就是route命令反馈的信息表明没有正确设置10.92.6.254这个网关
将ROUTES=(!gateway)里面的惊叹号去掉,改为
ROUTES=(gateway)试试看

惊叹号去掉后/etc/rc.d/network restart 的报错怀疑就是广播地址和网关冲突的缘故。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-10 00:31:55 | 显示全部楼层
问题解决了,谢谢,真是高人,谢谢.
回复 支持 反对

使用道具 举报

发表于 2010-3-18 20:03:48 | 显示全部楼层
各位,我不是有意挖坟的。
可是…………
为什么我设置的跟这位兄弟一样,也是锐捷认证上但上不成网!而我在Ubuntu下却好好的
回复 支持 反对

使用道具 举报

发表于 2010-3-19 22:55:34 | 显示全部楼层
Post by coolsheep;2076246
各位,我不是有意挖坟的。
可是…………
为什么我设置的跟这位兄弟一样,也是锐捷认证上但上不成网!而我在Ubuntu下却好好的
ubuntu中配置文件都不一样好吧
回复 支持 反对

使用道具 举报

发表于 2010-3-20 00:22:05 | 显示全部楼层
试试看mentohust等其他锐捷,也比较方便
回复 支持 反对

使用道具 举报

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

本版积分规则

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