已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
set ip next-hop多链路负载均衡实验目的:R1做为边界路由,通过s1/1、s1/2两个接口链接到远程路由R2。在R1上做路由策略,实现来自vlan10的流量走s1/1接口的链路,vlan20的流量走s1/2接口的链路。实验环境:GNS3 1.0三层交换机 :i86bi-linux-l2-adventerprisek9-15.1a路由器:i86bi-linux-l3-adventerprisek9-15.4.1TPC:vpcs实验步骤:1、配置三层交换机,划分3个vlan,建立对应的vlan网关,并创建默认路由指向 192.168.4.253(R3的e0/0)S3(config)#vlan 10 S3(config-vlan)#name vlan10S3(config-vlan)#vlan 20S3(config-vlan)#name vlan20S3(config-vlan)#vlan 30S3(config-vlan)#name vlan30S3(config-vlan)#exitS3(config)#interface e0/1 S3(config-if)#switchport mode accessS3(config-if)#switchport access vlan 10S3(config-if)#no shS3(config-if)#interface e0/2S3(config-if)#switchport mode accessS3(config-if)#switchport access vlan 20S3(config-if)#no shS3(config-if)#interface e0/3S3(config-if)#switchport mode accessS3(config-if)#switchport access vlan 30S3(config-if)#no shS3(config-if)#exitS3(config)#interface vlan 10 S3(config-if)#ip address 192.168.1.254 255.255.255.0S3(config-if)#no shS3(config-if)#interface vlan 20 S3(config-if)#ip address 192.168.2.254 255.255.255.0S3(config-if)#no shS3(config-if)#interface vlan 30 S3(config-if)#ip address 192.168.3.254 255.2 55.255.0S3(config-if)#no shS3(config-if)#exitS3(config)#S3(config)#interface e0/0S3(config-if)#no switchport S3(config-if)#ip address 192.168.4.254 255.255.255.0S3(config-if)#exitS3(config)#S3(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.253 2、配置路由器。R1、R2通过两根串口线相连,启用OSPF。R1上对192.168.1.0 、192.168.2.0、 192.168.3.0三个网段创建静态路由,指向192.168.4.254 (S3的e 0/0)R1(config)#interface e0/0R1(config-if)#ip address 192.168.4.253 255.255.255.0R1(config-if)#interface s1/1R1(config-if)#ip address 192.168.5.1 255.255.255.0R1(config-if)#clock rate 2000000R1(config-if)#interface s1/2R1(config-if)#ip address 12.1.1.1 255.255.255.0R1(config-if)#clock rate64000R1(config-if)#router ospf 1R1(config-router)#network 192.168.4.0 0.0.0.255 area 0R1(config-router)#network 192.168.5.0 0.0.0.255 area 0R1(config-router)#network 12.1.1.0 0.0.0.255 area 0R1(config-router)#exitR1(config)#ip forward-protocol ndR1(config)#ip route 192.168.1.0 255.255.255.0 192.168.4.254R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.4.254R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.4.254R1(config)#router ospf 1R1(config-router)#redistribute static subnets /重发布静态路由R2(config)#interface e0/0R2(config-if)#ip address 24.1.1.254 255.255.255.0R2(config-if)#interface s1/1R2(config-if)#ip address 192.168.5.254 255.255.255.0R2(config-if)#clock rate2000000R2(config-if)#interface s1/2R2(config-if)#ip address 12.1.1.254 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#exitR2(config)#R2(config)#router ospf 1R2(config-router)#network 192.168.5.0 0.0.0.255 area 0R2(config-router)#network 12.1.1.0 0.0.0.255 area 0R2(config-router)#network 24.1.1.0 0.0.0.255 area 0R2(config-router)#exit3、验证配置R1#show ip routeGateway of last resort is not set12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 12.1.1.0/24 is directly connected, Serial1/2L 12.1.1.1/32 is directly connected, Serial1/224.0.0.0/24 is subnetted, 1 subnetsO 24.1.1.0 110/74 via 192.168.5.254, 02:28:25, Serial1/1110/74 via 12.1.1.254, 02:25:44, Serial1/2S 192.168.1.0/24 1/0 via 192.168.4.254S 192.168.2.0/24 1/0 via 192.168.4.254S 192.168.3.0/24 1/0 via 192.168.4.254192.168.4.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.4.0/24 is directly connected, Ethernet0/0L 192.168.4.253/32 is directly connected, Ethernet0/0192.168.5.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.5.0/24 is directly connected, Serial1/1L 192.168.5.1/32 is directly connected, Serial1/1R2#show ip routeCodes: L local, C connected, S static, R RIP, M mobile, B BGPGateway of last resort is not set12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 12.1.1.0/24 is directly connected, Serial1/2L 12.1.1.254/32 is directly connected, Serial1/224.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 24.1.1.0/24 is directly connected, Ethernet0/0L 24.1.1.254/32 is directly connected, Ethernet0/0O 192.168.4.0/24 110/74 via 192.168.5.1, 00:04:35, Serial1/1110/74 via 12.1.1.1, 00:01:55, Serial1/2192.168.5.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.5.0/24 is directly connected, Serial1/1L 192.168.5.254/32 is directly connected, Serial1/14、配置VPCSPC1 ip 192.168.1.1 /24 192.168.1.254Checking for duplicate addressPC1 : 192.168.1.1 255.255.255.0 gateway 192.168.1.254PC2PC2 ip 192.168.2.2 /24 192.168.2.254Checking for duplicate addressPC2 : 192.168.2.2 255.255.255.0 gateway 192.168.2.254PC3PC3 ip 192.168.3.3 /24 192.168.3.254Checking for duplicate addressPC3 : 192.168.3.3 255.255.255.0 gateway 192.168.3.254PC4PC4 ip 24.1.1.4 /24 24.1.1.254Checking for duplicate addressPC4 : 24.1.1.4 255.255.255.0 gateway 24.1.1.2545、连通性测试PC1 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.1.254 1.000 ms 0.000 ms 0.000 ms2 192.168.4.253 1.000 ms 1.000 ms 1.000 ms3192.168.5.254 10.001 ms 10.001 ms 10.000 ms4 *24.1.1.4 11.001 ms (ICMP type:3, code:3, Destination port unreachable)PC2 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.2.254 1.000 ms 1.001 ms 0.000 ms2 192.168.4.253 1.000 ms 1.000 ms 1.000 ms3192.168.5.25410.001 ms 10.000 ms 10.001 ms4 *24.1.1.4 10.000 ms (ICMP type:3, code:3, Destination port unreachable)PC3 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.3.254 0.000 ms 0.000 ms 0.000 ms2 192.168.4.253 0.000 ms 0.000 ms 0.000 ms312.1.1.254 10.001 ms 10.001 ms 10.000 ms4 *24.1.1.4 10.001 ms (ICMP type:3, code:3, Destination port unreachable)6、配置策略路由R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255 /配置ACL,抓取来自192.168.1.0的流量R1(config)#access-list 2 permit 192.168.2.0 0.0.0.255 /配置ACL,抓取来自192.168.2.0的流量R1(config)#R1(config)#route-map bearmr permit 10 /建立路由策略,序列10R1(config-route-map)#match ip address 1 /匹配ACL 1R1(config-route-map)#set ip next-hop 192.168.5.254 /设置下一跳,即来自192.168.1.0的流量走s1/1线路R1(config-route-map)#exitR1(config)#route-map bearmr permit 20 /建立路由策略,序列20R1(config-route-map)#match ip address 2 /匹配ACL 2R1(config-route-map)#set ip next-hop 12.1.1.254 /设置下一跳,即来自192.168.2.0的流量走s1/2线路R1(config-route-map)#exitR1(config)#interface e0/0R1(config-if)#ip policy route-map bearmr /将策略bearmr应用到e0/0接口7、测试结果PC1 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.1.254 0.000 ms 1.000 ms 0.000 ms2 192.168.4.253 1.000 ms 1.000 ms 0.000 ms3192.168.5.254 10.001 ms 10.000 ms 10.001 ms/来自192.168.1.0的流量走192.168.5.254接口4 *24.1.1.4 8.000 ms (ICMP type:3, code:3, Destination port unreachable)PC2 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.2.254 0.000 ms 0.000 ms 0.000 ms2 192.168.4.253 1.000 ms 1.000 ms 1.000 ms312.1.1.25410.000 ms 11.000 ms 10.001 ms/来自192.168.2.0的流量走12.1.1.254接口4 *24.1.1.4 10.000 ms (ICMP type:3, code:3, Destination port unreachable)PC3 tracer 24.1.1.4trace to 24.1.1.4, 8 hops max, press Ctrl+C to stop1 192.168.3.254 1.000 ms 0.000 ms 0.000 ms2 192.168.4.253 1.000 ms 1.000 ms 1.001 ms312.1.1.254 10.000 ms 11.001 ms 10.000 ms/没有配置策略,出口无变化4 *24.1.1.4 7.001 ms (ICMP type:3, code:3, Destination port unreachable)8、断开s1/2链路R2(config)#interface s1/2R2(config-if)#shutdownPC1 tracer 24.1.1.4trace to 24.1.1.4, 8 h
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高品位硫酸镁肥建设项目实施方案
- 出游策划方案酒店
- 内蒙古有岗2026云南中烟招聘502人模拟笔试试题及答案解析
- 外研版六年级名词辨析句型试题及答案
- 2025天津市西青经开区投资促进有限公司第二批次招聘3人备考考试试题及答案解析
- 直饮水供水项目节能评估报告
- 2025年厦门外代航运发展有限公司招聘船务部业务员1名备考笔试试题及答案解析
- 可再生能源接入热源厂方案
- CTCT护理科研与论文写作
- 2025年夜间经济五年发展:智慧创新文旅业态与安全管理体系行业报告
- 2025年董秘资格证上交所董秘资格考试题目及答案
- 跟腱断裂护理查房
- 私域流量培训
- 新疆和田县多宝山铅多金属矿项目环境影响报告书
- 2025春季学期国开电大专科《机械制图》一平台在线形考(形成性任务1至4)试题及答案
- T/CECS 10348-2023一体化净水设备
- T/CCS 073-2023井工煤矿智能掘进系统运维管理规范
- 部编版新教材三年级上册《20.古诗三首》教案(鹿柴、望天门山、饮湖上初晴后雨)
- 顺产侧切医院护理查房
- 框架玻璃幕墙拆除方案
- 2025高职单招考试(语文)试题(附答案)
评论
0/150
提交评论