本文主要是介绍链路聚合配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
链路聚合配置前需要将物理接口进行清除,然后将接口加入到聚合内完成对接。
对接端口核心3口4口与财务核心的23口与24口进行对接。
拓扑如下:
配置如下:
核心路由器
[CK]dhcp enable
[CK]interface GigabitEthernet 0/0/0
[CK-GigabitEthernet0/0/0]ip address dhcp-alloc
[CK]acl 3000
[CK-acl-adv-3000]rule permit ip
[CK]interface GigabitEthernet 0/0/0
[CK-GigabitEthernet0/0/0]nat outbound 3000
[CK]interface GigabitEthernet 0/0/1
[CK-GigabitEthernet0/0/1]ip address 192.168.80.1 24
[CK]ip route-static 172.16.5.0 24 192.168.80.2
[CK]ip route-static 172.16.6.0 24 192.168.80.2
[CK]ip route-static 172.16.7.0 24 192.168.80.2
核心交换机配置
[Huawei]dhcp enable
[Huawei]vlan batch 5 to 7 80
[Huawei]ip pool 5
[Huawei-ip-pool-5]network 172.16.5.0 mask 24
[Huawei-ip-pool-5]gateway-list 172.16.5.1
[Huawei-ip-pool-5]dns-list 114.114.114.114 223.5.5.5
[Huawei-ip-pool-5]lease day 0 hour 8 minute 0
[Huawei]ip pool 6
[Huawei-ip-pool-6]network 172.16.6.0 mask 24
[Huawei-ip-pool-6]gateway-list 172.16.6.1
[Huawei-ip-pool-6]dns-list 114.114.114.114 223.5.5.5
[Huawei-ip-pool-6]lease day 0 hour 8 minute 0
[Huawei]ip pool 7
[Huawei-ip-pool-7]network 172.16.7.0 mask 24
[Huawei-ip-pool-7]gateway-list 172.16.7.1
[Huawei-ip-pool-7]dns-list 114.114.114.114 223.5.5.5
[Huawei-ip-pool-7]lease day 0 hour 8 minute 0
[Huawei]interface Vlanif 5
[Huawei-Vlanif5]ip address 172.16.5.1 24
[Huawei-Vlanif5]dhcp select global
[Huawei]interface Vlanif 6
[Huawei-Vlanif6]ip address 172.16.6.1 24
[Huawei-Vlanif6]dhcp select global
[Huawei]interface Vlanif 7
[Huawei-Vlanif6]ip address 172.16.7.1 24
[Huawei-Vlanif6]dhcp select global
[Huawei]interface Vlanif 80
[Huawei-Vlanif80]ip address 192.168.80.2 24
[Huawei]interface GigabitEthernet 0/0/24
[Huawei-GigabitEthernet0/0/24]port link-type access
[Huawei-GigabitEthernet0/0/24]port default vlan 80
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 5
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 6
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.80.1
以上基础配置已经完成,下面链路聚合配置
核心交换机
[Huawei]interface Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
turned into UP state.trunkport GigabitEthernet 0/0/4
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
财务核心交换机
[CWcore]dhcp enable
[CWcore]vlan bath 7 80
[CWcore]interface Vlanif 80
[CWcore-Vlanif80]ip address 192.168.80.3 24
[CWcore]interface GigabitEthernet 0/0/1
[CWcore-GigabitEthernet0/0/1]port link-type access
[CWcore-GigabitEthernet0/0/1]port default vlan 7
[CWcore]interface GigabitEthernet 0/0/2
[CWcore-GigabitEthernet0/0/2]port link-type access
[CWcore-GigabitEthernet0/0/2]port default vlan 7
[CWcore]interface Eth-Trunk 2
[CWcore-Eth-Trunk2]trunkport GigabitEthernet 0/0/23
[CWcore-Eth-Trunk2]trunkport GigabitEthernet 0/0/24
[CWcore-Eth-Trunk2]port link-type trunk
[CWcore-Eth-Trunk2]port trunk allow-pass vlan all
[CWcore]ip route-static 0.0.0.0 0.0.0.0 192.168.80.2
唯一缺点上面把聚合链路的接口vlan全部放通了,建议明细放通会更好一些,避免下面环路了影响所有的vlan业务。
这篇关于链路聚合配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!