srv6-policy injected but fail to Distribute and take effect on peer device(cisco/huawei)
rosa-w opened this issue · 4 comments
1、following is the debuging info on device that show error attribute
Mar 1 2024 10:49:02.605+08:00 PE1 %%01BGP/3/DEBUG_INFO(d):CID=0x80130460;
BGP(VPN 0): Received message from 2022:1::7ACF:5942:615F:4E71, SourceIfIndex: 41
(Displaying bytes from 1 to 128)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 99 02 00 00 00 82 40 01 01 00 40 02 00 40 05 04 00 00 00 64 80 0E 2E 00 02 49 10 30 01 00 CC 00 01 00 00 00 00 00 00 00 00 00 01 00 C0 00 00 00 04 00 00 00 5E 30 01 00 CC 00 01 00 00 00 00 00 00 00 00 00 02 C0 17 40 00 0F 00 3C 0D 12 80 00 30 01 00 CC 03 00 00 00 00 00 00 01 00 00 00 01 80 00 25 00 09 06 00 00 00 00 00 0C
Mar 1 2024 10:49:02.605+08:00 PE1 %%01BGP/3/DEBUG_INFO(d):CID=0x80130460;
(Displaying bytes from 129 to 153)
00 30 01 00 CC 02 00 00 00 00 00 00 01 00 00 00 07 00 06 00 00 00 00 00 00
Mar 1 2024 10:49:02.626+08:00 PE1 %%01BGP/3/DEBUG_INFO(d):CID=0x81650475;
BGP.RM(VPN 0): Received UPDATE from 2022:1::7ACF:5942:615F:4E71, SourceIfIndex: 36, Length: 153,
Address family: IPv6-srpolicy
SRPOLICY NLRI: Distinguisher[4], PolicyColor[94], Endpoint[3001:CC:1::2].
,
Mar 1 2024 10:49:02.626+08:00 PE1 %%01BGP/3/DEBUG_INFO(d):CID=0x81650475;
BGP.RM(VPN 0): Ignoring error attribute while handling the UPDATE received from 2022:1::7ACF:5942:615F:4E71(SourceIfIndex: 36)
2、test step is like this:
2.1)、start gobgp to do bgp srv6-policy establish
2.2)、use SRv6-PI do srv6 policy injected, the yaml as following
nlri:
distinguisher: 4
endpoint: 3001:cc:1::2
color: 94
sourceasn: 200
family:
afi: 2
safi: 73
segmentlist:
segments:
- sid: 3001:cc:200::1:0:7
behavior: 6
bsid: 3001:cc:300::1:0:1
priority: 100
nexthop: 3001:cc:1::1
origin: 30
2.3)、peer device received the BGP update packet and discard it as its error attribute(like point1 show),srv6 policy Distribute failed
ps: this error also occur on Cisco
with the binary I preliminary analysis and find segment sid tlv that it lack 3byte of type length,flag in this binary
is because segment sid Serialize has issue bug ??
00 09 06 00 00 00 00 00 0C weight tlv
00 30 01 00 CC 02 00 00 00 00 00 00 01 00 00 00 07 00 06 00 00 00 00 00 00 segment sid tlv
Can you send a pull request?
sorry, I also not know the root cause of the problem.
here i add debuging and found in gobgp where do TunnelEncapSubTLV Serialize,its still ok(has sid type,length and flag ,following 13 26 32 three byte represent srv6-sid type,length and flag )
TunnelEncapSubTLV Serialize: [128 0 37 0 9 6 0 0 0 0 0 12 13 26 32 0 48 1 0 204 2 0 0 0 0 0 0 1 0 0 0 7 0 6 0 0 0 0 0 0]
but the peer device receive and found lack of this 3 byte ( as above issue described)
00 09 06 00 00 00 00 00 0C weight tlv
00 30 01 00 CC 02 00 00 00 00 00 00 01 00 00 00 07 00 06 00 00 00 00 00 00 segment sid tlv(lack of srv6-sid type,length and flag)
Can you get a pcap file?
this issue have solved,the reason is peer device that realized segment-routing-te-policy-07, this draft older than gobgp,
please help close this issue. thank you.