5、中小企業網絡架構-核心層交換機基本配置

網絡拓撲:

配置思路:

添加vlan;配置vlan網關;配置下聯接口;配置上聯接口;配置鏈路聚合;配置靜態路由;配置DHCP服務器;

操作步驟:

一、SW1核心交換機

1、添加vlan

<Huawei>system-view
[Huawei]sysname SW1
[SW1]vlan batch 2 3 6 7 8 9 10

2、配置vlan網關

[SW1]interface Vlanif  2
[SW1-Vlanif2]ip address 192.168.2.252 24	
[SW1-Vlanif2]quit 

[SW1]interface Vlanif  3
[SW1-Vlanif3]ip address 192.168.3.252 24
[SW1-Vlanif3]quit

[SW2]interface Vlanif  7
[SW2-Vlanif7]ip address 192.168.7.253 24
[SW2-Vlanif7]quit

[SW1]interface Vlanif  8
[SW1-Vlanif8]ip address 192.168.8.1 24
[SW1-Vlanif8]quit

3、配置下聯接口

[SW1]interface  GigabitEthernet 0/0/2	
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/2]description connect to SW3	
[SW1-GigabitEthernet0/0/2]quit

[SW1]interface  GigabitEthernet  0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk	
[SW1-GigabitEthernet0/0/3]port trunk  allow-pass  vlan  all
[SW1-GigabitEthernet0/0/3]description connect to SW4	
[SW1-GigabitEthernet0/0/3]quit

4、配置上聯接口

[SW1]interface GigabitEthernet  0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/1]port trunk pvid vlan 7
[SW1-GigabitEthernet0/0/1]description connect to FW1 G0/0/1
[SW1-GigabitEthernet0/0/1]quit

5、配置鏈路聚合

[SW1]interface Eth-Trunk 1
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/8
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/9
[SW1-Eth-Trunk1]description connect to SW2
[SW1-Eth-Trunk1]quit

6、配置靜態路由

[SW1]ip route-static 0.0.0.0 0.0.0.0 192.168.7.254

7、配置DHCP服務器

#添加DHCP服務器
[SW1]dhcp enable
[SW1]ip pool pool2
[SW1-ip-pool-pool2]network 192.168.2.0 mask 255.255.255.0
[SW1-ip-pool-pool2]gateway-list 192.168.2.252
[SW1-ip-pool-pool2]dns-list 114.114.114.114
[SW1-ip-pool-pool2]excluded-ip-address 192.168.2.254
[SW1-ip-pool-pool2]quit
#關聯DHCP服務器
[SW1]interface  Vlanif 2
[SW1-Vlanif2]dhcp select global
[SW1-Vlanif2]quit

[SW1]ip pool pool3
[SW1-ip-pool-pool3]network 192.168.3.0 mask 255.255.255.0
[SW1-ip-pool-pool3]gateway-list 192.168.3.252
[SW1-ip-pool-pool3]dns-list 114.114.114.114
[SW1-ip-pool-pool3]excluded-ip-address 192.168.3.254
[SW1-ip-pool-pool3]quit
[SW1]interface  Vlanif 3
[SW1-Vlanif3]dhcp select global
[SW1-Vlanif3]quit

二、SW2核心交換機

1、添加vlan

<Huawei>system-view
[Huawei]sysname SW2
[SW2]vlan batch 2 3 6 7 8 9 10

2、配置vlan網關

[SW2]interface Vlanif  2
[SW2-Vlanif2]ip address 192.168.2.253 24	
[SW2-Vlanif2]quit 

[SW2]interface Vlanif  3
[SW2-Vlanif3]ip address 192.168.3.253 24
[SW2-Vlanif3]quit

[SW2]interface Vlanif  6
[SW2-Vlanif6]ip address 192.168.6.253 24
[SW2-Vlanif6]quit

[SW2]interface Vlanif  8
[SW2-Vlanif8]ip address 192.168.8.2 24
[SW2-Vlanif8]quit

3、配置下聯接口

[SW2]interface  GigabitEthernet  0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk  allow-pass  vlan  all
[SW2-GigabitEthernet0/0/2]description connect to SW3
[SW2-GigabitEthernet0/0/2]quit 

[SW2]interface  GigabitEthernet  0/0/3
[SW2-GigabitEthernet0/0/3]port link-type trunk	
[SW2-GigabitEthernet0/0/3]port trunk  allow-pass  vlan  all
[SW2-GigabitEthernet0/0/3]description connect to SW4	
[SW2-GigabitEthernet0/0/3]quit

4、配置上聯接口

[SW2]interface GigabitEthernet  0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/1]port trunk pvid vlan 6
[SW2-GigabitEthernet0/0/1]description connect to FW1 G0/0/2
[SW2-GigabitEthernet0/0/1]quit

5、配置鏈路聚合

[SW2]interface Eth-Trunk 1
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/8
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/9
[SW2-Eth-Trunk1]description connect to SW1
[SW2-Eth-Trunk1]quit

6、配置靜態路由

[SW2]ip route-static 0.0.0.0 0.0.0.0 192.168.6.254

 

 

發佈了141 篇原創文章 · 獲贊 124 · 訪問量 27萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章