# How do I configure DHCP Relay on cnMatrix Switches in CLI

**URL:** <https://community.cambiumnetworks.com/t/how-do-i-configure-dhcp-relay-on-cnmatrix-switches-in-cli/94276>\
**Category:** cnMatrix\
**Tags:** knowledge-base\
**Created:** [July 27, 2023, 3:31pm UTC](https://community.cambiumnetworks.com/t/how-do-i-configure-dhcp-relay-on-cnmatrix-switches-in-cli/94276 "2023-07-27T15:31:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swren-cambium](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@swren-cambium](https://community.cambiumnetworks.com/u/swren-cambium)\
**Post date:** [July 27, 2023, 3:31pm UTC](https://community.cambiumnetworks.com/t/how-do-i-configure-dhcp-relay-on-cnmatrix-switches-in-cli/94276/1 "2023-07-27T15:31:49Z")

</div>

**Summary:** This article describes how to configure the DHCP Relay feature for cnMatrix Switches. DHCP Relay agent allows the DHCP client and DHCP server in different subnets to communicate with  
each other so that the DHCP client can obtain its IP address and configuration.

**Note:** Even though the feature can be enabled on a VLAN or port, it will relay packets from all  
VLANs.

In order for the DHCP Server to know what subnet to provide an IP address for, the Switches will need a Layer 3 VLAN Interface for every VLAN as well as a Layer 2 VLAN. This will then be used as the source address that the DHCP server receives.

**CLI**

1. Login to the cnMatrix Switch via SSH or Console

2. Create the Layer 3 VLAN Interface if you haven’t already, then configure the DHCP Relay commands. In the below example, I will use VLAN 10.
