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

GRE (gre)

Reached from

Lower layerSelectorValue
ipv4protocol47 (0x2f)
ipv6next_header47 (0x2f)
ipv6_hopoptsnext_header47 (0x2f)
ipv6_routenext_header47 (0x2f)
ipv6_srhnext_header47 (0x2f)
ipv6_fragnext_header47 (0x2f)
ipv6_dstoptsnext_header47 (0x2f)

Fields

FieldTypeDefaultAutoDescription
flagsflags(16)0x0GRE flags and version (checksum / key / sequence present bits).
protocol_typeenum(16)2048 (ipv4)Protocol number of the next layer (see Next layer)EtherType of the encapsulated payload.

flags

BitMaskName
1532768 (0x8000)checksum_present
138192 (0x2000)key_present
124096 (0x1000)sequence_present

protocol_type

ValueName
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
25944 (0x6558)transparent_ethernet
34887 (0x8847)mpls

Next layer

The next layer is selected by protocol_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
25944 (0x6558)ethernet2
34887 (0x8847)mpls

Sample templates

  • gre-ipv4 — templates/protocols/encap/gre-ipv4.wpg.yaml