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

add-path rib parsing #228

Open
digizeph opened this issue Aug 6, 2022 · 1 comment
Open

add-path rib parsing #228

digizeph opened this issue Aug 6, 2022 · 1 comment

Comments

@digizeph
Copy link
Contributor

digizeph commented Aug 6, 2022

RIB dump files with add-path fails to parse with bgpreader. I am on latest version at the time of writing (c608054), also latest on libparsebgp (https://github.com/caida/libparsebgp/tree/5daad75be00e57ef6ddad28f44844563f0eb5de0).

Example file: http://archive.routeviews.org/route-views5/bgpdata/2022.08/RIBS/rib.20220801.0000.bz2

➜  libbgpstream git:(master) bgpreader -d singlefile -o rib-file=http://archive.routeviews.org/route-views5/bgpdata/2022.08/RIBS/rib.20220801.0000.bz2
WARN: No time window specified, defaulting to all available data
2022-08-06 15:55:28 69455: bgpstream_parsebgp_common.c:601: ERROR: Failed to parse message from 'http://archive.routeviews.org/route-views5/bgpdata/2022.08/RIBS/rib.20220801.0000.bz2' (-2:Invalid Message)

Relevant issue and fix at bgpkit-parser repo bgpkit/bgpkit-parser#67.

@digizeph
Copy link
Contributor Author

digizeph commented Aug 6, 2022

UPDATE: I mistakenly run the command built previously for the test above. After updating the bgpreader binary, I now see different results between bgpreader and bgpdump and bgpkit-parser.

➜  libbgpstream git:(master) ./tools/bgpreader -d singlefile -o rib-file=http://archive.routeviews.org/route-views5/bgpdata/2022.08/RIBS/rib.20220801.0000.bz2|head
WARN: No time window specified, defaulting to all available data
R|B|1659312000.000000|singlefile|singlefile|||V|1659827072
R|R|1659312000.000000|singlefile|singlefile|||207934|185.156.96.227|1.6.166.0/24|185.156.96.227|207934 3292 6453 4755 9583|9583|3292:1100 3292:24901 65000:100||
R|R|1659312000.000000|singlefile|singlefile|||58511|103.247.3.36|1.6.166.0/24|103.247.3.36|58511 3491 6453 4755 9583|9583|||
R|R|1659312000.000000|singlefile|singlefile|||33185|170.39.196.252|1.6.166.0/24|170.39.196.252|33185 174 6453 4755 9583|9583|||
R|R|1659312000.000000|singlefile|singlefile|||41666|91.216.79.0|1.6.166.0/24|91.216.79.0|41666 58299 6830 6453 4755 9583|9583|6453:2000 6453:2100 6453:2104 6453:10001 6453:10002 6830:17000 6830:17457 6830:23001 6830:33104 41666:1000 58299:1000||
R|R|1659312000.000000|singlefile|singlefile|||211398|87.239.48.250|1.6.166.0/24|87.239.48.250|211398 34854 3257 6453 4755 9583|9583|3257:8052 3257:30110 3257:50001 3257:54900 3257:54901 34854:3005||
R|R|1659312000.000000|singlefile|singlefile|||40864|23.159.240.61|1.6.166.0/24|23.159.240.61|40864 6461 6453 4755 9583|9583|6461:5997||
R|R|1659312000.000000|singlefile|singlefile|||211398|87.239.48.250|1.6.166.0/24|87.239.48.250|211398 34927 174 6453 4755 9583|9583|174:21100 174:22010 34927:710 34927:747||
R|R|1659312000.000000|singlefile|singlefile|||211398|87.239.48.250|1.6.166.0/24|87.239.48.250|211398 34854 3257 6453 4755 9583|9583|3257:8052 3257:30110 3257:50001 3257:54900 3257:54901 34854:3005||
R|R|1659312000.000000|singlefile|singlefile|||211398|87.239.48.250|1.6.166.0/24|87.239.48.250|211398 57695 60068 174 6453 4755 9583|9583|174:21100 174:22012 57695:13000 60068:203 60068:2000 60068:2010 60068:7040||

➜  libbgpstream git:(master) bgpkit-parser-cli http://archive.routeviews.org/route-views5/bgpdata/2022.08/RIBS/rib.20220801.0000.bz2|head             
A|1659312000|87.239.48.250|211398|1.0.0.0/24|211398 34854 3257 13335|IGP|87.239.48.250|0|0|3257:4000 3257:8794 3257:50001 3257:50110 3257:54900 3257:54901 34854:3005 65000:4134 65001:3320 65002:5511 lg:211398:255:100 lg:211398:555:555 lg:211398:2760255:34854|NAG|13335|162.158.84.50
A|1659312000|91.216.79.0|41666|1.0.0.0/24|41666 13335|IGP|91.216.79.0|0|0|13335:10020 13335:19020 13335:20050 13335:20500 13335:20530|NAG|13335|141.101.65.254
A|1659312000|23.159.240.61|40864|1.0.0.0/24|40864 6461 13335|IGP|23.159.240.61|0|0|6461:5997|NAG|13335|108.162.239.1
A|1659312000|87.239.48.250|211398|1.0.0.0/24|211398 48646 50629 13335|IGP|87.239.48.250|0|0|13335:10075 13335:19020 13335:20050 13335:20500 13335:20530 50629:200 50629:201 50629:334 50629:1000 50629:10001 50629:10102 50629:10205 lg:48646:0:101 lg:211398:245:100 lg:211398:2760245:48646|NAG|13335|162.158.200.1
A|1659312000|87.239.48.250|211398|1.0.0.0/24|211398 34927 13335|IGP|87.239.48.250|0|0|13335:10020 13335:19020 13335:20050 13335:20500 13335:20530 34927:130 34927:153 34927:730 34927:732 lg:211398:252:100 lg:211398:5280252:34927|NAG|13335|141.101.65.254
A|1659312000|185.156.96.227|207934|1.0.0.0/24|207934 13335|IGP|185.156.96.227|0|0|13335:10065 13335:19020 13335:20050 13335:20500 13335:20530 65000:200 65001:26301|NAG|13335|162.158.132.1
A|1659312000|170.39.196.252|33185|1.0.0.0/24|33185 13335|IGP|170.39.196.252|0|0||NAG|13335|162.158.124.1
A|1659312000|103.247.3.36|58511|1.0.0.0/24|58511 13335|IGP|103.247.3.36|0|0||NAG|13335|198.41.236.1
A|1659312000|87.239.48.250|211398|1.0.0.0/24|211398 57695 25369 13335|IGP|87.239.48.250|0|0|25369:400 25369:401 25369:668 25369:673 57695:13000 lg:211398:250:100 lg:211398:8260250:57695|NAG|13335|141.101.71.254
A|1659312000|103.247.3.142|58511|1.0.0.0/24|58511 13335|IGP|103.247.3.142|0|0|58511:200 58511:9005|NAG|13335|162.158.164.1

➜  libbgpstream git:(master) ✗ bgpdump -m rib.20220801.0000.bz2| head
2022-08-06 16:07:13 [info] logging to syslog
TABLE_DUMP2_AP|1659312000|B|87.239.48.250|211398|1.0.0.0/24|27|211398 34854 3257 13335|IGP|87.239.48.250|0|0|3257:4000 3257:8794 3257:50001 3257:50110 3257:54900 3257:54901 34854:3005 65000:4134 65001:3320 65002:5511|NAG|13335 162.158.84.50|
TABLE_DUMP2_AP|1659312000|B|91.216.79.0|41666|1.0.0.0/24|0|41666 13335|IGP|91.216.79.0|0|0|13335:10020 13335:19020 13335:20050 13335:20500 13335:20530|NAG|13335 141.101.65.254|
TABLE_DUMP2_AP|1659312000|B|23.159.240.61|40864|1.0.0.0/24|0|40864 6461 13335|IGP|23.159.240.61|0|0|6461:5997|NAG|13335 108.162.239.1|
TABLE_DUMP2_AP|1659312000|B|87.239.48.250|211398|1.0.0.0/24|23|211398 48646 50629 13335|IGP|87.239.48.250|0|0|13335:10075 13335:19020 13335:20050 13335:20500 13335:20530 50629:200 50629:201 50629:334 50629:1000 50629:10001 50629:10102 50629:10205|NAG|13335 162.158.200.1|
TABLE_DUMP2_AP|1659312000|B|87.239.48.250|211398|1.0.0.0/24|21|211398 34927 13335|IGP|87.239.48.250|0|0|13335:10020 13335:19020 13335:20050 13335:20500 13335:20530 34927:130 34927:153 34927:730 34927:732|NAG|13335 141.101.65.254|
TABLE_DUMP2_AP|1659312000|B|185.156.96.227|207934|1.0.0.0/24|0|207934 13335|IGP|185.156.96.227|0|0|13335:10065 13335:19020 13335:20050 13335:20500 13335:20530 65000:200 65001:26301|NAG|13335 162.158.132.1|
TABLE_DUMP2_AP|1659312000|B|170.39.196.252|33185|1.0.0.0/24|0|33185 13335|IGP|170.39.196.252|0|0||NAG|13335 162.158.124.1|
TABLE_DUMP2_AP|1659312000|B|103.247.3.36|58511|1.0.0.0/24|0|58511 13335|IGP|103.247.3.36|0|0||NAG|13335 198.41.236.1|
TABLE_DUMP2_AP|1659312000|B|87.239.48.250|211398|1.0.0.0/24|18|211398 57695 25369 13335|IGP|87.239.48.250|0|0|25369:400 25369:401 25369:668 25369:673 57695:13000|NAG|13335 141.101.71.254|
TABLE_DUMP2_AP|1659312000|B|103.247.3.142|58511|1.0.0.0/24|0|58511 13335|IGP|103.247.3.142|0|0|58511:200 58511:9005|NAG|13335 162.158.164.1|

bgpdump and bgpkit-parser conform with each other, but bgpreader output is different. For example | grep "1\.0\.0\.0" produces nothing from bgpreader but has quite a few from the other two.

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

1 participant