blob: 30f49b1566c266e936801a7fb31b55e71dcb04bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
---
lastproofread: '2026-03-13'
---
(vpp-config-interfaces-gre)=
```{include} /_include/need_improvement.txt
```
# VPP GRE Configuration
VPP GRE interfaces provide Generic Routing Encapsulation tunneling with
high-performance packet processing. GRE tunnels encapsulate various
protocols within IP packets, enabling connectivity across Layer 3
networks while maintaining the performance benefits of VPP's optimized
data plane.
## Basic Configuration
### Creating a GRE Interface
```{cfgcmd} set interfaces vpp gre \<vppgreN\>
Create a GRE interface where ``<vppgreN>`` follows the naming convention
``vppgre1``, ``vppgre2``, etc.
```
```{cfgcmd} set interfaces vpp gre \<vppgreN\> remote \<address\>
Set the tunnel remote endpoint address. Supports both IPv4 and IPv6
addresses.
```
```{cfgcmd} set interfaces vpp gre \<vppgreN\> source-address \<address\>
Set the tunnel source address. Must match an address configured on
the local system.
```
**Basic Example:**
```none
set interfaces vpp gre vppgre1
set interfaces vpp gre vppgre1 remote 203.0.113.2
set interfaces vpp gre vppgre1 source-address 192.168.1.1
```
## Interface Configuration
### Description and Administrative Control
```{cfgcmd} set interfaces vpp gre \<vppgreN\> description \<description\>
Set a descriptive name for the GRE interface.
```
```{cfgcmd} set interfaces vpp gre \<vppgreN\> disable
Administratively disable the GRE interface.
```
### Tunnel Type
```{cfgcmd} set interfaces vpp gre \<vppgreN\> tunnel-type \<type\>
Set the GRE tunnel encapsulation type:
* ``l3`` - Generic Routing Encapsulation for network layer traffic (default).
* ``teb`` - Transparent Ethernet Bridge for Layer 2 frame transport.
* ``erspan`` - Encapsulated Remote Switched Port Analyzer for traffic
mirroring.
```
### Kernel Interface Integration
LCP kernel pair interface bound to the VPP GRE interface is created
automatically. This allows standard Linux networking tools and
services to interact with the VPP GRE.
## IP Address Configuration
```{cfgcmd} set interfaces vpp gre \<vppgreN\> address \<ip-address/prefix\>
Configure IPv4 or IPv6 addresses on the kernel interface. Multiple
addresses can be assigned.
```
**Examples:**
```none
# IPv4 address
set interfaces vpp gre vppgre0 address 192.168.1.10/24
# IPv6 address
set interfaces vpp gre vppgre0 address 2001:db8::10/64
```
## MTU Configuration
```{cfgcmd} set interfaces vpp gre \<vppgreN\> mtu \<size\>
Set the Maximum Transmission Unit (MTU) for the kernel interface.
The MTU must be compatible with the connected VPP interface.
```
**Example:**
```none
set interfaces vpp gre vppgre0 mtu 9000
```
:::{note}
The MTU size must not exceed the MTU size
supported by the associated VPP interface.
:::
## Configuration Examples
### Layer 3 GRE Tunnel
```none
# IPv4 GRE tunnel
set interfaces vpp gre vppgre1
set interfaces vpp gre vppgre1 description "Site-to-site tunnel"
set interfaces vpp gre vppgre1 remote 203.0.113.10
set interfaces vpp gre vppgre1 source-address 192.168.1.1
set interfaces vpp gre vppgre1 tunnel-type l3
```
### Layer 2 GRE Tunnel (TEB)
```none
# Transparent Ethernet Bridge
set interfaces vpp gre vppgre2
set interfaces vpp gre vppgre2 description "L2 extension tunnel"
set interfaces vpp gre vppgre2 remote 203.0.113.20
set interfaces vpp gre vppgre2 source-address 192.168.1.1
set interfaces vpp gre vppgre2 tunnel-type teb
```
### IPv6 GRE Tunnel
```none
# IPv6 endpoints
set interfaces vpp gre vppgre3
set interfaces vpp gre vppgre3 remote 2001:db8::2
set interfaces vpp gre vppgre3 source-address 2001:db8::1
```
### GRE with Kernel Interface
```none
# GRE tunnel with management interface
set interfaces vpp gre vppgre4
set interfaces vpp gre vppgre4 remote 203.0.113.30
set interfaces vpp gre vppgre4 source-address 192.168.1.1
set interfaces vpp gre vppgre4 address 10.0.1.1/30
```
## Bridge Integration
GRE interfaces can be added as members to VPP bridges for Layer 2
switching. See {doc}`bridge` for detailed bridge configuration.
```none
# Add TEB GRE tunnel to bridge
set interfaces vpp bridge vppbr1
set interfaces vpp bridge vppbr1 member interface vppgre2
set interfaces vpp bridge vppbr1 member interface eth1
```
|