Chào các bạn,
Bài LAB dưới đây hi vọng sẽ làm bạn bất ngờ vì không ngờ rằng trên ASA lại có thể cấu hình tracking.
Đầu tiên, yêu cầu của chúng ta là cần phải có IOS của ASA là 8.0(3) trở lên.

Bước 1 : Chúng ta thiết lập trên những interfaces như sau :
Bước 2 : cấu hình NAT:
Bước 3 : cấu hình static route tracking
Bước 4 : Định nghĩa ra một static route để track và một route đóng vai trò backup
Bước 5 : Kiểm tra cấu hình :
Tôi tiếp tục kiểm tra SLA và nó đang có trạng thái là OK:
Tiếp theo , tôi sẽ kiểm tra bảng định tuyến để đảm bảo rằng , những cấu hình ở trên đã đưa ra một default route đúng đắng.
Và cuối cùng , tôi tiễn gateway ra đi . Sau đó , tôi kiểm tra trạng thái một lần nữa.
Sau đó tôi tiếp tục xem bảng định tuyến xem có gì chuyển biến không :
Và để chắc ăn, tôi cho gateway ban đầu sống lại. Và kết quả đã như tôi mong đợi :
Hi vọng rằng, Bài LAB trên sẽ giúp các bạn ít nhiều khi triển khai tại công ty mình.
Mọi phản hồi vui lòng gời đến ccsp.master.guide@gmail.com
Xin vui lòng ghi rõ nguồn gốc khi trích đăng ở những forum khác.
Chúc các bạn luôn vui vẻ.
Bài LAB dưới đây hi vọng sẽ làm bạn bất ngờ vì không ngờ rằng trên ASA lại có thể cấu hình tracking.
Đầu tiên, yêu cầu của chúng ta là cần phải có IOS của ASA là 8.0(3) trở lên.
Static Route Tracking trên ASA
Mô hình mạng :
Bước 1 : Chúng ta thiết lập trên những interfaces như sau :
Code:
interface GigabitEthernet0/0 nameif outside security-level 0 ip address 192.168.6.2 255.255.255.0 ! interface GigabitEthernet0/1 nameif inside security-level 100 ip address 10.0.6.1 255.255.255.0 ! interface GigabitEthernet0/2 nameif backup security-level 0 ip address 192.168.5.25 255.255.255.0 !
Code:
ciscoasa(config)# sh run nat nat (inside) 1 0.0.0.0 0.0.0.0 ciscoasa(config)# sh run global global (outside) 1 interface global (backup) 1 interface ciscoasa(config)#
Code:
sla monitor 1 type echo protocol ipIcmpEcho 192.168.6.1 interface outside timeout 1000 frequency 3 sla monitor schedule 1 life forever start-time now
Code:
route outside 0.0.0.0 0.0.0.0 192.168.6.1 1 track 1 route backup 0.0.0.0 0.0.0.0 192.168.5.1 5
Code:
[COLOR=Red][B]ciscoasa(config)# sh sla monitor configuration[/B][/COLOR] SA Agent, Infrastructure Engine-II Entry number: 1 Owner: Tag: Type of operation to perform: echo Target address: 192.168.6.1 Interface: outside Number of packets: 1 Request size (ARR data portion): 28 Operation timeout (milliseconds): 1000 Type Of Service parameters: 0x0 Verify data: No Operation frequency (seconds): 3 Next Scheduled Start Time: Start Time already passed Group Scheduled : FALSE Life (seconds): Forever Entry Ageout (seconds): never Recurring (Starting Everyday): FALSE Status of entry (SNMP RowStatus): Active Enhanced History:
Code:
[B][COLOR=Green]ciscoasa(config)# sh sla monitor operational-state[/COLOR][/B] Entry number: 1 Modification time: 04:02:36.312 UTC Fri Oct 24 2008 Number of Octets Used by this Entry: 1480 Number of operations attempted: 352 Number of operations skipped: 0 Current seconds left in Life: Forever Operational state of entry: Active Last time this entry was reset: Never Connection loss occurred: FALSE Timeout occurred: FALSE Over thresholds occurred: FALSE Latest RTT (milliseconds): 1 Latest operation start time: 04:20:09.312 UTC Fri Oct 24 2008 Latest operation return code: [U][SIZE=4][COLOR=Red][B]OK[/B][/COLOR][/SIZE][/U] RTT Values: RTTAvg: 1 RTTMin: 1 RTTMax: 1 NumOfRTT: 1 RTTSum: 1 RTTSum2: 1
Code:
ciscoasa(config)# sh route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 192.168.6.1 to network 0.0.0.0 C 127.0.0.0 255.255.0.0 is directly connected, cplane C 192.168.5.0 255.255.255.0 is directly connected, backup C 10.0.6.0 255.255.255.0 is directly connected, inside C 192.168.6.0 255.255.255.0 is directly connected, outside [I][U][B][COLOR=Red]S* 0.0.0.0 0.0.0.0 [1/0] via 192.168.6.1, outside[/COLOR][/B][/U][/I] ciscoasa(config)#
Code:
ciscoasa(config)# sh sla monitor operational-state Entry number: 1 Modification time: 04:02:36.321 UTC Fri Oct 24 2008 Number of Octets Used by this Entry: 1480 Number of operations attempted: 375 Number of operations skipped: 0 Current seconds left in Life: Forever Operational state of entry: Active Last time this entry was reset: Never Connection loss occurred: FALSE Timeout occurred: TRUE Over thresholds occurred: FALSE Latest RTT (milliseconds): NoConnection/Busy/Timeout Latest operation start time: 04:21:18.311 UTC Fri Oct 24 2008 Latest operation return code: [SIZE=5][U][B][COLOR=Red]Timeout[/COLOR][/B][/U][/SIZE] RTT Values: RTTAvg: 0 RTTMin: 0 RTTMax: 0 NumOfRTT: 0 RTTSum: 0 RTTSum2: 0
Code:
ciscoasa(config)# sh route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 192.168.5.1 to network 0.0.0.0 C 127.0.0.0 255.255.0.0 is directly connected, cplane C 192.168.5.0 255.255.255.0 is directly connected, backup C 10.0.6.0 255.255.255.0 is directly connected, inside C 192.168.6.0 255.255.255.0 is directly connected, outside [U][COLOR=Red][B][SIZE=5]S* 0.0.0.0 0.0.0.0 [5/0] via 192.168.5.1, backup[/SIZE][/B][/COLOR][/U] ciscoasa(config)#
Code:
ciscoasa(config)# sh route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 192.168.6.1 to network 0.0.0.0 C 127.0.0.0 255.255.0.0 is directly connected, cplane C 192.168.5.0 255.255.255.0 is directly connected, backup C 10.0.6.0 255.255.255.0 is directly connected, inside C 192.168.6.0 255.255.255.0 is directly connected, outside [U][I][SIZE=4][COLOR=Blue][B]S* 0.0.0.0 0.0.0.0 [1/0] via 192.168.6.1, outside[/B][/COLOR][/SIZE][/I][/U] ciscoasa(config)#
Mọi phản hồi vui lòng gời đến ccsp.master.guide@gmail.com
Xin vui lòng ghi rõ nguồn gốc khi trích đăng ở những forum khác.
Chúc các bạn luôn vui vẻ.
Comment