ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

基于协议类型的本地策略路由的配置实验

2014-4-19 22:08| 发布者: admin| 查看: 453| 评论: 0

摘要: 【拓扑及所用软件】 这次实验H3C模拟器,在华三的官网上可以免费下载到。 【组网的需求】 R1分别与R2,R3如上图直连,R2与R3路由不可达,通过策略路由控制从R1发出的报文,所有TCP报文均通过串口S0/6/0发送, ...

 【拓扑及所用软件】

 
这次实验H3C模拟器,在华三的官网上可以免费下载到。
 
【组网的需求】
 
R1分别与R2,R3如上图直连,R2与R3路由不可达,通过策略路由控制从R1发出的报文,所有TCP报文均通过串口S0/6/0发送,其他报文仍然按照查找路由表的方式进行转发。
 
【详细的配置命令】
 
R1:
#
acl number 3101
 rule 0 permit tcp
#
interface Serial0/6/0
 link-protocol ppp
 ip address 10.1.1.1 255.255.255.0
#
interface Serial0/6/1
 link-protocol ppp
 ip address 10.1.2.1 255.255.255.0
 
#
policy-based-route 123 permit node 5
   if-match acl 3101
   apply output-interface Serial0/6/0
 
R2:
 
 telnet server enable
 
interface Serial0/6/0
 link-protocol ppp
 ip address 10.1.1.2 255.255.255.0
#
 
user-interface con 0
user-interface vty 0 4
 authentication-mode none
 
R3:
#
 telnet server enable
 
#
interface Serial0/6/1
 link-protocol ppp
 ip address 10.1.2.2 255.255.255.0
 
#
user-interface con 0
user-interface vty 0 4
 authentication-mode none
【结果验证】
 
1、先从R1本地发出ICMP报文:
<R1>ping 10.1.1.2
  PING 10.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=10 ms
    Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=14 ms
    Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=25 ms
    Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=26 ms
    Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms
 
  --- 10.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/17/26 ms
 
<R1>ping 10.1.2.2
  PING 10.1.2.2: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 10.1.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 10.1.2.2: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 10.1.2.2: bytes=56 Sequence=4 ttl=255 time=10 ms
    Reply from 10.1.2.2: bytes=56 Sequence=5 ttl=255 time=10 ms
 
  --- 10.1.2.2 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 1/12/30 ms
以上信息显示ICMP报文正常转发,路由可达
 
2、再从R1本地发出TCP报文
 
<R1>tel
<R1>telnet 10.1.1.2
Trying 10.1.1.2 ...
Press CTRL+K to abort
Connected to 10.1.1.2 ...
******************************************************************************
* Copyright (c) 2004-2007 Hangzhou H3C Tech. Co., Ltd. All rights reserved.  *
* Without the owner's prior written consent,                                 *
* no decompiling or reverse-engineering shall be allowed.                    *
******************************************************************************
 
<R2>
<R2>
<R2>
<R2>
<R2>
<R2>
<R2>qu
The connection was closed by the remote host!
<R1>telnet 10.1.2.2
Trying 10.1.2.2 ...
Press CTRL+K to abort
Can't connect to the remote host!        不可达!!
<R1>
<R1>
<R1>
 
如上信息,从R1发出TCP报文(telnet)可以到R2,但是不能达R3  因为所有TCP报文都从S0/6/0发出,所以只能到达与S0/6/0直连的R2,不通到达R3。
不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-5-14 08:29 , Processed in 0.072230 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部