
- 配置各接口所属的VLAN
[LSW1]vlan batch 100 200 300
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100
[LSW1-GigabitEthernet0/0/1]port trunk pvid vlan 100
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 200
[LSW1-GigabitEthernet0/0/2]port trunk pvid vlan 200
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 300 - 配置VLANIF接口的IP地址
[LSW1-Vlanif100]ip add 10.1.1.2 24
[LSW1-Vlanif200]ip add 10.1.2.2 24
[LSW1-Vlanif300]ip add 10.1.3.2 24 - 配置NQA测试例
[LSW1]nqa test-instance user test1
[LSW1-nqa-user-test1]test-type icmp
[LSW1-nqa-user-test1]destination-address ipv4 10.1.1.1
[LSW1-nqa-user-test1]frequency 11
[LSW1-nqa-user-test1]probe-count 2
[LSW1-nqa-user-test1]interval seconds 5
[LSW1-nqa-user-test1]timeout 4
[LSW1-nqa-user-test1]start now
[LSW1]nqa test-instance user test2
[LSW1-nqa-user-test2]test-type icmp
[LSW1-nqa-user-test2]destination-address ipv4 10.1.2.1
[LSW1-nqa-user-test2]frequency 11
[LSW1-nqa-user-test2]probe-count 2
[LSW1-nqa-user-test2]interval seconds 5
[LSW1-nqa-user-test2]timeout 4
[LSW1-nqa-user-test2]start now - 配置静态缺省路由,并绑定NQA测试例
[LSW1]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 track nqa user test1
[LSW1]ip route-static 0.0.0.0 0.0.0.0 10.1.2.1 track nqa user test2
[AR1]ip route-static 10.1.0.0 16 10.1.1.2
[AR2]ip route-static 10.1.0.0 16 10.1.2.2 - 配置AR的IP地址
[AR1-GigabitEthernet0/0/0]ip add 10.1.1.1 24
[AR2-GigabitEthernet0/0/0]ip add 10.1.2.1 24 - 验证配置



Shutdown LSW1的G0/0/2口后



配置了LSW1的多个接口所属的VLAN,分别为100、200、300,并为每个VLAN配置了IP地址。创建了两个NQA测试实例用于ICMP测试,分别针对10.1.1.1和10.1.2.1。同时,设置了静态默认路由并绑定NQA测试例进行路径健康检查。AR1和AR2的接口也配置了IP地址,用于网络通信。当LSW1的G0/0/2口关闭后,网络连通性将受到影响。
5605

被折叠的 条评论
为什么被折叠?



