Difference between revisions of "DHCP Relay configuration example new"

From Teltonika Networks Wiki
 
(6 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
  LAN IP/subnet: 192.168.4.1/24
 
  LAN IP/subnet: 192.168.4.1/24
  
[[File:Networking_rutx_manual_lan_static_dhcp_server_relay_scheme_v2.png|border|class=tlt-border| center]]
+
[[File:DHCP_RELAY_9.png|border|class=tlt-border| center]]
  
 
===Configuration===
 
===Configuration===
Line 30: Line 30:
 
}}
 
}}
  
====DHCP Server Node Configuration====
+
====DHCP Server Configuration====
 
----
 
----
 
=====LAN Configuration=====
 
=====LAN Configuration=====
Line 66: Line 66:
 
----
 
----
 
=====Relay WAN Confiuration=====
 
=====Relay WAN Confiuration=====
 +
----
 
Open router’s '''WebUI → Network → WAN → WAN interfaces''' click [[File:Pencil2.png]]current available WAN interface configuration:
 
Open router’s '''WebUI → Network → WAN → WAN interfaces''' click [[File:Pencil2.png]]current available WAN interface configuration:
 
======General Settings======
 
======General Settings======
Line 105: Line 106:
 
# Enable: '''on'''
 
# Enable: '''on'''
 
# Select DHCPv4 mode: '''Relay'''
 
# Select DHCPv4 mode: '''Relay'''
# Enter DHCP server address: '''192.168.2.1'''
+
# Enter DHCP server address: '''192.168.4.1'''
  
 
[[File:DHCP_RELAY_5.png|border|class=tlt-border|center|1000px]]
 
[[File:DHCP_RELAY_5.png|border|class=tlt-border|center|1000px]]
 +
 +
===Additional notes===
 +
----
 +
'''Note:''' It's strongly recommended to use static IP configuration for DHCP Relay WAN interface otherwise there might be cases when WAN interface will receive new IP address which will cause static route to stop working.
 +
 +
[[Category:Router control and monitoring]]

Latest revision as of 13:20, 31 July 2024

Main Page > General Information > Configuration Examples > Router control and monitoring > DHCP Relay configuration example new

The information on this page is updated in accordance with the 00.07.08 firmware version .

firmware version .

Introduction


DHCP Relay is a router that forwards IP addresses from the DHCP Server to the user devices, even if the server is on a different network. The main benefit of this approach is that a single DHCP Server can distribute IP addresses to multiple networks. Bellow you will find an example of how to configure a basic DHCP Relay configuration. ​

Prerequisites & Topology


Prerequisites

  1. For this configuration you will need 2 routers. One as a DHCP Server and the other as a DHCP Relay.
  2. DHCP Relay device WAN port needs to be connected to DHCP server LAN port.

Topology


DHCP Relay network settings:

LAN IP/subnet: 192.168.2.1/24
WAN IP: 192.168.4.194

DHCP server network settings:

LAN IP/subnet: 192.168.4.1/24
DHCP RELAY 9.png

Configuration


If you're having trouble finding this page or some of the parameters described here on your device's WebUI, you should turn on "Advanced WebUI" mode. You can do that by clicking the "Advanced" button, located at the top of the WebUI.

Networking rutos manual webui basic advanced mode 75.gif

DHCP Server Configuration


LAN Configuration

Open router’s WebUI → Network → LAN click Pencil2.pngon current available LAN interface configuration:

General Settings

Make the following changes:

  1. Enter IPv4 address: 192.168.4.1
DHCP RELAY 1 1.png
Lease Configuration

Open router’s WebUI → System → Mantenance → CLI

Enter this command to CLI:

echo "dhcp-range=192.168.2.100,192.168.2.200,12h" >> /etc/dnsmasq.conf
DHCP RELAY 2.png
Static Route Configuration

Open WebUI → Network → Routing → Static routes

Static IPv4 Routes

click Add Button.png and apply this to the route:

  1. Select Interface: lan | Enter Target: 192.168.2.0 | Enter IPv4-Netmask: 255.255.255.0 | Enter IPv4-Gateway: 192.168.4.194
DHCP RELAY 3.png

DHCP Relay Configuration


Relay WAN Confiuration

Open router’s WebUI → Network → WAN → WAN interfaces click Pencil2.pngcurrent available WAN interface configuration:

General Settings

Make the following changes:

  1. Select Protocol: Static
  2. Enter IPv4 address: 192.168.4.194
DHCP RELAY 7.png
Relay LAN Confiuration

Open router’s WebUI → Network → LAN click Pencil2.pngcurrent available LAN interface configuration:

General Settings

Make the following changes:

  1. Enter IPv4 address: 192.168.2.1
DHCP RELAY 4.png
Firewall Rule Configuration

Open router’s WebUI → Network → Firewall → Traffic Rules click Pencil2.png on Allow-DHCP-Renew rule:

Firewall - Traffic Rules - Allow-DHCP-Renew

  1. Enter Destination Port: 67
DHCP RELAY 8.png


DHCP Replay Configuration

Open router’s WebUI → Network → DHCP → Server Settings → IPv4 → DHCPv4 servers click Pencil2.pngcurrent available server interface configuration:

DHCPv4: lan

Make the following changes:

  1. Enable: on
  2. Select DHCPv4 mode: Relay
  3. Enter DHCP server address: 192.168.4.1
DHCP RELAY 5.png

Additional notes


Note: It's strongly recommended to use static IP configuration for DHCP Relay WAN interface otherwise there might be cases when WAN interface will receive new IP address which will cause static route to stop working.