实验五策略路由.doc_第1页
实验五策略路由.doc_第2页
实验五策略路由.doc_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验五 策略路由实验名称:策略路由。实验目的:理解基于源IP地址的策略路由。技术原理:基于策略的路由,能够根据目的地址、协议类型、报文大小、应用、IP源地址或者其他策略来选择转发路径。当数据包经过路由器转发时,路由器根据预先设定的策略对数据包进行匹配,如果匹配到一条策略,就根据该条策略指定的路由进行转发;如果没有匹配到任何策略,就使用路由表中的各项根据目的地址对报文进行路由。实现功能:按照预先定义的策略路由转发。实验设备:R2501+一台,RSR20二台,R2600一台,S2126G一台,PC二台。实验拓朴:实验步骤:1. 配置路由器RSR20-2: routerenable /进入特权模式router# configure terminal /进入全局配置模式 router(config)# hostname RSR20-2RSR20-2(config)# interface fastethernet 0/0 /进入路由器的接口模式RSR20-2(config-if)# ip address 3.3.3.1 255.255.255.252 RSR20-2(config-if)# no shutdown /开启该端口 RSR20-2(config-if)# exit RSR20-2(config)# interface fastethernet 0/1 RSR20-2(config-if)# ip address 1.1.1.1 255.255.255.252RSR20-2(config-if)# no shutdown /开启该端口 RSR20-2(config-if)# exit RSR20-2(config)# router rip /开启RIP协议进程 RSR20-2(config-router)# network 1.1.1.0 /宣告直连网段信息 RSR20-2(config-router)# network 3.3.3.0 RSR20-2(config-router)# version 2 /开启RIP V2 RSR20-2(config-router)# no auto-summary /关闭路由信息的自动汇总功能2. 配置路由器R2501+: routerenable /进入特权模式。router# configure terminal /进入全局配置模式。 router(config)# hostname r2501+r2501+(config)# interface fastethernet 0/0 /进入路由器接口模式r2501+(config-if)# ip address 4.4.4.2 255.255.255.252 r2501+(config-if)# no shutdown /开启该端口 r2501+(config-if)# exit r2501+(config)# interface fastethernet 0/1 r2501+(config-if)# ip address 3.3.3.2 255.255.255.252r2501+(config-if)# no shutdown r2501+(config-if)# exitr2501+(config)# interface loopback 0r2501+(config-if)# ip address 10.1.1.1 255.255.255.0 r2501+(config-if)# exit r2501+(config)# router rip /开启RIP协议进程 r2501+(config-router)# network 4.4.4.0 /宣告直连网段信息 r2501+(config-router)# network 3.3.3.0 r2501+(config-router)# network 10.1.1.0 r2501+(config-router)# version 2 /开启RIP V2 r2501+(config-router)# no auto-summary /关闭路由信息的自动汇总功能3. 配置路由器RSR20-1: routerenable /进入特权模式。router# configure terminal /进入全局配置模式。 router(config)# hostname RSR20-1RSR20-1(config)# interface fastethernet 0/0 /进入路由器接口模式RSR20-1(config-if)# ip address 2.2.2.1 255.255.255.252 RSR20-1(config-if)# no shutdown /开启该端口 RSR20-1(config-if)# exit RSR20-1(config)# interface fastethernet 0/1 RSR20-1(config-if)# ip address 4.4.4.1 255.255.255.252RSR20-1(config-if)# no shutdown RSR20-1(config-if)# exit RSR20-1(config)# router rip /开启RIP协议进程 RSR20-1(config-router)# network 4.4.4.0 /宣告直连网段信息 RSR20-1(config-router)# network 2.2.2.0 RSR20-1(config-router)# version 2 /开启RIP V2 RSR20-1(config-router)# no auto-summary /关闭路由信息的自动汇总功能4. 配置路由器R2600: routerenable /进入特权模式router# configure terminal /进入全局配置模式 router(config)# hostname R2600R2600(config)# interface fastethernet 0/2 /进入路由器接口模式R2600(config-if)# ip address 1.1.1.2 255.255.255.252 R2600(config-if)# no shutdown /开启该端口 R2600(config-if)# exit R2600(config)# interface fastethernet 0/1 R2600(config-if)# ip address 2.2.2.2 255.255.255.252R2600(config-if)# no shutdown R2600(config-if)# exit R2600(config)# router rip /开启RIP协议进程 R2600(config-router)# network 1.1.1.0 /申明本设备的直连网段信息 R2600(config-router)# network 2.2.2.0 R2600(config-router)# network 192.168.1.0 R2600(config-router)# network 192.168.2.0 R2600(config-router)# version 2 /开启RIP V2 R2600(config-router)# no auto-summary 关闭路由信息的自动汇总功能 R2600(config-router)# exit R2600(config)# access-list 1 permit 192.168.1.0 0.0.0.255 /配置地址列表 R2600(config)# access-list 2 permit 192.168.2.0 0.0.0.255 /配置地址列表 R2600(config)# route-map test permit 10 /创建路由映射规则 R2600(config-route-map)# match ip address 1 /符合地址列表1 R2600(config-route-map)# set ip next-hop 1.1.1.1 /执行动作是送往1.1.1.1 R2600 (config-route-map)# exit R2600(config)# route-map test permit 20 R2600(config-route-map)# match ip address 2 /符合地址列表2 R2600(config-route-map)# set ip next-hop 2.2.2.1 /执行动作是送往2.2.2.1 R2600 (config-route-map)# exit R2600(config)# interface fastethernet 0/3R2600(config-if)# no shutdown /开启该端口,使端口转发数据。 R2600(config-if)# ip address 192.168.1.1 255.255.255.0 /配置各个网段的ip 地址 R2600(config-if)# ip address 192.168.2.1 255.255.255.0 secondaryR2600(config-if)# ip policy route-map test /应用之前定义的路由映射R2600(config-if)# exit5. 设置PC1的IP地址为:192.168.1.2/24,网关为:192.168.1.1;PC2的IP地址为:192.168.2.2/24,网关为:192.168

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论