我以前在xp下使用网通pppoe上网。.后来添加了一台路由器,最近由于学习linux,为了查找资料方便,想要在.rhel5下.通过路由器上网。可是发现无论我怎么设置从始至终都是只能PING自己的IP还有路由器的ip.外贸
我在安装.rhel5的时候,设.置网络时选择的是dhcp外贸
这是我的网卡配置
[root@localhost ~]#. vim /etc/sysconfig/net.work-scripts/ifcfg-eth0 健康
# Silico.n Integrated Systems [SiS] 190 Ethernet Adap.ter--- 印刷
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=B7:54:00:0.0:00:00电影
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
我的dns
[root@.localhost ~]# vim /e.tc/resolv.conf 电子
; generated b.y /sbin/dhclient-.script 建材
search domain
nameserve.r 202.106.46.151.
nameser.ver 202.106.0.20 鲜花
[root@.localh.ost ~]# ifconfig(广告)
eth0 Link encap:.Ethernet. HWaddr B7:54:00:00:00:00 杀毒
inet addr:19.2.168.1.102 Bcast:1.92.168.1.255 Mask:255.255.255.0.
inet6 addr: fe80::b554:ff:fe00:.0/64 Scope:Lin.k 女人
UP BROADCAST RUNN.ING MULTICAST MTU:1500 Metri.c:1 外汇
. RX pa.ckets:219 errors:0 dropped:0 overruns:0 frame:0 女人
. TX packets:196 errors:0 d.ropped:0 overruns:0 carrier:0.
.collisions:0. txqueuelen:1000 杀毒
RX b.ytes:1.8125 (17.7 KiB) TX bytes:25270 (24.6 KiB).
Interrupt:50 Ba.se a.ddress:0xdead --- 印刷
lo. Link e.ncap:Local Loopback 学习
inet add.r:127.0.0.1 Mask:255.0..0.0健康
. inet6 addr: ::1/128 Scop.e:Host学习
UP LOOP.BACK RUNNING . MTU:16436 Metric:1 美容
. . RX packets:1795 errors:0 dropped:0 overruns:0 frame:0--- 印刷
TX pa.ckets:1795 error.s:0 dropped:0 overruns:0 carrier:0 美容
. coll.isions:0 txqueuelen:0 .
RX bytes:3099404 (2.9 MiB) TX bytes:30.99404 (.2.9 MiB).
添加路由的时候也是怎么也不对,IP地址无论写我的路由器的IP192。168。1。1还是我自己电脑的.ip 192。1.68。1。102(广告)
[root@localhost. ~]# r.oute add -net 192.168..1.1 netwark 255.255.255.0 dev eth0 女人
结果都是这样
Usage: inet_route [-vF] .del {-host|-net} Target[/prefix] [gw. Gw] [met.ric M] [[dev] If]电脑
in.et_route [-vF] add {-host|-net} Target[/prefix.] [gw Gw] [metric M] 汽车
[.netmask N] [mss Mss] [window .W] [irtt I]投资
[mod] [d.yn] [reinstate] [[dev] If.]域名
inet_rout.e [-vF] add {-host.|-net} Target[/prefix] [metric M] reject 乙肝
inet_route .[-FC.] flush NOT supported.
PING 我自己的路由器能通
[r..oot@localhost ~]# ping 192.168.1.1 健康
PING 19.2.168.1.1 (192.168.1.1) 56(84) bytes of data.. 鲜花
64 by.tes from 192.168.1..1: icmp_seq=1 ttl=64 time=2.32 ms( 游戏 )
64 bytes from 192.168..1.1: icmp._seq=2 ttl=64 time=0.528 ms 乙肝
64 bytes from 192.168.1.1: icmp_seq=3 t.tl=64. time=0.520 ms.
64 bytes from 192.168.1.1: icmp._seq=4 .ttl=64 time=0.510 ms 建材
[1]+ Stopped pi.n.g 192.168.1.1 杀毒
ping另外一台电脑也没问题
[
root@localho.st ~]# ping 192..168.1.101 鲜花
PING 192.168..1.101 (192.168.1.101) 56(84) b.ytes of data..
64 bytes from 192.168..1.101: icmp_seq=1 ttl=128. time=1.64 ms学习
64 byte.s from 192.168.1.10.1: icmp_seq=2 ttl=128 time=0.145 ms教育
64 byte.s from 192.168.1.101: icmp_seq=3 ttl=128 time=.0.143 ms--- 印刷
64 bytes from 19.2.168.1.101: icmp_seq=4 ttl=12.8 time=0.140 ms 建材
--- 192.168.1.101 ping s.tatistics --.- 女人
4 packets transm.itted, 4 received, 0% pack.et loss, time 3000ms.
rtt min/av.g/max/mdev = 0.140/0.519/1.649/0.652. ms.
ping自己也很顺利
[
root@l.ocalhost ~]# ping 192.1.68.1.102.
PING 1.92.168.1.102 (192.168..1.102) 56(84) bytes of data.健康
64 bytes from 192.168..1.102: icmp_seq=1 ttl=64. time=0.043 ms学习
64 bytes from 19.2.168.1.102: icmp_seq.=2 ttl=64 time=0.033 ms教育
64 bytes from 192.168.1.102: icmp_seq=3 .ttl=.64 time=0.033 ms虚拟主机
64 bytes .from 192.168.1.102: icmp_seq=4 tt.l=64 time=0.035 ms外贸
64 bytes from 192.168..1..102: icmp_seq=5 ttl=64 time=0.033 ms 乙肝
就是上不了网 http://upload.bbs.csuboy.com/Mon_1004/126_6734_726fe05f633fafa.gif[/img][成人用品]
我到底是哪个地方搞错了呢?