---
title: DHCP Server failover
slug: aidc/dhcp-server-failover
createdAt: 2025-12-01T11:11:08.000Z
---

## <font color="#1d50a2">DHCP Server failover  Config</font>

<font color="#1d05a2">Table 1 DHCP Server Failover Config</font>

| **Command**                               | **Purpose**                                       |
| ----------------------------------------- | ------------------------------------------------- |
| **dhcp failover** *name*                  | Enable DHCP Server failover                       |
| **adddress** \{*A.B.C.D*\|**loopback 0**} | Configure failover local IP                       |
| **peer address** *A.B.C.D*                | Configure failover peer IP                        |
| **auto-partner-down** *time*              | Configure peer offline time                       |
| **max-response-delay** *time*             | Configure maximum communication interruption time |
| **role** \{**primary**\|**secondary**}    | Configure primary and secondary roles             |

### <font color="#1d50a2">dhcp failover *name*</font>

**\[Command]**
**dhcp failover** *name*

**\[Purpose]**
Enable DHCP Server failover.

**\[Parameters]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *name*        | Instance name.  |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no dhcp failover** *name* to disable DHCP Server failover.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
```

### <font color="#1d50a2">adddress \{*A.B.C.D*|loopback 0\}</font>

**\[Command]**
**adddress** \{*A.B.C.D*|**loopback 0**}

**\[Purpose]**
Configure local IP.

**\[Parameters]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *A.B.C.D*     | IPv4 address.   |

**\[View]**
DHCP failover Configuration View

**\[Notes]**
Run command **no address** to delete local IP.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
sonic(config-dhcp-failover-t456)# address 20.0.0.1
```

### <font color="#1d50a2">peer address *A.B.C.D*</font>

**\[Command]**
**peer address** *A.B.C.D*

**\[Purpose]**
Configure peer IP.

**\[Parameters]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *A.B.C.D*     | IPv4 address.   |

**\[View]**
DHCP failover Configuration View

**\[Notes]**
Run command **no peer address** to delete peer IP

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
sonic(config-dhcp-failover-t456)# peer address 20.0.0.2
```

### <font color="#1d50a2">auto-partner-down *time*</font>

**\[Command]**
**auto-partner-down** *time*

**\[Purpose]**
Configure peer offline time.

**\[Parameters]**

| **Parameter** | **Description**                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------ |
| *time*        | Peer offline time, in seconds and ranging from 1 to 3600. By default, peers will not go offline. |

**\[View]**
DHCP failover Configuration View

**\[Notes]**
Run command **auto-partner-down** to disable peer offline function

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
sonic(config-dhcp-failover-t456)# auto-partner-down 100
```

### <font color="#1d50a2">max-response-delay *time*</font>

**\[Command]**
**max-response-delay** *time*

**\[Purpose]**
Configure maximum communication interruption time.

**\[Parameters]**

| **Parameter** | **Description**                                                                                                       |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| *time*        | The maximum communication interruption time, measured in seconds, ranges from 30 to 3600, with a default value of 60. |

**\[View]**
DHCP failover Configuration View

**\[Notes]**
Run command **nomax-response-delay** to restore maximum communication time to default value

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
sonic(config-dhcp-failover-t456)# max-response-delay 100
```

### <font color="#1d50a2">role \{primary|secondary\}</font>

**\[Command]**
**role** \{**primary**|**secondary**}

**\[Purpose]**
Configure primary and secondary roles.

**\[View]**
DHCP failover Configuration View

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# dhcp failover t456
sonic(config-dhcp-failover-t456)# role primary
```

