H3C交换机基本配置

  1. 通过console连接到交换机。


H3C交换机基本配置_第1张图片

2. 在启动界面下,输入sys进行配置模式,输入sysname修改主机名

H3C交换机基本配置_第2张图片

3.  通过local-user 命令创建本地用户,设置密码及权限。

[meac-core-p01-luser-huawei]authorization-attribute level 3
[meac-core-p01-luser-huawei]ser
[meac-core-p01-luser-huawei]service-type ?
  ftp         FTP service type
  lan-access  LAN-ACCESS service type
  ssh         Secure Shell service type
  telnet      TELNET service type
  terminal    TERMINAL service type
  web         Web service type

[meac-core-p01-luser-huawei]service-type s
[meac-core-p01-luser-huawei]service-type ssh te
[meac-core-p01-luser-huawei]service-type ssh telnet
[meac-core-p01-luser-huawei]

4. 开启telnet服务,并且设置console和VTY的连接认证。

[meac-core-p01]telnet server enable
[meac-core-p01]user
[meac-core-p01]user-i
[meac-core-p01]user-interface
[meac-core-p01]user-interface a
[meac-core-p01]user-interface aux 0
[meac-core-p01-ui-aux0]au
[meac-core-p01-ui-aux0]auth
[meac-core-p01-ui-aux0]authentication-mode sc
[meac-core-p01-ui-aux0]authentication-mode scheme
[meac-core-p01-ui-aux0]quit
[meac-core-p01]user
[meac-core-p01]user-i
[meac-core-p01]user-interface v
[meac-core-p01]user-interface vty 0 15
[meac-core-p01-ui-vty0-15]auth
[meac-core-p01-ui-vty0-15]authentication-mode sc
[meac-core-p01-ui-vty0-15]authentication-mode scheme
[meac-core-p01-ui-vty0-15]

5. 创建VLAN, 设置端口模式。

[meac-core-p01]
[meac-core-p01]vlan 200
[meac-core-p01-vlan200]name management-vlan
[meac-core-p01-vlan200]quit
[meac-core-p01]int ra
[meac-core-p01]int range e
[meac-core-p01]int range Ethernet 1/0/1 to e
[meac-core-p01]int range Ethernet 1/0/1 to Ethernet 1/0/6
[meac-core-p01-if-range]port li
[meac-core-p01-if-range]port link-t
[meac-core-p01-if-range]port link-type tru
[meac-core-p01-if-range]port link-type trunk
[meac-core-p01-if-range]port tr
[meac-core-p01-if-range]port trunk per
[meac-core-p01-if-range]port trunk permit vl
[meac-core-p01-if-range]port trunk permit vlan ?
  INTEGER<1-4094>  VLAN ID
  all              All the VLANs

[meac-core-p01-if-range]port trunk permit vlan 100 ?
  INTEGER<1-4094>  VLAN ID
  to               Range of VLAN ID
              

[meac-core-p01-if-range]port trunk permit vlan 100 200
 Please wait... Done.
 Please wait... Done.
 Please wait... Done.
 Please wait... Done.