三層交換機配置說明(華為S5700設置三個網段互通)


1.配置Switch

# 創建VLAN

<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20 30
# 配置接口加入VLAN

[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 10
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type access
[Switch-GigabitEthernet0/0/2] port default vlan 20
[Switch-GigabitEthernet0/0/2] quit
[Switch] interface gigabitethernet 0/0/3
[Switch-GigabitEthernet0/0/3] port link-type access
[Switch-GigabitEthernet0/0/3] port default vlan 30
[Switch-GigabitEthernet0/0/3] quit
# 配置VLANIF接口的IP地址

[Switch] interface vlanif 10
[Switch-Vlanif10] ip address 192.168.50.1 24
[Switch-Vlanif10] quit
[Switch] interface vlanif 20
[Switch-Vlanif20] ip address 192.168.60.1 24
[Switch-Vlanif20] quit
[Switch] interface vlanif 30
[Switch-Vlanif30] ip address 192.168.70.1 24
[Switch-Vlanif30] quit
2.檢查配置結果

在VLAN10中的User1主機上配置IP地址為192.168.50.2/24,缺省網關為VLANIF10接口的IP地址192.168.50.1/24。

在VLAN20中的User2主機上配置IP地址為192.168.60.2/24,缺省網關為VLANIF20接口的IP地址192.168.60.1/24。

在VLAN30中的User3主機上配置IP地址為192.168.70.2/24,缺省網關為VLANIF20接口的IP地址192.168.70.1/24。

配置完成后,VLAN10內的User1與VLAN20內的User2和VLAN30內的User3能夠相互訪問。


免責聲明!

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



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