V5 的配置改成v7的 大佬指点一下
clock timezone beijing add 08:00:00
#
super password sim 1111111
#
dhcp relay server-group 1 ip 192.168.0.19
dhcp relay server-group 2 ip 192.168.59.19
#
domain default enable jinluo
#
ipv6
#
telnet server enable
#
ip ttl-expires enable
ip unreachables enable
#
bfd echo-source-ip 1.0.0.1
#
switch-mode standard
switch-mode normal slot 4
switch-mode normal slot 6
#
switch-mode route-normal
#
password-recovery enable
#radius scheme portal
server-type extended
primary authentication 192.168.0.26
primary accounting 192.168.0.26
key authentication cipher $c$3$2baOEGiQ0pU5BCdg23l2iOWWkkN6MpuThQ==
key accounting cipher $c$3$yEeQleWzxPpvIhJLNovHuIwwjQTRIFbLew==
user-name-format without-domain
nas-ip 192.168.249.254
radius scheme login
primary authentication 192.168.0.26
primary accounting 192.168.0.26
key authentication cipher $c$3$Xr3dbX1AsdmLSlBA8mXE++sRacRUDwayMQ==
key accounting cipher $c$3$sM8CKduzCuOSKbLcuWbsMeDk+w8KaVxojA==
user-name-format without-domain
nas-ip 192.168.249.254
#
domain jinluo domain name jinluo
authentication login radius-scheme login local
authorization login radius-scheme login local
accounting login radius-scheme login local
authentication portal radius-scheme portal
authorization portal radius-scheme portal
accounting portal radius-scheme portal
access-limit disable
state active
idle-cut disable
self-service-url disable
accounting optional
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#nqa entry imclinktopologypleaseignore ping
type icmp-echo
destination ip 192.168.249.253
frequency 270000
#
mac-address blackhole c400-ad67-93df vlan 93
mac-address blackhole dc65-55b0-84fe vlan 93
mac-address blackhole dc65-55b0-7bba vlan 93
mac-address blackhole dc65-55b0-8531 vlan 93
mac-address blackhole dc65-55b0-8d8d vlan 93
mac-address blackhole c42f-9012-8972 vlan 93
mac-address blackhole ecc8-9c7b-7a4f vlan 93
mac-address blackhole a414-377c-97d3 vlan 93
mac-address blackhole a414-377c-977b vlan 93
mac-address blackhole 44a6-42f4-743f vlan 93
mac-address blackhole d8b0-4cd9-e19b vlan 93
mac-address blackhole c42f-9012-8a2a vlan 93
#
ip ip-prefix Static2Ospf index 10 permit 192.168.249.248 32
ip ip-prefix Static2Ospf index 20 permit 192.168.249.250 32
ip ip-prefix Static2Ospf index 30 permit 192.168.249.251 32
ip ip-prefix Static2Ospf index 40 permit 192.168.249.252 32
ip ip-prefix Static2Ospf index 50 permit 10.12.0.0 23
ip ip-prefix Static2Ospf index 60 permit 192.168.95.0 24
#
ip route-static 0.0.0.0 0.0.0.0 10.102.1.5 track 1 preference 100
ip route-static 0.0.0.0 0.0.0.0 10.103.1.9 preference 200 description "新屠宰-防火墙"
ip route-static 10.12.0.0 255.255.254.0 10.103.1.20 description "wifi-guest"
ip route-static 192.168.249.248 255.255.255.255 10.103.1.9
ip route-static 192.168.249.250 255.255.255.255 10.103.1.9
ip route-static 192.168.249.251 255.255.255.255 10.103.1.21
ip route-static 192.168.249.252 255.255.255.255 10.103.1.22
#
ipv6 route-static :: 0 FD00:86:2004:1022::1
#
info-center source DHCP channel 4 log state off
info-center source DHCPS channel 4 log state off
info-center loghost 192.168.0.26
undo info-center logfile enable
#
snmp-agent
snmp-agent local-engineid 800063A2035CDD70035FA5
snmp-agent community read jinluo-r acl 2000
snmp-agent community write jinluo-w acl 2000
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.0.26 params securityname jinluo-r
#
track 1 bfd echo interface Vlan-interface1022 remote ip 10.102.1.5 local ip 10.102.1.6
#
dhcp enable
#
nqa schedule imclinktopologypleaseignore ping start-time now lifetime 630720000
#
ntp-service unicast-server 192.168.0.10
#
qos vlan-policy BanGong vlan 93 inbound
qos vlan-policy BanGong vlan 95 inbound
qos vlan-policy BanGong vlan 92 inbound
#
load xml-configuration
#
load tr069-configuration
#
user-interface aux 0 1
user-interface vty 0 15
acl 2001 inbound
acl ipv6 2001 inbound
authentication-mode scheme
user privilege level 3
set authentication password cipher $c$3$rMQeAThH6pYWfXXqbSz58nm6VTvYN5q7XUnAW/o=
#
return
这份速查表整理了您配置中涉及的核心命令变化,是翻译配置时最常用到的:
| V5 命令 | V7 命令 (差异与说明) |
|---|---|
clock timezone beijing add 08:00:00 | clock timezone beijing add 08:00:00 (命令本身通用,但需确认 add 参数是否仍需指定) |
super password sim 1111111 | super password simple 1111111 (sim 变更为 simple) |
dhcp relay server-group 1 ip 192.168.0.19 | dhcp relay server-group 1server 192.168.0.19 (需要分两步配置) |
domain default enable jinluo | domain jinluodomain default enable jinluo (需要先创建domain) |
telnet server enable | telnet server enable (命令通用) |
bfd echo-source-ip 1.0.0.1 | bfd echo-source-ip 1.0.0.1 (命令通用) |
ip ip-prefix Static2Ospf index 10 permit 192.168.249.248 32 | ip prefix-list Static2Ospf index 10 permit 192.168.249.248 32 (ip ip-prefix 变为 ip prefix-list,命令更简洁) |
track 1 bfd echo interface Vlan-interface1022 remote ip 10.102.1.5 local ip 10.102.1.6 | track 1 bfd echo interface Vlan-interface1022 remote ip 10.102.1.5 local ip 10.102.1.6 (命令通用,但对端不需要配置BFD) |
ntp-service unicast-server 192.168.0.10 | ntp-service enablentp-service unicast-server 192.168.0.10 (需要先开启NTP服务) |
snmp-agent community read jinluo-r acl 2000 | snmp-agent community read jinluo-rsnmp-agent community write jinluo-wsnmp-agent community acl 2000 (建议分步配置,将ACL绑定到Community) |
user-interface vty 0 15acl 2001 inboundauthentication-mode schemeuser privilege level 3 | user-interface vty 0 15acl 2001 inboundauthentication-mode schemeuser-role network-admin (user privilege level 命令被废除,使用 user-role 替代) |
下面是一些核心模块的详细翻译和解释。
1. 系统时钟与时区
clock timezone时,务必确认命令格式。在某些V7版本中,需要去掉 add 参数,直接写为 clock timezone beijing 08:00:00。这是一个关键差异,若不确定,可以 ? 查看在线帮助。2. BFD (双向转发检测)
track 与 bfd echo 联动的配置在 V7 中依然有效。只要本端配置了 bfd echo-source-ip,对端无需配置BFD,只需将收到的 Echo 报文转发回本端即可。3. NTP (网络时间协议)
4. DHCP Relay (DHCP中继)
5. 黑洞MAC地址 (MAC Address Blackhole)
1. RADIUS Scheme (RADIUS方案)
server-type extended 在V7中已废除,但使用 cipher 加密的密码可以直接复用。2. ISP Domain (ISP域)
domain 视图下的AAA配置方法完全相同。domain default enable jinluo 命令也通用。3. User-Interface (用户接口)
user privilege level 命令在V7中已被 user-role 命令取代。您需要根据需求选择合适的用户角色,常用的有 network-admin (等同于V5的level 3) 和 network-operator (等同于level 1)。1. 地址前缀列表 (IP Prefix-List)
ip ip-prefix 变更为 ip prefix-list,语法更简洁。这条命令的作用是匹配一条精确的主机路由。在 route-policy 中引用时,if-match 子句后的命令也从 ip address prefix-list 变更为 ip address prefix-list。2. 静态路由 (Static Route)
暂无评论
# 时钟
clock timezone beijing offset 08:00:00
# 超级密码(V7 已合并到本地用户)
local-user admin class manage
password simple 1111111
service-type ssh telnet terminal
authorization-attribute user-role network-admin
authorization-attribute user-role level-3
# DHCP 中继
dhcp relay server-group 1 ip 192.168.0.19
dhcp relay server-group 2 ip 192.168.59.19
# 域名
domain default enable jinluo
# IPv6
ipv6
# TELNET
telnet server enable
# IP 异常报文
ip ttl-expires enable
ip unreachables enable
# BFD
bfd echo-source-ip 1.0.0.1
# 交换模式(V7 自动适配,无需配置)
# switch-mode standard
# switch-mode normal slot 4
# switch-mode normal slot 6
# switch-mode route-normal
# 密码恢复
password-recovery enable
# RADIUS scheme portal
radius scheme portal
server-type extended
primary authentication 192.168.0.26
primary accounting 192.168.0.26
key authentication cipher $c$3$2baOEGiQ0pU5BCdg23l2iOWWkkN6MpuThQ==
key accounting cipher $c$3$yEeQleWzxPpvIhJLNovHuIwwjQTRIFbLew==
user-name-format without-domain
nas-ip 192.168.249.254
# RADIUS scheme login
radius scheme login
primary authentication 192.168.0.26
primary accounting 192.168.0.26
key authentication cipher $c$3$Xr3dbX1AsdmLSlBA8mXE++sRacRUDwayMQ==
key accounting cipher $c$3$sM8CKduzCuOSKbLcuWbsMeDk+w8KaVxojA==
user-name-format without-domain
nas-ip 192.168.249.254
# 域 jinluo
domain jinluo
authentication login radius-scheme login local
authorization login radius-scheme login local
accounting login radius-scheme login local
authentication portal radius-scheme portal local
authorization portal radius-scheme portal local
accounting portal radius-scheme portal local
access-limit disable
state active
idle-cut disable
accounting optional
# 域 system
domain system
access-limit disable
state active
idle-cut disable
# NQA(V7 语法)
nqa entry imclinktopologypleaseignore ping
type icmp-echo
destination ip 192.168.249.253
frequency 270000
# 黑洞 MAC
mac-address blackhole c400-ad67-93df vlan 93
mac-address blackhole dc65-55b0-84fe vlan 93
mac-address blackhole dc65-55b0-7bba vlan 93
mac-address blackhole dc65-55b0-8531 vlan 93
mac-address blackhole dc65-55b0-8d8d vlan 93
mac-address blackhole c42f-9012-8972 vlan 93
mac-address blackhole ecc8-9c7b-7a4f vlan 93
mac-address blackhole a414-377c-97d3 vlan 93
mac-address blackhole a414-377c-977b vlan 93
mac-address blackhole 44a6-42f4-743f vlan 93
mac-address blackhole d8b0-4cd9-e19b vlan 93
mac-address blackhole c42f-9012-8a2a vlan 93
# 前缀列表
ip prefix-list Static2Ospf index 10 permit 192.168.249.248 32
ip prefix-list Static2Ospf index 20 permit 192.168.249.250 32
ip prefix-list Static2Ospf index 30 permit 192.168.249.251 32
ip prefix-list Static2Ospf index 40 permit 192.168.249.252 32
ip prefix-list Static2Ospf index 50 permit 10.12.0.0 23
ip prefix-list Static2Ospf index 60 permit 192.168.95.0 24
# 静态路由
ip route-static 0.0.0.0 0.0.0.0 10.102.1.5 track 1 preference 100
ip route-static 0.0.0.0 0.0.0.0 10.103.1.9 preference 200 description "新屠宰-防火墙"
ip route-static 10.12.0.0 255.255.254.0 10.103.1.20 description "wifi-guest"
ip route-static 192.168.249.248 255.255.255.255 10.103.1.9
ip route-static 192.168.249.250 255.255.255.255 10.103.1.9
ip route-static 192.168.249.251 255.255.255.255 10.103.1.21
ip route-static 192.168.249.252 255.255.255.255 10.103.1.22
# IPv6 路由
ipv6 route-static :: 0 FD00:86:2004:1022::1
# 日志
info-center source DHCP channel 4 log disable
info-center source DHCPS channel 4 log disable
info-center loghost 192.168.0.26
undo info-center logfile enable
# SNMP
snmp-agent
snmp-agent community read jinluo-r acl 2000
snmp-agent community write jinluo-w acl 2000
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.0.26 params securityname jinluo-r v2c
# Track
track 1 bfd echo interface Vlan-interface1022 remote 10.102.1.5 local 10.102.1.6
# DHCP 使能
dhcp enable
# NQA 调度
nqa schedule imclinktopologypleaseignore ping start-time now lifetime forever
# NTP
ntp-service unicast-server 192.168.0.10
# QOS
qos vlan-policy BanGong vlan 93 inbound
qos vlan-policy BanGong vlan 95 inbound
qos vlan-policy BanGong vlan 92 inbound
# 用户线路
user-interface aux 0 1
user-role network-admin
user-interface vty 0 15
acl 2001 inbound
acl ipv6 2001 inbound
authentication-mode scheme
user-role network-admin
user-role level-3
set authentication password cipher $c$3$rMQeAThH6pYWfXXqbSz58nm6VTvYN5q7XUnAW/o=
# 保存
save
super passwordlocal-user + user-role network-adminip ip-prefixip prefix-listauthentication portal radius-scheme portallocal 做备份authentication portal radius-scheme portal **local**
state offlog disablev2c
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论