这种方式最为直接,适合临时切换。
修改外网口IP:导航至“网络配置 > 接口 > 物理接口”,编辑连接外网的接口(如GE1),将其IP地址更新为移动分配的IP。
调整默认路由:导航至“网络配置 > 路由 > 静态路由”,找到目的地址为0.0.0.0(掩码0.0.0.0)的默认路由,将其“下一跳”地址修改为移动运营商的网关IP。
使用链路负载均衡功能,可以实现主备链路的自动切换。
配置接口IP:依次为联通和移动线路的接口配置正确的IP地址。
配置健康检查:导航至“网络配置 > 链路负载均衡 > 健康检查”,创建针对移动网关的检查策略(如PING),用于链路状态检测。
配置负载均衡策略:创建策略,将移动线路设置为高优先级,联通线路为低优先级。这样当移动线路故障时,流量会自动切换至联通线路。
system-view
restore factory-default
# 提示确认:输入 y
reboot
# 提示是否保存当前配置:选 n
192.168.1.1/24admin / 密码:admin 或 h3capadmin(以机身标签为准)112.85.x.x/28112.85.x.1211.138.x.x/27211.138.x.254192.168.100.1/24# 进入系统
system-view
# 1. 配置联通 WAN1
interface GigabitEthernet 0/0
ip address 112.85.x.x 255.255.255.240
undo shutdown
quit
# 2. 配置移动 WAN2
interface GigabitEthernet 0/1
ip address 211.138.x.x 255.255.255.224
undo shutdown
quit
# 3. 内网接口(GE0/2)
interface GigabitEthernet 0/2
port link-mode route
ip address 192.168.100.1 255.255.255.0
undo shutdown
quit
# 1. 定义ACL匹配内网
acl basic 2000
rule permit source 192.168.100.0 0.0.0.255
quit
# 2. 策略路由:内网 → 强制走移动 WAN2
policy-based-route MOBILE permit node 10
if-match acl 2000
apply next-hop 211.138.x.254 # 移动网关
quit
# 3. 在内网口应用策略路由
interface GigabitEthernet 0/2
ip policy-based-route MOBILE
quit
192.168.100.0/24211.138.x.254(移动网关)GE0/1bgp 65001
router-id 192.168.100.1
# 地址族
address-family ipv4 unicast
import-route static
import-route direct
quit
# 联通BGP邻居(示例)
peer 112.85.x.1 as-number 4837
# 移动BGP邻居(示例)
peer 211.138.x.254 as-number 9808
# 发布内网
network 192.168.100.0 255.255.255.0
quit
# 路由策略优选移动
route-policy MOBILE_PREF permit node 10
apply local-preference 200
quit
bgp 65001
address-family ipv4 unicast
peer 211.138.x.254 route-policy MOBILE_PREF import
quit
# 主:移动(优先级60)
ip route-static 0.0.0.0 0.0.0.0 211.138.x.254 preference 60
# 备:联通(优先级100)
ip route-static 0.0.0.0 0.0.0.0 112.85.x.1 preference 100
nat address-group 1
mode no-pat
section 0 211.138.x.x 211.138.x.x # 移动公网IP
nat address-group 2
mode no-pat
section 0 112.85.x.x 112.85.x.x # 联通公网IP
# 内网→移动
nat policy 1
rule 0
source-zone Trust
destination-zone Untrust
source-address 192.168.100.0 24
action source-nat address-group 1
egress-interface GigabitEthernet 0/1
quit
# 内网→联通(备用)
nat policy 2
rule 0
source-zone Trust
destination-zone Untrust
source-address 192.168.100.0 24
action source-nat address-group 2
egress-interface GigabitEthernet 0/0
quit
display ip policy-based-route
display ip routing-table
display bgp peer
display bgp routing-table
display nat policy
暂无评论
首页支持文档与软件文档中心安全应用控制网关产品H3C SecPath ACG1000系列应用控制网关
打开你的电脑,在浏览器输入知了社区,找到这个帖子,要么在别人下面评论,要么点我的头像。
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论