网络拓扑:
配置思路:
添加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
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/95239.html