DHCP Relay through GRE-Bridge

DHCP relay through a GRE tunnel for a centralized DHCP server serving a remote location.

Scenario

  • Centralized DHCP: DHCP server in the datacenter
  • Remote Sites: branch offices relay DHCP through the tunnel
  • Service Provider: aggregation site DHCP

Topology

Branch Office          GRE Tunnel          Datacenter
   (VyOS)      ════════════════════►      (DHCP Server)
Client DHCP      DHCP Relay               10.100.1.53
Request

VyOS Branch Configuration

# GRE tunnel to the datacenter
set interfaces tunnel tun0 address '172.16.0.2/30'
set interfaces tunnel tun0 encapsulation 'gre'
set interfaces tunnel tun0 source-address '198.51.100.1'
set interfaces tunnel tun0 remote '203.0.113.1'

# Bridge (LAN + GRE tunnel)
set interfaces bridge br0 member interface eth1
set interfaces bridge br0 member interface tun0
set interfaces bridge br0 address '10.10.1.1/24'

# DHCP Relay
set service dhcp-relay interface 'br0'
set service dhcp-relay server '10.100.1.53'
set service dhcp-relay relay-options relay-agents-packets 'forward'

commit

Datacenter DHCP Server

DHCP server at 10.100.1.53 with a scope for the 10.10.1.0/24 branch subnet.

References

Reviewed by OpenNix LLC · Last updated on