#bgp #mrt


Structs and other building blocks for BGP and MRT related Rust projects

25 releases (5 breaking)

new 0.6.0-rc.3 Nov 29, 2021
0.6.0-rc.1 Nov 28, 2021
0.5.0 Nov 27, 2021
0.4.1 Nov 25, 2021
0.1.6 Oct 16, 2021

#3 in #mrt

Download history 11/week @ 2021-09-27 41/week @ 2021-10-04 118/week @ 2021-10-11 124/week @ 2021-10-18 20/week @ 2021-10-25 8/week @ 2021-11-01 27/week @ 2021-11-08 45/week @ 2021-11-15 144/week @ 2021-11-22

182 downloads per month
Used in 2 crates

MIT license

955 lines



bgp-models is a library that defines the basic BGP and MRT message data structures. This library aims to provide building blocks for downstreams libraries working with BGP and MRT messages such as MRT parser or BGP table constructor.

Supported RFCs

Most of the structs defined in this library are named after the formal definitions in a number of RFCs. Here is a list of them:


  • RFC 4271: A Border Gateway Protocol 4 (BGP-4)
  • RFC 6793: BGP Support for Four-Octet Autonomous System (AS) Number Space


  • RFC 6396: Multi-Threaded Routing Toolkit (MRT) Routing Information Export Format
  • RFC 6397: Multi-Threaded Routing Toolkit (MRT) Border Gateway Protocol (BGP) Routing Information Export Format with Geo-Location Extensions
  • RFC 8050: Multi-Threaded Routing Toolkit (MRT) Routing Information Export Format with BGP Additional Path Extensions



Extended Communities

  • RFC 4360: BGP Extended Communities Attribute
  • RFC 5668: 4-Octet AS Specific BGP Extended Community
  • RFC 5701: IPv6 Address Specific BGP Extended Community Attribute
  • RFC 7153: IANA Registries for BGP Extended Communities Updates 4360, 5701
  • RFC 8097: BGP Prefix Origin Validation State Extended Community

Large Communities

Other Informational

  • RFC 4384: BGP Communities for Data Collection BCP 114
  • RFC 8195: Use of BGP Large Communities (informational)
  • RFC 8642: Policy Behavior for Well-Known BGP Communities

Used By

Built with ❤️ by BGPKIT Team

BGPKIT is a small-team start-up that focus on building the best tooling for BGP data in Rust. We have 10 years of experience working with BGP data and believe that our work can enable more companies to start keeping tracks of BGP data on their own turf. Learn more about what services we provide at https://bgpkit.com.



~39K SLoC