routermap路由策略

上传人:新** 文档编号:513980797 上传时间:2022-09-09 格式:DOCX 页数:7 大小:38.28KB
返回 下载 相关 举报
routermap路由策略_第1页
第1页 / 共7页
routermap路由策略_第2页
第2页 / 共7页
routermap路由策略_第3页
第3页 / 共7页
routermap路由策略_第4页
第4页 / 共7页
routermap路由策略_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《routermap路由策略》由会员分享,可在线阅读,更多相关《routermap路由策略(7页珍藏版)》请在金锄头文库上搜索。

1、routermap路由策略router-map路由策略 一、策略路由简介 基于策略的路由允许应用一个策略控制数据包应如何走而非基于路由表选路。IP路由基于目标地,而PBR允许基于源的路由,即来自何处而应到哪去,从而根据需要走一条特殊的路径。 在网络中实施基于策略的路由有以下优点:1、基于源的供应商选择:通过策略路由使源于不同用户组的数据流选择经过不同的Internet连接。2、服务质量:可以通过在网络边缘路由器上设置IP数据包包头中的优先级或TOS值,并利用队列机制在网络核心或主干中为数据流划分不同的优先级,来为不同的数据流提供不同级别的QoS。3、负载均衡:网络管理员可以通过策略路由在多条路

2、径上分发数据流。4、网络管理更加灵活。 二、双出口配置实例 实验拓朴:实验要求:1、R1连接本地子网,R2为边缘策略路由器,R3模拟双ISP接入的Internet环境。2、要求R1所连接的局域网部分流量走R2-R3间上条链路,部分流量走R2-R3间下条链路从而实现基于源的供应商链路选择和网络负载均衡。 各路由器配置如下: R1配置: R1#sh run interface Loopback 0 /模拟第一个子网:192.168.1.0/24 ip address 192.168.1.1 255.255.255.0 /模拟子网中第一台主机 ip address 192.168.1.2 255.2

3、55.255.0 secondary /模拟子网中第二台主机 ! interface Loopback 2 192.168.2.0/24 ip address 192.168.2.1 255.255.255.0 ip address 192.168.2.2 255.255.255.0 secondary ! interface FastEthernet0/0 ip address 12.0.0.1 255.255.255.0 ! router rip version 2 network 192.168.1.0 network 192.168.1.0 network 12.0.0.0 no au

4、to-summary /模拟第二个子网:R3配置: R3#sh run interface Loopback 0 /模拟一个连接目标 ip address 100.100.100.100 255.255.255.0 ! interface Serial1/1 /模拟ISP1的接入端口 ip address 123.0.0.3 255.255.255.0 ! interface Serial1/3 /模拟ISP2的接入端口 ip address 223.0.0.3 255.255.255.0 ! router rip version 2 network 100.0.0.0 network 123

5、.0.0.0 network 223.0.0.0 no auto-summary ! R2的配置 : R2#sh run interface FastEthernet0/0 ip address 12.0.0.2 255.255.255.0 ip policy route-map isp-test /在接口上启用策略路由isp-test进行流量控制 ! interface Serial1/1 ip address 123.0.0.1 255.255.255.0 ! interface Serial1/3 ip address 223.0.0.1 255.255.255.0 router rip

6、 version 2 network 12.0.0.0 network 123.0.0.0 network 223.0.0.0 no auto-summary access-list 101 permit ip 192.168.1.0 0.0.0.255 host 100.100.100.100 /访问控制列表101,用于过滤原地址,允许子网192.168.1.0流量通过 */ access-list 102 permit ip 192.168.2.0 0.0.0.255 host 100.100.100.100 /访问控制列表102,用于过滤原地址,允许子网192.168.2.0流量通过 *

7、/ ! route-map isp-test permit 10 /定义route-map,取名为isp-test,序列为10 match ip address 101 /检查源地址,匹配acl 101 set ip default next-hop 123.0.0.3 /指定下一跳地址 ! route-map isp-test permit 20 /定义isp-test的第二条语句,序列号为20 match ip address 102 /检查源地下,匹配acl102 set ip default next-hop 223.0.0.3 ! route-map isp-test permit

8、30 /定义isp-test的第三条语句,序列号为30 set default interface Null0 /丢弃不匹配规定标准的包 -调试 R2#sh ip policy /显示应用的策略 Interface Route map Fa0/0 isp-acc R2#sh route-map isp-test /显示配置的路由映射图 route-map isp-test, permit, sequence 10 Match clauses: ip address (access-lists): 101 Set clauses: ip default next-hop 123.0.0.3 Po

9、licy routing matches: 0 packets, 0 bytes route-map isp-test, permit, sequence 20 Match clauses: ip address (access-lists): 102 Set clauses: ip default next-hop 223.0.0.3 Policy routing matches: 0 packets, 0 bytes route-map isp-test, permit, sequence 30 Match clauses: Set clauses: default interface N

10、ull0 Policy routing matches: 0 packets, 0 bytes = R1#traceroute /路由跟踪 Protocol ip: /ip流量 Target IP address: 100.100.100.100 /目标地 Source address: 192.168.1.1 /源地址为子网一的第一台主机 Numeric display n: Timeout in seconds 3: Probe count 3: Minimum Time to Live 1: Maximum Time to Live 30: Port Number 33434: Loos

11、e, Strict, Record, Timestamp, Verbosenone: Type escape sequence to abort. Tracing the route to 100.100.100.100 1 12.0.0.2 72 msec 216 msec 276 msec 2 123.0.0.3 288 msec 360 msec * /ISP1入口- R1# traceroute Protocol ip: Target IP address: 100.100.100.100 Source address: 192.168.1.2 /源地址为子网一的第二台主机 Numer

12、ic display n: Timeout in seconds 3: Probe count 3: Minimum Time to Live 1: Maximum Time to Live 30: Port Number 33434: Loose, Strict, Record, Timestamp, Verbosenone: Type escape sequence to abort. Tracing the route to 100.100.100.100 1 12.0.0.2 92 msec 188 msec 52 msec 2 123.0.0.3 416 msec 436 msec * /ISP1入口- R1#traceroute Protocol ip: Target IP address: 100.100.100.100 Source address: 192.168.2.1 /源地址为子网二的第一台主机 Numeric display n: Timeout in seconds 3: Probe count 3: Minimum Time to Live 1: Maximum Time to Live 30

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号