华为交换机的三种视图.docx
6页华为交换机的三种视图: 用户视图, 系统视图, 接口视图用户视图: 刚开始登入交换机时的视图,一般看到的是尖括号<> .save // 配置完交换机后保存当前配置的命令system-view // 进入系统视图的命令clock timezone BJ add|minus 8 // 设置时区clock datetime 16:36:00 2016-07-01 //设置交换机的时间· 1· 2· 3· 4· 5系统视图: 在用户视图下输入system-view后进入系统视图,一般为方括号[]display current-configuration // 显示当前配置user-interface maximum-vty 15 //配置vty最大连接数user-interface vty 0 14 //进入vty用户界面视图user privilege level 2 //设置vty登入的用户等级为2(配置用户级别)authentication-mode aaa //设置vty登入时的验证模式为用户名和密码验证aaa //进入AAA视图local-user admin password cipher admin@123 //设置aaa登入的用户名和密码local-user admin service-type telnet //设置admin用户远程登入时的协议user-interface console 0 //进入第0个console口的用户界面authentication-mode passwd //配置从console口登入交换机的认证模式为密码认证set authentication password cipher admin@123 //配置从console口登入交换机的密码· 1· 2· 3· 4· 5· 6· 7· 8· 9· 10· 11· 12· 13· 14vlan 10 //创建一个VLANinterface meth 0/0/1 //进入交换机的第一个管理网口ip address 192.168.1.110 24 //设置管理网口的ip地址和子网掩码interface gigabitethernet 0/0/1 //进入第一个业务网口port link-type access //设置第1个网口位access模式port default vlan 10 //设置此网口的VLAN号为10interface gigabitethnet 0/0/2 //进入第2个业务网口port link-type trunk //设置第二个网口位trunk模式port trunk allow-pass vlan 10 20 30 //设置此端口可以通过的VLAN号 // port trunk allow-pass vlan all 表示可以通过所有的带VLAN的帧Interface gigabitethnet 0/0/3 //进入第3个业务网口Port link-type hybrid //设置此端口为hybrid模式,每个端口默认就是hybrid模式Port hybrid pvid vlan 10 //设置pvid为10Port hybrid tagged vlan 20 30 40 //设置tagged列表为20,30,40Port hybrid untagged vlan 50 60 //设置untagged列表为50,60Display port vlan //显示当前各端口的VLAN情况· 1· 2· 3· 4· 5· 6· 7· 8· 9· 10· 11· 12· 13· 14· 15· 16· 17· 18· 19· 20· 21· 22· 23清除某个端口的配置Interface gigabitethernet 0/0/2Clear configuration thisUndo shutdownInterface gigabitethernet 0/0/3Undo port default vlan //access 模式的端口Undo port link-type Undo port hybrid pvid vlan vlanid //hybrid 模式的端口Undo port hybrid untagged vlan vlanid Undo port hybrid tagged vlan vlanid Undo port trunk pvid vlan //trunk 模式的端口Undo port trunk allow-pass vlan vlanid Undo port link-type恢复出厂设置s5700SI在用户视图下(按Ctrl+z组合键回到用户视图)输入如下命令操作reset saved-configurationYRebootNY· 1· 2· 3· 4· 5· 6· 7· 8· 9· 10· 11· 12· 13· 14· 15· 16· 17· 18· 19· 20· 21· 22· 23设置交换机的mux-vlan模式假设主VLAN是10,从VLAN中group模式的有VLAN 20, separate模式的有VLAN 30,server连接1号端口,PC1和PC2连接2和3号端口,PC3和PC4连接4和5号端口Vlan batch 10 20 30Vlan 10Mux-vlanSubordinate group 20Subordinate separate 30把各连接的端口设为access模式,并且加入到各自的VLAN中,且同时开启mux-vlan功能,Interface gigabitethernet 0/0/1 Port link-type accessPort default vlan 10Port mux-vlan enableInterface gigabitethernet 0/0/2 //3号端口设置方法类似Port link-type accessPort default vlan 20Port mux-vlan enableInterface gigabitethernet 0/0/4 //5号端口设置方法类似Port link-type accessPort default vlan 30Port mux-vlan enable· 1· 2· 3· 4· 5· 6· 7· 8· 9· 10· 11· 12· 13· 14· 15· 16· 17· 18· 19· 20· 21三层交换机接路由器LAN口Vlan 60 70Interface vlanif 60ip address 192.168.60.1 24interface vlanif 70ip address 192.168.1.238 24interface gigabitethernet 0/0/3port link-type accessport default vlan 60interface gigabitethernet 0/0/4port link-type accessport default vlan 70ip route-static 0.0.0.0 0.0.0.0 192.168.1.1在与交换机相连的路由器上设置一条静态ip地址,目的地址为交换机相关的各个网段地址,网关为交换机与路由器相连的vlanif的ip地址· 1· 2· 3· 4· 5· 6· 7· 8· 9· 10· 11· 12· 13· 14· 15批量配置交换机端口vlan batch 10 20port-group 1group-member gigabitethernet 0/0/1 to gigabitethernet 0/0/10port link-type accessport default vlan 10非物质文化遗产是指各族人民世代传承的,与群众生活密切相关的各种传统文化表现形式和文化空间,包括民俗活动、表演艺术、传统知识和技能以及与之相关的器具、实物、手工制品等。





