LinuxSir.cn,穿越时空的Linuxsir!

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

关于slackware9.1下通过路由器上网

[复制链接]
发表于 2004-9-4 16:50:54 | 显示全部楼层 |阅读模式
路由器IP:192.168.1.1,开了DHCP服务

我的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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

root@darkstar:~# hostname
darkstar
root@darkstar:~# dnsdomainname
example.net

在win2000下一开机就能上网
C:\>ipconfig

Windows 2000 IP Configuration

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . : domain
IP Address. . . . . . . . . . . . : 192.168.1.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

linux下无法打开网页,无法ping通路由器和我自己的机器,这是什么原因?我启动时看到加载了eth0为via-rhine(我的网卡)

我该如何设置?

:help
发表于 2004-9-4 17:03:36 | 显示全部楼层
netconfig时有没有指定使用dhcp?
有没有安装dhcpcd-1.3.22pl4-i386-1.tgz这个包?启动的时候有没有让它自动从dhcp服务器获取ip地址?
 楼主| 发表于 2004-9-4 18:42:54 | 显示全部楼层
我刚才去设了一下netconfig,选了dhcp的那一项,然后
root@aaaaa:~# dhcpcd eth0
root@aaaaa:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:B0:5C:A0:0F:51
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1363 (1.3 Kb)  TX bytes:3540 (3.4 Kb)
          Interrupt:5 Base address:0xe800

root@aaaaa:~# 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:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2400 (2.3 Kb)  TX bytes:2400 (2.3 Kb)
进系统时多了一行dhcpcd[132]:broadcasting DHCP-DISCOVER
但还是打不开网页
郁闷
发表于 2004-9-4 20:22:57 | 显示全部楼层
不如不要 DHCP ,自己指定 IP 吧
 楼主| 发表于 2004-9-4 20:46:00 | 显示全部楼层
最初由 jhuangjiahua 发表
不如不要 DHCP ,自己指定 IP 吧

路由器不是我一个人用的,还有三个人一起在共享,他们(winxp用户)喜欢一开机就连上网
 楼主| 发表于 2004-9-4 21:10:06 | 显示全部楼层
晕~~~~~
我把路由器的防火墙关了,冲击波来了(我win2000没装防火墙)。。。lsass.exe出错,离关机还有。。。
各位快带我脱离win的苦难吧
 楼主| 发表于 2004-9-4 21:26:49 | 显示全部楼层
状态码为128系统现在关机。。。
 楼主| 发表于 2004-9-4 21:35:09 | 显示全部楼层
还有,我2000下的主机名叫school-db0d29d0,slk下叫aaaaa,但是我进入slk后,路由器用户列表上的主机名还是叫school-db0d29d0,不过两个系统下的MAC地址是一样的,都是00-b0-5c-a0-0f-51

:help :help :help
发表于 2004-9-4 21:57:51 | 显示全部楼层
看来你没有从dhcp服务器得到ip地址。你 man dhcpcd 看看用法应该是怎样的,我从 /etc/rc.d/rc.inet1 里面看到的用法是:
dhcpcd -t 10 -d eth0
 楼主| 发表于 2004-9-4 23:17:35 | 显示全部楼层
我的/etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="school-db0d29d0"

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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