R
R
Rainb262020-05-01 11:57:26
Border Gateway Protocol
Rainb26, 2020-05-01 11:57:26

How to find out the network address for the BGP protocol?

I need to write a c++ program that would build a routing table for the BGP protocol from a pcap packet.
Tell me how to determine the network address and mask of the destination host in wireshark?
BGP has an NP_REACH_NLRI attribute in Path Attributes, which, according to the Internet, notifies about a possible path to a partner, it has its own NEXT_HOP and NLRI Prefix (network address, which, however, looks doubtful).
5eac95921e2d6266735618.png

However, in the RFC, the source of the network address specifies the NLRI Prefix, which is NOT included in the Path Attributes
5eac959e9c0f1929898133.png

. In this case, the protocol uses either option 1 or 2, but not both together.
Why in some protocols NLRI Prefix can only be found in Path Attributes, and can this representation be used to determine the network address and next hop?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-05-01
@jcmvbkbc

Tell me how to determine the network address and mask of the destination host in wireshark?

See the RFC to understand how NLRI fields and NEXT_HOP attributes are related in an UPDATE message.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question