root

Leader IT/Architect
Dec 31, 2012
1,153
72
48

Lab Configure Cisco ASA Active Standby failover


Lab Configure Cisco ASA Active Standby failover sử dụng 2 Firewall Cisco ASA được cấu hình để chạy ở mode active Standby để dự phòng cho nhau.

I.Mô hình Lab Configure Cisco ASA Active Standby failover


1. Mô hình.

Configure Cisco ASA Active Standby failover (1)
2. Yêu cầu
- Khi ASA Active bị down thì ASA Standby sẽ lên làm Active để đảm bảo hệ thống mạng không bị down khi 1 trong 2 ASA bị down

II. Triển khai Lab Configure Cisco ASA Active Standby failover


1. cấu hình trên Router
- Cấu hình Router đảm bảo Router đi internet
Code:
R1(config)#int f0/0
R1(config-if)#ip address dhcp
R1(config-if)#no shutdown

R1(config-if)#int f0/1
R1(config-if)#ip address 172.16.16.254 255.255.255.0
R1(config-if)#no shutdown
- Trên R1 ping thử ra internet thành công

R1#ping 8.8.8.8

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/48/60 ms

2. Config Cisco ASA Active


- Đầu tiên các bạn "show version" lên để kiểm tra Cisco ASA của bạn có được hỗ trợ tính năng "Failover" không.

Configure Cisco ASA Active Standby failover (2)

- cấu hình Failover trên ASA 1 làm chức năng Active. Lưu ý: interface g2 không được cấu hình ip hoặc nameif, ...
Code:
Active(config)# failover lan unit primary
Active(config)# failover lan interface folink g2
INFO: Non-failover interface config is cleared on GigabitEthernet2 and its sub-interfaces

Active(config)# failover interface ip folink 10.1.1.1 255.255.255.0 standby 10.1.1.2
Active(config)# failover

Active(config)# int g2
Active(config-if)# no shutdown
- Bây giờ các bạn dùng lệnh "show failover" để kiểm tra failover đã được bật chưa.

Configure Cisco ASA Active Standby failover (3)

- Cấu hình IP cho interface G0 và G1 để các PC trong LAN ra internet. Đây là con ASA Active nên việc cấu hình trên ASA Active sẽ được đồng bộ xuống cho con ASA Standby thông qua đương Failover link(GigabitEthernet2).
- Vì vậy, việc cấu hình ip, nameif ở đây hơi khác bình thường 1 tý là bạn ko chỉ cấu hình IP và nameif... cho con Active mà còn cho cả con Standby.
- IP phía sau chữ "standby" chính là IP của con standby.
Code:
Active(config)#interface g0
Active(config-if)# nameif outside
Active(config-if)# ip address 172.16.16.1 255.255.255.0 standby 172.16.16.2
Active(config-if)# no shutdown

Active(config-if)# int g1
Active(config-if)# nameif inside
Active(config-if)# ip address 192.168.100.1 255.255.255.0 standby 192.168.100.2
Active(config-if)# no shutdown
- Để kiểm tra IP và namif các bạn đã đặt các bạn dùng lệnh "show ip" và "show int ip brief" hoặc "show nameif"...

Configure Cisco ASA Active Standby failover (4)

- Để ASA ra được internet các bạn cần thêm default-route
Code:
Active(config)# route outside 0 0 172.16.16.254
- Trên ASA Active thực hiện ping ra internet thành công
Active(config-if)# ping 8.8.8.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 50/86/120 ms
- Tuy nhiên, để các PC trong LAN ra internet các bạn cần có NAT và inspect icmp
Code:
Active(config)# object network inside
Active(config-network-object)# subnet 192.168.100.0 255.255.255.0
Active(config-network-object)# nat (inside,outside) dynamic interface

Active(config)# fixup protocol icmp
- Bây giờ các bạn qua PC đặt IP và trỏ gateway cho PC và ping ra internet thành công.

Configure Cisco ASA Active Standby failover (5)

3. Cấu hình Cisco ASA Standby
- Cấu hình failover secondary cho ASA standby
Code:
Standby(config)#failover lan unit secondary
Standby(config)#failover lan interface folink g2
Standby(config)#failover interface ip folink 10.1.1.1 255.255.255.0 standby 10.1.1.2
Standby(config)# failover

Standby(config)# int g2
Standby(config-if)# no shutdown
- Bây giờ các bạn sẽ thấy cấu hình từ Cisco ASA Active sẽ được đồng bộ xuống cho con Standby.

Configure Cisco ASA Active Standby failover (6)

- Các bạn thực hiện "shop ip" và "sh int ip brief" để kiểm tra lại thì các bạn thấy rõ ràng là các ban không thực hiện cấu hình IP,nameif...trên con Cisco ASA Standby nhưng khi show thì nó có IP, nameif... Vì nó đã được đồng bộ từ con Active xuống.

Configure Cisco ASA Active Standby failover (7)

- Bây giờ các bạn tiến hành down còn Cisco ASA Active để xem PC trong LAN còn đi được internet nữa không.
- Trước khi thực hiện down con Active các bạn qua con Standby dùng lệnh "show failover" để kiểm tra trạng thái.

Configure Cisco ASA Active Standby failover (8)

- Bây giờ các bạn down con Cisco ASA Active. Sau đo qua xem con Standby và "show failover" xem nó có chuyển qua trạng thái Active không.

Configure Cisco ASA Active Standby failover (9)

- Các bạn thấy con ASA Standby đã lên làm Active. Giờ các bạn vào PC xem ping ra internet còn được không.

Configure Cisco ASA Active Standby failover (10)

- Các bạn thấy PC ping ra internet vẫn bình thường.
- Và các bạn để ý thấy IP gateway 192.168.100.1 có MAC: 00-ab-3d-76-9b-01. Chứng tỏ con Standby đã sử dụng MAC đổi MAC của nó thành MAC của con Active để sử dụng
 
Last edited:
Mô hình hinh.JPG
Chào mn, mình cấu hình như trên hướng dẫn PC ra internet bình thường nhưng khi down Active thi` Standby lên làm Active thì PC không ping được internet và inside lun.Mong các bạn giúp đỡ gấp hix hix .. Thanks
Active
ASA Version 8.0(2)
!
hostname ciscoasa
enable password 8Ry2YjIyt7RRXU24 encrypted
names
!
interface Ethernet0/0
nameif inside
security-level 100
ip address 192.168.20.2 255.255.255.0 standby 192.168.20.3
!
interface Ethernet0/1
description LAN Failover Interface
!
interface Ethernet0/2
nameif outside
security-level 0
ip address 172.16.16.1 255.255.255.0 standby 172.16.16.2
!
interface Ethernet0/3
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/4
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/5
shutdown
no nameif
no security-level
no ip address
!
passwd 2KFQnbNIdI.2KYOU encrypted
boot config disk0:/.private/startup-config
ftp mode passive
pager lines 24
no logging message 402128
mtu inside 1500
mtu outside 1500
failover
failover lan unit primary
failover lan interface folink Ethernet0/1
failover interface ip folink 10.1.1.1 255.255.255.0 standby 10.1.1.2
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 192.168.20.0 255.255.255.0
route outside 0.0.0.0 0.0.0.0 172.16.16.254 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout uauth 0:05:00 absolute
dynamic-access-policy-record DfltAccessPolicy
http server enable
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
service resetoutside
no crypto isakmp nat-traversal
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
inspect icmp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:5c5ad22b6b7c0f2d2ae8c336b5f8678d
: end

Standby
ASA Version 8.0(2)
!
hostname ciscoasa
enable password 8Ry2YjIyt7RRXU24 encrypted
names
!
interface Ethernet0/0
nameif inside
security-level 100
ip address 192.168.20.2 255.255.255.0 standby 192.168.20.3
!
interface Ethernet0/1
description LAN Failover Interface
!
interface Ethernet0/2
nameif outside
security-level 0
ip address 172.16.16.1 255.255.255.0 standby 172.16.16.2
!
interface Ethernet0/3
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/4
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/5
shutdown
no nameif
no security-level
no ip address
!
passwd 2KFQnbNIdI.2KYOU encrypted
boot config disk0:/.private/startup-config
ftp mode passive
pager lines 24
no logging message 402128
mtu inside 1500
mtu outside 1500
failover
failover lan unit secondary
failover lan interface folink Ethernet0/1
failover interface ip folink 10.1.1.1 255.255.255.0 standby 10.1.1.2
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 192.168.20.0 255.255.255.0
route outside 0.0.0.0 0.0.0.0 172.16.16.254 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout uauth 0:05:00 absolute
dynamic-access-policy-record DfltAccessPolicy
http server enable
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
service resetoutside
no crypto isakmp nat-traversal
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
inspect icmp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:55a723db0002ed38968b7ad25f43cfc0
: end
 
Sau khi down Active..show pên Standby và ping thử kết quả
ciscoasa# show failover
Switching to Active


Failover On
Failover unit Secondary
Failover LAN Interface: folink Ethernet0/1 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 2 of 250 maximum
Version: Ours 8.0(2), Mate 8.0(2)
Last Failover at: 00:02:11 UTC Nov 30 1999
This host: Secondary - Active
Active time: 0 (sec)
slot 0: empty
Interface inside (192.168.20.2): Testing (Waiting)
Interface outside (172.16.16.1): Unknown (Waiting)
slot 1: empty
Other host: Primary - Failed
Active time: 111 (sec)
slot 0: empty
Interface inside (192.168.20.3): Unknown
Interface outside (172.16.16.2): Unknown
slot 1: empty


Stateful Failover Logical Update Statistics
Link : Unconfigured.


ciscoasa# ping 8.8.8.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
?????
Success rate is 0 percent (0/5)
ciscoasa# ping 172.16.16.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.16.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
ciscoasa# ping 192.168.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
ciscoasa# ping 192.168.20.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.3, timeout is 2 seconds:
?????
Success rate is 0 percent (0/5)
 

About us

  • Securityzone.vn là một trang web chuyên về an ninh mạng và công nghệ thông tin. Trang web này cung cấp các bài viết, tin tức, video, diễn đàn và các dịch vụ liên quan đến lĩnh vực này. Securityzone.vn là một trong những cộng đồng IT lớn và uy tín tại Việt Nam, thu hút nhiều người quan tâm và tham gia. Securityzone.vn cũng là nơi để các chuyên gia, nhà nghiên cứu, sinh viên và người yêu thích an ninh mạng có thể trao đổi, học hỏi và chia sẻ kiến thức, kinh nghiệm và giải pháp về các vấn đề bảo mật trong thời đại số.

Quick Navigation

User Menu