---
title: Interface Management
slug: enterprise-v5p2/interface-management
description: interface management
createdAt: 2025-11-14T03:58:41.669Z
---

The interface contains various information about the interface and the status of the interface. It is worth noting that when viewing interface information, multiple interfaces are displayed, so the command keyword is "interfaces" in plural form; while when configuring interfaces, they are configured one by one, so the keyword "interface" is used in singular form.

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

### <font color="#1d50a2">show interface description</font>

**\[Command]**
**show interface description**

**\[Purpose]**
Display individual interface description information

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show interface description
 Interface  Oper  Admin    Alias  Description
----------- ------ ------- ---------- -------------
 Ethernet1  down    up  Ethernet1      N/A
 Ethernet2  down    up  Ethernet2      N/A
 Ethernet3  down    up  Ethernet3      N/A
 Ethernet4  down    up  Ethernet4      N/A
 Ethernet5  down    up  Ethernet5      N/A
 Ethernet6  down    up  Ethernet6      N/A
```

### <font color="#1d50a2">show interface transceiver</font>

**\[Command]**
**show interface transceiver \{eeprom|lpmode|presence}**

**\[Purpose]**
Display of optical module information

**\[Parameter]**

| **Parameter** | **Description**                                  |
| ------------- | ------------------------------------------------ |
| **eeprom**    | Display interface transceiver EEPROM information |
| **lpmode**    | Display interface transceiver low power mode     |
| **presence**  | Display module in-position information           |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show interface transceiver eeprom
Ethernet48: SFP EEPROM Not detected
Ethernet49: SFP EEPROM detected
    Connector: LC
    Encoding: 64B/66B
    Extended Identifier: GBIC/SFP defined by twowire interface ID
    Extended RateSelect Compliance: Unspecified
    Identifier: SFP/SFP+/SFP28
    LengthOM3(UnitsOf10m): 0
    Nominal Bit Rate(100Mbs): 103
    Specification compliance:
        10GEthernetComplianceCode: 10G Base-LR
        FibreChannelLinkLength: Long distance (L)
        FibreChannelSpeed: 1200 MBytes/sec
        FibreChannelTechnology: Longwave Laser (LC)
        FibreChannelTransmissionMedia: Single Mode (SM)
    Vendor Date Code(YYYY-MM-DD Lot): 2018-07-21
    Vendor Name: OEM
    Vendor OUI: 00-00-00
    Vendor PN: TSSP31B33CDL10
    Vendor Rev: A
    Vendor SN: STST31182900045
sonic# show interface transceiver lpmode
Port    Low-power Mode
---------- ----------------
Ethernet1  Off
Ethernet2  Off
sonic# show interface transceiver presence
Port    Presence
---------- -----------
Ethernet1  Not present
Ethernet2  Not present
```

### <font color="#1d50a2">show interface port ethernet</font>

**\[Command]**
**show interface port ethernet**  *interface\_id*

**\[Purpose]**
Display interface details

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show interface port
Ethernet1 is up, line protocol is down
Hardware is Eth
Interface index is 1
Description:
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
IP MTU 9216 bytes
LineSpeed 1G, Auto-negotiation off
Input statistics:
    0 packets, 0 octets
    0 Multicasts, 0 Broadcasts, 0 Unicasts
    0 error, 0 discarded
    0 ipv4Packets, 0 ipv4Octets
    0 ipv6Packets, 0 ipv6Octets
Output statistics:
    0 packets, 0 octets
    0 Multicasts, 0 Broadcasts, 0 Unicasts
    0 error, 0 discarded
    0 ipv4Octets, 0 ipv6Octets
```

### <font color="#1d50a2">show interface limit-rate</font>

**\[Command]**
**show interface limit-rate**

**\[Purpose]**
Show interface rate limit configuration

**\[View]**
System View

**\[Use Cases]**

```none
sonic# show interface limit-rate
Interfaces    Direction      Cir(KBytes)    Cbs(Bytes)
------------  -----------  -------------  ------------
Ethernet1     ingress                200             1
Ethernet1     egress                 300             1
```

### <font color="#1d50a2">show interface status</font>

**\[Command]**
**show interface status**

**\[Purpose]**
Display interface staus

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show interface status
 Interface    Lanes      Speed  MTU  FEC  Alias  Oper  Admin      Type      Asym PFC
----------- ----------- ------- ----- ----- ------- ------ ------- -------------- ----------
 Ethernet1      0          25G  9216   rs    Y1  down    up SFP/SFP+/SFP28     N/A
 Ethernet2      1          10G  9216  none   Y2   up     up SFP/SFP+/SFP28     N/A
 Ethernet3      2          25G  9216   rs    Y3  down    up SFP/SFP+/SFP28     N/A
 Ethernet4      3          25G  9216   rs    Y4  down    up       N/A          N/A
 Ethernet5      4          25G  9216   rs    Y5  down    up       N/A          N/A
 Ethernet6      5          25G  9216   rs    Y6  down    up       N/A          N/A
 Ethernet7      6          25G  9216   rs    Y7  down    up       N/A          N/A
 Ethernet8      7          25G  9216   rs    Y8  down    up       N/A          N/A
 Ethernet9      8          25G  9216   rs    Y9  down    up       N/A          N/A
 Ethernet10     9          25G  9216   rs   Y10  down    up       N/A          N/A
…
 Ethernet46      45        25G  9216   rs   Y46  down    up       N/A          N/A
 Ethernet47      46        25G  9216   rs   Y47  down    up       N/A          N/A
 Ethernet48      47        25G  9216   rs   Y48  down    up       N/A          N/A
 Ethernet49 48,49,50,51   100G  9216   rs    C1  down    up       N/A          N/A
 Ethernet53 52,53,54,55   100G  9216   rs    C2  down    up       N/A          N/A
 Ethernet57 56,57,58,59   100G  9216   rs    C3  down    up       N/A          N/A
 Ethernet61 64,65,66,67   100G  9216   rs    C4  down    up       N/A          N/A
 Ethernet65 68,69,70,71   100G  9216   rs    C5  down    up       N/A          N/A
 Ethernet69 72,73,74,75   100G  9216   rs    C6  down    up       N/A          N/A
 Ethernet73 76,77,78,79   100G  9216   rs    C7  down    up       N/A          N/A
 Ethernet77 80,81,82,83   100G  9216   rs    C8  down    up       N/A          N/A
```

### <font color="#1d50a2">show counters interface</font>

**\[Command]**
**show counters interface \[ethernet** *interface\_id***] \[errors\_only | rates\_only ]**

**\[Purpose]**
Show interface count

**\[Parameter]**

| **Parameter**   | **Description** |
| --------------- | --------------- |
| *interface\_id* | Interface id    |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show counters interface
IFACE   STATE RX_OK RX_BPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_UTIL TX_ERR TX_DRP TX_OVR
-------------------------------------------------------------------------------------------------
Ethernet0  D    0   N/A    N/A     0      0      0      0     N/A    N/A      0      0     N/A
Ethernet1  U    0   N/A    N/A     0      0      0      27    N/A    N/A      0      0     N/A
Ethernet2  U    0   N/A    N/A     0      0      0      27    N/A    N/A      0      0     N/A
Ethernet3  U    0   N/A    N/A     0      0      0      35    N/A    N/A      0      0     N/A
Ethernet4  X    0   N/A    N/A     0      0      0      0     N/A    N/A      0      0     N/A

sonic# show counters interface errors_only
     IFACE    STATE    RX_ERR    RX_DRP    RX_OVR    TX_ERR    TX_DRP    TX_OVR
----------  -------  --------  --------  --------  --------  --------  --------
 Ethernet1        U         0         0    83,705         0         0         0
 Ethernet2        D         0         0         0         0         0         0
 Ethernet3        D         0         0         0         0         0         0
 Ethernet4        D         0         0         0         0         0         0
 Ethernet5        D         0         0         0         0         0         0

```

### <font color="#1d50a2">show link-flapping config</font>

**\[Command]**
**show link-flapping config**

**\[Purpose]**
Show interface link-flapping configuration

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show link-flapping config
+-----------+----------+------------+-------------+------------+-----------------+
| Port      | Detect   |   Interval |   Threshold | Action     |   Recovery-Time |
+===========+==========+============+=============+============+=================+
| Ethernet2 | enable   |         60 |           5 | error-down |               0 |
+-----------+----------+------------+-------------+------------+-----------------+
```

### <font color="#1d50a2">show interface errdown</font>

**\[Command]**
**show interface errdown**

**\[Purpose]**
Display the err-disable state of all interfaces

**\[View]**
System view

**\[Notes]**
Once an interface enters the errdown state, it cannot recover automatically. Manual restoration by executing the `shutdown/no shutdown` command in the interface view is required.

**\[Use Cases]**

```plaintext
sonic# show interface errdown
Interface        Status    Reason
---------------  --------  --------
Ethernet1        up        None
Ethernet5        up        None
Ethernet9        up        None
Ethernet13       up        None
Ethernet17       up        None
Ethernet21       up        None
Ethernet25       up        None
Ethernet29       up        None
Ethernet33       up        None
Ethernet37       up        None
Ethernet41       up        None
Ethernet45       up        None
Ethernet49       up        None
Ethernet53       up        None
Ethernet57       up        None
Ethernet61       up        None
Ethernet65       up        None
Ethernet69       up        None
Ethernet73       up        None
Ethernet77       up        None
Ethernet81       up        None
Ethernet85       up        None
Ethernet89       up        None
Ethernet93       up        None
Ethernet97       up        None
Ethernet101      up        None
Ethernet105      up        None
Ethernet109      up        None
Ethernet113      up        None
Ethernet117      errdown   Link flap
Ethernet121      up        None
Ethernet125      up        None
Ethernet129      up        None
Ethernet130      up        None
```

### <font color="#1d50a2">clear counters interface</font>

**\[Command]**
**clear counters interface**

**\[Purpose]**
Clear interface count

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# clear counters interface
Cleared counters
```

### <font color="#1d50a2">interface ethernet</font>

**\[Command]**
**interface ethernet** *interface\_id*

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

**\[Parameter]**

| **Parameter**   | **Description** |
| --------------- | --------------- |
| *interface\_id* | Interface id    |

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# show this
!
interface ethernet 1
```

### <font color="#1d50a2">shutdown</font>

**\[Command]**
**shutdown**
**no shutdown**

**\[Purpose]**
Shutdown interface

**\[View]**
Interface view

**\[Usage Scenario]**
When you have made changes to the interface's operational parameters, and the new configuration does not take effect immediately, you can use the "shutdown" and "undo shutdown" commands to disable and re-enable the interface to apply the new configuration.
Also, when an interface is idle, it is advisable to use the "shutdown" command to deactivate that interface. This helps prevent any issues that may arise due to interference on the interface when it's not in use.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# shutdown
sonic(config-if-1)# show this
!
interface ethernet 1
shutdown
```

### <font color="#1d50a2">link-flapping detect enable</font>

**\[Command]**
**link-flapping detect enable**
**no link-flapping detect enable**

**\[Purpose]**
Enable/disable the link-flapping feature on the interface.

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 121
sonic(config-if-121)# link-flapping detect enable
sonic(config-if-121)#
```

### <font color="#1d50a2">link-flapping detect-action error-down</font>

**\[Command]**
**link-flapping detect-action error-down**
**no link-flapping detect-action error-down**

**\[Purpose]**
Configure/Remove the interface status after the link-flapping threshold is triggered.

**\[View]**
Interface view

**\[Usage Scenario]**
When the device interface frequently alternates between UP and DOWN states, it will proactively enter the errdisable state.

**\[Notes]**
Once an interface enters the errdisable state, it cannot recover automatically; manual restoration by executing the `shutdown/no shutdown` command in the interface view is required.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 121
sonic(config-if-121)# link-flapping detect-action error-down
```

### <font color="#1d50a2">link-flapping detect-interval</font>

**\[Command]**
**link-flapping detect-interval**  *time*
**no link-flapping detect-interval**

**\[Purpose]**
Configure/Remove the link-flapping monitoring period.

**\[Parameter]**

| **Parameter** | **Description**                                                  |
| ------------- | ---------------------------------------------------------------- |
| *time*        | Interface UP/DOWN monitoring period; Unit: seconds; Range: 5-60. |

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 121
sonic(config-if-121)# link-flapping detect-interval 30
```

### <font color="#1d50a2">link-flapping detect-threshold</font>

**\[Command]**
**link-flapping detect-threshold** *threshold\_num*
**no link-flapping detect-threshold**

**\[Purpose]**
Configure/Remove the threshold for frequent interface UP/DOWN events.

**\[Parameter]**

| **Parameter**    | **Description**                       |
| ---------------- | ------------------------------------- |
| *threshold\_num* | Interface UP/DOWN count; Range: 5-30. |

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 121
sonic(config-if-121)# link-flapping detect-interval 30 
```

### <font color="#1d50a2">**link-flapping recovery-time**</font>

**\[Command]**
**link-flapping recovery-time&#x20;***recovery\_time*****
**no link-flapping detect-threshold**

**\[Purpose]**
The time for the interface to recover to UP after configuration/deletion triggers link-flapping errdown.

**\[Parameter]**

| **Parameter**   | **Description**                                                            |
| --------------- | -------------------------------------------------------------------------- |
| recovery\_time	 | The time for the interface to recover to UP, configuration range:10\~65535 |

**\[View]**
Interface View

**\[Use Cases]**

```none
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# link-flapping recovery-time 60
```

### <font color="#1d50a2">speed</font>

**\[Command]**
**speed** *speed*

**\[Purpose]**
Configure the interface rate

**\[Parameter]**

| **Parameter** | **Description**                                                          |
| ------------- | ------------------------------------------------------------------------ |
| *speed*       | Rate in Mbit. Selectable 10/100/1000/2500/10000/25000/40000/100000/auto. |

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# speed 10000
sonic(config-if-1)# show this
!
interface ethernet 1
 speed 10000
```

### <font color="#1d50a2">limit-rate \{ingress|egress\} bind</font>

**\[Command]**
**limit-rate \{ingress|egress} bind** *cir cbr*
**no limit-rate \{ingress|egress} bind**

**\[Purpose]**
Configure interface rate limiting function

**\[Parameter]**

| **Parameter** | **Description**                                                                                                                       |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| *cir*         | Specifes the committed information rate (CIR), which is the allowed rate at which trafc can pass through. (unit: KBytes)              |
| *cbr*         | Specifes the committed burst size (CBS), which is the average volume of burst trafc that can pass through an interface. (unit: Bytes) |

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# limit-rate ingress bind 1000 100
sonic(config-if-1)# limit-rate egress bind 200 200
sonic(config-if-1)# show this
!
interface ethernet 1
limit-rate egress bind 200 200
limit-rate ingress bind 1000 100
```

### <font color="#1d50a2">mtu</font>

**\[Command]**
**mtu** *mtu*

**\[Purpose]**
Configure interface MTU

**\[Parameter]**

| **Parameter** | **Description**                             |
| ------------- | ------------------------------------------- |
| *mtu*         | Maximum Transmission Unit, Scope: 1312～9216 |

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# mtu 2000
sonic(config-if-1)# show this
!
interface ethernet 1
 mtu 2000
```

### <font color="#1d50a2">startup-delay</font>

**\[Command]**
**startup-delay** *time*
**no startup-delay**

**\[Purpose]**
Configure interface delayed start time

**\[Parameter]**

| **Parameter** | **Description**             |
| ------------- | --------------------------- |
| *time*        | Value range: 1-300, unit: s |

**\[View]**
Interface view

**\[Usage Scenario]**
In unstable network environments, there may be situations where the device cannot obtain an IP address from the expected DHCP server. If the device acquires an IP address from another DHCP server, even after network recovery, it may remain unable to obtain an IP address from the desired subnet for an extended period. To avoid this scenario, users can specify a delay in port activation time for the device after a reboot, depending on the network conditions.

**\[Notes]**
When the time parameter is configured to 0, it means no delayed start is enabled.

**\[Use Cases]**

```plaintext
sonic(config)# interface ethernet 1
sonic(config-if-1)# startup-delay 100
```

### <font color="#1d50a2">description</font>

**\[Command]**
**description** *description*
**no description**

**\[Purpose]**
Configure interface description information

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *description* | Interface description |

**\[View]**
Interface view

**\[Notes]**
Only one description for an interface, which will be overwritten by multiple configurations.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface ethernet 1
sonic(config-if-1)# description abc
sonic(config-if-1)# show this
!
interface ethernet 1
 description abc
```

### <font color="#1d50a2">breakout</font>

**\[Command]**
**breakout \{4x25G|4x10G|4x1G}**
**no breakout**

**\[Purpose]**
Configure static splitting for the interface

**\[Parameter]**

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| **4x25G**     | Split the 100G interface into 4x25G |
| **4x10G**     | Split the 100G interface into 4x10G |
| **4x1G**      | Split the 100G interface into 4x1G  |

**\[View]**
Interface view

**\[Notes]**
When splitting, do not check configuration dependencies; however, check the configuration dependencies for sub-interfaces 1-4 during merging. After splitting, a device restart is required for the changes to take effect

**\[Use Cases]**

```plaintext
sonic(config)# interface ethernet 49
sonic(config-if-49)# breakout 4x25G
```

### <font color="#1d50a2">speed auto</font>

**\[Command]**
**speed auto**

**\[Purpose]**
Enable interface speed adaptation

**\[View]**
Interface view

**\[Usage Scenario]**
The device defaults to enabling interface speed auto-negotiation. After manually modifying the interface speed, this command can be used to restore the interface speed auto-negotiation feature.

**\[Use Cases]**

```plaintext
sonic(config)# interface ethernet 1
sonic(config-if-1)# speed auto
```

### <font color="#1d50a2">lldp transparent enable</font>

**\[Command]**
**lldp transparent enable**
**no lldp transparent enable**

**\[Purpose]**
Enable the interface to transparently transmit LLDP packets

**\[View]**
Interface View

**\[Use Cases]**

```none
sonic(config)# interface ethernet 1
sonic(config-if-1)# lldp transparent enable
```

### <font color="#1d50a2">lacp transparent enable</font>

**\[Command]**
**lacp transparent enable**
**no lacp transparent enable**

**\[Purpose]**
Enable the interface to transparently transmit LACP packets

**\[View]**
Interface View

**\[Use Cases]**

```none
sonic(config)# interface ethernet 1
sonic(config-if-1)# lacp transparent enable
```

### <font color="#1d50a2">ip err-packet-check forbidden</font>

**\[Command]**
**ip err-packet-check forbidden**
**no ip err-packet-check forbidden**

**\[Purpose]**
Disable the packet checksum verification function; the interface can normally receive and forward IP packets with checksum errors.

**\[View]**
System Configuration View

**\[Use Cases]**

```none
sonic(config)# ip err-packet-check forbidden
```

****

## <font color="#1d50a2">Sub-interface Configuration</font>

### <font color="#1d50a2">show sub-interface</font>

**\[Command]**
**show sub-interface \{ethernet** *interface\_name.subinterface\_number* **|** **status}**

**\[Purpose]**
Display sub-interface status information

**\[Parameter]**

| **Parameter**          | **Description**       |
| ---------------------- | --------------------- |
| *interface\_name*      | Parent interface name |
| *subinterface\_numbe*r | Sub-interface ID      |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show sub-interface status
+----------------------+-------+--------+---------+---------------------+
| Sub port interface   | MTU   | vlan   | Admin   | Type                |
+======================+=======+========+=========+=====================+
| Eth1.3000            | 9216  | 3000   | up      | dot1q-encapsulation |
+----------------------+-------+--------+---------+---------------------+
| Eth40.3000           | 9216  | 3000   | up      | dot1q-encapsulation |
+----------------------+-------+--------+---------+---------------------+
```

### <font color="#1d50a2">interface sub-ethernet</font>

**\[Command]**
**interface sub-ethernet** *interface\_name.subinterface\_number*
**no interface sub-ethernet** *interface\_name.subinterface\_number*

**\[Purpose]**
Add sub-interface

**\[Parameter]**

| **Parameter**          | **Description**       |
| ---------------------- | --------------------- |
| *interface\_name*      | Parent interface name |
| *subinterface\_number* | Sub-interface ID      |

**\[View]**
System configuration view

**\[Notes]**
If the sub-interface is configured with an IP address, the IP address of the sub-interface must be deleted before the sub-interface can be deleted.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# interface sub-ethernet 40.1000
sonic(config-if-40.1000)#
```

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

### <font color="#1d50a2">interface loopback</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</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
```

## <font color="#1d50a2">Port Group Configuration</font>

### <font color="#1d50a2">port-group ethernet</font>

**\[Command]**
**port-group ethernet** *interface\_range*

**\[Purpose]**
Create port group

**\[View]**
System configuration view

**\[Usage Scenario]**
Creating an interface group is designed to facilitate the identical configuration of multiple Ethernet interfaces. Configuring each interface individually can easily lead to errors and result in a significant amount of repetitive work. By establishing an interface group, it becomes possible to centrally manage the configuration of these interfaces, thereby enhancing efficiency and reducing the likelihood of configuration errors.

**\[Use Cases]**

```plaintext
sonic(config)# port-group ethernet 1-20
sonic(config-port-group-1-20)# switchport vlan access 10
```

### <font color="#1d50a2">port-group lag</font>

**\[Command]**
**port-group lag** *lag\_range*

**\[Purpose]**
Create lag group

**\[View]**
System configuration view

**\[Usage Scenario]**
Creating a lag group is designed to facilitate the identical configuration of multiple lags. Configuring each lag individually can easily lead to errors and result in a significant amount of repetitive work. By establishing an lag group, it becomes possible to centrally manage the configuration of these lags, thereby enhancing efficiency and reducing the likelihood of configuration errors.

**\[Use Cases]**

```plaintext
sonic(config)# port-group lag 1-20
sonic(config-lag-group-1-20)# switchport vlan access 10
```

