Overview

1. Overview GRE (Generic Routing Encapsulation) is a protocol that encapsulates data packets of certain network‑layer protocols (such as IP and IPX) so that these encapsulated packets can be transmitted over another network‑layer protocol (such as IP). In most normal cases, a system has a payload packet that must be encapsulated and delivered to a destination network. The payload is first encapsulated in a GRE packet, then the GRE packet is encapsulated in another protocol and transmitted. This protocol is the transmission protocol. Using tunnel technology, GRE is a layer‑3 VPN tunneling protocol. The tunnel is a virtual point‑to‑point connection that provides a path for transmitting encapsulated data packets, and the packets are encapsulated and decapsulated at both ends of the tunnel. 2. Why is GRE used for tunneling? GRE is a tunneling protocol originally developed by CISCO. It offers a simple generic approach to transport packets from one protocol to another via encapsulation, so that packets can be transmitted across heterogeneous networks. For example, if we need to perform non-IP transmission over an IP network, GRE is a good solution for data transmission; another example, you can transmit multicast packets and IPv6 packets via a GRE tunnel. Sometimes you need encrypted multicast transmission, and GRE tunnels can deliver multicast packets as a physical network interface. Moreover, a large number of videos, VoIP, and music streams are compatible with multicast transmission. Currently, computers within enterprises communicate using private IP addresses. When a company needs to connect to its branch in another zone via the Internet, the problem of crossing a private IP network through the public network must be solved. A very simple solution is to create a “tunnel” over the Internet, through which the company and its branch can interconnect. GRE technology can effectively solve this problem. 3. GRE advantages The PPTP and L2TP protocols provide incomplete support for modern security needs, and their scope of application is not wide enough. Take PPTP as an example: it does not support QoS, and its authentication and encryption are relatively weak. Moreover, each user can use only one tunnel, so from the user’s perspective a large amount of resources is wasted while a significant amount of money is spent. In fact, they all lack the digital certificate supported by PKI technology, so the VPN is deprived of the most important security. GRE is a layer‑3 tunneling protocol. It is easy to configure and exploit, and its security, scalability and reliability are superior to those of the layer‑2 tunneling protocol. And our GRE can be used with IPSec which provides user data encryption, so the user’s security is higher. The protocol provides encryption and authentication for communications between routers, firewalls or other communications. It is far more secure than any other protocol. Since GRE is an IP‑network protocol, it is very easy to form a global specification, thus providing excellent versatility. In a relatively secure intranet of a company or enterprise, if the GRE protocol can be applied flexibly and independently, it can meet a variety of business needs and produce a significant effect, even better than other technologies. 4. GRE features (1) GRE is easy to implement and adds only a few charges to devices at both ends of a tunnel. (2) GRE easily encapsulates non‑IP data packets from protocols such as IPX or AppleTalk. (3) Data communication is limited to being performed on a single private IP network. (4) GRE supports multiple protocols and multicast transmission. (5) GRE can be used to create a flexible VPN. (6) GRE supports multipoint tunneling. · (7) GRE can implement QoS. 4. Basic device configuration Device 1 settings are as follows: 20170801112314210.png Device 2 settings are as follows: 20170807034144750.png 5. Conclusion Previously proposed, GRE offers strong data packet encapsulation capacity. To date, it has been developed to be relatively mature. It is not limited to a particular "X over B" application, but constitutes a common encapsulation method. GRE can be used with IPSec to provide users with a safer and more reliable environment. In real networks, GRE supports more flexible usage.