---
title: Loopback Interface Configuration
slug: routing/loopback-interface-configuration
createdAt: 2025-12-04T04:30:21.223Z
---

## <font color="#1d50a2">Loopback Interface Configuration</font>

### <font color="#1d50a2">interface loopback *loopback-id*</font>

**\[Command]**
**interface loopback *loopback-id***

**\[Purpose]**
Switch to loopback view

**\[Parameter]**

| **Parameter** | **Description**  |
| ------------- | ---------------- |
| *loopback-id* | Loopback port ID |

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface loopback 0
sonic(config-loif-0)# show this
!
interface loopback 0
```

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

**\[Command]**
**ip address *A.B.C.D/M***

**\[Purpose]**
Adding an IP address to the loopback port

**\[Parameter]**

| **Parameter** | **Description**               |
| ------------- | ----------------------------- |
| *A.B.C.D/M*   | IP address with prefix length |

**\[View]**
System configuration view

**\[Notes]**
The IPv4 address configured on the Loopback port is not allowed to be deleted and can be overwritten by reconfiguration.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface loopback 2
sonic(config-loif-2)# ip address 3.3.3.6/24
sonic(config-loif-2)# show this
!
interface loopback 2
ip address 3.3.3.6/24
```

