# OpenWRT - Adding DHCP Entry

1. SSH to Server
2. Edit `/etc/config/dhcp`
3. Use the following template to add entry in the correct location (Ordered by IP):

```bash
# Template:
config host
        option mac 'MAC Address'
        option name 'Server Name'
        option dns '1'
        option ip 'IP Address'

# Example:
config host
        option mac '84:F5:A1:21:E6:17'
        option name 'Server-01'
        option dns '1'
        option ip '192.168.1.20'
```

{% hint style="info" %}
Note: No restart is required, this updates in real time, but if you need the devices to reconnect to the router probably a restart is appropriate and easy.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/networking/openwrt/openwrt-adding-dhcp-entry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
