H3C 与Azure进行连接VPN连接的命令!
来源:互联网 发布:域名续费期限 编辑:程序博客网 时间:2024/05/29 04:38
最近在做一个项目,希望实现基于Azure 的BGP的功能实现各个站点的相互的互联互通,所有的各个站点的数据均通过Azure实现数据访问的中转,各个站点之间不在部署专线。以下为网络拓扑架构:
由于分支机构到总部专线费用昂贵,而且速度无法得到保证,也存在联通和电信多链路的问题,为了解决这个问题,我们目前计划采用Azure进行中转,来实现我们的各个站点和总部的互通。
这次我们基本上采用了IPSEC VPN方式实现了相互的互联互通,Azure 提供了100M的带宽功能。因此能够最大限度的满足对于网络的要求。
各个站点到分支机构的都采用H3C的MSR 系列路由器,带IPSEC VPN及BGP功能,考虑他主要是因为不需要够吗所谓的LIC 激活相关的功能来实现互联互通。
各个站点大体上配置一致,下面是我们的其中站点的主要IPSEC 配置。
#
interface LoopBack100
ip address 172.16.xxx.xxx 255.255.255.255 #环回口配置,通常我们的BGP配置的环回就是这个
interface LoopBack100
ip address 172.16.xxx.xxx 255.255.255.255 #环回口配置,通常我们的BGP配置的环回就是这个
#
interface Tunnel2 mode ipsec # 建立基于隧道模式的VPN,基于IPSEC协议
ip address 169.254.0.1 255.255.255.0 #配置本地tunnel 接口的IP地址,云端自动变化不用配置
tcp mss 1350 #设置MSS 参数,这个是强制参数,如果不是,则必须修改
source aaa.aaa.aaa.aaa #本地源的IP
destination bbb.bbb.bbb.bbb #Azure 动态网关IP
tunnel protection ipsec profile azure #采用azure 的ipsec 策略绑定到隧道
#
bgp 65004 # 设置本地BGP,主要的ASN 号码不能有错
peer 10.0.2.254 as-number 65010 #云端BGP的IP
peer 10.0.2.254 connect-interface LoopBack100 # 云端BGP 连接环回地址
peer 10.0.2.254 ebgp-max-hop 64 #设置Ebgp 路由跳跃上限
#
address-family ipv4 unicast #BGP 路由导入
import-route static #设置导入模式
peer 10.0.2.254 enable #对端BGP 路由
#
ip route-static 0.0.0.0 0 bbb.bbb.bbb.bbb 静态路由
ip route-static 10.0.0.0 16 Tunnel2 云端路由走 隧道出接口
ip route-static 172.16.0.0 24 Tunnel2 云端路由走隧道出接口
ip route-static 192.168.1.0 24 Tunnel2 云端路由走隧道出接口,这部分根据实际的状况进行修改
#
ip address 169.254.0.1 255.255.255.0 #配置本地tunnel 接口的IP地址,云端自动变化不用配置
tcp mss 1350 #设置MSS 参数,这个是强制参数,如果不是,则必须修改
source aaa.aaa.aaa.aaa #本地源的IP
destination bbb.bbb.bbb.bbb #Azure 动态网关IP
tunnel protection ipsec profile azure #采用azure 的ipsec 策略绑定到隧道
#
bgp 65004 # 设置本地BGP,主要的ASN 号码不能有错
peer 10.0.2.254 as-number 65010 #云端BGP的IP
peer 10.0.2.254 connect-interface LoopBack100 # 云端BGP 连接环回地址
peer 10.0.2.254 ebgp-max-hop 64 #设置Ebgp 路由跳跃上限
#
address-family ipv4 unicast #BGP 路由导入
import-route static #设置导入模式
peer 10.0.2.254 enable #对端BGP 路由
#
ip route-static 0.0.0.0 0 bbb.bbb.bbb.bbb 静态路由
ip route-static 10.0.0.0 16 Tunnel2 云端路由走 隧道出接口
ip route-static 172.16.0.0 24 Tunnel2 云端路由走隧道出接口
ip route-static 192.168.1.0 24 Tunnel2 云端路由走隧道出接口,这部分根据实际的状况进行修改
#
#
ipsec transform-set azure #设置transform-set 并命名
esp encryption-algorithm des-cbc #设置加密模式
esp authentication-algorithm sha1 #设置授权模式
#
ipsec profile azure isakmp #设置IPSEC Profile
transform-set azure #引用Azure transform set
ikev2-profile azureprofile #引用IKEV2 的profile
ipsec transform-set azure #设置transform-set 并命名
esp encryption-algorithm des-cbc #设置加密模式
esp authentication-algorithm sha1 #设置授权模式
#
ipsec profile azure isakmp #设置IPSEC Profile
transform-set azure #引用Azure transform set
ikev2-profile azureprofile #引用IKEV2 的profile
ikev2 keychain azure
peer auzrepeer
address 139.219.230.195 255.255.255.255
identity address 139.219.230.195
pre-shared-key ciphertext $c$3$5EJTyQ5gs9kQQ7vKvnVBJ/u80BXJmluWvred
#
ikev2 profile azureprofile
authentication-method local pre-share
authentication-method remote pre-share
keychain azure
match local address aaa.aaa.aaa.aaa
match remote identity address bbb.bbb.bbb.bbb.195 255.255.255.255
#
ikev2 proposal 1 #定义好ikev2 的proposal
encryption aes-cbc-256 #加密方式aes-cbc-256
integrity sha1 #integrity 采用sha1方式
dh group2 #DH组设置为 dh 组2
prf sha1 # 设置PRF 模式为sha1
#
ikev2 policy azureprofile #定义IKEV2的策略
proposal 1 #采用Proposal 1模式
match local address aaa.aaa.aaa.aaa #匹配本地地址
peer auzrepeer
address 139.219.230.195 255.255.255.255
identity address 139.219.230.195
pre-shared-key ciphertext $c$3$5EJTyQ5gs9kQQ7vKvnVBJ/u80BXJmluWvred
#
ikev2 profile azureprofile
authentication-method local pre-share
authentication-method remote pre-share
keychain azure
match local address aaa.aaa.aaa.aaa
match remote identity address bbb.bbb.bbb.bbb.195 255.255.255.255
#
ikev2 proposal 1 #定义好ikev2 的proposal
encryption aes-cbc-256 #加密方式aes-cbc-256
integrity sha1 #integrity 采用sha1方式
dh group2 #DH组设置为 dh 组2
prf sha1 # 设置PRF 模式为sha1
#
ikev2 policy azureprofile #定义IKEV2的策略
proposal 1 #采用Proposal 1模式
match local address aaa.aaa.aaa.aaa #匹配本地地址
因为通过Azure实现中转路由,我们直接可以设置一个最近的邻居即可。
阅读全文
0 0
- H3C 与Azure进行连接VPN连接的命令!
- Azure中的WEB项目与Azure的MySQL连接
- 保持与 Microsoft Azure Files 的连接
- 使用CentOS 6.0 VPN 客户端连接H3C路由器
- 如何实现Azure虚拟网络中点到站VPN的自动连接
- 通过基于 Linux 的软件 VPN 设备连接到 Windows Azure 虚拟网络
- win7下对VPN进行自动连接
- Win7/8/10进行VPN连接
- vpn连接
- VPN连接
- VPN连接
- vpn无法连接的原因
- 远程连接实验室的VPN
- Window dos 命令 连接断开VPN
- 连接SQL Azure的几种方式
- 连接Windows Azure上的SQL数据库
- 排查 Azure 虚拟机的远程桌面连接问题
- 通过Windows Azure Connect ,实现本地机器与Windows Azure 虚拟机的相互连接(转+译)
- [高层建筑资料] 【结构精品案例】全球第八381m超高层—南京紫峰大厦工程技术解析
- spring之jdbc的DataSource的设置
- nginx+tomcat报504超时错误
- 编程常见报错原因对照表
- Launcher简单学习(一)布局基础与常用类的认识
- H3C 与Azure进行连接VPN连接的命令!
- 用C操作MYSQL数据库
- Linux C 总结篇(socket编程)
- VS 2015 linux makefile
- sticky-headers-recyclerview库使用出现的问题
- Xmind工具使用
- JAVA HASHMAP 用法
- #比特币挖矿part1# 挖矿算法
- Android