SRv6学习笔记(一)(srv6技术课堂)

网友投稿 460 2022-09-17


SRv6学习笔记(一)(srv6技术课堂)

工欲善其事,必先利其器。Segment Routing /SRv6部署实践

相关技术学习储备:

segment routing over ipv6 基础理论;ISIS/OSPF/BGP/BGP-LS/BGP-L2VPN EVPN;流量工程srv6-te;

个人学习资料推荐汇总:

​​L3VPN Over SRv6(主流实现)

CE13/CE14配置:

一边使用bgp peer group,一边常规配置,主要是为了便于展示,现网推荐使用group配置。配置没什么需要特殊说明的,因为两端CE是同一个BGP号码,注意一下允许as-loop就可以了

dis current-configuration configuration bgp #bgp 65000 router-id 13.13.13.13 group ebgp external peer ebgp as-number 1 peer 13.1.1.1 group ebgp peer 13.5.5.5 group ebgp # address-family ipv4 unicast balance eibgp 32 network 13.13.13.13 255.255.255.255 peer ebgp enable peer ebgp allow-as-loop 1 dis current-configuration configuration bgp #bgp 65000 router-id 14.14.14.14 peer 4.14.4.4 as-number 1 peer 8.14.8.8 as-number 1 # address-family ipv4 unicast balance eibgp 32 network 14.14.14.14 255.255.255.255 peer 4.14.4.4 enable peer 4.14.4.4 allow-as-loop 1 peer 8.14.8.8 enable peer 8.14.8.8 allow-as-loop 1 disp bgp peer ipv4 unicast BGP local router ID: 13.13.13.13 Local AS number: 65000 Total number of peers: 2 Peers in established state: 2 * - Dynamically created peer Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State 13.1.1.1 1 60 63 0 5 00:49:16 Established 13.5.5.5 1 60 64 0 5 00:49:16 Establisheddis ip routing-table 14.14.14.14Summary count : 2Destination/Mask Proto Pre Cost NextHop Interface14.14.14.14/32 BGP 255 0 13.1.1.1 GE1/0 BGP 255 0 13.5.5.5 GE2/0dis bgp peer ipv4 unicast BGP local router ID: 14.14.14.14 Local AS number: 65000 Total number of peers: 2 Peers in established state: 2 * - Dynamically created peer Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State 4.14.4.4 1 62 70 0 5 00:49:49 Established 8.14.8.8 1 62 59 0 5 00:49:49 Establisheddis ip routing-table 13.13.13.13Summary count : 2Destination/Mask Proto Pre Cost NextHop Interface13.13.13.13/32 BGP 255 0 4.14.4.4 GE1/0 BGP 255 0 8.14.8.8 GE2/0ping -a 14.14.14.14 13.13.13.13Ping 13.13.13.13 (13.13.13.13) from 14.14.14.14: 56 data bytes, press CTRL_C to break56 bytes from 13.13.13.13: icmp_seq=0 ttl=253 time=4.654 ms56 bytes from 13.13.13.13: icmp_seq=1 ttl=253 time=2.669 ms56 bytes from 13.13.13.13: icmp_seq=2 ttl=253 time=2.916 ms56 bytes from 13.13.13.13: icmp_seq=3 ttl=253 time=2.596 ms56 bytes from 13.13.13.13: icmp_seq=4 ttl=253 time=2.574 ms--- Ping statistics for 13.13.13.13 ---5 packet(s) transmitted, 5 packet(s) received, 0.0% packet lossround-trip min/avg/max/std-dev = 2.574/3.082/4.654/0.795 ms

R1\R5两个PE节点,先看下R5,主要使用BE转发流量,具体配置如下

ip vpn-instance vpn1 route-distinguisher 1:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity#isis 1 is-level level-2 cost-style wide network-entity 49.0000.0000.0005.00 # address-family ipv6 unicast multi-topology segment-routing microloop-avoidance enable segment-routing ipv6 locator srv6_locator#bgp 1 router-id 5.5.5.5 group IBGP internal peer IBGP connect-interface LoopBack0 peer 6::6 group IBGP # address-family ipv6 unicast segment-routing ipv6 best-effort # address-family l2vpn evpn peer IBGP enable peer IBGP advertise-community peer IBGP next-hop-local peer IBGP advertise encap-type srv6 # ip vpn-instance vpn1 router-id 5.5.5.5 peer 13.5.5.3 as-number 65000 # address-family ipv4 unicast segment-routing ipv6 best-effort segment-routing ipv6 best-effort evpn segment-routing ipv6 locator srv6_locator evpn import-route direct peer 13.5.5.3 enable peer 13.5.5.3 advertise-community peer 13.5.5.3 advertise-ext-community peer 13.5.5.3 soo 1:1#segment-routing ipv6 locator srv6_locator ipv6-prefix 2005:: 64 static 32 opcode 2005 end #

R1的配置:这里简单说明一下,很多朋友看不懂这里的配置。

自动隧道迭代的方法:是BGP-VPN VRF IPv4地址族下-->隧道选择器apply tunnel-selector 1-->关联至隧道策略apply tunnel-policy 1-->隧道策略1通过指定end-point关联srv6policygroup1-->policygroup1-->policygroup1通过end-point和ip default映射至color 10-->从而命中srv6-te policy定义的end-point和Color策略,定义命中流量走segment list a。

sysname vsr1#ip vpn-instance vpn1 route-distinguisher 1:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity#isis 1 is-level level-2 cost-style wide network-entity 49.0000.0000.0001.00 # address-family ipv6 unicast multi-topology segment-routing microloop-avoidance enable segment-routing ipv6 locator srv6_locator#tunnel-policy 1 select-seq srv6-policy load-balance-number 32 binding-destination 4::4 srv6-policy group 1 down-switch#interface LoopBack0 isis ipv6 enable 1 ipv6 address 1::1/128#interface GigabitEthernet1/0 port link-mode route isis ipv6 enable 1 ipv6 address 12::1/126#interface GigabitEthernet2/0 port link-mode route isis ipv6 enable 1 ipv6 address 15::1/126#interface GigabitEthernet3/0 port link-mode route ip binding vpn-instance vpn1 ip address 13.1.1.1 255.255.255.0#interface GigabitEthernet4/0 port link-mode route#bgp 1 sr-policy steering policy-based router-id 1.1.1.1 group IBGP internal peer IBGP connect-interface LoopBack0 peer 6::6 group IBGP # address-family ipv6 unicast segment-routing ipv6 best-effort # address-family l2vpn evpn peer IBGP enable peer IBGP advertise-community peer IBGP next-hop-local peer IBGP advertise encap-type srv6 # ip vpn-instance vpn1 router-id 1.1.1.1 peer 13.1.1.3 as-number 65000 # address-family ipv4 unicast apply tunnel-selector 1 segment-routing ipv6 traffic-engineering best-effort evpn segment-routing ipv6 traffic-engineering best-effort segment-routing ipv6 locator srv6_locator evpn import-route direct peer 13.1.1.3 enable#tunnel-selector 1 permit node 10 apply tunnel-policy 1# segment-routing ipv6 encapsulation source-address 1::1 locator srv6_locator ipv6-prefix 2001:: 64 static 32 opcode 1 end-dt4 vpn-instance vpn1 opcode 2001 end traffic-engineering srv6-policy forwarding statistics enable srv6-policy forwarding statistics interval 10 srv6-policy backup hot-standby enable srv6-policy locator srv6_locator segment-list a index 1 ipv6 2002::7D2 index 2 ipv6 2006::7D6 index 3 ipv6 2003::7D3 index 4 ipv6 2004::7D4 policy vpn1 binding-sid ipv6 2001::2000 color 10 end-point ipv6 4::4 backup hot-standby enable forwarding statistics enable candidate-paths preference 10 explicit segment-list a policy-group 1 end-point ipv6 4::4 color 10 match dscp ipv4 default

R6路由反射器的配置:

isis 1 is-level level-2 cost-style wide network-entity 49.0000.0000.0006.00 # address-family ipv6 unicast multi-topology segment-routing microloop-avoidance enable segment-routing ipv6 locator srv6_locator# password-recovery enable#vlan 1#irf-port#bgp 1 router-id 6.6.6.6 group IBGP-RR internal peer IBGP-RR connect-interface LoopBack0 peer 1::1 group IBGP-RR peer 2::2 group IBGP-RR peer 3::3 group IBGP-RR peer 4::4 group IBGP-RR peer 5::5 group IBGP-RR peer 7::7 group IBGP-RR peer 8::8 group IBGP-RR # address-family ipv6 unicast balance ibgp 32 segment-routing ipv6 best-effort # address-family l2vpn evpn reflector cluster-id 1 undo policy vpn-target peer IBGP-RR enable peer IBGP-RR advertise-community peer IBGP-RR reflect-client peer IBGP-RR advertise encap-type srv6#segment-routing ipv6 locator srv6_locator ipv6-prefix 2006:: 64 static 32 opcode 2006 end #

R4的主要相关配置

ip vpn-instance vpn1 route-distinguisher 1:1 # address-family ipv4 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity#isis 1 is-level level-2 cost-style wide network-entity 49.0000.0000.0004.00 # address-family ipv6 unicast multi-topology segment-routing microloop-avoidance enable segment-routing microloop-avoidance rib-update-delay 1000 segment-routing ipv6 locator srv6_locator# password-recovery enable#vlan 1#irf-port#interface NULL0#interface LoopBack0 isis ipv6 enable 1 ipv6 address 4::4/128#interface GigabitEthernet1/0 port link-mode route isis ipv6 enable 1 ipv6 address 34::4/64#interface GigabitEthernet2/0 port link-mode route isis ipv6 enable 1 ipv6 address 48::4/64#interface GigabitEthernet3/0 port link-mode route ip binding vpn-instance vpn1 ip address 4.14.4.4 255.255.255.0#interface GigabitEthernet4/0 port link-mode route#bgp 1 router-id 4.4.4.4 group IBGP internal peer IBGP connect-interface LoopBack0 peer 6::6 group IBGP # address-family ipv6 unicast segment-routing ipv6 best-effort # address-family l2vpn evpn peer IBGP enable peer IBGP advertise-community peer IBGP next-hop-local peer IBGP advertise encap-type srv6 # ip vpn-instance vpn1 peer 4.14.4.14 as-number 65000 # address-family ipv4 unicast segment-routing ipv6 best-effort segment-routing ipv6 best-effort evpn segment-routing ipv6 locator srv6_locator evpn import-route direct peer 4.14.4.14 enable peer 4.14.4.14 advertise-community peer 4.14.4.14 advertise-ext-community peer 4.14.4.14 soo 1:1#segment-routing ipv6 encapsulation source-address 4::4 locator srv6_locator ipv6-prefix 2004:: 64 static 32 opcode 1 end-dt4 vpn-instance vpn1 opcode 2004 end #

R8的主要相关配置

sysname vsr8#ip vpn-instance vpn1 route-distinguisher 1:1 # address-family ipv4 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity#isis 1 is-level level-2 cost-style wide network-entity 49.0000.0000.0008.00 # address-family ipv6 unicast multi-topology segment-routing microloop-avoidance enable segment-routing microloop-avoidance rib-update-delay 1000 segment-routing ipv6 locator srv6_locator#interface LoopBack0 isis ipv6 enable 1 ipv6 address 8::8/128#interface GigabitEthernet1/0 port link-mode route isis ipv6 enable 1 ipv6 address 78::8/64#interface GigabitEthernet2/0 port link-mode route isis ipv6 enable 1 ipv6 address 48::8/64#interface GigabitEthernet3/0 port link-mode route ip binding vpn-instance vpn1 ip address 8.14.8.8 255.255.255.0#bgp 1 router-id 8.8.8.8 group IBGP internal peer IBGP connect-interface LoopBack0 peer 6::6 group IBGP # address-family ipv6 unicast segment-routing ipv6 best-effort # address-family l2vpn evpn peer IBGP enable peer IBGP advertise-community peer IBGP next-hop-local peer IBGP advertise encap-type srv6 peer 6::6 route-policy color export # ip vpn-instance vpn1 peer 8.14.8.14 as-number 65000 # address-family ipv4 unicast segment-routing ipv6 best-effort segment-routing ipv6 best-effort evpn segment-routing ipv6 locator srv6_locator evpn import-route direct peer 8.14.8.14 enable peer 8.14.8.14 advertise-community peer 8.14.8.14 advertise-ext-community peer 8.14.8.14 soo 1:1#segment-routing ipv6 encapsulation source-address 8::8 locator srv6_locator ipv6-prefix 2008:: 64 static 32 opcode 1 end-dt4 vpn-instance vpn1 opcode 2008 end


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java中Map集合的常用方法详解
下一篇:实验案列一
相关文章

 发表评论

暂时没有评论,来抢沙发吧~