-
Notifications
You must be signed in to change notification settings - Fork 87
Add support for MPLS labels in flow reports #5
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
Conversation
@bodgit I would love a quick sanity check on how you think this should work before I spend the time rebasing it after #8 (will probably wait until #10 gets merged, realistically). I'm wondering if it's better to just define the netflow fields and leave them in the event as |
I would probably leave them as individual fields, of course with IPFIX and its complex data types an exporting device could send an actual list of MPLS labels if it chose to. I noticed you added a new type that breaks apart the bit-fields which is handy 👍 . I was thinking of maybe doing something similar for the TCP flags field (ID 6) rather than just report a single number. |
Makes sense! I'll re-implement this and submit a new PR with the changes. |
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
Hi @wrigby any chance you can provide a .pcap with MPLS label containing flows? |
@jorritfolmer I'm at a different company now, and I don't think I have any .pcap files left from that project (they were all on my work laptop). 😞 I can maybe throw together a quick test set up, but I have to make sure the ISR I have laying around supports MPLS and Netflow. It will be a good learning experience anyway. |
Hi @wrigby, if you wanna fix it, just amend the commit with the different e-mail and force push:
Or, rather, make sure you update your Git config with the e-mail you have access to :) I cant vouch for this particular PR, but this can come handy in future. |
See RFCs 3954 and 5642 * New class in util.rb for MPLS stack labels * New entries for MPLS stack entries 1-10 * Build an array for the MPLS stack, rather than just putting the raw mpls_label_x fields on the event
@karmi fixed, mostly just for the exercise of fixing it. Thanks! |
I'll leave this PR open, even though it's old, just in case someone has an MPLS setup and can provide pcaps. |
Closing due to lack of tests, or pcap to create them from. |
Previously, NetFlow v9 templates with MPLS label fields in them weren't getting parsed, so any flow reports with MPLS labels in them were getting ignored. This PR adds support for flow reports containing the MPLS label stack.
util.rb
for MPLS stack labelsnetflow.yaml
for MPLS stack entries 1-10mpls_top_label_ip_addr
toip4_addr
instead ofuint32
See also: