SmartMC网络的物理连接如图所示,TM为管理设备,TC 1~TC 2为成员设备。现需要通过自动方式建立SmartMC网络,并通过SmartMC组升级所有TC的配置文件。
· 所有TC的设备类型都相同,均为S5130S-52S-EI系列设备。
· FTP服务器的IP地址为192.168.239.2,用户名为admin,密码为admin。
· 配置文件名称为startup.cfg。
参考官网配置后,TC未上线
[S6520X_54QC_hexin-smartmc-group-S1]display smartmc group S1
Group name : S1
TC count : 0
Boot-loader file :
Startup-configuration file :
(1) 配置TC 1。
# 配置VLAN1接口。
<TC1> system-view
[TC1] interface vlan-interface 1
[TC1-Vlan-interface1] ip address 192.168.0.1 24
[TC1-Vlan-interface1] quit
# 开启HTTP、HTTPS服务。
[TC1] ip http enable
[TC1] ip https enable
# 开启Telnet服务。
[TC1] telnet server enable
# 开启基于HTTP的NETCONF over SOAP功能。
[TC1] netconf soap http enable
# 全局开启LLDP功能。
[TC1] lldp global enable
# 降低设备对本地用户密码复杂度的要求。
[TC1] password-control length 4
[TC1] password-control composition type-number 1 type-length 1
[TC1] undo password-control complexity user-name check
# 配置本地用户csdzsw,密码为hello123、服务类型为Telnet、HTTP和HTTPS、RBAC角色为network-admin。
[TC1] local-user csdzsw
[TC1-luser-manage-csdzsw] password simple hello123
[TC1-luser-manage-csdzsw] service-type telnet http https
[TC1-luser-manage-csdzsw] authorization-attribute user-role network-admin
[TC1-luser-manage-csdzsw] quit
# 配置VTY用户线0~63的认证方式为scheme。
[TC1] line vty 0 63
[TC1-line-vty0-63] authentication-mode scheme
[TC1-line-vty0-63] quit
# 开启SmartMC功能,并配置设备角色为成员设备。
[TC1] smartmc tc enable
(2) 配置TM。
# 配置VLAN 1000接口。
<TM> system-view
[TM] interface Vlan-interface1000
[TM-Ten-GigabitEthernet1/0/1] ip address 192.168.239.2 28
[TM-Ten-GigabitEthernet1/0/1] quit
# 配置VLAN1接口。
[TM] interface vlan-interface 1
[TM-Vlan-interface1] ip address 192.168.0.254 24
[TM-Vlan-interface1] quit
# 开启HTTP、HTTPS服务。
[TM] ip http enable
[TM] ip https enable
# 开启Telnet服务。
[TM] telnet server enable
# 开启基于HTTP的NETCONF over SOAP功能。
[TM] netconf soap http enable
# 全局开启LLDP功能。
[TM] lldp global enable
# 配置本地用户csdzsw,密码为hello12345、服务类型为Telnet、HTTP和HTTPS、RBAC角色为network-admin。
[TM] local-user csdzsw
[TM-luser-manage-csdzsw] password simple hello12345
[TM-luser-manage-csdzsw] service-type telnet http https
[TM-luser-manage-csdzsw] authorization-attribute user-role network-admin
[TM-luser-manage-csdzsw] quit
# 配置VTY用户线0~63的认证方式为scheme。
[TM] line vty 0 63
[TM-line-vty0-63] authentication-mode scheme
[TM-line-vty0-63] quit
# 开启SmartMC功能并配置设备的角色为管理设备,用户名为csdzsw,明文密码为hello12345。
[TM] smartmc tm username csdzsw password simple hello12345 enable
# 将接口VLAN 1000配置为SmartMC网络的出接口。
[TM] interface Vlan-interface1000
[TM-Ten-GigabitEthernet1/0/1] smartmc outbound
[TM-Ten-GigabitEthernet1/0/1] quit
# 配置FTP服务器信息,指定FTP服务器的IP为192.168.239.2,用户名为csdzsw,明文密码为hello12345。
[TM] smartmc ftp-server 192.168.239.2 username csdzsw password simple hello12345
# 创建SmartMC组S1,并进入SmartMC组视图。
[TM] smartmc group S1
# 配置SmartMC组的匹配规则为按照IP地址匹配成员设备。
[TM-smartmc-group-S1] match ip-address 192.168.0.0 24
# 配置SmartMC组使用的配置文件为startup.cfg。
[TM-smartmc-group-S1] startup-configuration startup.cfg
[TM-smartmc-group-S1] quit
# 执行立即升级操作。
[TM] smartmc upgrade startup-configuration group S1 startup.cfg
核对相关配置后,暂未看出异常,TC设备查看lldp邻居情况正常:(SWZX_S6520X_54QC_hexin是TM)
针对SmartMC的自动建立,官网说明:
管理设备收到成员设备的应答报文后,使用成员设备的缺省用户名(admin)和密码(admin)与成员设备建立NETCONF会话,并通过该会话获取成员设备的详细信息(例如成员设备的端口信息、LLDP邻居信息、STP信息、设备类型、软件版本等)。
故TC上面的本地用户需要是admin和admin,将下面用户修改后成功纳管;
# 配置本地用户csdzsw,密码为hello123、服务类型为Telnet、HTTP和HTTPS、RBAC角色为network-admin。
[TC1] local-user csdzsw
[TC1-luser-manage-csdzsw] password simple hello123
[TC1-luser-manage-csdzsw] service-type telnet http https
[TC1-luser-manage-csdzsw] authorization-attribute user-role network-admin
[TC1-luser-manage-csdzsw] quit
纳管成功截图:
web页面可视化截图:
注意点:
1、SmartMC必须要在vlan 1内建立;
2、TC本地账户的用户名在纳管前必须admin和admin;
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作