Call for Contributions
This section needs improvements, examples and explanations.
Please take a look at the Contributing Guide for our Write Documentation.
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
Create a GRE interface where <greN>
follows the naming convention gre1, gre2, etc.
Set the tunnel remote endpoint address. Supports both IPv4 and IPv6 addresses.
Set the tunnel source address. Must match an address configured on the local system.
Basic Example:
set vpp interfaces gre gre1
set vpp interfaces gre gre1 remote 203.0.113.2
set vpp interfaces gre gre1 source-address 192.168.1.1
Interface Configuration
Description and Administrative Control
Set a descriptive name for the GRE interface.
Tunnel Mode
Tunnel Type
Kernel Interface Integration
Bind a kernel interface to the GRE tunnel for management and application compatibility.
For detailed information about kernel interface integration, see VPP Kernel Interfaces Configuration.
Configuration Examples
Layer 3 GRE Tunnel
# IPv4 GRE tunnel
set vpp interfaces gre gre1
set vpp interfaces gre gre1 description "Site-to-site tunnel"
set vpp interfaces gre gre1 remote 203.0.113.10
set vpp interfaces gre gre1 source-address 192.168.1.1
set vpp interfaces gre gre1 tunnel-type l3
Layer 2 GRE Tunnel (TEB)
# Transparent Ethernet Bridge
set vpp interfaces gre gre2
set vpp interfaces gre gre2 description "L2 extension tunnel"
set vpp interfaces gre gre2 remote 203.0.113.20
set vpp interfaces gre gre2 source-address 192.168.1.1
set vpp interfaces gre gre2 tunnel-type teb
IPv6 GRE Tunnel
# IPv6 endpoints
set vpp interfaces gre gre3
set vpp interfaces gre gre3 remote 2001:db8::2
set vpp interfaces gre gre3 source-address 2001:db8::1
Point-to-Multipoint Configuration
# Hub configuration for multiple spokes
set vpp interfaces gre gre4
set vpp interfaces gre gre4 mode point-to-multipoint
set vpp interfaces gre gre4 remote 0.0.0.0
set vpp interfaces gre gre4 source-address 192.168.1.1
Note
For point-to-multipoint mode, the remote address must be set to 0.0.0.0 to allow multiple remote endpoints.
GRE with Kernel Interface
# GRE tunnel with management interface
set vpp interfaces gre gre5
set vpp interfaces gre gre5 remote 203.0.113.30
set vpp interfaces gre gre5 source-address 192.168.1.1
set vpp interfaces gre gre5 kernel-interface vpptun5
set vpp kernel-interfaces vpptun5 address 10.0.1.1/30
Bridge Integration
GRE interfaces can be added as members to VPP bridges for Layer 2 switching. See VPP Bridge Configuration for detailed bridge configuration.
# Add TEB GRE tunnel to bridge
set vpp interfaces bridge br1
set vpp interfaces bridge br1 member interface gre2
set vpp interfaces bridge br1 member interface eth1