LinuxSir.cn,穿越时空的Linuxsir!

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

刚刚装上gentoo,怎么配置也上不了网,能帮忙看一下么?谢谢!

[复制链接]
发表于 2007-9-30 21:16:21 | 显示全部楼层 |阅读模式
Gentoo LiveCD 2007.0无网络安装的

/etc/conf.d/net中的内容是:

iface_eth0=“192.168.1.250 broadcast 192.168.1.255 netmask 255.255.255.0”
gateway=“eth0/192.168.1.1”

/etc/resolv.conf中是:
nameserver 162.105.129.26
nameserver 162.105.129.27

然后net.eth0 stop
net.eth0 start 没有报错

但是ping 192.168.1.1返回
from 192.168.1.250 ...destnation....
(忘了具体内容了,待会补上)

ping www.baidu.com 直接没有反应(估计卡在域名解析那一步了)

lsmod 中有8139cp 和8139too


请问这是怎么回事?谢谢了!
发表于 2007-9-30 21:31:10 | 显示全部楼层
net.example里已经没有你那样子的表述了,请严格参照范本设置。
回复 支持 反对

使用道具 举报

发表于 2007-9-30 22:16:14 | 显示全部楼层
在/etc/profile中加入
ifconfig  eth0  192.168.1.250 netmask 255.255.255.0

route add  default gw 192.168.1.1
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-30 22:18:01 | 显示全部楼层
Post by midx
net.example里已经没有你那样子的表述了,请严格参照范本设置。



恩~谢谢!

我原来就是按照那个example修改的,也不行,刚才又去修改了一下

modules=( "ifconfig" )
config_eth0=( "192.168.1.250 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.1.1" )

然后几个命令返回如下:

joyan@JoyanGentoo ~ $ sudo /etc/init.d/net.eth0 start
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
* has a modification time in the future!
* Caching service dependencies ...                                                                                    [ ok ]
* Starting eth0
*   Bringing up eth0
*     192.168.1.250                                                                                                   [ ok ]
*   Adding routes
*     default via 192.168.1.1 ...                                                                                     [ ok ]



joyan@JoyanGentoo ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.250 icmp_seq=1 Destination Host Unreachable
From 192.168.1.250 icmp_seq=2 Destination Host Unreachable
From 192.168.1.250 icmp_seq=3 Destination Host Unreachable
From 192.168.1.250 icmp_seq=5 Destination Host Unreachable
From 192.168.1.250 icmp_seq=6 Destination Host Unreachable
From 192.168.1.250 icmp_seq=7 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6006ms
, pipe 3

joyan@JoyanGentoo ~ $ ping baidu.com
ping: unknown host baidu.com


joyan@JoyanGentoo ~ $ sudo ifconfig
eth0      Link encap:UNSPEC  HWaddr 00-40-CA-01-12-03-70-4A-00-00-00-00-00-00-00-00  
          inet addr:192.168.1.250  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:720 (720.0 b)

lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:921 (921.0 b)  TX bytes:921 (921.0 b)


joyan@JoyanGentoo ~ $ lsmod
Module                  Size  Used by
rtc                    12852  0
parport_pc             31844  0
parport                26440  1 parport_pc
8139cp                 20608  0
8139too                22912  0
mii                     7168  2 8139cp,8139too
pcspkr                  5888  0
i2c_sis96x              8068  0
i2c_core               15360  1 i2c_sis96x
snd_intel8x0           26780  0
snd_intel8x0m          15500  0
snd_ac97_codec         71712  2 snd_intel8x0,snd_intel8x0m
snd_ac97_bus            5376  1 snd_ac97_codec
snd_pcm                47364  3 snd_intel8x0,snd_intel8x0m,snd_ac97_codec
snd_timer              18180  1 snd_pcm
snd                    33764  5 snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm,snd_timer
snd_page_alloc         10248  3 snd_intel8x0,snd_intel8x0m,snd_pcm
yenta_socket           22412  0
rsrc_nonstatic         13056  1 yenta_socket
pcmcia_core            27156  2 yenta_socket,rsrc_nonstatic
eth1394                18308  0
sis_agp                 9604  1
agpgart                21972  1 sis_agp
tg3                    91652  0
e1000                  94656  0
nfs                    95164  0
lockd                  48392  1 nfs
sunrpc                110012  2 nfs,lockd
jfs                   147948  0
dm_mirror              19152  0
dm_mod                 40344  1 dm_mirror
pdc_adma               10500  0
sata_mv                17672  0
ata_piix               14600  0
ahci                   17796  0
sata_qstor             10756  0
sata_vsc                9988  0
sata_uli                9220  0
sata_sis                9732  0
sata_sx4               14084  0
sata_nv                11268  0
sata_via               11268  0
sata_svw                9348  0
sata_sil24             14852  0
sata_sil               11784  0
sata_promise           12292  0
libata                 67220  15 pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise
sbp2                   21380  0
ohci1394               30896  0
ieee1394               59576  3 eth1394,sbp2,ohci1394
sl811_hcd              13056  0
usbhid                 35936  0
ohci_hcd               18948  0
uhci_hcd               21128  0
usb_storage            62400  0
ehci_hcd               25736  0
usbcore                88452  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd



能帮忙再看看么?谢谢!~~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-30 22:18:44 | 显示全部楼层
Post by beyond1314
在/etc/profile中加入
ipconfig  eth0  192.168.1.250 netmask 255.255.255.0

route add  default gw 192.168.1.1



好的我试试去~
回复 支持 反对

使用道具 举报

发表于 2007-9-30 22:29:45 | 显示全部楼层
怀疑你的eth0是不是网卡,不会是1394吧?
  1. #dmesg | grep eth0
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-30 22:32:30 | 显示全部楼层
Post by beyond1314
在/etc/profile中加入
ipconfig  eth0  192.168.1.250 netmask 255.255.255.0

route add  default gw 192.168.1.1



ipconfig?我这里没有....我改成ifconfig了

然后试了试.....还是不行....原样
回复 支持 反对

使用道具 举报

发表于 2007-9-30 22:37:37 | 显示全部楼层
joyan@JoyanGentoo ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.250 icmp_seq=1 Destination Host Unreachable
From 192.168.1.250 icmp_seq=2 Destination Host Unreachable
From 192.168.1.250 icmp_seq=3 Destination Host Unreachable
From 192.168.1.250 icmp_seq=5 Destination Host Unreachable
From 192.168.1.250 icmp_seq=6 Destination Host Unreachable
From 192.168.1.250 icmp_seq=7 Destination Host Unreachable
网关设置的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-30 22:40:06 | 显示全部楼层
Post by Blahster
怀疑你的eth0是不是网卡,不会是1394吧?

  1. #dmesg | grep eth0
复制代码


试过了,好象是网卡~

eth0: RealTek RTL8139 at 0xceaee000, 00:40:ca:c3:66:79, IRQ 10
eth0:  Identified 8139 chip type 'RTL-8100B/8139D'
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-30 22:41:54 | 显示全部楼层
Post by beyond1314
joyan@JoyanGentoo ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.250 icmp_seq=1 Destination Host Unreachable
From 192.168.1.250 icmp_seq=2 Destination Host Unreachable
From 192.168.1.250 icmp_seq=3 Destination Host Unreachable
From 192.168.1.250 icmp_seq=5 Destination Host Unreachable
From 192.168.1.250 icmp_seq=6 Destination Host Unreachable
From 192.168.1.250 icmp_seq=7 Destination Host Unreachable
网关设置的问题



? 能说的具体一点么? 网关确实是192.168.1.1呀~~我现在在同一个机器xp下,
设置的网关就是192.168.1.1~~?
回复 支持 反对

使用道具 举报

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

本版积分规则

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