環境描述
1. 兩條公網出口,分別為移動,聯通
2. 兩臺ASA做主備配置,實現出口故障轉移
3. 內網兩臺核心做堆疊配置(由於模擬器無法實現堆疊,此處使用HSRP)
需求描述
1. 當一條公網鏈路故障後,上網流量切換到備用線路
2. 當一臺ASA故障後,流量切換到備用ASA
3. 當一臺核心故障後,實現內網使用者流量冗餘
拓撲簡介
1. vios9模擬移動鏈路,vios10模擬聯通鏈路
2. switch13模擬公網主機
3. 出口兩臺switch作為網際網路接入交換機
4. ASA作為出口裝置,代理內網使用者上網
5. 內網兩臺核心做HSRP配置
6. switch12 模擬內網主機
配置詳情
1. vios9
interface GigabitEthernet0/0
ip address 10.10.10.1 255.255.255.0
interface GigabitEthernet0/1
ip address 10.10.200.2 255.255.255.0
ip route 30.30.30.0 255.255.255.0 10.10.200.1 //通往公網主機路由
2. vios10
interface GigabitEthernet0/0
ip address 20.20.20.1 255.255.255.0
interface GigabitEthernet0/1
ip address 10.10.100.2 255.255.255.0
ip route 30.30.30.0 255.255.255.0 10.10.100.1 //通往公網主機路由
3. 網際網路接入交換機配置
左邊交換機
右邊交換機
4. ASA配置
左邊防火牆
failover //啟用failover功能
failover lan unit primary //配置ASA角色為主
failover lan interface failover_lan GigabitEthernet0/1
failover key cisco1234 //配置通訊祕鑰
failover link failover_link GigabitEthernet0/2
failover interface ip failover_lan 1.1.1.5 255.255.255.252 standby 1.1.1.6
failover interface ip failover_link 1.1.1.9 255.255.255.252 standby 1.1.1.10
右邊防火牆
failover
failover lan unit primary
failover lan interface failover_lan GigabitEthernet0/1
failover key cisco1234
failover link failover_link GigabitEthernet0/2
failover interface ip failover_lan 1.1.1.5 255.255.255.252 standby 1.1.1.6
failover interface ip failover_link 1.1.1.9 255.255.255.252 standby 1.1.1.10
此時 ASA的主備功能配置完成,剩餘的配置只要在主裝置配置即可,備裝置會自動同步
檢視failover狀態
以下為防火牆介面配置,nat配置,路由配置 acl配置
新建內網網段物件,並配置NAT
object network obj-inside1
subnet 192.168.10.0 255.255.255.0
object network obj-inside2
subnet 192.168.10.0 255.255.255.0
===============
object network obj-inside1
nat (inside,outside1) dynamic interface
object network obj-inside2
nat (inside,outside2) dynamic interface
=============
路由配置
route outside1 0.0.0.0 0.0.0.0 10.10.10.1 1 track 1 //此處預設走此路由,配置track,當track鏈路出現問題時,自動切換預設路由
route outside2 0.0.0.0 0.0.0.0 20.20.20.1 254
route inside 192.168.10.0 255.255.255.0 1.1.1.18 1
=============
track配置
sla monitor 123
type echo protocol ipIcmpEcho 10.10.10.1 interface outside1
num-packets 3
frequency 10
sla monitor schedule 123 life forever start-time now
track 1 rtr 123 reachability
==============
acl配置
access-list des_out extended permit icmp any any //此處為了驗證,放行icmp
access-group des_out in interface outside1 //分別在兩個公網介面呼叫
access-group des_out in interface outside2 //分別在兩個公網介面呼叫
5. 核心交換機配置
介面配置
左
右
HSRP配置
ip route 0.0.0.0 0.0.0.0 1.1.1.17 //預設路由
內網主機配置在此不再贅述
此時已實以上需求配置,ASA主備切換時,模擬器狀態下,內網主機丟一個包