新的交换机使用admin/admin登录进去,然后开始配置
基础配置
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]]sysname openstack-sw01[openstack-sw01]user-interface aux 0
[openstack-sw01-line-aux0]authentication-mode password
[openstack-sw01-line-aux0]set authentication password simple 密码
配置vlan
<openstack-sw01>system-view
[openstack-sw01-vlan2]vlan 2
[openstack-sw01-vlan3]vlan 3
[openstack-sw01-vlan3]vlan 4 to 20
[openstack-sw01-Vlan-interface2]interface Vlan-interface 2
[openstack-sw01-Vlan-interface2]ip address 192.168.10.1 24
加入端口
[openstack-sw01-vlan2]vlan 2
[openstack-sw01-vlan2]port GigabitEthernet 1/0/2
[openstack-sw01-vlan2]port GigabitEthernet 1/0/3 to GigabitEthernet 1/0/10
配置trunk
[openstack-sw01]interface GigabitEthernet 1/0/1[openstack-sw01-GigabitEthernet1/0/1]port link-type trunk[openstack-sw01-GigabitEthernet1/0/1]port trunk permit vlan 2
[openstack-sw01-GigabitEthernet1/0/1]port trunk permit vlan 3
查看命令
[openstack-sw01]display current-configuration
[openstack-sw01]display saved-configuration
[openstack-sw01]display interface GigabitEthernet 1/0/1
[openstack-sw01]display vlan 2
[openstack-sw01]display version
删除(原命令前加undo)
[openstack-sw01]undo vlan 2
保存(不保存的话断电配置还原)
[openstack-sw01]save
配置web访问
[H3C]ip https enable
[H3C]local-user admin
[H3C-luser-manage-admin]servi
[H3C-luser-manage-admin]service-type telnet
[H3C-luser-manage-admin]password simple ${password}
[H3C-luser-manage-admin]exit
[H3C]super password role level-3 simple ${super_password}
通过任意vlan的管理ip可以登录web页面
重置console密码
链接好console口,打开终端,重启交换机,一直按ctrl+B,进入恢复模式,输入7,y启动跳过启动高配置文件,输入0重启,重启后跳过启动配置文件,这时不需要密码可以登录交换机
<H3C>dir
Directory of flash:0 -rw- 220684 Jan 01 2013 00:00:00 defaultfile.zip1 drw- - Jan 01 2013 00:00:14 diagfile2 -rw- 735 Jan 01 2013 14:08:26 hostkey3 -rw- 1569 Jan 01 2013 14:04:38 ifindex.dat4 drw- - Jan 02 2013 00:00:14 logfile5 drw- - Jan 01 2013 00:00:28 pki6 -rw- 5799936 Jan 01 2013 00:00:00 s5000e_x-cmw710-boot-r6126p20.bin7 -rw- 43059200 Jan 01 2013 00:00:00 s5000e_x-cmw710-system-r6126p20.bin8 drw- - Jan 01 2013 00:00:14 seclog9 -rw- 591 Jan 01 2013 14:08:27 serverkey10 -rw- 5197 Jan 01 2013 14:04:39 startup.cfg11 -rw- 124780 Jan 01 2013 14:04:39 startup.mdb251904 KB total (202548 KB free)<H3C>copy startup.cfg start_bak.cfg
准备一个tftp服务器,与交换机相连,交换机vlan1 ip和tftp ip配置在同一个网段,备份startup.cfg
<H3C>tftp 10.10.12.23 startup.cfg #将启动配置文件拷贝到tftp服务器
在tftp服务器对该文件进行编辑
local-user admin class managepassword hash $h$6$9+/iB9Ns8uphS3uj$YxSSy+fVNrbXnwYrPzdh4Q9HAyZjUNhigVfQ3grO1zj0B9M1gcQFAKSYCP/SnPpRiPgKtreC2M/Xjy6b9DDHEg==service-type telnet http https terminalauthorization-attribute user-role network-adminauthorization-attribute user-role network-operator#password行改为下面内容password simple 123
在交换机使用修改过后的配置文件覆盖原来的配置文件
<H3C>restore startup-configuration 10.10.12.23 startup.cfg
重启交换机
使用admin/123登录