This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

BGP NLRIs - counting in Wireshark

0

Can Wireshark count the number of BGP NLRIs in a capture?

asked 24 Oct '14, 17:18

candres's gravatar image

candres
11112
accept rate: 0%


One Answer:

0

Not directly, but you can use tshark and some scripting.

tshark -nr bgp.pcap -Y "bgp.update.nlri" -V -x > out.txt

Then parse out.txt with a script (perl, python, whatever) and look for something like this:

   Network Layer Reachability Information (NLRI)
       172.16.0.0/16
           NLRI prefix length: 16
           NLRI prefix: 172.16.0.0 (172.16.0.0)

As an alternative, you can write a LUA Listener, to count the NLRIs.

http://wiki.wireshark.org/Lua/Taps
https://www.wireshark.org/docs/wsug_html_chunked/wslua_tap_example.html
http://wiki.wireshark.org/Lua/Examples

Regards
Kurt

answered 26 Oct '14, 15:44

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 26 Oct '14, 15:49