本文主要是介绍华为设备配置IS-IS的负载分担,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 配置各接口所属VLAN
[LSW1]vlan batch 10 20 50
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 50
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 20
[LSW2]vlan batch 10 30
[LSW2-GigabitEthernet0/0/1]port link-type trunk
[LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW2-GigabitEthernet0/0/4]port link-type trunk
[LSW2-GigabitEthernet0/0/4]port trunk allow-pass vlan 30
[LSW3]vlan batch 20 40
[LSW3-GigabitEthernet0/0/1]port link-type trunk
[LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 20
[LSW3-GigabitEthernet0/0/4]port link-type trunk
[LSW3-GigabitEthernet0/0/4]port trunk allow-pass vlan 40
[LSW4]vlan batch 30 40 60
[LSW4-GigabitEthernet0/0/2]port link-type trunk
[LSW4-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
[LSW4-GigabitEthernet0/0/1]port link-type trunk
[LSW4-GigabitEthernet0/0/1]port trunk allow-pass vlan 60
[LSW4-GigabitEthernet0/0/3]port link-type trunk
[LSW4-GigabitEthernet0/0/3]port trunk allow-pass vlan 40 - 配置各VLANIF接口的IP地址
[LSW1-Vlanif50]ip add 10.5.1.1 24
[LSW1-Vlanif10]ip add 10.1.1.1 24
[LSW1-Vlanif20]ip add 10.1.2.1 24
[LSW2-Vlanif10]ip add 10.1.1.2 24
[LSW2-Vlanif30]ip add 10.1.3.2 24
[LSW3-Vlanif20]ip add 10.1.2.3 24
[LSW3-Vlanif40]ip add 10.1.4.3 24
[LSW4-Vlanif60]ip add 10.6.1.4 24
[LSW4-Vlanif40]ip add 10.1.4.4 24
[LSW4-Vlanif30]ip add 10.1.3.4 24 - 配置IS-IS基本功能
[LSW1]stp disable //stp会导致某个端口被阻塞,从而导致三层业务不能正常运行
[LSW2]stp disable
[LSW3]stp disable
[LSW4]stp disable
[LSW1]isis 1
[LSW1-isis-1]is-level level-2
[LSW1-isis-1]network-entity 10.0000.0000.0001.00
[LSW1-Vlanif10]isis enable 1
[LSW1-Vlanif20]isis enable 1
[LSW1-Vlanif50]isis enable 1
[LSW2]isis 1
[LSW2-isis-1]is-level level-2
[LSW2-isis-1]network-entity 10.0000.0000.0002.00
[LSW2-Vlanif10]isis enable 1
[LSW2-Vlanif30]isis enable 1
[LSW3]isis 1
[LSW3-isis-1]is-level level-2
[LSW3-isis-1]network-entity 10.0000.0000.0003.00
[LSW3-Vlanif20]isis enable 1
[LSW3-Vlanif40]isis enable 1
[LSW4]isis 1
[LSW4-isis-1]is-level level-2
[LSW4-isis-1]network-entity 10.0000.0000.0004.00
[LSW4-Vlanif30]isis enable 1
[LSW4-Vlanif40]isis enable 1
[LSW4-Vlanif60]isis enable 1 - 在LSW1配置负载分担数目为1
[LSW1]isis 1
[LSW1-isis-1]maximum load-balancing 1
当配置负载分担最大等价路由条数为1后,到达目标网段10.6.1.0的下一跳为10.1.1.2。这是由于LSW2 system ID较小,所以IS-IS优先选择下一跳为10.1.1.2为唯一最优路由
5. 在LSW1恢复负载分担路由的缺省数量
[LSW1]isis 1
[LSW1-isis-1]undo maximum load-balancing
当恢复负载分担的缺省值后,由于最大等价路由条数的缺省值为8,因此LSW1两个下一跳10.1.1.2(LSW2)和10.1.2.3(LSW3)均成为有效路由
6. 在LSW1配置等价路由优先级
[LSW1]isis
[LSW1-isis-1]nexthop 10.1.2.3 weight 1
从路由表中可以看出,当配置等价路由的优先级后,由于下一跳为10.1.2.3(LSW3)的优先级(权值为1)高于下一跳为10.1.1.2(LSW2)的优先级,所以IS-IS优先选择下一跳为10.1.2.3为唯一最优路由
这篇关于华为设备配置IS-IS的负载分担的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!