GRE Protocol in Industrial Routers

GRE Protocol in Industrial Routers

GRE (Generic Routing Encapsulation) protocol is a communication protocol used to establish a direct point-to-point connection between network nodes. GRE adopts Tunnel technology, which is the Layer 3 tunneling protocol of VPN (Virtual Private Network), and encapsulates the data messages of certain network layer protocols (such as IP and IPX) so that these encapsulated data messages can be transmitted in another network layer protocol (such as IP), thus solving the problem of cross-disparate network. It encapsulates the data messages of certain network layer protocols (such as IP and IPX) so that these encapsulated data messages can be transmitted in another network layer protocol (such as IP), thus solving the problem of transmitting across heterogeneous networks.GRE is defined by RFC 2784.

The GRE protocol has the following advantages.

Multiple protocols are used on a single protocol backbone.
Network construction can be achieved with a limited number of hops
Networking of non-contiguous subnets
Lower resource requirements than its alternatives (e.g., IPsec VPNs)

Principle of Operation

The system routes data to GRE endpoints via routes established in the routing table. When a GRE endpoint receives a packet, it is decapsulated and re-routed to its destination address. GRE tunnels are stateless, and tunnel endpoints contain no information about the status or availability of remote tunnel endpoints. Therefore, a switch operating as a tunnel source router cannot shut down a GRE tunnel interface if the remote endpoint is unreachable.

GRE Message Transmission Flow

If a message from Host A is transmitted from RouterA to RouterB, the GRE data is encapsulated on RouterA and decapsulated on RouterB. The path that the encapsulated data message travels through the network is the GRE tunnel.

1. Encapsulation Message

1) When Router A receives a packet from Host A 192.168.10.10 with destination IP 192.172.1.10 (Host B), it encapsulates the original packet as a payload packet into the GRE protocol and adds a GRE header with source IP 1.1.1.2 and destination IP 1.1.1.3 at the opposite end of the tunnel.

2) Complete the encapsulation of the GRE packet

3) Router A continues to add the GRE tunnel source IP 113.113.11.11 and destination IP 113.113.10.10 to the outside of the packet and sends it to the Internet

 

2. Unencapsulating the message

1) After the packet is sent to the Internet, all routers will only forward the packet according to the external public IP address until the packet is forwarded to the real destination IP 113.113.10.10 (Router B)

2) Router B will first untangle the public IP header of the packet and then realize that the destination IP in the GRE header is 1.1.1.3, which is exactly itself.

3) Router B will continue to unwrap the GRE packet and find that the destination IP is 192.172.1.10, eventually sending the packet to 192.172.1.10 (Host B)

Jincan network Help express cabinets to solve the "last 100 meters" problem
« Previous 05/09/2024 18:11
Using L2TP Protocol in Industrial Routers ZX4224
Next » 05/09/2024 18:11
en_USEnglish