<轉>華為S5700怎么划分VLAN? S5700交換機配置VLAN的方法


<Huawei>system-view                         進入配置模式

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname center_switch            更改交換機名

創建vlan

[center_switch]vlan 40                           

[center_switch-vlan40]quit

給vlan配置IP地址           

[center_switch]interface Vlanif 40       

[center_switch-Vlanif40]ip address 10.10.40.1 255.255.255.0

將某個端口加入到vlan中

[center_switch] interface port GigabitEthernet 0/0/24

[center_switch-GigabitEthernet0/0/24]port link-type access

[center_switch-GigabitEthernet0/0/24]port default vlan40

將交換機中一組端口加入到一個VLAN中

創建vlan

[center_switch]vlan 42

[center_switch-vlan42]quit

給vlan 配置IP地址

[center_switch]interface Vlanif 42

[center_switch-Vlanif42]ip add

[center_switch-Vlanif42]ip address 10.10.42.1 255.255.255.0

創建端口組

[center_switch]port-group port1to8forvlan40

將相應的端口加入組中

[center_switch]port-group port1to8forvlan40]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/8

設置端口方式

[center_switch-port-group-port1to8forvlan42]port link-type access

設置端口組默認vlan(即之前創建好的vlan ID 42)

[center_switch-port-group-port1to8forvlan42]port default vlan 42

[center_switch]display vlan

<center_switch>save

[Quidway] display version

顯示VRP版本號 

[Quidway] display current-configuration

顯示系統運行配置信息

[Quidway] display saved-configuration

顯示保存的配置信息

[Quidway] display interfaces brief

顯示接口配置信息

[Quidway]display ip routing-table

顯示路由表 

[Quidway]display systname 

命令用來顯示路由器的名稱

以上就是華為S5700交換機配置VLAN的方法,謝謝閱讀,希望能幫到大家,請繼續關注腳本之家,我們會努力分享更多優秀的文章。

 

如果是配置trunk口,則如下:

port link-type trunk
 port trunk allow-pass vlan all


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM