Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sFlow agent on Huawei sends too short packets when traffic includes vlans #990

Open
pavel-odintsov opened this issue Jul 18, 2023 · 12 comments

Comments

@pavel-odintsov
Copy link
Owner

pavel-odintsov commented Jul 18, 2023

You may notice that Wireshark can decode only part of TCP header and it can retrieve only source and destination port:
huawei_Sflow

Other fields such as TCP flags or ACK numbers are located close to end of TCP packet and this data was cropped by router.

Majority of other vendors include larger parts of packet header to include whole TCP packet.

@pavel-odintsov
Copy link
Owner Author

We have customer with that exact issue with Huawei NE 8000 F1A.

Software:
hua

Issue:
image

@pavel-odintsov
Copy link
Owner Author

Another very strange thing with Huawei that they do export Ethernet, Raw and IPv4 headers in same time.

sflow_too_much

@pavel-odintsov
Copy link
Owner Author

I actually do not see any advantages in exporting all of them as RAW includes all the things.

As consequence each flow entry is almost 288 bytes and each UDP packet carries just 4 of them:
image

Other vendors can export 10-15 packets in each UDP packet by exporting only raw.

@pavel-odintsov
Copy link
Owner Author

pavel-odintsov commented Jul 18, 2023

I got some hints from Neil McKee from InMon Corp to look on standard and Standard is pretty clear about this case:

A flow_sample must contain packet header information. The prefered format for reporting packet header information is the sampled_header. However, if the packet header is not available to the sampling process then one or more of sampled_ethernet, sampled_ipv4, sampled_ipv6 may be used.

So raw packet header is more then enough. Ethernet and IPv4 headers are redundant in this case and can be skipped.

@pavel-odintsov
Copy link
Owner Author

I re-opened ticket for visibility. Both FastNetMon Advanced and Community can handle such packets but we need to communicate / confirm it with Huawei.

@jackey123-king
Copy link

about the packet lenth, you can try this command:
"sflow max-packet-length"
The sflow max-packet-length command configures the maximum length of sFlow packet payload.

@pavel-odintsov
Copy link
Owner Author

pavel-odintsov commented Sep 1, 2023 via email

@jackey123-king
Copy link

yes,Huawei‘s router can support this function.

@pavel-odintsov
Copy link
Owner Author

I found this option "sflow flow-sampling max-header length": https://support.huawei.com/enterprise/en/doc/EDOC1000178165?section=j04t

@pavel-odintsov
Copy link
Owner Author

We confirmed that NE40E-F1A-14H24Q is affected too. Looks like whole Huawei router product line is affected

@pavel-odintsov
Copy link
Owner Author

Worth to mention that this issue has side effects that FastNetMon does not observe TCP flags at all and it may negatively affect quality of mitigation in BGP Flow Spec mode.

@pavel-odintsov
Copy link
Owner Author

pavel-odintsov commented Sep 2, 2024

Unfortunately we got yet another pretty crazy bug from Huawei NE40E-F1A-14H24Q

sflow_hauwei_clean

When BGP Flow Spec discards or rate limits some traffic it leads to disappearance of ASN information in sFlow (it's stored in extended gateway data section).

It simply vanishes.

Also, Huawei does not report such traffic as discarded via special encoding of output interface type (but it's not 100% confirmed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants