#
version 5.20, Release 1910, Standard
#
sysname 3_ZT_WX_C_ H3C5040_1
#
clock timezone beijing add 08:00:00
#
domain default enable system
#
telnet server enable
#
dar p2p signature-file cfa0:/p2p_default.mtd
#
multicast routing-enable
#
mpls lsr-id 192.168.184.145
#
vlan 1
#
mpls
lsp-trigger all
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 192.168.184.2
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
user-group system
#
local-user admin
password cipher AU*2(-:=JB2/3:L02.;;!Q!!
authorization-attribute level 3
service-type telnet
local-user superuser
password cipher Q`R^W:7'V,SN#".;_P%&+A!!
authorization-attribute level 3
service-type ssh telnet terminal
#
cwmp
undo cwmp enable
#
interface Aux0
async mode flow
link-protocol ppp
#
interface Cellular0/0
async mode protocol
link-protocol ppp
#
interface Ethernet0/0
port link-mode route
shutdown
#
interface Ethernet5/0
port link-mode route
description TO_ 3_ZT_WX_C_ H3C5040_2
ip address 192.168.178.229 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
#
interface Ethernet5/1
port link-mode route
#
interface Ethernet5/1.1510
vlan-type dot1q vid 1510
mpls l2vc 192.168.184.2 530629111
#
interface Ethernet5/2
port link-mode route
#
interface Ethernet5/3
port link-mode route
#
interface NULL0
#
interface LoopBack0
description TO_3_ZT_WX_C_ H3C5040_1
ip address 192.168.184.145 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
description TO_2_ZT_C_ HuaWei _NE20E-X6_1
ip address 192.168.178.218 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
undo ip fast-forwarding
#
interface GigabitEthernet0/1
port link-mode route
description GE0-1_100M-to-YN_WX_Cisco7304_2
duplex full
speed 100
shutdown
undo ip fast-forwarding
#
interface GigabitEthernet0/2
port link-mode route
description TO_3_ZT_WX_C_ HuaWei_ S7706_1
ip address 192.168.178.233 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
#
interface Encrypt11/0
#
ospf 100 router-id 192.168.184.145
import-route direct
import-route static
area 0.0.3.102
network 192.168.178.216 0.0.0.3
network 192.168.178.228 0.0.0.3
network 192.168.178.232 0.0.0.3
network 192.168.184.145 0.0.0.0
#
#
voice-setup
voip called-start normal
#
sip
#
sip-server
#
call-rule-set
#
call-route
#
dial-program
default entity fax protocol standard-t38
default entity fax protocol standard-t38 hb-redundancy 0
default entity fax protocol standard-t38 lb-redundancy 0
select-rule type-first 2 1 3 4
#
number-substitute 100
rule 1 ^1... 97451...
rule 2 ^2... 97452...
rule 3 ^3... 97453...
rule 4 ^4... 97454...
rule 5 ^5... 97455...
rule 6 ^6... 97456...
rule 8 ^8... 97458...
rule 9 ^70.. 974570..
rule 10 ^71.. 974571..
rule 11 ^72.. 974572..
rule 12 ^73.. 974573..
rule 13 ^74.. 974574..
#
substitute outgoing-call called 100
#
entity 100 pots
dial-prefix 75
line 6/0
match-template 974575..
#
entity 101 pots
dial-prefix 75
line 6/1
match-template 974575..
#
entity 102 pots
dial-prefix 75
line 6/2
match-template 974575..
#
entity 103 pots
dial-prefix 75
line 6/3
match-template 974575..
#
entity 104 pots
dial-prefix 76
line 6/0
match-template 974576..
#
entity 105 pots
dial-prefix 76
line 6/1
match-template 974576..
#
entity 106 pots
dial-prefix 76
line 6/2
match-template 974576..
#
entity 107 pots
dial-prefix 76
line 6/3
match-template 974576..
#
entity 108 pots
dial-prefix 77
line 6/0
match-template 974577..
#
entity 109 pots
dial-prefix 77
line 6/1
match-template 974577..
#
entity 110 pots
dial-prefix 77
line 6/2
match-template 974577..
#
entity 111 pots
dial-prefix 77
line 6/3
match-template 974577..
#
entity 112 pots
dial-prefix 78
line 6/0
match-template 974578..
#
entity 113 pots
dial-prefix 78
line 6/1
match-template 974578..
#
entity 114 pots
dial-prefix 78
line 6/2
match-template 974578..
#
entity 115 pots
dial-prefix 78
line 6/3
match-template 974578..
#
entity 116 pots
dial-prefix 79
line 6/0
match-template 974579..
#
entity 117 pots
dial-prefix 79
line 6/1
match-template 974579..
#
entity 118 pots
dial-prefix 79
line 6/2
match-template 974579..
#
entity 119 pots
dial-prefix 79
line 6/3
match-template 974579..
#
entity 1009000 voip
address ras
match-template 9.......
outband h245
#
entity 1009750 voip
address ip 10.166.2.10
match-template 9750....
outband h245
#
aaa-client
#
gk-client
area-id 1#
gk-id ztwx-zone gk-addr 192.168.184.6 1718
gw-address 192.168.184.145
gw-id ztwx-gw-2611
ras-on
#
subscriber-line6/0
receive gain -4.0
#
subscriber-line6/1
receive gain -4.0
#
subscriber-line6/2
receive gain -4.0
#
subscriber-line6/3
receive gain -4.0
#
info-center source default channel 2 log level debugging
info-center loghost source LoopBack0
info-center loghost 192.168.125.14
info-center loghost 86.161.7.140
#
snmp-agent
snmp-agent local-engineid 800063A203002389A46621
snmp-agent community write ynga mib-view View_ALL
snmp-agent community read public mib-view View_ALL
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.125.33 params securityname public v2c
snmp-agent mib-view included View_ALL iso
#
ntp-service unicast-server 192.168.184.4
ntp-service unicast-server 10.166.154.50
#
load xml-configuration
#
load tr069-configuration
#
user-interface con 0
user-interface tty 13
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
set authentication password cipher 57\%K\T:S,CQ=^Q`MAF4<1!!
#
return
大神能受累说的具体点吗,新设备是5660,能帮忙完整下脚本吗
结合 H3C MSR V5 → V7 官方命令规范,完整逐行转换,适配 MSR5660 等 V7 平台,保留全部业务:MPLS L2VPN、LDP、OSPF、PIM、语音 VOIP/H.323 GK、号码变换、用户、网管、日志等,同时标注核心差异点。
前置说明
V7 不再区分 Ethernet/GigabitEthernet 逻辑差异,接口名按你硬件实际标识保留;
V5 mpls l2vc 统一改为 V7 标准 xconnect;
语音视图、本地用户、AAA、GK 客户端命令全面重构;
密文密码直接沿用,无需修改;
V7 取消 load xml-configuration/load tr069-configuration 两条命令,直接删除即可。
完整 V7 配置(可直接粘贴部署)
cli
#
clock timezone beijing add 08:00:00
#
telnet server enable
#
# 加载P2P特征库 V7沿用原命令
dar p2p signature-file cfa0:/p2p_default.mtd
#
multicast routing
#
# MPLS 全局配置
mpls lsr-id 192.168.184.145
mpls lsp-trigger all
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 192.168.184.2
#
# 域配置 V7精简,保留原有策略
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
# 本地用户 V7 必须加 class manage,权限改为 user-role
local-user admin class manage
password cipher AU*2(-:=JB2/3:L02.;;!Q!!
service-type telnet
authorization-attribute user-role level-3
#
local-user superuser class manage
password cipher Q`R^W:7'V,SN#".;_P%&+A!!
service-type ssh telnet terminal
authorization-attribute user-role level-3
#
# 关闭CWMP/TR069
cwmp
undo cwmp enable
#
# 物理接口
interface Aux0
async mode flow
link-protocol ppp
#
interface Cellular0/0
async mode protocol
link-protocol ppp
#
interface Ethernet0/0
port link-mode route
shutdown
#
interface Ethernet5/0
port link-mode route
description TO_3_ZT_WX_C_H3C5040_2
ip address 192.168.178.229 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
#
interface Ethernet5/1
port link-mode route
#
# 子接口 L2VPN 核心变更:mpls l2vc → xconnect
interface Ethernet5/1.1510
vlan-type dot1q vid 1510
xconnect 192.168.184.2 530629111 mpls l2vc
#
interface Ethernet5/2
port link-mode route
#
interface Ethernet5/3
port link-mode route
#
interface NULL0
#
interface LoopBack0
description TO_3_ZT_WX_C_H3C5040_1
ip address 192.168.184.145 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
description TO_2_ZT_C_HuaWei_NE20E-X6_1
ip address 192.168.178.218 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
undo ip fast-forwarding
#
interface GigabitEthernet0/1
port link-mode route
description GE0-1_100M-to-YN_WX_Cisco7304_2
speed 100
duplex full
shutdown
undo ip fast-forwarding
#
interface GigabitEthernet0/2
port link-mode route
description TO_3_ZT_WX_C_HuaWei_S7706_1
ip address 192.168.178.233 255.255.255.252
pim sm
mpls
mpls mtu 1580
mpls ldp
#
interface Encrypt11/0
#
# OSPF 区域格式兼容 V7,0.0.3.102 简写为 3.102
ospf 100 router-id 192.168.184.145
import-route direct
import-route static
area 3.102
network 192.168.178.216 0.0.0.3
network 192.168.178.228 0.0.0.3
network 192.168.178.232 0.0.0.3
network 192.168.184.145 0.0.0.0
#
# ===================== 语音模块 V5→V7 完整重构 =====================
# 根视图 voice 替代 voice-setup
voice voip
called-start normal
#
# FAX 全局参数
voice fax protocol standard-t38
voice fax redundancy hb 0 lb 0
#
# 号码选择规则
voice select-rule type-first 2 1 3 4
#
# 号码变换规则
voice number-substitute 100
rule 1 ^1... replace 97451...
rule 2 ^2... replace 97452...
rule 3 ^3... replace 97453...
rule 4 ^4... replace 97454...
rule 5 ^5... replace 97455...
rule 6 ^6... replace 97456...
rule 8 ^8... replace 97458...
rule 9 ^70.. replace 974570..
rule 10 ^71.. replace 974571..
rule 11 ^72.. replace 974572..
rule 12 ^73.. replace 974573..
rule 13 ^74.. replace 974574..
#
# 出局被叫替换
voice substitute outgoing called 100
#
# POTS 语音实体
voice entity 100 pots
line 6/0
dial-prefix 75
match-template 974575..
#
voice entity 101 pots
line 6/1
dial-prefix 75
match-template 974575..
#
voice entity 102 pots
line 6/2
dial-prefix 75
match-template 974575..
#
voice entity 103 pots
line 6/3
dial-prefix 75
match-template 974575..
#
voice entity 104 pots
line 6/0
dial-prefix 76
match-template 974576..
#
voice entity 105 pots
line 6/1
dial-prefix 76
match-template 974576..
#
voice entity 106 pots
line 6/2
dial-prefix 76
match-template 974576..
#
voice entity 107 pots
line 6/3
dial-prefix 76
match-template 974576..
#
voice entity 108 pots
line 6/0
dial-prefix 77
match-template 974577..
#
voice entity 109 pots
line 6/1
dial-prefix 77
match-template 974577..
#
voice entity 110 pots
line 6/2
dial-prefix 77
match-template 974577..
#
voice entity 111 pots
line 6/3
dial-prefix 77
match-template 974577..
#
voice entity 112 pots
line 6/0
dial-prefix 78
match-template 974578..
#
voice entity 113 pots
line 6/1
dial-prefix 78
match-template 974578..
#
voice entity 114 pots
line 6/2
dial-prefix 78
match-template 974578..
#
voice entity 115 pots
line 6/3
dial-prefix 78
match-template 974578..
#
voice entity 116 pots
line 6/0
dial-prefix 79
match-template 974579..
#
voice entity 117 pots
line 6/1
dial-prefix 79
match-template 974579..
#
voice entity 118 pots
line 6/2
dial-prefix 79
match-template 974579..
#
voice entity 119 pots
line 6/3
dial-prefix 79
match-template 974579..
#
# VOIP 语音实体
voice entity 1009000 voip
address ras
match-template 9.......
#
voice entity 1009750 voip
address ip 10.166.2.10
match-template 9750....
#
# H.323 GK 客户端 V7 专用视图
voice gk-client
gk id ztwx-zone ip 192.168.184.6 port 1718
gw id ztwx-gw-2611
gw ip 192.168.184.145
ras enable
#
# 模拟线增益配置
voice subscriber-line 6/0
receive gain -4.0
#
voice subscriber-line 6/1
receive gain -4.0
#
voice subscriber-line 6/2
receive gain -4.0
#
voice subscriber-line 6/3
receive gain -4.0
#
# 日志配置
info-center source default channel 2 log level debugging
info-center loghost source LoopBack0
info-center loghost 192.168.125.14
info-center loghost 86.161.7.140
#
# SNMP 配置
snmp-agent
snmp-agent local-engineid 800063A203002389A46621
snmp-agent community read public mib-view View_ALL
snmp-agent community write ynga mib-view View_ALL
snmp-agent sys-info version all
snmp-agent mib-view included View_ALL iso
snmp-agent target-host trap address udp-domain 192.168.125.33 params securityname public v2c
#
# NTP 服务器
ntp-service unicast-server 192.168.184.4
ntp-service unicast-server 10.166.154.50
#
# 用户线 V7 兼容原有配置
user-interface con 0
user-interface tty 13
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
set authentication password cipher 57\%K\T:S,CQ=^Q`MAF4<1!!
#
二、核心命令差异对照表(运维必看)
1. MPLS L2VPN(最关键业务)
V5
plaintext
mpls l2vc 192.168.184.2 530629111
V7 标准
plaintext
xconnect 192.168.184.2 530629111 mpls l2vc
2. 本地用户 & 权限
V5
plaintext
local-user admin
authorization-attribute level 3
V7
plaintext
local-user admin class manage
authorization-attribute user-role level-3
3. 语音整体架构
顶层视图:voice-setup → voice
实体配置:dial-program entity → voice entity
号码变换:number-substitute → voice number-substitute
GK 客户端:gk-client 移入 voice gk-client 视图
模拟线:subscriber-line → voice subscriber-line
4. 组播
V5:multicast routing-enable
V7:multicast routing
5. 废弃命令(直接删除)
V7 平台不支持,已全部剔除:
plaintext
load xml-configuration
load tr069-configuration
6. OSPF 区域
V5 写法 area 0.0.3.102,V7 支持简写 area 3.102,功能完全一致。
三、上线前校验 & 排错要点
接口状态
配置完成后执行 display ip interface brief,核对所有接口 IP、状态与原 V5 设备一致。
MPLS/LDP 校验
cli
display mpls lsr-id
display mpls ldp peer
display xconnect summary
查看 LDP 邻居、L2VC 虚链路状态为Up。
语音校验
cli
display voice entity
display voice gk-client status
检查 POTS/VOIP 实体、GK 注册状态。
连通性测试
内网互通、MPLS 二层专线互通
电话呼叫、号码替换、传真功能测试
密码说明:所有 cipher 密文密码为设备加密格式,禁止手动修改,直接使用即可。
四、保存配置
配置完成后执行保存,防止重启丢失:
cli
save
mpls l2vc 192.168.184.2 530629111 这种静态 VC 的配置方式在 V7 中依然适用。voice-setup 视图及其下的 sip、dial-program、entity 等命令在 V7 中已被废弃。您需要按照 V7 全新的 VoIP 架构重新配置:entity 100 pots, line 6/0, match-template 974575..voice voice-port 6/0 或配置 voice dial-peer,并使用 destination-pattern 974575.. 来匹配号码。同时需要在 dial-peer 下绑定对应的 SIP 呼叫服务器(VoIP Profile)。entity 1009750 voip, address ip 10.166.2.10voice voip-profile <name> 定义 SIP 参数,并通过 sip server 或 registrar 命令指定对端 IP 10.166.2.10。rule 1 ^1... 97451...voice translation-rule <id>,语法变更为类似 rule 1 /^1.../ /97451.../,然后在 voice translation-profile 中调用该 rule。gk-id ztwx-zone gk-addr 192.168.184.6 1718sip proxy 或 sip registrar;若必须对接传统 H.323 GK,V7 仍保留部分兼容命令,但建议评估是否可升级为纯 SIP 组网。local-user admin 在 V7 中需增加 class 属性,变为 local-user admin class manage。authorization-attribute level 3 在 V7 中被 user-role network-admin 取代(等同于 V5 的 level 3)。service-type 中明确开启所需的服务(如 ssh telnet terminal)。Ethernet 和 GigabitEthernet 在 V7 中可能统一为 GigabitEthernet 或根据实际板卡命名为 Ten-GigabitEthernet 等,请根据新设备物理面板调整接口编号。info-center 和 snmp-agent 的基础命令通用,直接复制即可。
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
大神能受累说的具体点吗,新设备是5660,能帮忙完整下脚本吗