بررسی مفهوم IP SLA و کانفیگ IP SLA Route Tracking در روتر سیسکو

IP SLA و یا به شکل گسترده IP Service Level Agreements ابزاریست در IOS سیسکو برای بررسی عملکرد و کیفیت سرویس ها و ارتباطات ، بر روی بستر IP . IP SLA به ما امکان بررسی و جمع آوری اطلاعات در مورد میزان تاخیر پکت ها Packet Delay ، میزان Packet Loss ، برقراری ارتباطات ، میزان Jitter ، کیفیت صدا در ارتباطات voip ، بررسی یک مسیر به شکل hop by hop ، در دسترس بودن یک سرویس و .. که تمامی این امکانات ، باعث میشود که میزان پایداری شبکه و کیفیت سرویس QOS بالا رفته و از Down Time ها و network outage ها به شکا قابل ملاحظه ای کاسته شود ، همچنین با ابزار هایی نظیر SNMP و نرم افزار CiscoWorks Internetwork Performance Monitor و یا حتی نرم افزار های third part ، امکان بررسی و جمع آوری اطلاعات در زمینه کارکرد شبکه و کیفیت سرویس فراهم می آورد.

cisco iconبرخی از انواع بررسی ها و نوع عملکرد و سرویس IP SLA ، بدین صورت است :

• Data Link Switching Plus (DLSw+)
• Domain Name System (DNS)
• Dynamic Host Control Protocol (DHCP)
• File Transfer Protocol (FTP)
• Hypertext Transfer Protocol (HTTP)
• ICMP echo
• ICMP jitter
• ICMP path echo
• ICMP path jitter
• Real-Time Transport Protocol (RTP)-based VoIP
• Transmission Control Protocol (TCP) connect
• UDP echo
• UDP jitter
• UDP jitter for VoIP
• VoIP gatekeeper registration delay
• VoIP post-dial delay

IP SLA برای دستیابی به نتایج و اطلاعات ، مبادرت به بررسی دائمی ترافیک عبوری ، تولید و شبیه سازی ترافیک ، می ورزد ، که بدین ترتیب امکان بررسی و جمع آوری اطلاعات از وضعیت شبکه ، منابع ، مسیر ، سرویس و … را فراهم می آورد . یکی از مثال های ساده پیاده سازی IP SLA ، مانیتورینگ یه مسیر ، میزان تاخیر ، میزان پکت لاس و همچنین ، برقراری و قطع میسر است که توسط یک سنسور ، ارزیابی میشود . این سنسور اقدام به ارسال بسته های ICMP به مقصد مشخص و در فواصل معین نموده ، و نتیجه را یا به شکل میزان تاخیر مسیر و یا به عنوان UP یا Down بودن مسیر گذارش میکند .

از این کاربرد میتوان در Floating Static Route استفاده کرد ، بدین ترتیب که برای مثال ، در یک شبکه ، یک آپلینک اینترنت و یک لینک بکاپ وجود دارد ، میخواهیم ، در صورت قطع ارتباط اصلی ، ارتباط از طریق لینک بکاپ برقرار شود . یکی از سناریو های پر کاربرد در ایران ، بدین ترتیب است که اکثر ISP ها ، علاوه بر ارتباط رادیویی با uplink خود که مثلا میتوانید ماکروویو باشد ، یک ارتباط اینترانتی نیز بر روی فیبر هم با ISP بالادست خود ، یا مخابرات دارند ، خب البته که ماکروویو ارجح است ، چون تاخیر کمتری داشته و همچنین به ISP ، بار اضافی over head تحمیل نمیکند ، ولی در هر صورت ، اگر این لینک down شود ، میبایست ترافیک به شکل خودکار از روی لینک فیبر و یا همان اینترنت ، یا هر لینک دوم دیگری ، عبور کند ، البته هم برای send این کار را کرد و هم receive که میتواند BGP peering باشد . مراحل کار بدین ترتیب است ، که ابتدا IP SLA را برای مقصد مورد نظر ، جهت ارسال بسته های icmp در پریود های مشخص تنظیم کرده و برای آن یک schedule تعریف می نماییم ، سبس برای بررسی up/down بودن مسیر از tracking object بهره میبریم :

cisco iconسیسکو ip sla

Technet24(config)# ip sla 1
Technet24(config)# icmp-echo 217.218.1.2 source-interface GigabitEthernet0/0
Technet24(config)# timeout 1000
Technet24(config)# threshold 2
Technet24(config)# frequency 3
Technet24(config)# ip sla schedule 1 life forever start-time now

مطابق شکل ، ما IP SLA را برای مانیتور کردن ارتباط به روتر R2 بدین ترتیب که هر 3 ثانیه با timeout 1 ثانیه ، بسته های icmp را ارسال کند و میزان تاخیر لینک ( یا همان امکان دسترسی ) را بررسی نماید . سپس با کمک Object Tracking که از امکانات داخلی IOS سیسکو است ، خروجی IP SLA را بررسی میکنیم :

Technet24(config)# track 1 ip sla 1 reachability

cisco iconجهت بررسی عمکرد IP SLA و همچنین Tracker :

Technet24#sh ip sla statistics 1
IPSLAs Latest Operation Statistics
IPSLA operation id: 1
Latest RTT: 2 milliseconds
Latest operation start time: 01:57:19.412 tehran Fri Jul 25 2014
Latest operation return code: Over threshold
Number of successes: 10
Number of failures: 0
Operation time to live: Forever

Technet24#sh track 1
Track 1
IP SLA 1 reachability
Reachability is Up
1 change, last change 00:00:14
Latest operation return code: Over threshold
Latest RTT (millisecs) 2

همانطور که ملاحظه میکنید ، RTR مسیر 2 میلی ثانیه و وضعیت لینک UP است . همکنون باید از این Tracker در Floating Static Route استفاده کنیم ، بدین ترتیب که ، ما برای بررسی وضعیت مسیر به روتر R2 یک سنسور داریم ، پس کافی است از آن به عنوان default route استفاده کرده و یک route با metric بالاتر به سمت R3 بنویسیم :

Technet24(config)# ip route 0.0.0.0 0.0.0.0 217.218.1.2 track 1
Technet24(config)# ip route 0.0.0.0 0.0.0.0 217.218.2.2 20

تا زمانی که وضعیه track 1 به شکل UP باشد ، ترافیک از به سمت R2 به لحاظ metric کمتر میرود ، وقتی که ارتباط با R2 به شکل برخورد ، وضعیت Track 1 به حالت Down در آمده و ترافیک به سمت R3 خواهد رفت . این سناریو به سادگی در شبکه های MultiHome BGP با چند BGP Peer و چندین ارتیاط برای send نیز قابل پیاده سازیست .smile icon

http://www.firewall.cx/cisco-technical-knowledgebase/cisco-routers/813-cisco-router-ipsla-basic.html

In today’s network environment, redundancy is one of the most important aspects, whether its on the LAN side or on the WAN side. In this topic I will be covering WAN redundancy with multiple WAN links terminating on a single router. The best and simplest way to achieve WAN redundancy on Cisco devices is to use Reliable Static backup routes with IP SLA tracking. IP SLAs is a feature included in the Cisco IOS Software that can allow administrators the ability to Analyze IP Service Levels for IP applications and services. IP SLA’s uses active traffic-monitoring technology to monitor continuous traffic on the network. This is a reliable method in measuring over head network performance. Cisco Routers provide IP SLA Responders that give accuracy of measured data across a network. With IP SLAs, routers and switches perform periodic measurements. The number and type of available measurements are vast and in this article I will be covering just the ICMP ECHO feature. IP SLA in itself is a very big topic to cover J

Let us take an example of a basic redundant WAN link scenario as shown below:

tk-cisco-ipsla-1[1]

In the above figure the Cisco device is connected to two WAN links ISP1 and ISP2. The most common setup that we use in day to day life is to have to default routes configured on the Cisco router pointing to the respective next hop IPs as shown below:

 R1(config)# ip route 0.0.0.0 0.0.0.0 2.2.2.2
R1(config)# ip route 0.0.0.0 0.0.0.0 3.3.3.3 10

If you notice the Administrative Distance for the secondary route pointing to ISP2 is increased to 10 so that it becomes the backup link.

The above configuration with just two floating static routes partially accomplishes our requirement as it will work only in the scenario where the routers interfaces connected to the WAN link are in up/down or down/down status. But in a lot of situations we see that even though the links remain up but we are not able to reach the gateway, this usually happens when the issue is at the ISP side.

In such scenarios, IP SLAs becomes an engineer’s best friend. With around six additional IOS commands we can have a more reliable automatic failover environment. Using IP SLA the Cisco IOS gets the ability to use Internet Control Message Protocol (ICMP) pings to identify when a WAN link goes down at the remote end and hence allows the initiation of a backup connection from an alternative port. The Reliable Static Routing Backup using Object Tracking feature can ensure reliable backup in the case of several catastrophic events, such as Internet circuit failure or peer device failure.

IP SLA is configured to ping a target, such as a publicly routable IP address or a target inside the corporate network or your next-hop IP on the ISP’s router. The pings are routed from the primary interface only. Following a sample configuration of IP SLA to generate icmp ping targeted at the ISP1s next-hop IP.

R1(config)# ip sla 1
R1(config)# icmp-echo 2.2.2.2 source-interface FastEthernet0/0
R1(config)# timeout 1000
R1(config)# threshold 2
R1(config)# frequency 3
R1(config)# ip sla schedule 1 life forever start-time now

Please note that the Cisco IP SLA commands have changed from IOS to IOS to know the exact command for IOS check the Cisco documentation. The above commands are for IOS 12.4(4)T, 15.(0)1M, and later releases.

The above configuration defines and starts an IP SLA probe. The ICMP Echo probe sends an ICMP Echo packet to next-hop IP 2.2.2.2 every 3 seconds, as defined by the “frequency” parameter. Timeout sets the amount of time (in milliseconds) for which the Cisco IOS IP SLAs operation waits for a response from its request packet. Threshold sets the rising threshold that generates a reaction event and stores history information for the Cisco IOS IP SLAs operation. After defining the IP SLA operation our next step is to define an object that tracks the SLA probe. This can be accomplished by using the IOS Track Object as shown below:

R1(config)# track 1 ip sla 1 reachability

The above command will track the state of the IP SLA operation. If there are no ping responses from the next-hop IP the track will go down and it will come up when the ip sla operation starts receiving ping response.

To verify the track status use the use the “show track” command as shown below:

 R1# show track

Track 1
IP SLA 1 reachability
Reachability is Down
1 change, last change 00:03:19
Latest operation return code: Unknown

The above output shows that the track status is down. Every IP SLAs operation maintains an operation return-code value. This return code is interpreted by the tracking process. The return code may return OK, OverThreshold, and several other return codes.

Different operations may have different return-code values, so only values common to all operation types are used. The below table shows the track states as per the IP SLA return code.

Tracking

Return Code

Track State

Reachability

OK or over threshold

(all other return codes)

Up

Down

The Last step in the IP SLA Reliable Static Route configuration is to add the “track” statement to the default routes pointing to the ISP routers as shown below:

R1(config)# ip route 0.0.0.0 0.0.0.0 2.2.2.2 track 1
R1(config)# ip route 0.0.0.0 0.0.0.0 3.3.3.3 10

The track number keyword and argument combination specifies that the static route will be installed only if the state of the configured track object is up. Hence if the track status is down the secondary route will be used to forward all the traffic.

دیدگاه 1
  1. sinaiit24 says

    سایت بسیار خوبی ایجاد کردید. بسیار متشکرم

دیدگاه

آدرس ایمیل شما منتشر نخواهد شد.