在经典版本的MultiSIM Reservation中,当通过两个移动网络提供IPVPN服务时,存在以下问题:
- 对于每个客户端,您需要创建自己的专用APN,在其中配置BGP或静态路由,立即为正确的IP寻址计划计算所需的主机数。
- , , .
- ().
- IPVPN LTE , , — IPVPN LTE «».
另一方面,我们拥有IPSec,其中所有路由和客户端设置都从传输中抽象出来,无论是有线Internet通道还是不同运营商的LTE,并且流量标签也可以存储在隧道内,尽管不提供SLA,因为Internet尤其是LTE / 3G,是一种无法预测的数据传输媒介。
因此,我们有了一个想法-“为什么不同时使用LTE IPsec?”将带有预先创建的APN的标准SIM卡放入路由器,并通过它们将IPSEC建立到我们的VPN HUB,并将客户端释放到其VRF。并且,如果存在有线信道,则将有线连接用作主要传输,并在发生事故的情况下,将流量切换到LTE。
因此,网络图开始看起来像这样:
可单击
的客户端一次最多可获取三个WAN通道,它们将对IPSec流量起“底层”的作用:
- 有线互联网访问通道。
- 第一个(主)LTE网络。
- 第二(备份)LTE网络(如果需要)。
现在,仍然可以为此服务交付选项选择和配置路由器。
配置路由器
在选择路由器时,我们对华为提供的两种型号AR161和AR129感兴趣。它们具有IPSec支持,支持两个SIM卡,4个以太网LAN端口+ 1个以太网WAN的LTE调制解调器,并且AR129型号还具有WiFi,也就是说,电路工作所需的一切,甚至更多。
但是,有了这些设置,一切都变得更加复杂了。
在为Multisim Redundancy配置路由器时,我们面临有线WAN和两个LTE网络之间优先级的问题,以便选择最佳的流量路由。
Huawei AR161 / 129为此提供了两个工具:
- 网络质量分析功能(又名NQA测试)。
对指定主机的icmp请求进行基本测试,以确定其可用性。 - 开放式可编程系统(OPS)+ Python功能。
一个非常强大的工具,它使您可以将信息保存在日志中,并基于icmp统计信息执行“智能”切换,但也很难学习。
为了解决我们的问题,我们选择了OPS + Python功能以仅启用两个LTE SIM,并为Internet +两个LTE SIM启用混合模式。
路由器上的大致配置如下:
如果只有2个Sim LTE连接
# IP WAN ( DHCP)
interface GigabitEthernet0/0/4
ip address dhcp-alloc
# APN , Cellular0/0/0
apn profile [APN #1]
apn [APN 1 NAME]
apn profile [APN #2]
apn [APN 2 NAME]
sim-id 2
# Cellular0/0/0
interface Cellular0/0/0
dialer enable-circular
apn-profile [APN #1] priority 120
apn-profile [APN #2]
dialer timer autodial 60
profile create lte-default [APN #1] sim-id 1
profile create lte-default [APN #2] sim-id 2
ip address negotiate
modem reboot
# IPSec
ipsec authentication sha2 compatible enable
ike local-name [IPSEC_LOGIN]
# IPSec
ipsec proposal ipsec
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-256
ike proposal 1
encryption-algorithm aes-256
dh group2
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
# IPSec
ike peer ipsec_1
pre-shared-key simple [IPSEC_PASSWORD]
ike-proposal 1
local-id-type fqdn
remote-id-type ip
dpd type periodic
dpd idle-time 10
dpd retransmit-interval 2
remote-address 100.64.0.100
route accept
config-exchange request
config-exchange set accept
config-exchange set send
ipsec profile ipsecprof_1
ike-peer ipsec_1
proposal ipsec
# IPSec -
interface Tunnel0/0/0
tunnel-protocol ipsec
ip address [ IP - Huawei] 255.255.255.252
source Cellular0/0/0
ipsec profile ipsecprof_1
#
ip route-static 0.0.0.0 0.0.0.0 Tunnel0/0/0
ip route-static [VPN HUB INTERNAL ADDRESS] 255.255.0.0 Cellular0/0/0
如果是Internet + 2x Sim LTE(含)
# IP WAN ( DHCP)
interface GigabitEthernet0/0/4
ip address dhcp-alloc
# APN , Cellular0/0/0
apn profile [APN #1]
apn [APN 1 NAME]
apn profile [APN #2]
apn [APN 2 NAME]
sim-id 2
# Cellular0/0/0
interface Cellular0/0/0
dialer enable-circular
apn-profile [APN #1] priority 120
apn-profile [APN #2]
dialer timer autodial 60
profile create lte-default [APN #1] sim-id 1
profile create lte-default [APN #2] sim-id 2
ip address negotiate
modem reboot
# IPSec
ipsec authentication sha2 compatible enable
ike local-name [IPSEC_LOGIN]
# IPSec
ipsec proposal ipsec
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-256
ike proposal 1
encryption-algorithm aes-256
dh group2
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
# IPSec
ike peer ipsec_1
pre-shared-key simple [IPSEC_PASSWORD]
ike-proposal 1
local-id-type fqdn
remote-id-type ip
dpd type periodic
dpd idle-time 10
dpd retransmit-interval 2
remote-address 81.211.80.50
route accept
config-exchange request
config-exchange set accept
config-exchange set send
ipsec profile ipsecprof_1
ike-peer ipsec_1
proposal ipsec
ike peer ipsec_2
pre-shared-key simple [IPSEC_PASSWORD]
ike-proposal 1
local-id-type fqdn
remote-id-type ip
dpd type periodic
dpd idle-time 10
dpd retransmit-interval 2
remote-address [VPN HUB INTERNAL ADDRESS]
route accept
config-exchange request
config-exchange set accept
config-exchange set send
ipsec profile ipsecprof_2
ike-peer ipsec_2
proposal ipsec
# IPSec-
interface LoopBack32
ip address [ IP - Huawei] 255.255.255.252
interface Tunnel0/0/0
ip address unnumbered interface LoopBack32
tunnel-protocol ipsec
source GigabitEthernet0/0/1
ipsec profile ipsecprof_1
interface Tunnel0/0/1
ip address unnumbered interface LoopBack32
tunnel-protocol ipsec
source Cellular0/0/0
ipsec profile ipsecprof_2
# ( )
nqa test-instance [username] inet
test-type icmp
destination-address ipv4 81.211.80.50
source-interface GigabitEthernet0/0/4
frequency 16
probe-count 2
start now
#
ip route-static 81.211.80.50 255.255.255.255 GigabitEthernet 0/0/4 dhcp track nqa [username] inet
ip route-static [VPN HUB INTERNAL ADDRESS] 255.255.255.255 NULL0 track nqa [username] inet
ip route-static [VPN HUB INTERNAL ADDRESS] 255.255.0.0 Cellular0/0/0 preference 70
ip route-static 80.240.216.155 255.255.255.255 GigabitEthernet 0/0/4 dhcp
ip route-static 194.67.0.206 255.255.255.255 GigabitEthernet 0/0/4 dhcp
一切都可以将已配置的路由器安装到客户端。
计划
从计划开发此解决方案的计划:
- 进行相同的操作,但是在Cisco / Mikrotik路由器上。
- 仅将所有交换逻辑转换为OPS + Python
在接下来的文章中,我们将告诉您如何与我们的Cloud PBX一起使用Multisim Reservation服务,如何通过x-connect在同一华为上实现L2-over-L3模式,布置脚本以在Python中切换SIM卡以及如何在路由器上部署USB。 感谢RnD的同事,特别是Denis Zinchenko(
德钦)和Andrey Voronov一起准备这些技术解决方案并帮助撰写本文!
PS:帖子的第一部分在这里。