对SLA工具的基本使用
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
对SLA⼯具的基本使⽤
实验标题:对SLA⼯具的基本使⽤
软件环境:GNS3 V0.73
路由器:3台
时间:2012-7-15
拓扑如下:
习题⼀:仿真udp流量
实验说明:在源路由器R1建⽴了⼀个sla策略100,向⽬的路由器R3的UDP⽬的端⼝5000发送upd流量,每次发送20个数据包,数据包发送间隔默认为20ms。
每5秒重复发送⼀次
R1基础配置
R1#configration ter
R1(config)# interface Loopback0
R1(config-if)# ip address 1.1.1.1 255.255.255.255
R1(config)# interface Ethernet0/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config)#router ospf 1
R1(config-route)#network 1.1.1.1 0.0.0.0 area 0
R1(config-route)#network 192.168.12.1 0.0.0.0 area 0
R1的SLA配置
R1(config)#ip sla monitor 110
R1(config-sla-monitor)# type jitter dest-ipaddr 3.3.3.3 dest-port 5000 source-ipaddr 1.1.1.1 source-port 3000num-packets 20 R1(config-sla-monitor-jitter)#frequency 5
R1(config)#ip sla monitor schedule 100 life forever start-time now //马上启⽤
R2基础配置
R2#configration ter
R2(config)# interface Ethernet0/1
R2(config-if)#ip address 192.168.12.2 255.255.255.0 R2(config)# interface Ethernet0/0
R2(config-if)#ip address 192.168.23.2 255.255.255.0 R2(config)#router ospf 1
R2(config-route)#network 192.168.12.2 0.0.0.0 area 0 R2(config-route)#network 192.168.23.2 0.0.0.0 area 0
R3基础配置
R2#configration ter
R2(config)# interface Ethernet0/1
R2(config-if)#ip address 192.168.23.3 255.255.255.0 R2(config)# interface loopback0
R2(config-if)#ip address 3.3.3.3 255.255.255.255 R2(config)#router ospf 1
R2(config-route)#network 192.168.23.3 0.0.0.0 area 0 R2(config-route)#network 3.3.3.3 0.0.0.0 area 0
R3的SLA配置
R2(config)#ip sla monitor responper 打开SLA回应
验证
1.从R3ping到R1
2.在R1上查看SLA状态
3.在R3上查看SLA状态
习题⼆:配置跟踪对象,实⾏按条件通告的路由
实验说明:在R2上建⽴⼀条默认路由到R3
1、如果OSPF 3.3.3.3 /32不可达----默认路由不能安装
2、如果OSPF 3.3.3.3 /32可达----默认路由就安装
配置
1、保持习题⼀的配置不变,在R2上配置
R2(config)#track 21 ip route 3.3.3.3/32 reachability
R2(config)#ip route 0.0.0.0 0.0.0.0 192.168.23.3 track 21
●验证
1、如果OSPF 3.3.3.3 /32可达----默认路由就安装
2、将R3的loopback0 端⼝DOWN
3、如果OSPF 3.3.3.3 /32不可达----默认路由不能安装
习题三:Track 与SLA⼯具配合,实现按条件路由通告
实验说明:使⽤sla定义⼀个永久的ping测试,测试到3.3.3.3地址的连通性,还需顶⼀个track对象,跟踪sla测试的结果。
如果能够ping通3.3.3.3地址,track队形的跟踪结果为真,否者跟踪结果为假。
●配置
R1
R1#Conf t
R1#(config)Ip sla monitor 200
R1#(config-sla-monitor)Type echo protocol ipicmpecho 3.3.3.3
R1#(config-sla-monitor-echo)Frequency 5
R1#(config-sla-monitor-echo)Exit
R1#(config)Ip sla monitor schedule 200 life forever start-time now
R1#(config)Track 103 rtt 200 reacheability
R1#(config-track)Exit
R1#(config )Ip route 0.0.0.0 0.0.0.0 192.168.12.2 track 103
●验证
1、能ping通3.3.3.3的情况下,默认路由应该是安装到路由表的。
2、将R3的loopback 0 shutdown的情况
习题四:使⽤Track和sla⼯具,实现HSRP⾼级路由跟踪,基于指定路由的状态决定主和备的路由切换。
实验说明:R1和R2允许HSRP,组号为12,VIP 192.168..12.100
要求R2在3.3.3.3路由可达时,为active,在3.3.3.3不可达时,转换到standby
保持上⾯配置不变。
●配置
R1配置
R1(config)#Interface E0/0
R1#(config)Standby 12 ip 192.168.12.100
R1(config-if)# Standby priority 105
R1(config-if)#Standby 12 preempt
R2配置
R2(config)#Ip sla monitor 300
R2(config-sla-monitor)Type echo protocol ipicmpecho 3.3.3.3
R2(config-sla-monitor-echo)Frequency 5
R2(config-sla-monitor-echo)#Exit
R2(config)#Ip sla monitor schedule 300 life forever start-time now
R2(config)#track 110 rtr 300 reachability
interface e0/1
R2#(config-if)standby 12 ip 192.168.12.100
R2#(config-if)standby 12 priority 110
R2#(config-if)standby 12 preempt
R2#(config-if)standby 12 track 110 decrement 20
验证
1、查看R2的track 110和HSRP状态
2、将3.3.3.3 端⼝打开。
查看R2的track 110和HSRP状态。