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

Output from zebra-dump-parser and bgpkit are different #5

Open
ACodingfreak opened this issue Jan 20, 2023 · 2 comments
Open

Output from zebra-dump-parser and bgpkit are different #5

ACodingfreak opened this issue Jan 20, 2023 · 2 comments

Comments

@ACodingfreak
Copy link

ACodingfreak commented Jan 20, 2023

Hi All,

I am downloading below MRT file from RIS and trying to parse it via zebra-dump-parser and bgpkit
wget https://data.ris.ripe.net/rrc00/2023.01/updates.20230120.1420.gz

As you can see in below output, according to zebra-dump-parser we have one BGP update containing 3 announced prefixes. But in the case of PYBGPKIT it is split into 3 different BGP updates instead of 1. Is there a way we can show it as one BGP update under pybgpkit ?

Output from PYBGPKIT

{'timestamp': 1674224400.0, 'elem_type': 'A', 'peer_ip': '23.129.32.61', 'peer_asn': 49134, 'prefix': '200.169.64.0/24', 'next_hop': '23.129.32.61', 'as_path': '49134 53356 6939 265264 52976 16397 15830 265264 52976', 'origin_asns': [52976], 'origin': 'IGP', 'local_pref': 0, 'med': 0, 'communities': None, 'atomic': 'NAG', 'aggr_asn': None, 'aggr_ip': None}
{'timestamp': 1674224400.0, 'elem_type': 'A', 'peer_ip': '23.129.32.61', 'peer_asn': 49134, 'prefix': '200.169.67.0/24', 'next_hop': '23.129.32.61', 'as_path': '49134 53356 6939 265264 52976 16397 15830 265264 52976', 'origin_asns': [52976], 'origin': 'IGP', 'local_pref': 0, 'med': 0, 'communities': None, 'atomic': 'NAG', 'aggr_asn': None, 'aggr_ip': None}
{'timestamp': 1674224400.0, 'elem_type': 'A', 'peer_ip': '23.129.32.61', 'peer_asn': 49134, 'prefix': '200.169.65.0/24', 'next_hop': '23.129.32.61', 'as_path': '49134 53356 6939 265264 52976 16397 15830 265264 52976', 'origin_asns': [52976], 'origin': 'IGP', 'local_pref': 0, 'med': 0, 'communities': None, 'atomic': 'NAG', 'aggr_asn': None, 'aggr_ip': None}

Output from zebra-dump-parser

TYPE: BGP4MP/BGP4MP_MESSAGE_AS4 AFI_IP
FROM: 23.129.32.61
TO: 193.0.4.28
BGP PACKET TYPE: UPDATE
ORIGIN: IGP
AS_PATH: 49134 53356 6939 265264 52976 16397 15830 265264 52976
NEXT_HOP: 23.129.32.61
ANNOUNCED: 200.169.64.0/24
ANNOUNCED: 200.169.67.0/24
ANNOUNCED: 200.169.65.0/24
@digizeph
Copy link
Member

This is not currently implemented as we are not targeting to match the output from zebra-dump-parser. We will consider supporting record/update-level output in the future releases.

@ACodingfreak
Copy link
Author

ACodingfreak commented Jan 21, 2023

Hi @digizeph ,

Thanks for the reply.

I am not interested in MRT format as shown by zeba-dump-parser but need to process raw BGPUPDATES sent by the router.
Creating 3 entries as shown in example will create a duplicates in my scenario.

Looks like bgpreader has the similar design. But iterating through BGPRecords instead of BGPelems might solve my issue (which I need to still check). Does BGPKit have a similar design ?

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