华为S2300交换机基本配置 |
您所在的位置:网站首页 › 华为交换机s2326如何设置 › 华为S2300交换机基本配置 |
1. 进入华为S2300交换机配置界面并给交换机命名 sys //进入system-view视图进行交换机配置 Enter system view, return user view with Ctrl+Z. [Quidway]sysname Mill2meetingroom-S2300 //设置交换机名字为Mill2meetingroom-S2300(二厂会议室华为S2300) [Mill2meetingroom-S2300] 2. 批量创建VLAN
[Mill2meetingroom-S2300]vlan batch 2 to 21 Please wait... Done. //添加VLAN 2 到 VLAN 21(VLAN 1为默认VLAN) [Mill2meetingroom-S2300-vlan2] 3. 建立端口组并把端口批量加入端口组里,批量修改端口类型(port link-type)[Mill2meetingroom-S2300]port-group accessmeetingroom //建立端口组accessmeetingroom [Mill2meetingroom-S2300-port-group-accessmeetingroom]group-member Ethernet 0/0/1 to Ethernet 0/0/22 //添加组成员1到22号端口 [Mill2meetingroom-S2300-port-group-accessmeetingroom]port link-type access //设置改端口组成员为access口Execute command [port link-type access ] for port [Ethernet0/0/1] is finished. Execute command [port link-type access ] for port [Ethernet0/0/2] is finished. Execute command [port link-type access ] for port [Ethernet0/0/3] is finished. Execute command [port link-type access ] for port [Ethernet0/0/4] is finished. Execute command [port link-type access ] for port [Ethernet0/0/5] is finished. Execute command [port link-type access ] for port [Ethernet0/0/6] is finished. Execute command [port link-type access ] for port [Ethernet0/0/7] is finished. Execute command [port link-type access ] for port [Ethernet0/0/8] is finished. Execute command [port link-type access ] for port [Ethernet0/0/9] is finished. Execute command [port link-type access ] for port [Ethernet0/0/10] is finished. Execute command [port link-type access ] for port [Ethernet0/0/11] is finished. Execute command [port link-type access ] for port [Ethernet0/0/12] is finished. Execute command [port link-type access ] for port [Ethernet0/0/13] is finished. Execute command [port link-type access ] for port [Ethernet0/0/14] is finished. Execute command [port link-type access ] for port [Ethernet0/0/15] is finished. Execute command [port link-type access ] for port [Ethernet0/0/16] is finished. Execute command [port link-type access ] for port [Ethernet0/0/17] is finished. Execute command [port link-type access ] for port [Ethernet0/0/18] is finished. Execute command [port link-type access ] for port [Ethernet0/0/19] is finished. Execute command [port link-type access ] for port [Ethernet0/0/20] is finished. Execute command [port link-type access ] for port [Ethernet0/0/21] is finished. Execute command [port link-type access ] for port [Ethernet0/0/22] is finished. [Mill2meetingroom-S2300-port-group-accessmeetingroom]quit //设置成功后退出端口组配置 4. 批量划分端口VLAN [Mill2meetingroom-S2300]vlan 7[Mill2meetingroom-S2300-vlan7]port ethernet 0/0/1 to 0/0/16 //把1到16号口划分给VLAN 7 [Mill2meetingroom-S2300-vlan7]quit [Mill2meetingroom-S2300]vlan 6[Mill2meetingroom-S2300-vlan6]port ethernet 0/0/17 to 0/0/22 //把1到16号口划分给VLAN 6 [Mill2meetingroom-S2300-vlan6]quit 5. 设置trunk口[Mill2meetingroom-S2300]port-group trunkmeetingroom [Mill2meetingroom-S2300-port-group-trunkmeetingroom]group-member ethernet 0/0/23 to ethernet 0/0/24 [Mill2meetingroom-S2300-port-group-trunkmeetingroom]port link-type trunk Error: Link-type trunk conflicts with default VLAN attribute on a port. Execute command [port link-type trunk] for port [Ethernet0/0/23] is finished. Error: Link-type trunk conflicts with default VLAN attribute on a port. Execute command [port link-type trunk] for port [Ethernet0/0/24] is finished. [Mill2meetingroom-S2300-port-group-trunkmeetingroom]port trunk allow-pass vlan a llExecute command [port trunk allow-pass vlan all] for port [Ethernet0/0/23] is fi nished.Execute command [port trunk allow-pass vlan all] for port [Ethernet0/0/24] is fi nished.[Mill2meetingroom-S2300-port-group-trunkmeetingroom]negotiation auto Execute command [negotiation auto] for port [Ethernet0/0/23] is finished. Execute command [negotiation auto] for port [Ethernet0/0/24] is finished. 6. 设置交换机管理地址192.168.15.24 [Mill2meetingroom-S2300]int vlanif 1 [Mill2meetingroom-S2300-Vlanif1]shutdown //关闭vlanif 1Info: Interface Vlanif1 has already been shutdown. [Mill2meetingroom-S2300]interface vlanif 15[Mill2meetingroom-S2300-Vlanif15]ip address 192.168.15.24 255.255.255.0 [Mill2meetingroom-S2300-Vlanif15]undo shutdown Info: Interface Vlanif15 is not shutdown. [Mill2meetingroom-S2300-Vlanif15]quit[Mill2meetingroom-S2300]ip route-static 0.0.0.0 0.0.0.0 192.168.15.254 preferenc e 607. 设置console口 [Mill2meetingroom-S2300]user-interface con 0 [Mill2meetingroom-S2300-ui-console0]idle-timeout 0 0 [Mill2meetingroom-S2300-ui-console0]authentication-mode password [Mill2meetingroom-S2300-ui-console0]set authentication password cipher dabaicai [Mill2meetingroom-S2300-ui-console0]quit 8. 设置远程登录 [Mill2meetingroom-S2300]user-interface vty 0 4 [Mill2meetingroom-S2300-ui-vty0-4]idle-timeout 0 0 [Mill2meetingroom-S2300-ui-vty0-4]authentication-mode password [Mill2meetingroom-S2300-ui-vty0-4]set authentication password cipher dabaicai [Mill2meetingroom-S2300-ui-vty0-4]user privilege level 15 [Mill2meetingroom-S2300-ui-vty0-4]quit 9. 查看交换机当前配置 [Mill2meetingroom-S2300]display current-configuration #Error:Wrong parameter found #sysname Mill2meetingroom-S2300 cluster enable ntdp enable ntdp hop 16 ndp enablevlan batch 1 to 21 #bpdu enable [2cha #Hcluster enable-vty0-4]set aut ntdp enableassword ciph ntdp hop 16 ndp enable #voice-vlan mac-address 0001-e300-0000 mask ffff-ff00-0000 description Siemens p honevoice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000 description Cisco pho nevoice-vlan mac-address 0004-0d00-0000 mask ffff-ff00-0000 description Avaya pho nevoice-vlan mac-address 0060-b900-0000 mask ffff-ff00-0000 description Philips/N EC phonevoice-vlan mac-address 00d0-1e00-0000 mask ffff-ff00-0000 description Pingtel p honevoice-vlan mac-address 00e0-7500-0000 mask ffff-ff00-0000 description Polycom p honevoice-vlan mac-address 00e0-bb00-0000 mask ffff-ff00-0000 description 3com phon e #undo http server enable # interface Vlanif1 shutdownip address dhcp-alloc # interface Vlanif15ip address 192.168.15.24 255.255.255.0 # interface Ethernet0/0/1port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/2port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/3port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/4port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/5port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/6port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/7port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/8port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/9port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/10port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/11port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/12port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/13port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/14port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/15port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/16port link-type access port default vlan 7 ntdp enable ndp enable # interface Ethernet0/0/17port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/18port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/19port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/20port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/21port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/22port link-type access port default vlan 6 ntdp enable ndp enable # interface Ethernet0/0/23 port default vlan 1port trunk allow-pass vlan 1 to 4094 ntdp enable ndp enable # interface Ethernet0/0/24 port default vlan 1port trunk allow-pass vlan 1 to 4094 ntdp enable ndp enable # interface GigabitEthernet0/0/1 port default vlan 1ntdp enable ndp enable # interface GigabitEthernet0/0/2port default vlan 1 ntdp enable ndp enable # interface NULL0 aaaauthentication-scheme default authorization-scheme default accounting-scheme defaultdomain default domain default_admin #ip route-static 0.0.0.0 0.0.0.0 192.168.15.254 # user-interface con 0 authentication-mode passwordset authentication password cipher EJ |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |