Saturday 21 March 2020

Generic Routing Encapsulation (GRE) - Basics & Packet Header



  • GRE is a tunneling protocol.
  • Developed by Cisco but later became industry standard.
  • Allows the encapsulation of a wide variety of Layer 3 protocols including IP.
  • In GRE an IP Datagram is tunnelled i.e encapsulated within another IP datagram.
  • GRE allows routing of IP packets between private networks which are separated over public network like  internet.
  • GRE tunnels are not secure because it doesnot encrypt its Data payload.
  • In real-time GRE is used with some other secure tunnelling protocols like IPSec to provide network security.



GRE Packet Header

GRE PACKET HEADER
PIC CREDIT - WIKIPEDIA

C
Checksum bit. Set to 1 if a checksum is present.

K
Key bit. Set to 1 if a key is present.

S
Sequence number bit. Set to 1 if a sequence number is present.

Reserved0
Reserved bits; set to 0.

Version
GRE Version number; set to 0.

Protocol Type
Indicates the ether protocol type of the encapsulated payload. (For IPv4, this would be hex 0800.)

Checksum
Present if the C bit is set; contains the checksum for the GRE header and payload.

Reserved1
Present if the C bit is set; is set to 0.

Key
Present if the K bit is set; contains an application-specific key value.

Sequence Number
Present if the S bit is set; contains a sequence number for the GRE packet.
Is used when packets need to be sent from one network to another over the Internet
or insecure network.

Contd.....


No comments:

Post a Comment