策略路由双出口配置实例典型案例gns3

上传人:ji****n 文档编号:45693835 上传时间:2018-06-18 格式:DOC 页数:3 大小:95.50KB
返回 下载 相关 举报
策略路由双出口配置实例典型案例gns3_第1页
第1页 / 共3页
策略路由双出口配置实例典型案例gns3_第2页
第2页 / 共3页
策略路由双出口配置实例典型案例gns3_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《策略路由双出口配置实例典型案例gns3》由会员分享,可在线阅读,更多相关《策略路由双出口配置实例典型案例gns3(3页珍藏版)》请在金锄头文库上搜索。

1、策略路由双出口配置策略路由双出口配置实验要求: 1、R1 连接本地子网,R2 为边缘策略路由器,R3 模拟双 ISP 接入的 Internet 环境。 2、要求 R1 所连接的局域网部分流量走 R2-R3 间上条链路(ISP1 链路),部分流量走 R2-R3 间下条链路 (ISP2 链路)从而实现基于源的供应商链路选择和网络负载均衡。 各路由器配置如下: R1(config)#int lo0 /模拟子网一:192.168.1.0/24 R1(config-if)#ip add 192.168.1.1 255.255.255.0 /模拟子网中第一台主机 R1(config-if)#ip add

2、192.168.1.2 255.255.255.0 secondary /模拟子网中第二台主机 R1(config-if)#int lo1 R1(config-if)#ip add 192.168.2.1 255.255.255.0 R1(config-if)#ip add 192.168.2.2 255.255.255.0 secondary R1(config-if)#int f0/0 R1(config-if)#ip add 12.0.0.1 255.255.255.0 R1(config-if)#no shut R1(config-if)#exit R1(config)#router

3、rip R2(config-router)#version 2 R1(config-router)#net 192.168.1.0 R1(config-router)#net 192.168.2.0 R1(config-router)#net 12.0.0.0 策略路由器 R2 的配置 R2(config)#int f0/0 R2(config-if)#ip add 12.0.0.2 255.255.255.0 R2(config-if)#no shut R2(config-if)#int s1/1 R2(config-if)#ip add 123.0.0.1 255.255.255.0 R2

4、(config-if)#no shut R2(config-if)#int s1/3 R2(config-if)#ip add 223.0.0.1 255.255.255.0 R2(config-if)#no shut R2(config-if)#exit R2(config)#router rip R2(config-router)#version 2 R2(config-router)#net 12.0.0.0 R2(config-router)#net 123.0.0.0 R2(config-router)#net 223.0.0.0 R2(config-router)#no au R2

5、(config)#access-list 101 per ip 192.168.1.0 0.0.0.255 host 100.100.100.100 R2(config)#access-list 102 per ip 192.168.2.0 0.0.0.255 host 100.100.100.100 R2(config)#route-map isp-test permit 10 /定义 route-map,取名为 isp-test,序列为 10 R2(config-route-map)#match ip address 101 /检查源地址,匹配 acl 101R2(config-route

6、-map)#set ip default next-hop 123.0.0.3 /指定下一跳地址 R2(config)#route-map isp-test per 20 /定义 isp-test 的第二条语句,序列号为 20 R2(config-route-map)#match ip address 102 /检查源地下,匹配 acl102 R2(config-route-map)#set ip default next 223.0.0.3 R2(config-route-map)#exit R2(config)#route-map isp-test per 30 /定义 isp-test

7、的第三条语句,序列号为 30 R2(config-route-map)#set default interface null 0 /丢弃不匹配规定标准的包 R2(config-route-map)#exit R2(config)#int f0/0 R2(config-if)#ip policy route-map isp-test /在接口上启用策略路由 isp-test 进行流量控制 R3(config)#int lo0 /模拟一个连接目标 R3(config-if)#ip add 100.100.100.100 255.255.255.0 R3(config-if)#no shut R3(

8、config-if)#int s1/1 /模拟 ISP1 的接入端口 R3(config-if)#ip add 123.0.0.3 255.255.255.0 R3(config-if)#no shut R3(config-if)#int s1/3 /模拟 ISP2 的接入端口 R3(config-if)#ip add 223.0.0.3 255.255.255.0 R3(config-if)#no shut R3(config-if)#exit R3(config)#router rip R3(config-router)#ver 2 R3(config-router)#net 100.10

9、0.100.0 R3(config-router)#net 123.0.0.0 R3(config-router)#net 223.0.0.0 R3(config-router)#no au调试调试R2#sh ip policy /显示应用的策略R2#sh route-map isp-test /显示配置的路由映射图R1#traceroute /路由跟踪Protocol ip: /ip 流量Target IP address: 100.100.100.100 /目标地址Source address: 192.168.1.1 /源地址为子网一的第一台主机Type escape sequence

10、to abort.Tracing the route to 100.100.100.1001 12.0.0.2 72 msec 216 msec 276 msec2 123.0.0.3 288 msec 360 msec * /ISP1 入口-R1# tracerouteProtocol ip:Target IP address: 100.100.100.100Source address: 192.168.1.2 /源地址为子网一的第二台主机Type escape sequence to abort.Tracing the route to 100.100.100.1001 12.0.0.2

11、 92 msec 188 msec 52 msec2 123.0.0.3 416 msec 436 msec * /ISP1 入口-R1#tracerouteProtocol ip:Target IP address: 100.100.100.100Source address: 192.168.2.1 /源地址为子网二的第一台主机 Type escape sequence to abort.Tracing the route to 100.100.100.1001 12.0.0.2 136 msec 40 msec 144 msec2 223.0.0.3 356 msec * 132 mse

12、c /ISP2 入口-R1#tracerouteProtocol ip:Target IP address: 100.100.100.100Source address: 192.168.2.2 /源地址为子网二中第二台主机Type escape sequence to abort.Tracing the route to 100.100.100.1001 12.0.0.2 28 msec 104 msec 200 msec2 223.0.0.3 300 msec * 196 msec /ISP2 入口通过以上实验,可以看到子网一(192.168.1.0/24)的流量都经过 R2-R3 的上一

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

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

当前位置:首页 > 中学教育 > 初中教育

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