Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

BGP UPDATE (bgp_update)

  • Layer: Application and control
  • Header: variable length

Reached from

Lower layerSelectorValue
bgptype2 (0x02)

Fields

FieldTypeDefaultAutoDescription
withdrawn_routes_lengthuint(16)Size of withdrawn_routes in octetsLength of the withdrawn routes, in octets (Auto).
withdrawn_routeslist<struct> — withdrawn_routes_length octets[]Withdrawn IPv4 routes (prefix length in bits, prefix).
total_path_attribute_lengthuint(16)Size of path_attributes in octetsLength of the path attributes, in octets (Auto).
path_attributestlv — total_path_attribute_length octets3 itemsPath attributes (flags + type code; the length is 16 bits with the Extended Length flag, set automatically above 255 octets).
nlrilist<struct> — rest of the PDU1 itemsAnnounced IPv4 routes (prefix length in bits, prefix); other families go in MP_REACH_NLRI.

withdrawn_routes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes

  • Type 16 bits, length 8 bits.
  • The length counts the value only.
  • Type bit 0x1000 selects a 16-bit length.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
16385 (0x4001)originorigin
16386 (0x4002)as_pathsegments
16387 (0x4003)next_hopnext_hop
32772 (0x8004)multi_exit_discmed
16389 (0x4005)local_preflocal_pref
16390 (0x4006)atomic_aggregate
49159 (0xc007)aggregatorasn, address
49160 (0xc008)communitiesvalues
32782 (0x800e)mp_reach_ipv4_unicastafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 01 01
32782 (0x800e)mp_reach_ipv6_unicastafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 02 01
32782 (0x800e)mp_reach_vpnv4afi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 01 80
32782 (0x800e)mp_reach_vpnv6afi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 02 80
32782 (0x800e)mp_reach_evpnafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 19 46
32782 (0x800e)mp_reach_nlriafi, safi, next_hop_length, next_hop, reserved, nlri
32783 (0x800f)mp_unreach_ipv4_unicastafi, safi, withdrawn; when the value starts with 00 01 01
32783 (0x800f)mp_unreach_ipv6_unicastafi, safi, withdrawn; when the value starts with 00 02 01
32783 (0x800f)mp_unreach_vpnv4afi, safi, withdrawn; when the value starts with 00 01 80
32783 (0x800f)mp_unreach_vpnv6afi, safi, withdrawn; when the value starts with 00 02 80
32783 (0x800f)mp_unreach_evpnafi, safi, withdrawn; when the value starts with 00 19 46
32783 (0x800f)mp_unreach_nlriafi, safi, withdrawn
49168 (0xc010)extended_communitiesvalues
49184 (0xc020)large_communitiesvalues
49174 (0xc016)pmsi_tunnelflags, tunnel_type, mpls_label, tunnel_id

path_attributes › origin

FieldTypeDefaultAutoDescription
originuint(8)

path_attributes › as_path

FieldTypeDefaultAutoDescription
segmentslist<struct> — rest of the PDU
path_attributes › as_path › segments

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
segment_typeenum(8)
segment_lengthuint(8)
asnslist<uint(32)> — segment_length * 4 octets
path_attributes › as_path › segments › segment_type
ValueName
1 (0x01)as_set
2 (0x02)as_sequence

path_attributes › next_hop

FieldTypeDefaultAutoDescription
next_hopipv4

path_attributes › multi_exit_disc

FieldTypeDefaultAutoDescription
meduint(32)

path_attributes › local_pref

FieldTypeDefaultAutoDescription
local_prefuint(32)

path_attributes › aggregator

FieldTypeDefaultAutoDescription
asnuint(32)
addressipv4

path_attributes › communities

FieldTypeDefaultAutoDescription
valueslist<uint(32)> — rest of the PDU

path_attributes › mp_reach_ipv4_unicast

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)1
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<ipv4> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_ipv4_unicast › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_reach_ipv6_unicast

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)1
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<ipv6> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_ipv6_unicast › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_reach_vpnv4

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)128
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<struct> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_vpnv4 › next_hop

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
rdbytes(8)
addressipv4
path_attributes › mp_reach_vpnv4 › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_reach_vpnv6

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)128
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<struct> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_vpnv6 › next_hop

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
rdbytes(8)
addressipv6
path_attributes › mp_reach_vpnv6 › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_reach_evpn

FieldTypeDefaultAutoDescription
afiuint(16)25
safiuint(8)70
next_hop_lengthuint(8)Size of next_hop in octets
next_hopbytes — next_hop_length octets
reserveduint(8)
nlritlv — rest of the PDU
path_attributes › mp_reach_evpn › nlri
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ethernet_adrd, esi, ethernet_tag, mpls_label
2 (0x02)mac_iprd, esi, ethernet_tag, mac_length, mac, ip_length, ip_address, labels
3 (0x03)inclusive_multicastrd, ethernet_tag, ip_length, originating_ip
4 (0x04)ethernet_segmentrd, esi, ip_length, originating_ip
5 (0x05)ip_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 34 octets
5 (0x05)ipv6_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 58 octets
path_attributes › mp_reach_evpn › nlri › ethernet_ad
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mpls_labeluint(24)
path_attributes › mp_reach_evpn › nlri › mac_ip
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mac_lengthuint(8)
macmac
ip_lengthuint(8)
ip_addressbytes — ip_length / 8 octets
labelslist<uint(24)> — rest of the PDU
path_attributes › mp_reach_evpn › nlri › inclusive_multicast
FieldTypeDefaultAutoDescription
rdbytes(8)
ethernet_taguint(32)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_reach_evpn › nlri › ethernet_segment
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_reach_evpn › nlri › ip_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv4
gatewayipv4
mpls_labeluint(24)
path_attributes › mp_reach_evpn › nlri › ipv6_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv6
gatewayipv6
mpls_labeluint(24)

path_attributes › mp_reach_nlri

FieldTypeDefaultAutoDescription
afiuint(16)
safiuint(8)
next_hop_lengthuint(8)Size of next_hop in octets
next_hopbytes — next_hop_length octets
reserveduint(8)
nlribytes — rest of the PDU

path_attributes › mp_unreach_ipv4_unicast

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)1
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_ipv4_unicast › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_unreach_ipv6_unicast

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)1
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_ipv6_unicast › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_unreach_vpnv4

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)128
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_vpnv4 › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_unreach_vpnv6

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)128
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_vpnv6 › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_unreach_evpn

FieldTypeDefaultAutoDescription
afiuint(16)25
safiuint(8)70
withdrawntlv — rest of the PDU
path_attributes › mp_unreach_evpn › withdrawn
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ethernet_adrd, esi, ethernet_tag, mpls_label
2 (0x02)mac_iprd, esi, ethernet_tag, mac_length, mac, ip_length, ip_address, labels
3 (0x03)inclusive_multicastrd, ethernet_tag, ip_length, originating_ip
4 (0x04)ethernet_segmentrd, esi, ip_length, originating_ip
5 (0x05)ip_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 34 octets
5 (0x05)ipv6_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 58 octets
path_attributes › mp_unreach_evpn › withdrawn › ethernet_ad
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mpls_labeluint(24)
path_attributes › mp_unreach_evpn › withdrawn › mac_ip
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mac_lengthuint(8)
macmac
ip_lengthuint(8)
ip_addressbytes — ip_length / 8 octets
labelslist<uint(24)> — rest of the PDU
path_attributes › mp_unreach_evpn › withdrawn › inclusive_multicast
FieldTypeDefaultAutoDescription
rdbytes(8)
ethernet_taguint(32)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_unreach_evpn › withdrawn › ethernet_segment
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_unreach_evpn › withdrawn › ip_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv4
gatewayipv4
mpls_labeluint(24)
path_attributes › mp_unreach_evpn › withdrawn › ipv6_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv6
gatewayipv6
mpls_labeluint(24)

path_attributes › mp_unreach_nlri

FieldTypeDefaultAutoDescription
afiuint(16)
safiuint(8)
withdrawnbytes — rest of the PDU

path_attributes › extended_communities

FieldTypeDefaultAutoDescription
valueslist<uint(64)> — rest of the PDU

path_attributes › large_communities

FieldTypeDefaultAutoDescription
valueslist<struct> — rest of the PDU
path_attributes › large_communities › values

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
global_adminuint(32)
local_data1uint(32)
local_data2uint(32)

path_attributes › pmsi_tunnel

FieldTypeDefaultAutoDescription
flagsuint(8)
tunnel_typeenum(8)
mpls_labeluint(24)
tunnel_idbytes — rest of the PDU
path_attributes › pmsi_tunnel › tunnel_type
ValueName
0 (0x00)none
1 (0x01)rsvp_te_p2mp
2 (0x02)mldp_p2mp
3 (0x03)pim_ssm
4 (0x04)pim_sm
5 (0x05)bidir_pim
6 (0x06)ingress_replication
7 (0x07)mldp_mp2mp

nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

Sample templates