For Network Protocol Transmission in different environments, we need to encapsulate it in the form of mail packaging. This is also the role of the GRE protocol. Let's take a look at the specific content encapsulated by the Protocol. Hope to help you.
1. GRE protocol Concept
Generic Routing Encapsulation (GREGeneric Routing Encapsulation) encapsulates packets of certain network layer protocols such as IP and IPX, so that these encapsulated packets can be transmitted in another network layer protocol such as IP.
GRE can be used as the layer-3 Tunnel protocol of VPN, and Tunnel technology is used between protocol layers. Tunnel is a virtual point-to-point connection. It can be seen as a virtual interface that only supports point-to-point connections. This interface provides a path for the encapsulated datagram to be transmitted over this path, encapsulate and unencapsulate the data packets at both ends of a Tunnel.
2. Packet encapsulation and unencapsulation
(1) Transmission of packets
Packet transmission in Tunnel includes two processes: encapsulation and unencapsulation. The network process is described as follows:
Add encapsulation process:
After the interface connecting to Novell group1 receives the IPX datagram, it is first processed by IPX protocol.
The IPX protocol checks the destination address field in the IPX header to determine how to route this packet. If the destination address of the packet needs to go through the Virtual Network Number of the network Tunnel with the network number 1f), send the packet to the Tunnel interface with the network number 1f.
After receiving the packet, the Tunnel interface encapsulates the packet using the GRE protocol. After encapsulation, the packet is sent to the IP module for processing. After encapsulating the IP packet header, the Tunnel interface submits the Packet Destination Address and route table to the corresponding network interface for processing.
Encapsulation process:
The process of decoding and adding encapsulation is the opposite. When an IP packet is received from the Tunnel interface and the destination address is checked, the system removes the IP header of the packet and submits it to the GRE protocol module for processing; after the GRE protocol module completes the corresponding processing, it removes the GRE header and then submits it to the IPX protocol module for processing. The IPX protocol module processes the datagram like a general datagram.
(2) Basic Concepts
The datagram received by the system to be encapsulated and routed is called the Net Load Payload). The net load is first encapsulated by the GRE protocol and becomes the GRE packet. The net load is then encapsulated in the IP packet, in this way, the IP layer can be fully responsible for the forward of this packet ).
The IP Protocol responsible for forwarding is called the Transport Protocol Delivery Protocol or Transport Protocol ). Shows the encapsulated Message format:
For example, the format of an IPX packet encapsulated in the IP Tunnel can be expressed:
Passenger Protocol: Passenger Protocol
Carrier Protocol/Encapsulation Protocol: Transport Protocol/Encapsulation Protocol
Transport Protocol: transmission Protocol