本文詳細記錄如何在Cisco路由器上實現雙線接入(雙ISP負載均衡/備援),透過路由映射與NAT實現流量按出口分流。適用於擁有兩條不同運營商專線(如電信、網通)的企業網絡環境。
interface GigabitEthernet5/1
ip address 60.10.135.11 255.255.255.224
ip nat outside
interface GigabitEthernet5/9
ip address 219.148.157.22 255.255.255.252
ip nat outside
interface GigabitEthernet5/2
ip address 192.168.0.1 255.255.255.0
ip nat inside
access-list 100 permit ip 192.168.0.0 0.0.0.255 any
ip nat pool pool2 60.10.135.11 60.10.135.11 netmask 255.255.255.224
ip nat pool pool1 219.148.157.22 219.148.157.22 netmask 255.255.255.252
route-map isp2 permit 10
match ip address 100
match interface GigabitEthernet5/1
route-map isp1 permit 10
match ip address 100
match interface GigabitEthernet5/9
ip nat inside source route-map isp1 pool pool1 overload
ip nat inside source route-map isp2 pool pool2 overload
ip route 0.0.0.0 0.0.0.0 219.148.157.21ip route 202.99.168.0 255.255.248.0 60.10.135.1配置完成後,使用show ip nat translations觀察NAT轉換表,確認內網流量正確按策略出口;結合show ip route核對路由表生效情況。