IPsec 多链路建立IPsec隧道(总部tunnel多链路备份,分支物理口)

1.实验拓扑
2.基础配置
a.基础配置(IP地址,路由配置等)

AR1:

isis 1

is-level level-2

cost-style wide

network-entity 10.0001.0000.0000.0001.00

interface GigabitEthernet0/0/0

ip address 10.1.11.2 255.255.255.0

isis en 1

interface GigabitEthernet0/0/1

ip address 10.1.14.1 255.255.255.0

isis en 1

AR2:

isis 1

is-level level-2

cost-style wide

network-entity 10.0001.0000.0000.0002.00

interface GigabitEthernet0/0/0

ip address 10.1.12.2 255.255.255.0

isis en 1

interface GigabitEthernet0/0/1

ip address 10.1.24.2 255.255.255.0

isis en 1

AR3:

isis 1

is-level level-2

cost-style wide

network-entity 10.0001.0000.0000.0003.00

interface GigabitEthernet0/0/0

ip address 10.1.13.3 255.255.255.0

isis en 1

interface GigabitEthernet0/0/1

ip address 10.1.34.3 255.255.255.0

isis en 1

AR4:

isis 1

is-level level-2

cost-style wide

network-entity 10.0001.0000.0000.0004.00

interface GigabitEthernet0/0/0

ip address 10.1.14.4 255.255.255.0

isis en 1

interface GigabitEthernet0/0/1

ip address 10.1.24.4 255.255.255.0

isis en 1

interface GigabitEthernet0/0/2

ip address 10.1.34.4 255.255.255.0

isis en 1

interface GigabitEthernet40/0

ip address 10.1.42.4 255.255.255.0

isis en 1

FW1:

interface GigabitEthernet1/0/0

undo shutdown

ip address 10.1.11.1 255.255.255.0

interface GigabitEthernet1/0/1

undo shutdown

ip address 10.1.12.1 255.255.255.0

interface GigabitEthernet1/0/2

undo shutdown

ip address 10.1.13.1 255.255.255.0

interface GigabitEthernet1/0/3

undo shutdown

ip address 192.168.1.254 255.255.255.0

service-manage ping permit

firewall zone local

set priority 100

firewall zone trust

set priority 85

add interface GigabitEthernet0/0/0

add interface GigabitEthernet1/0/3

firewall zone untrust

set priority 5

add interface GigabitEthernet1/0/0

add interface GigabitEthernet1/0/1

add interface GigabitEthernet1/0/2

firewall zone dmz

set priority 50

ip route-static 0.0.0.0 0.0.0.0 10.1.11.2

ip route-static 0.0.0.0 0.0.0.0 10.1.12.2

ip route-static 0.0.0.0 0.0.0.0 10.1.13.2

FW2:

interface GigabitEthernet1/0/0

undo shutdown

ip address 10.1.42.2 255.255.255.0

interface GigabitEthernet1/0/1

undo shutdown

ip address 192.168.2.254 255.255.255.0

firewall zone local

set priority 100

firewall zone trust

set priority 85

add interface GigabitEthernet0/0/0

add interface GigabitEthernet1/0/1

firewall zone untrust

set priority 5

add interface GigabitEthernet1/0/0

firewall zone dmz

set priority 50

ip route-static 0.0.0.0 0.0.0.0 10.1.42.4

b.配置FW1tunnel口以及隧道引流

FW1:

interface Tunnel0

ip address 1.1.1.1 255.255.255.0

tunnel-protocol ipsec

alias 1

service-manage ping permit

ip route-static 192.168.2.0 24 Tunnel 0

c.配置安全策略

FW1:

ip service-set ike type object 16

service 0 protocol udp source-port 0 to 65535 destination-port 500

security-policy

rule name ike

source-zone local

source-zone untrust

destination-zone local

destination-zone untrust

service esp

service ike

action permit

rule name ping

source-zone trust

source-zone untrust

destination-zone trust

destination-zone untrust

source-address 192.168.1.0 mask 255.255.255.0

source-address 192.168.2.0 mask 255.255.255.0

destination-address 192.168.1.0 mask 255.255.255.0

destination-address 192.168.2.0 mask 255.255.255.0

service icmp

action permit

FW2:

ip service-set ike type object 16

service 0 protocol udp source-port 0 to 65535 destination-port 500

security-policy

rule name ike

source-zone local

source-zone untrust

destination-zone local

destination-zone untrust

service esp

service ike

action permit

rule name ping

source-zone trust

source-zone untrust

destination-zone trust

destination-zone untrust

source-address 192.168.1.0 mask 255.255.255.0

source-address 192.168.2.0 mask 255.255.255.0

destination-address 192.168.1.0 mask 255.255.255.0

destination-address 192.168.2.0 mask 255.255.255.0

service icmp

action permit

d.建立IPsec隧道

FW1:

acl number 3000

rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

ipsec proposal prop6472322180

encapsulation-mode auto

esp authentication-algorithm sha2-256

esp encryption-algorithm aes-256

ike proposal default

encryption-algorithm aes-256 aes-192 aes-128

dh group14

authentication-algorithm sha2-512 sha2-384 sha2-256

authentication-method pre-share

integrity-algorithm hmac-sha2-256

prf hmac-sha2-256

ike proposal 1

encryption-algorithm aes-256

dh group14

authentication-algorithm sha2-256

authentication-method pre-share

integrity-algorithm hmac-sha2-256

prf hmac-sha2-256

ike peer ike6472322180

exchange-mode auto

pre-shared-key %^%#pTVZ2E$H6/{GFB,*xyTOukZMPx`=Q56OD!F'|#/H%^%#

ike-proposal 1

remote-id-type none

dpd type periodic

remote-address 10.1.42.2

ipsec policy ipsec6472321925 1 isakmp

security acl 3000

ike-peer ike6472322180

proposal prop6472322180

tunnel local applied-interface

alias 12

sa trigger-mode auto

sa duration traffic-based 10485760

sa duration time-based 3600

interface Tunnel0

ip address 1.1.1.1 255.255.255.0

tunnel-protocol ipsec

alias 1

service-manage ping permit

ipsec policy ipsec6472321925

FW2:

acl number 3000

rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

ipsec proposal prop6472317853

encapsulation-mode auto

esp authentication-algorithm sha2-256

esp encryption-algorithm aes-256

ike proposal default

encryption-algorithm aes-256 aes-192 aes-128

dh group14

authentication-algorithm sha2-512 sha2-384 sha2-256

authentication-method pre-share

integrity-algorithm hmac-sha2-256

prf hmac-sha2-256

ike proposal 1

encryption-algorithm aes-256

dh group14

authentication-algorithm sha2-256

authentication-method pre-share

integrity-algorithm hmac-sha2-256

prf hmac-sha2-256

ike peer ike6472317853

exchange-mode auto

pre-shared-key %^%#yk4GAL->G0[4E'8>\c5-lO`j;^#}pVNhq5YRY'`R%^%#

ike-proposal 1

remote-id-type none

dpd type periodic

remote-address 1.1.1.1

ipsec policy ipsec6472317572 1 isakmp

security acl 3000

ike-peer ike6472317853

proposal prop6472317853

tunnel local applied-interface

alias 12

sa trigger-mode auto

sa duration traffic-based 10485760

sa duration time-based 3600

3.结果验证
a.IPsec隧道是否建立
b.是否可以ping通
4.总结

此方案就是网关使用tunnel口利用链路进行多链路备份,可用性较高,只要不是双方防火墙出现问题,三条备用链路

而且FW2也可以使用tunnel口,FW2侧多些路由器,也可以实现FW1侧多链路,这样可靠行会更高

相关推荐
虎头金猫2 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
wuyk5552 天前
《WiFi 嵌入式物联网开发全套实战》| 第 16 章 ESP32 AP+STA 双模共存原理与工程坑点
网络·stm32·物联网
QYRdata2 天前
年均增速24.2%!机器人数据湖未来六年增长动能强劲
网络·机器人·服务发现
CHENKONG_CK2 天前
破解制鞋打磨痛点:RFID赋能去毛刺工序自动化升级
网络·单片机·嵌入式硬件·网络协议·tcp/ip
chshang19922 天前
工业路由器是什么?浅谈5G工业网络中的IR602
网络·物联网·5g·智能路由器
萧瑟余晖2 天前
Netty 核心组件与 Reactor 模型详解
网络·架构
ITxiaobing20232 天前
IP 定位服务选型指南:从准确率到工程落地的技术考察
linux·服务器·网络
wuyk5552 天前
【Socket 进阶之路】第 9 章 Linux 网络服务量产稳定性优化|心跳保活、TIME_WAIT、SO_LINGER、内存池、断线重连、完整异常防护框架
linux·服务器·开发语言·网络·物联网
z落落2 天前
C#UDP+串口服务端+UDP 客户端(含 CRC16 校验)
网络·网络协议·udp
云运维笔记2 天前
华为设备IP地址配置全攻略
运维·网络·计算机网络·华为