GRE, Generic Routing Encapsulation(Definition from RFC)

GRE header, version 0:

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
C R K S s Recur Flags Version Protocol
Checksum Offset
Key
Sequence Number
Routing :::

C, Checksum Present. 1 bit.
The Checksum field is present and contains valid information if set. If either the Checksum Present bit or the Routing Present bit are set, the Checksum and Offset fields are both present.

R, Routing Present. 1 bit.
If set then the Offset field is present and contains valid information. If either the Checksum Present bit or the Routing Present bit are set, the Checksum and Offset fields are both present.

K, Key Present. 1 bit.
If set then the Key field is present and contains valid information.

S, Sequence Number present. 1 bit.
If set then the Sequence Number field is present and contains valid information.

s, Strict Source Route. 1 bit.
The meaning of this bit is defined in other documents. It is recommended that this bit only be set if all of the the Routing Information consists of Strict Source Routes.

Recur, Recursion Control. 3 bits, unsigned integer.
Contains the number of additional encapsulations which are permitted. 0 is the default value.

Flags. 5 bits.
These bits are reserved and must be transmitted as 0.

Version. 3 bits.
GRE protocol version. Must be cleared to 0.

Protocol. 16 bits.
Contains the protocol type of the payload packet. In general, the value will be the Ethernet protocol type field for the packet. Additional values may be defined in other documents.

Checksum. 16 bits.
Optional. Contains the IP (one's complement) checksum of the GRE header and the payload packet.

Offset. 16 bits.
Optional. Indicates the byte offset from the start of the Routing field to the first byte of the active Source Route Entry to be examined.

Key. 32 bits.
Optional. Contains a number which was inserted by the encapsulator. It may be used by the receiver to authenticate the source of the packet.

Sequence Number. 32 bits, unsigned.
Optional. Contains a number which is inserted by the encapsulator. It may be used by the receiver to establish the order in which packets have been transmitted from the encapsulator to the receiver.

Routing. Variable length.
Optional. This field is a list of SREs.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章