GRE Quick Start

Source: Internet
Author: User

Anyone who has some knowledge about networking must know tunnel encapsulation technology. In the network, we use the GRE protocol to encapsulate data packets. So today we will have a basic understanding of this agreement. Next, let's look at the text.

1. Protocol Introduction

The GRE (generic routing encapsulation, universal routing encapsulation) protocol encapsulates the datagram of some network layer protocols such as ip and ipx, so that these encapsulated datagram can be in another network layer protocol such as ip). GRE protocol is the layer-3 tunnel protocol of vpnvirtual private network. A tunnel technology is used between the protocol layers. Tunnel is a virtual point-to-point connection. In practice, it can be regarded as a virtual interface that only supports point-to-point connections. This interface provides a path for the encapsulated datagram to be transmitted on this path, data packets are encapsulated and unencapsulated at both ends of a tunnel.

To transmit a message in tunnel, it must be encapsulated and unencapsulated.

(1) encapsulation process

The interface connecting to novell group1 first submits the ipx datagram to the ipx protocol after receiving the ipx datagram. The ipx protocol checks the destination address domain in the ipx header to determine how to route the packet. If the destination address of the packet is found to be the virtual network number of the network tunnel with the network number 1f), send the packet to the tunnel port with the network number 1f. After receiving the packet, the tunnel port encapsulates the packet in GRE. After encapsulation, the packet is sent to the ip module for processing. After encapsulation, the packet header is sent to the corresponding network interface based on the destination address and route table of the packet.

(2) encapsulation process

The process of decoding and adding encapsulation is the opposite. The ip packet received from the tunnel interface checks the destination address. When the destination is the vro, the system removes the ip header of the packet, to the GRE protocol module for key verification, checksum and message serial numbers, etc.). After the GRE protocol module completes the corresponding processing, it removes the GRE header and submits it to the ipx protocol module for processing, the ipx protocol module processes the datagram like a common datagram.

The system receives a datagram that needs to be encapsulated and routed, called the Net Load payload). The net load is first encapsulated by GRE to form a GRE packet, and then encapsulated in an ip packet, in this way, the ip layer is fully responsible for the forward transmission of this message ). This forward transmission ip protocol is often referred to as the transport protocol delivery protocol or transport protocol ).

2. Application Scope

The GRE Protocol provides the following types of services:

(1) multi-protocol backbone network transmission through a single protocol Backbone Network

Group1 and group2 are networks that run the novell ipx protocol, and term1 and term2 are networks that run the ip protocol. Tunnel encapsulated by GRE protocol between routerb and routerb), group1 and group2, team1 and team2 can communicate with each other without affecting each other.

(2) expanded the scope of work of the network with limited number of hops, such as ipx.

If the number of hops between two terminals exceeds 15, they cannot communicate. By using tunnel in the network, you can hide some step hops to expand the network scope.

(3) connect some non-consecutive subnets to form a vpn

The two subnets group1 and group2 running the novell ipx protocol are located in different cities. tunnel can be used to achieve vpn across the WAN.

(4) use with ipsec

Perform GRE encapsulation for data such as routing protocols, voice and video, and then encrypt the encapsulated packets by using ipsec.

In addition, GRE also allows you to select and record the keyword of the tunnel interface, and perform end-to-end verification on encapsulated packets.

The impact of factors such as encapsulation, unencapsulation, and increased data volume caused by encapsulation on both sides of the GRE Protocol, this causes gre to reduce the data forwarding efficiency of the router to a certain extent.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.