当前位置:网站首页>GRE protocol details
GRE protocol details
2022-06-12 05:29:00 【Gradually every day, I miss my hometown a little more】
Generic Routing Encapsulation (GRE) General routing encapsulation protocol , be based on IP Network layer protocol encapsulates Ethernet message , Can be used in IPSec VPN Multicast routing information messages are transmitted between networks , Or in PPTP Agreement , bearing PPP The data packet . Its position in the data frame is as follows :
|-------------------|----------------|----------------------|------------------|
| Outer IP Header | GRE Header | Inner IP Header | Payload |
|-------------------|----------------|----------------------|------------------|
GRE The head is the smallest 4 Byte length , Followed by optional fields , The flag bit in the first byte determines whether the following field exists , Maximum length is 16 Bytes . The following is a standard GRE Header format :
|------------------------------------------------------------------------------|
| bit0-3 | 4-12 | 13-15 | 16 - 31 |
|-------------|----------------|-------|---------------------------------------|
| C | | K | S | Reserved0 | Ver | Protocol Type |
|--------------------------------------|---------------------------------------|
| Checksum(optional) | Reserved1(optional) |
|------------------------------------------------------------------------------|
| Key(optional) |
|------------------------------------------------------------------------------|
| Sequence Number (optional) |
|------------------------------------------------------------------------------|
C, K, and S : They correspond to each other Checksum、Key and Sequence Number Field , Set up 1 Indicates that there is a corresponding field , Otherwise, there is no such field .
Ver : GRE Version number ( by 0), about PPTP GRE, This field is 1.
Protocol Type : Encapsulated Ethernet protocol type ( for example IPv4, Here is 0x0800)
Checksum : If C Position as 1, This field contains information from GRE The checksum of all data at the beginning of the header
Key : If K Position as 1, This field contains secret key information
Sequence Number: If S Position as 1, This field contains GRE The serial number of the packet
Linux Configuration command
Two sets of equipment are required (Ubuntu operating system ) Configure and test . A device A Of IP The address is 192.168.1.113, Another device B Of IP The address is 192.168.1.123. First on the device A On the configuration GRE Tunnel , Following commands :
$ sudo ip tunnel add gre01 mode gre remote 192.168.1.123 local 192.168.1.113 ttl 255
$ sudo ip link set gre01 up
$ sudo ip addr add 10.1.1.1/24 dev gre01
边栏推荐
- Realease package appears – missing type parameter
- Is the individual industrial and commercial door a legal person enterprise
- Selenium crawler automatically captures TOEFL test position of NEEA website
- Force/release learning and sorting in IC Verification (6) research on the influence of wire type signals
- WiFi protocol and ieee905 protocol learning details
- Serial port oscilloscope_ port_ Setup of plotter secondary development environment (including QT setup)
- Map coordinate conversion of Baidu map API
- How to deploy dolphin scheduler 1.3.1 on cdh5
- 个体工商户是不是法人企业
- 67. convert string to integer
猜你喜欢

WiFi band resources

分公司负责人需要承担的法律责任

Multi thread learning v. volatile visibility and cache inconsistency, instruction reordering

Is the individual industrial and commercial door a legal person enterprise

20000 word detailed reptile knowledge reserve, basic exercises of data collection and cleaning (I) reference answers to the first song

Detailed tutorial on the use of yolov5 and training your own dataset with yolov5

Thingsboard create RCP widget

How to deploy dolphin scheduler Apache dolphin scheduler 1.2.0 in cdh5.16.2

16. Somme des trois plus proches

DMA RDMA technology details
随机推荐
Deploying a single node kubernetes cluster using rancher-2.5.5
WiFi smartconfig implementation
国企为什么要上市
Lesson 5: data warehouse construction (III)
JS to determine whether the tags of multiple classes are empty
What is thinking
Force/release learning arrangement in IC Verification (5) research on the influence of reg type signals
67. convert string to integer
Link: fatal error lnk1168: cannot open debug/test Solution of exe for writing
51. reverse order pairs in the array
Realease package appears – missing type parameter
Variables and data types
Stm32f4 ll library multi-channel ADC
Performance test - performance test tool analysis
Detailed explanation of data envelopment analysis (DEA) (taking the 8th Ningxia provincial competition as an example)
Pupanvr create project and management script (2)
Performance & interface test tool - JMeter
什么是工程预付款
59 - II. Maximum value of the queue
Introduction to redis cluster