华为交换机的配置--S2700 system-view //进入配置模式 [Quidway]sysname B1 //给交换机命名为B1 [B1]httpserverloadflash:/S2700?..zip//加载WEB管理程序 [B1]http server enable //开启WEB管理功能 [B1]user-interface console0 //进入consoleO端口的配置 [B1-ui-cono]authentication-modepassword//启用密码认证 [B1-ui-con0]set authentication password cipherqqgroup//设置密文密码 [B1-ui-conO]user privilege level3 //安全级别为3 [B1-ui-con0]quit //退出 [B1]user-interface vty 0 4 //进入VTY配置 [B1-ui-vty0-4]authentication-mode password [B1-ui-vtyo-4]set authentication password cipher qq [B1-ui-vty0-4]user privilege level 3 [B1-ui-vty0-4]quit
[B1]vlan 10 //创建VLAN10 [B1-vlan10]interfaceEthernet0/0/1 //进入交换机的端口 [B1-ethernet0/0/1]portlink-typeaccess//设置端口模式为接入模式 [B1-ethernet0/0/1]portdefaultvlan10//把该端口加入VLAN10 [B1-ethernet0/0/1]interfaceEthernet0/0/24 [B1-ethernet 0/0/24]port link-type trunk //设置端口模式为TRUNK [B1-ethernet0/0/24]port trunkpermitvlan10//设置TRUNK允许通过的VLAN [B1-ethernet 0/0/24]quit [B1]interfacevlan10 //进入VLAN接口 [B1]ip add 192.168.10.1 24 ://给VLAN配置管理地址.
[B1]quit save //保存