Here's my proposed format for the TABLE_DUMP_V2 type for comment.
The following defines a new MRT routing information type called
TABLE_DUMP_V2, which is assigned MRT type 13.
The TABLE_DUMP_V2 type updates the TABLE_DUMP type to include 32-bit
ASN support and full support for BGP Multiprotocol extensions. It also
improves upon the space efficiency of the TABLE_DUMP type by employing
an index table for peers and using a single MRT record per NLRI entry.
The following subtypes are used with the TABLE_DUMP_V2 type.
1 INDEX_TABLE
2 IPV4_UNICAST
3 MULTIPROTOCOL
An initial INDEX_TABLE MRT record provides a list of indexed peers.
Following the INDEX_TABLE MRT record, a series of IPV4_UNICAST
or MULTI_PROTOCOL records encode the RIB table entries. The
INDEX_TABLE Subtype is shown below. The Peer Type field is a bit field
which encodes the type of the AS and IP address as follows:
Bit 0 - unset for IPv4 Peer IP address, set of IPv6
Bit 1 - unset when Peer AS field is 16 bits, set when it's 32 bits
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer IP address (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer AS (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| repeated Peer Type, Peer IP address, and Peer AS fields
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Peer Type, Peer IP, and Peer AS fields are repeated as indicated
by the Peer Count field. The position of the Peer in the INDEX_TABLE
is used as an index in the IPV4_UNICAST and MULTIPROTCOL
MRT records. The index number begins with 0.
The IPV4_UNICAST and MULTIPROTOCOL subtypes include a header
which specify a sequence number, NLRI, and a count of the number of RIB
entries which follow. The IPV4_UNICAST_NLRI and MULTIPROTOCOL_NLRI have
unique headers followed by a common RIB entry format.
The IPV4_UNICAST_NLRI header is shown below. The Prefix Length
and Prefix fields are encoded in the same manner as the BGP
NLRI field.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Entry Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The MULTIPROTOCOL header is shown below. It includes Address
Family Identifier (AFI), Subsequent AFI and a single NLRI entry.
The NLRI information is specific to the AFI and SAFI values.
An implementation which does not recognize particular AFI and SAFI
values SHOULD discard the remainder of the MRT record.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Family Identifier |Subsequent AFI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Layer Reachability Information (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Entry Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The IPV4_UNICAST_NLRI and MULTIPROTOCOL_NLRI headers are followed
by a series of RIB entries which are repeated Entry Count times.
These entries share a common format as shown below. They include a
Peer Index from the INDEX_TABLE MRT record, an originated time for
the RIB entry, and the BGP path attribute length and attributes
encoded as provided in a BGP Update message.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Originated Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Attribute Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| BGP Attributes... (variable)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
There is one exception to the encoding of BGP attributes for the BGP
MP_REACH_NLRI attribute (BGP Type Code 14) [RFC 4760]. Since the AFI,
SAFI, and NLRI information is already encoded in the MULTIPROTOCOL
header, only the Next Hop Address Length and Next Hop Address fields
are included. The Reserved field is omitted. The attribute length is
also adjusted to reflect only the length of the Next Hop Address Length
and Next Hop Address fields.
_______________________________________________
GROW mailing list
[email protected]
https://www1.ietf.org/mailman/listinfo/grow