建立并配置VLAN system-view
//进入配置模式 [H3C]vlan 10
//建立VLAN 10  [H3C-vlan10]port Ethernet1/0/19
//把Ethernet1/0/19 加入到VLAN 10里面 [H3C-vlan10]name test //名字为test  [H3C-vlan10]descriptio test //描述为test [H3C-vlan10]quit //退出vlan 10  [H3C]interface vlan 10 进入VLAN 300里  [H3C-Vlan-interface10]ip address 192.168.1.1 255.255.255.0 配置IP地址 
  VLAN 20的配置 [H3C]vlan 20 //建立vlan 20  [H3C-vlan20]port Ethernet 1/0/10 to Ethernet 1/0/15 //把端口1/0/10到1/0/15加入到vlan 20里 [H3C-vlan20]name jishu [H3C-vlan20]descriptiojishu [H3C-vlan20]quit [H3C]interface vlan 20  [H3C-Vlan-interface20]ip address 192.168.2.1 255.255.255.0   [H3C-vlan10]undo port Ethernet1/0/19 //VLAN里面端口的删除 [H3C]undo vlan 10 //VLAN的删除   ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 preference 60 //建立默认路由   建立DHCP中继  [H3C]dhcp-server 1 ip 192.168.8.9 //配置dhcp服务器IP  [H3C]dhcp relay information enable //启动DHCP中继服务 [H3C]interface vlan 10 //进入VLAN 10接口  [H3C-Vlan-interface10]dhcp-server 1 //设置vlan 10接口的DHCP-server为1  
设置交换机密码  [H3C]user-interface aux 0 7  [H3C-ui-aux0-7]user privilege level 3  [H3C-ui-aux0-7]set authentication password simple yokaswich   [H3C]user-interface vty 0 4  [H3C-ui-vty0-4]user privilege level 3  [H3C-ui-vty0-4]set authentication password simple yokaswich   [H3C]display current-configuration  //查看配置 [H3C]save  //保存配置