设为首页 收藏本站
查看: 962|回复: 0

[经验分享] 华为S2300交换机基本配置

[复制链接]

尚未签到

发表于 2018-7-23 09:37:26 | 显示全部楼层 |阅读模式
  1. 进入华为S2300交换机配置界面并给交换机命名
<Quidway>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]quit5. 设置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
ll  Execute 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 1  Info: 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 shutdownInfo: 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 60  7. 设置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 enable  vlan batch 1 to 21
#  bpdu enable
[2cha#H  cluster 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
hone  voice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000 description Cisco pho
ne  voice-vlan mac-address 0004-0d00-0000 mask ffff-ff00-0000 description Avaya pho
ne  voice-vlan mac-address 0060-b900-0000 mask ffff-ff00-0000 description Philips/N
EC phone  voice-vlan mac-address 00d0-1e00-0000 mask ffff-ff00-0000 description Pingtel p
hone  voice-vlan mac-address 00e0-7500-0000 mask ffff-ff00-0000 description Polycom p
hone  voice-vlan mac-address 00e0-bb00-0000 mask ffff-ff00-0000 description 3com phon
e#  undo http server enable
#interface Vlanif1                      shutdown  ip address dhcp-alloc
#interface Vlanif15  ip address 192.168.15.24 255.255.255.0
#interface Ethernet0/0/1  port link-type access
  port default vlan 7
  ntdp enable
  ndp enable
#interface Ethernet0/0/2  port link-type access
  port default vlan 7
  ntdp enable
ndp enable      # interface Ethernet0/0/3  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/4  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/5  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/6  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/7  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/8  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/9  port link-type access
  port default vlan 7
  ntdp enable
ndp enable#interface Ethernet0/0/10  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/11  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/12  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/13  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/14  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/15  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/16  port link-type access
  port default vlan 7
  ntdp enable
ndp enable    #interface Ethernet0/0/17  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/18  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/19  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/20  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/21  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/22  port link-type access
  port default vlan 6
  ntdp enable
ndp enable#interface Ethernet0/0/23 port default vlan 1  port trunk allow-pass vlan 1 to 4094
  ntdp enable
ndp enable#interface Ethernet0/0/24 port default vlan 1  port trunk allow-pass vlan 1 to 4094
  ntdp enable
ndp enable#interface GigabitEthernet0/0/1 port default vlan 1  ntdp enable
ndp enable#interface GigabitEthernet0/0/2  port default vlan 1
  ntdp enable
ndp enable#interface NULL0aaa  authentication-scheme default
authorization-scheme default accounting-scheme default  domain 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 password  set authentication password cipher EJ<VT&QM)6+Q=^Q`MAF4<1!!
idle-timeout 0 0user-interface vty 0 4  user privilege level 15
  set authentication password cipher EJ<VT&QM)6+Q=^Q`MAF4<1!!
idle-timeout 0 0#  port-group accessmeetingroom
group-member Ethernet0/0/1 group-member Ethernet0/0/2 group-member Ethernet0/0/3Ethernet0/0/4 group-member Ethernet0/0/5 group-member Ethernet0/0/6 group-member Ethernet0/0/7 group-member Ethernet0/0/8 group-member Ethernet0/0/9 group-member Ethernet0/0/10  group-member Ethernet0/0/11
group-member Ethernet0/0/12 group-member Ethernet0/0/13 group-member Ethernet0/0/14  group-member Ethernet0/0/15
group-member Ethernet0/0/16 group-member Ethernet0/0/17 group-member Ethernet0/0/18 group-member Ethernet0/0/19  group-member Ethernet0/0/20
group-member Ethernet0/0/21 group-member Ethernet0/0/22#  port-group trunkmeetingroom
group-member Ethernet0/0/23 group-member Ethernet0/0/24#Return 10. 错误处理  出现的错误提示的原因在于设置trunk口时首先需要取消端口默认VLAN(port default vlan), 也就是VLAN 1
  [Mill2meetingroom-S2300]port-group trunkmeetingroom
  [Mill2meetingroom-S2300-port-group-trunkmeetingroom]undo port default vlan
  Execute command [undo port default vlan] for port [Ethernet0/0/23] is finished.
  Execute command [undo port default vlan] for port [Ethernet0/0/24] is finished.
[Mill2meetingroom-S2300-port-group-trunkmeetingroom]port link-type trunk  Execute command [port link-type trunk] for port [Ethernet0/0/23] is finished.
  Execute command [port link-type trunk] for port [Ethernet0/0/24] is finished.
[Mill2meetingroom-S2300-port-group-trunkmeetingroom]port trunk allow-pass vlan all  Execute 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.
[Mill2meetingroom-S2300-port-group-trunkmeetingroom]quit 11. 保存配置[Mill2meetingroom-S2300]quit<Mill2meetingroom-S2300>save  The current configuration will be written to the device.
Are you sure to continue?[Y/N]y  Now saving the current configuration to the device.
  Jan  1 2008 01:36:17 Mill2meetingroom-S2300 %%01CFM/4/SAVE(l): When deciding whe
  ther to save configuration to the device, the user chose Y.................
  Info: The current configuration was saved to the device successfully.
重新查看S2300配置,trunk口已经配置完毕。<Mill2meetingroom-S2300>disp cu#  interface Ethernet0/0/23
port link-type trunk port trunk allow-pass vlan 1 to 4094 ntdp enable ndp enable#  interface Ethernet0/0/24
port link-type trunk port trunk allow-pass vlan 1 to 4094 ntdp enable ndp enable

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-539975-1-1.html 上篇帖子: 华为及H3C低端交换机MAC绑定 下篇帖子: 华为5328/9303命令—2.STP
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表