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

 

 

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

友人a笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值