策略路由与前缀列表实验解析Word格式文档下载.docx

上传人:b****6 文档编号:19026040 上传时间:2023-01-03 格式:DOCX 页数:12 大小:250.35KB
下载 相关 举报
策略路由与前缀列表实验解析Word格式文档下载.docx_第1页
第1页 / 共12页
策略路由与前缀列表实验解析Word格式文档下载.docx_第2页
第2页 / 共12页
策略路由与前缀列表实验解析Word格式文档下载.docx_第3页
第3页 / 共12页
策略路由与前缀列表实验解析Word格式文档下载.docx_第4页
第4页 / 共12页
策略路由与前缀列表实验解析Word格式文档下载.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

策略路由与前缀列表实验解析Word格式文档下载.docx

《策略路由与前缀列表实验解析Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《策略路由与前缀列表实验解析Word格式文档下载.docx(12页珍藏版)》请在冰豆网上搜索。

策略路由与前缀列表实验解析Word格式文档下载.docx

R1(config)#interfaceserial1/1

R1(config-if)#ipaddress151.1.1.1255.255.255.0

R1(config)#routerrip

R1(config-router)#network192.1.1.0

R1(config-router)#network150.1.0.0

R1(config-router)#network151.1.0.0

R1(config-router)#exit

R2(config)#interfaces0/1

R2(config-if)#ipaddress150.1.1.2255.255.255.0

R2(config-if)#noshutdown

R2(config-if)#clockrate64000

R2(config-if)#exit

R2(config)#interfaces0/2

R2(config-if)#ipaddress151.1.1.2255.255.255.0

R2(config)#interfaceloopback0

R2(config-if)#ipaddress152.1.1.1255.255.255.0

R2(config)#routerrip

R2(config-router)#network150.1.0.0

R2(config-router)#network151.1.0.0

R2(config-router)#network152.1.0.0

R2(config)#dowr

R3(config)#interfacef1/0

R3(config-if)#ipaddress192.1.1.1255.255.255.0

R3(config-if)#ipaddress192.1.1.2255.255.255.0secondary

2.R1(config)#access-list1permit192.1.1.10.0.0.0

R1(config)#access-list2permit192.1.1.20.0.0.0

定义两台服务器的IP

R1(config)#route-maplab1permit10

R1(config-route-map)#matchipaddress1

R1(config-route-map)#setipnext-hop150.1.1.2

R1(config-route-map)#exit

RouteMap表lab1的第一条语句,服务器192.1.1.1的数据经过下一跳地址是150.1.1.2即s0/1发送,条件语句嵌套ACL1

R1(config)#route-maplab1permit20

R1(config-route-map)#matchipaddress2

R1(config-route-map)#setipnext-hop151.1.1.2

RouteMap表lab1的第二条语句,服务器192.1.1.2的数据经过下一跳地址是151.1.1.2即s0/2发送,条件语句嵌套ACL2

R1(config)#interfacef0/0

R1(config-if)#ippolicyroute-maplab1

在f0/0接口上应用名字是lab1的RouteMap表

R1(config)#iplocalpolicyroute-maplab1

要求路由器本身产生的数据包也接受策略路由的管理

2.测试

扩展的traceroute命令

R3#tracerouteip

TargetIPaddress:

152.1.1.1

Sourceaddress:

192.1.1.1

Numericdisplay[n]:

Timeoutinseconds[3]:

Probecount[3]:

MinimumTimetoLive[1]:

MaximumTimetoLive[30]:

PortNumber[33434]:

Loose,Strict,Record,Timestamp,Verbose[none]:

Typeescapesequencetoabort.

Tracingtherouteto152.1.1.1

1150.1.1.256msec*72msec

192.1.1.2

1151.1.1.256msec*52msec

另一种测试源IP地址的策略路由

使用debugippolicy命令来监视策略路由

R1#debugippolicy

Policyroutingdebuggingison

R3#ping

Protocol[ip]:

Repeatcount[5]:

Datagramsize[100]:

Timeoutinseconds[2]:

Extendedcommands[n]:

y

Sourceaddressorinterface:

Typeofservice[0]:

SetDFbitinIPheader?

[no]:

Validatereplydata?

Datapattern[0xABCD]:

Sweeprangeofsizes[n]:

Sending5,100-byteICMPEchosto152.1.1.1,timeoutis2seconds:

Packetsentwithasourceaddressof192.1.1.1

!

Successrateis100percent(5/5),round-tripmin/avg/max=4/51/128ms

这样路由器R1会输出debugippolicy监视所得的结果,截图

该命令显示定义的所有路由策略及路由策略匹配的情况。

R1#showroute-map查看定义的所有路由策略及路由策略匹配的情况

R1#showippolicy查看策略路由及作用的接口

实验任务二基于报文大小的策略路由(PBR)

实验拓扑同上

本实验设计如下:

在路由器R1的f0/0接口应用IP策略路由CCNP,使得对大小为64-100

字节的数据包设置出接口为s1/0;

大小为101-1000字节的数据包设置出接口为s1/1,

所有其它的数据包正常转发,整个网络运行EIGRP路由协议。

请自己按照实际拓扑的描述设计实验模拟拓扑

实验参考命令

步骤1:

先去掉上一个任务中R1的策略路由的相关配置

R1(config)#noiplocalpolicyroute-maplab1

R1(config-if)#noippolicyroute-maplab1

R1(config)#noroute-maplab1

R1(config)#noaccess-list1

R1(config)#noaccess-list2

步骤2:

配置路由器R1

R1(config)#route-mapCCNPpermit10

R1(config-route-map)#matchlength64100

R1(config-route-map)#setinterfaces1/0

R1(config)#route-mapCCNPpermit20

R1(config-route-map)#matchlength1011000

R1(config-route-map)#setinterfaces1/1

R1(config-if)#ippolicyroute-mapCCNP

R1(config)#routereigrp1

R1(config-router)#noauto-summary

R1(config-router)#network10.1.1.0255.255.255.0

R1(config-router)#network192.168.12.0

R1(config-router)#network192.168.21.0

实验调试

(1)执行扩展ping命令,数据包的长度为90,源地址为192.1.1.1(路由器R3的以太

口地址):

R3#ping

1

90

Typeescapesequencetoabort

.

路由器R1上显示调试信息,仔细分析其含义。

R1#debugippolicy

(2)执行扩展ping命令,数据包的长度为300,源地址为192.1.1.1

(3)执行扩展ping命令,数据包的长度为1200,源地址为192.1.1.1

(4)showroute-map该命令显示定义的所有路由策略及路由策略匹配的情况。

(5)showippolicy查看策略路由及作用的接口

 

实验任务三使用前缀列表实现下图所示功能。

路由器R1和R3环回接口的子网掩码都是24位。

实验内容及步骤

1.配置三台路由器的IP地址

2.配置路由协议

3.配置路由重分发

4.查看R1和R3路由表的信息,截图。

---------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------

5.在R2上配置前缀列表

ipprefix-listpfx1permit10.0.0.0/14ge24le24

ipprefix-listpfx2permit10.8.0.0/14ge32注:

OSPF是只识别32bit的子网掩码。

思考还有没有其它前缀列表匹配命令

6.在R2上配置路由映射表,引用前缀列表

route-mapinto_ospfpermit10

matchipaddressprefix-listpfx1

route-mapinto_rippermit10

matchipaddressprefix-listpfx2

7.在R2上进行重分发时调用路由映射表,进行路由过滤。

routerospf1

redistributeripsubnetsroute-mapinto_ospf

routerrip

redistributeospf1metric5route-mapinto_rip

8.查看R1和R3路由表的信息,截图。

9.在R2上查看前缀列表信息

showipprefix-list

showipprefix-listdetail

思考:

写出下面前缀列表匹配的命令,前缀列表名称自己拟定。

1.匹配所有路由

ipprefix-listxupermit0.0.0.0/0le32

2.匹配默认路由

ipprefix-listxupermit0.0.0.0/0

3.匹配默认路由外的所有路由

ipprefix-listxupermit0.0.0.0/0ge1

4.匹配所有主机路由

ipprefix-listxupermit0.0.0.0/0ge32

5.匹配A类地址

ipprefix-listxupermit0.0.0.0/1ge8le8

6.匹配B类地址

ipprefix-listxupermit128.0.0.0/2ge16le16

7.匹配C类地址

ipprefix-listxupermit192.0.0.0/3ge24le24

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1