论坛风格切换切换到宽版
  • 720阅读
  • 9回复

[问题求助]linux路由器实验中遇到的麻烦问题 [复制链接]

上一主题 下一主题
离线korey.
 
发帖
2026
C币
-235337
威望
391
贡献值
1
银元
-3
铜钱
4680
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
在下最近接.到老大的命令,要做一个linux路由器,系统版本是redhat9,我考虑了两个办法:1、使用纯linux做静态路由;2、用linux+zeb.ra做静态.路由。    健康
试验中我在机器上.接了4个网卡,但是只用了两个网卡做测试,一个是e.th0,一个是eth1,ifconfig分别是:          婚庆
[root@localhost root]# i..fconfig    健康
e.th0      Link encap:Ethernet  HWaddr 00:40:.05:45:20:05  [成人用品]
          inet addr:172.16.65.2.54  Bcast:172.16.65.25.5  Mask:255.255.255.0.
.         UP BROADCAST RUNNI.NG MULTICAST  MTU:1500  Metric:1域名
          RX pa.ckets:363437 errors.:0 dropped:0 overruns:0 frame:0虚拟主机
    .     . TX packets:4094 errors:0 dropped:0 overruns:0 carrier:0    外汇
          collisions.:.0 txqueuelen:100 虚拟主机
          RX bytes:22293822 (21.2 Mb)  .TX bytes:453958. (443.3 Kb)服务器
   .       I.nterrupt:9 Base address:0xc000              电子

eth1      Link encap:Ethern.et  HWaddr .00:40:05:42:11:92             建材
          inet addr:10.0.0.254.  Bcast:10.0..0.255  Mask:255.255.255.0健康
          UP BROADCAST MUL.TICAST.  MTU:1500  Metric:1           鲜花
     .     RX packets:48 errors:0 droppe.d:0 overruns:0 frame:0    外汇
          TX packets:414 errors:0 dropped:.0 overruns:0 c.arrier:0           建材
          collisi.ons:.0 txqueuelen:100 .
          RX bytes:4.286 (4.1 Kb)  TX bytes:22216 (2.1.6 Kb)--- 印刷
          Interrupt:5 Base addre.ss:0xc4.00              电子
1、纯linux静态路由:
显示路由表内容如下:
[root@localhost. roo.t]# route--------------彩票
K.ernel IP routing table--------------彩票
Destinat.ion     Gateway         Genmask   .      .Flags Metric Ref    Use Iface              乙肝
1.0.0.0.0        *               255.25.5.255.0   U     0    .  0        0 eth1           女人
172.16.65.0     *               255.255.255.0  . U     0.      0        0 eth0.外贸
172.1.6.0.0     . *               255.255.255.0   U .    0      0        0 eth2域名
172.16.1.0.      *               255.255.255.0   U     0      0      .  0 et.h3.
169.254.0.0     *       .        .255.255.0.0     U     0      0        .0 eth3外贸
127.0.0.0.       *               .255.0.0.0       U     0      0        0 lo           鲜花
defau.lt         1.0.0.0.1        0.0.0.0         .UG    0      0        0 eth1             电子

请各位达人帮忙看看这个配置有没有问题,实际实验中从172.16.65.54/24无法ping通10.0.0.1(10.0.0.1/24是ns-25的内网口.),麻烦各.位帮我看看问题出在哪.儿。--------------彩票
2、linux+ze.bra路由:.
考虑到我们的网络规模不是很大,.所以我没有启动bgp和ospf,只是在zebra里.配置了纯静态路由,showrun信息如下:投资
mi.sroute# sh run学习

C.urrent configuration:--- 印刷
!
hostna.me misroute学习
password mis
enable passw.ord mis教育
log file /var/log/zebra/.zebra..log域名
!
interface lo
!
interface eth0
d.escription interface to external. network 投资
ip. address 17.2.16.65.254/24             汽车
!
interface eth1
description. int.erface to internal network --------------彩票
ip. address 10.0.0.254/24学习
!
interface eth2
!
interface eth3
!
i.p route .10.0.0.0/24 172.16.65.0.
ip route. 172.16.65..0/24 10.0.0.0健康
!
!
line vty
!
end

sh int如下:
misr.oute# sh int教育
Interface lo
  index 1 metric 1 m.tu 16436 <U.P,LOOPBACK,RUNNING>;    外汇
  inet 127.0..0.1/8<性病>
    input packets 3357, bytes 213.313, dr.opped 0, multicast packets 0.
    .input errors 0, length 0, overrun 0., CRC 0, frame 0, fifo 0, missed 0--------------彩票
    .output packets. 3357, bytes 213313, dropped 0教育
    output errors 0, ..aborted 0, carrier 0, fifo 0, heartbeat 0, window 0--- 印刷
  .  collisions 0<性病>
Interface eth0
  Descrip.tion: interface to external network .    健康
. index 2 metric 1 mtu 1500 <UP.,BROADCAST,RUNNING,MULTICAST>;学习
  H.Wadd.r: 00:40:05:45:20:05            杀毒
  inet 172..16.65.254/24 broadcas.t 172.16.65.255外贸
    input pac.kets 542936, bytes 331.91449, dropped 0, multicast packets 0学习
    input errors 0, length .0, overrun 0, CRC 0, frame 0., fifo 0, missed 0    美容
    output packet.s 4389, b.ytes 479687, dropped 0外贸
    output errors 0, abo.rted 0, carrier 0., fifo 0, heartbeat 0, window 0.
    co.llisions 0              乙肝
Interface eth1
  Desc.ription: interface to int.ernal network 投资
  index 3 metric 1 mtu 1500 <UP,BROADCAST,MULTICA.ST.>;              乙肝
  HWaddr:. .00:40:05:42:11:92投资
  inet 10.0.0.254/24 broad.cast 10..0.0.255             汽车
    input. packets 48, bytes 42.86, dropped 0, multicast packets 0电脑
    input errors 0, length 0, overrun 0, CRC 0, frame 0., fifo 0, missed. 0             汽车
   . output packets 414, bytes 2221.6, dropped 0.
    output errors 0, ab.orted 0, carrier 0, fifo 0, heartbeat .0, window 0学习
  .  collisions 0    健康

不知道zebra是不是必.须启动bgpd或ospfd进程才能正常工作,还是我的这个配置有问题,麻烦各位指点一二,小弟已经为这问题痛苦了好多天了,离老大规定的交货日期也.越来越进,只.能求助这里的高手了,感激不尽!学习

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
发帖
2067
C币
-235797
威望
384
贡献值
1
银元
-2
铜钱
4645
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
哪位高手可以帮我看一下的?小弟感激不尽!!
补充一下:zebra的路由表如下:
misroute# sh ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       B - BGP, >; - selected route, * - FIB route

K>;* 0.0.0.0/0 via 10.0.0.1, eth1
S   10.0.0.0/24 [1/0] via 172.16.65.0, eth0
K * 10.0.0.0/24 is directly connected, eth1
C>;* 10.0.0.0/24 is directly connected, eth1
K * 127.0.0.0/8 is directly connected, lo
C>;* 127.0.0.0/8 is directly connected, lo
K>;* 169.254.0.0/16 is directly connected, eth3
K * 172.16.0.0/24 is directly connected, eth2
C>;* 172.16.0.0/24 is directly connected, eth2
K * 172.16.1.0/24 is directly connected, eth3
C>;* 172.16.1.0/24 is directly connected, eth3
S   172.16.65.0/24 [1/0] via 10.0.0.0, eth1
K * 172.16.65.0/24 is directly connected, eth0
C>;* 172.16.65.0/24 is directly connected, eth0


所有的物理连接均无问题。

离线ilxd.
发帖
2128
C币
-60197
威望
412
贡献值
1
银元
-1
铜钱
4904
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
试试从172.16.65.54 ping 10.0.0.254

离线cg678.
发帖
2019
C币
-60902
威望
330
贡献值
1
银元
-3
铜钱
4493
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
可以ping通,因为10.0.0.254和172.16.65.254是接在一个机器上。

发帖
1863
C币
-236116
威望
308
贡献值
1
银元
0
铜钱
4033
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-13
是172.16.65.54 不是172.16.65.254
应该是172.16.65.0/24上的另外一台机器吧。另外你要ns-25有返回,它的路由有指向你的linux上吗?

离线andyxie.
发帖
1978
C币
-140881
威望
354
贡献值
1
银元
0
铜钱
4450
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-13
没有这个必要吧?

发帖
2004
C币
-193467
威望
388
贡献值
1
银元
-1
铜钱
4541
人人网人气币
0
只看该作者 6楼 发表于: 2010-04-13
简单的结构如下:
172.16.65.65/24(windows PC)--------172.16.65.254/24(eth0)(eth1)10.0.0.254--------10.0.0.1/24(ns-25)

离线jiji134.
发帖
2135
C币
-236194
威望
372
贡献值
1
银元
-3
铜钱
4705
人人网人气币
0
只看该作者 7楼 发表于: 2010-04-13
我的意思是:如果从172.16.65.65/24(windows PC)能ping
(eth1)10.0.0.254的话说明linux的route是正确的。

离线dzbz.
发帖
2128
C币
-152321
威望
374
贡献值
1
银元
-4
铜钱
4710
人人网人气币
0
只看该作者 8楼 发表于: 2010-04-13
显示路由表内容如下:
[root@localhost root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
172.16.65.0 * 255.255.255.0 U 0 0 0 eth0
172.16.0.0 * 255.255.255.0 U 0 0 0 eth2
172.16.1.0 * 255.255.255.0 U 0 0 0 eth3
169.254.0.0 * 255.255.0.0 U 0 0 0 eth3
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth1

离线gjj3000gjj.
发帖
2013
C币
-140552
威望
393
贡献值
1
银元
-3
铜钱
4575
人人网人气币
0
只看该作者 9楼 发表于: 2010-04-13
求助···顶上来再说
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个