全网超详细SRv6-TE-Policy来啦,实验配置描述

张开发
2026/4/10 14:59:07 15 分钟阅读

分享文章

全网超详细SRv6-TE-Policy来啦,实验配置描述
1.实验拓扑2.基本配置a.基础配置IPv6地址IGP协议等NE1:#isis 1is-level level-2cost-style widenetwork-entity 10.0001.0000.0000.0001.00#ipv6 enable topology ipv6#interface GigabitEthernet3/0/1undo shutdownipv6 enableipv6 address 2001:12::1/64isis ipv6 enable 1#interface GigabitEthernet3/0/2undo shutdownipv6 enableipv6 address 2001:13::1/64isis ipv6 enable 1#interface l0undo shutdownipv6 enableipv6 address 2003:11::1/128isis ipv6 enable 1#NE2:isis 1is-level level-2cost-style widenetwork-entity 10.0001.0000.0000.0002.00ipv6 enable topology ipv6interface GigabitEthernet3/0/0undo shutdownipv6 enableipv6 address 2001:12::2/64isis ipv6 enable 1#interface GigabitEthernet3/0/1undo shutdownipv6 enableipv6 address 2001:24::2/64isis ipv6 enable 1#interface GigabitEthernet3/0/2undo shutdownipv6 enableipv6 address 2001:23::2/64isis ipv6 enable 1#interface l0undo shutdownipv6 enableipv6 address 2003:22::1/128isis ipv6 enable 1#NE3:isis 1is-level level-2cost-style widenetwork-entity 10.0001.0000.0000.0003.00ipv6 enable topology ipv6interface GigabitEthernet3/0/0undo shutdownipv6 enableipv6 address 2001:13::3/64isis ipv6 enable 1#interface GigabitEthernet3/0/1undo shutdownipv6 enableipv6 address 2001:34::3/64isis ipv6 enable 1#interface GigabitEthernet3/0/2undo shutdownipv6 enableipv6 address 2001:23::3/64isis ipv6 enable 1#interface l0undo shutdownipv6 enableipv6 address 2003:33::1/128isis ipv6 enable 1#NE4:#isis 1is-level level-2cost-style widenetwork-entity 10.0001.0000.0000.0004.00#ipv6 enable topology ipv6#interface GigabitEthernet3/0/1undo shutdownipv6 enableipv6 address 2001:24::4/64isis ipv6 enable 1#interface GigabitEthernet3/0/2undo shutdownipv6 enableipv6 address 2001:34::4/64isis ipv6 enable 1#interface l0undo shutdownipv6 enableipv6 address 2003:44::1/128isis ipv6 enable 1#b.使能SRv6以及配置相关参数NE1:#segment-routing ipv6encapsulation source-address 2003:11::1locator ne1 ipv6-prefix 2003:1:1:: 64 static 32opcode ::12 end-x interface GigabitEthernet3/0/1 nexthop 2001:12::2 no-flavoropcode ::13 end-x interface GigabitEthernet3/0/2 nexthop 2001:13::3 no-flavorsegment-list 14index 10 sid ipv6 2003:1:1::12index 20 sid ipv6 2003:2:2::23index 30 sid ipv6 2003:3:3::34srv6-te policy 14 endpoint 2003:44::1 color 100candidate-path preference 200segment-list 14##isis 1segment-routing ipv6 locator ne1NE2:#segment-routing ipv6encapsulation source-address 2003:22::1locator ne2 ipv6-prefix 2003:2:2:: 64 static 32opcode ::12 end-x interface GigabitEthernet3/0/0 nexthop 2001:12::1 no-flavoropcode ::24 end-x interface GigabitEthernet3/0/1 nexthop 2001:24::4 no-flavoropcode ::23 end-x interface GigabitEthernet3/0/2 nexthop 2001:23::3 no-flavor#isis 1segment-routing ipv6 locator ne2NE3:#segment-routing ipv6encapsulation source-address 2003:33::1locator ne3 ipv6-prefix 2003:3:3:: 64 static 32opcode ::13 end-x interface GigabitEthernet3/0/0 nexthop 2001:13::1 no-flavoropcode ::34 end-x interface GigabitEthernet3/0/1 nexthop 2001:34::4 no-flavoropcode ::23 end-x interface GigabitEthernet3/0/2 nexthop 2001:23::2 no-flavor#isis 1segment-routing ipv6 locator ne3NE4:#segment-routing ipv6encapsulation source-address 2003:44:1locator ne4 ipv6-prefix 2003:4:4:: 64 static 32opcode ::24 end-x interface GigabitEthernet3/0/1 nexthop 2001:24::2 no-flavoropcode ::34 end-x interface GigabitEthernet3/0/2 nexthop 2001:34::3 no-flavorsegment-list 41index 10 sid ipv6 2003:4:4::24index 20 sid ipv6 2003:2:2::23index 30 sid ipv6 2003:3:3::13srv6-te policy 41 endpoint 2003:11::1 color 200candidate-path preference 200segment-list 41#isis 1segment-routing ipv6 locator ne4c.配置EVPN实例以及PE和CE对接NE1:#ip vpn-instance aipv4-familyroute-distinguisher 1:100apply-label per-instancevpn-target 1:1 export-extcommunity evpnvpn-target 1:1 import-extcommunity evpn#interface GigabitEthernet3/0/0undo shutdownip binding vpn-instance aip address 10.1.11.2 255.255.255.0#bgp 200router-id 1.1.1.1private-4-byte-as enableipv4-family unicastundo synchronizationipv4-family vpn-instance aadvertise l2vpn evpnsegment-routing ipv6 locator ne1 evpnsegment-routing ipv6 traffic-engineer best-effort evpnpeer 10.1.11.1 as-number 100#AR1:#interface GE0/0/0ip address 10.1.11.1 255.255.255.0#interface LoopBack0ip address 192.168.1.1 255.255.255.0#bgp 100router-id 11.1.1.1private-4-byte-as enablepeer 10.1.11.2 as-number 200#ipv4-family unicastnetwork 192.168.1.0 255.255.255.0peer 10.1.11.2 enable#NE4:#ip vpn-instance aipv4-familyroute-distinguisher 1:200apply-label per-instancevpn-target 1:1 export-extcommunity evpnvpn-target 1:1 import-extcommunity evpn#interface GigabitEthernet3/0/0undo shutdownip binding vpn-instance aip address 10.1.24.4 255.255.255.0#bgp 200router-id 4.4.4.4private-4-byte-as enableipv4-family unicastundo synchronizationipv4-family vpn-instance aadvertise l2vpn evpnsegment-routing ipv6 locator ne4 evpnsegment-routing ipv6 traffic-engineer best-effort evpnpeer 10.1.24.2 as-number 300#AR2:#interface GE0/0/0ip address 10.1.24.2 255.255.255.0#interface LoopBack0ip address 192.168.2.1 255.255.255.0#bgp 300router-id 11.2.2.2private-4-byte-as enablepeer 10.1.24.4 as-number 200ipv4-family unicastnetwork 192.168.2.0 255.255.255.0peer 10.1.24.4 enable#d.配置PE之间IBGP邻居建立NE1:#bgp 200router-id 1.1.1.1peer 2003:44::1 as-number 200peer 2003:44::1 connect-interface LoopBack0l2vpn-family evpnpolicy vpn-targetpeer 2003:44::1 enableNE2:bgp 200router-id 4.4.4.4peer 2003:11::1 as-number 200peer 2003:11::1 connect-interface LoopBack0l2vpn-family evpnpolicy vpn-targetpeer 2003:11::1 enablee.配置安全策略以及隧道迭代NE1:#route-policy ne1 permit node 10apply extcommunity color 0:100#bgp 200#l2vpn-family evpnpeer 2003:44::1 route-policy ne1 import#tunnel-policy ne1tunnel select-seq ipv6 srv6-te-policy load-balance-number 1#ip vpn-instance atnl-policy ne1#NE4:#route-policy ne4 permit node 10apply extcommunity color 0:200#bgp 200#l2vpn-family evpnpeer 2003:11::1 route-policy ne4 import#tunnel-policy ne4tunnel select-seq ipv6 srv6-te-policy load-balance-number 1#ip vpn-instance atnl-policy ne4#3.结果验证a.ISIS邻居是否建立b.PE和CE之间EBGP邻居是否建立c.PE和PE之间IBGP邻居是否建立e.查看隧道以及是否ping通4.总结SRv6-te-policy 会比SRv6 BE有更好的扩展性可以自定义路径后面的文章会写出两种方式的对比和区别敬请期待

更多文章