---
title: Interface Configuration Guide
slug: aidc/interface-configuration-guide
description: Interface Configuration Guide
createdAt: 2025-11-12T12:13:54.857Z
---

The interfaces supported by this series of switches include Ethernet interfaces, management Ethernet ports (hereinafter referred to as management ports), Console ports (hereinafter referred to as serial ports), and USB ports. For the specific interface types and quantities supported by each model, please refer to the product installation manual. This chapter primarily introduces the configuration and commands related to management Ethernet ports and Ethernet interfaces.

## <font color="#1d50a2">Ethernet Interface for Management Configuration</font>

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

The management port, usually with an RJ-45 connector, is used to connect to a back-end computer for debugging or to connect to a remote device for remote control. It is generally named eth0 or mgmt 0 in the switch.
For Asterfusion data center series products, the IP address is automatically obtained via the DHCP management port when AsterNOS is installed, and can be viewed via the linux command `/sbin/ifconfig eth0` or "`sudo ifconfig eth0`. Once the system has been installed automatically, you can log in to the switch directly via SSH.

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

<font color="#1d05a2">Table 1 Management Port Configuration</font>

| **Purpose**                                               | **Commands**                                | **Description**                                                                                                                                                                                             |
| --------------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                           | **configure terminal**                      | -                                                                                                                                                                                                           |
| Enter management port configuration view                  | **interface mgmt 0**                        | -                                                                                                                                                                                                           |
| Configure the management port IPv4 address                | **ip address** *A.B.C.D/M* **gw** *A.B.C.D* | IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. |
| (Optional) Configure the management port IPv6 address     | **ip address** *A\::B/M* **gw** *A\::B*     | IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed.                     |
| (Optional) Obtain the management port IP address via DHCP | **ip address dhcp-alloc**                   | If the management port IP address is obtained via DHCP, manually configured management port IP addresses will not take effect.                                                                              |
| Exit management port configuration view                   | **exit**                                    | -                                                                                                                                                                                                           |
| Save the configuration                                    | **write**                                   | -                                                                                                                                                                                                           |

### <font color="#1d50a2">Display and Maintenance</font>

<font color="#1d05a2">Table 2 Management Port Display and Maintenance</font>

| **Purpose**                       | **Commands**            | **Description**                                                                                      |
| --------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------- |
| Check management port information | **show interface mgmt** | The IP of management port configured by the ifconfig or ip command is not displayed by this command. |

### <font color="#1d50a2">Specific Configuration Scenarios</font>

<font color="#1d50a2">**First Login**</font>

<font color="#1d05a2">Table 3 First Login</font>

| **Purpose**                                           | **Commands**                                | **Description**                                                                                                                                                                                             |
| ----------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                       | **configure terminal**                      | -                                                                                                                                                                                                           |
| Enter management port configuration view              | **interface mgmt 0**                        | -                                                                                                                                                                                                           |
| Configure the management port IPv4 address            | **ip address** *A.B.C.D/M* **gw** *A.B.C.D* | IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. |
| (optional) Configure the management port IPv6 address | **ip address** *A\::B/M* **gw** *A\::B*     | IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed.                     |
| Exit management port configuration view               | **exit**                                    | -                                                                                                                                                                                                           |
| Save the configuration                                | **write**                                   | -                                                                                                                                                                                                           |

<font color="#1d50a2">**Restore to Default Configuration**</font>****

<font color="#1d05a2">Table 4 Restore to Default Configuration</font>

| **Purpose**                       | **Commands**                                  | **Description**                                                                                                  |
| --------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Restore to default configuration. | **delete startup-config** \[**reserve-mgmt**] | Run command **reload** to take effect.Option **reserve-mgmt** determines whether to reserve mgmt IP and gateway. |
| Reload.                           | **reload**                                    | -                                                                                                                |

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

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

Logical interfaces are virtual interfaces that are capable of data exchange functions but do not physically exist and need to be created through configuration.
This section focuses on the several types of logical interfaces supported by the switch, as shown in the following table.

<font color="#1d05a2">Table 5 Types of Logical Interface</font>

| **Type of logical interface**  | **Description**                                                                                                                                                                                                                                                                                                          |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| VLANIF interface               | VLANIF interfaces are VLAN-based logical interfaces with Layer 3 characteristics, each VLAN corresponds to a VLANIF interface.                                                                                                                                                                                           |
| LAGIF interface                | LAGIF interface is a bundle of multiple Ethernet interfaces into a logical interface with Layer 2 characteristics or Layer 3 characteristics. Each Ethernet interface that is bundled together is called a member interface.                                                                                             |
| Ethernet Layer 3 sub-interface | Ethernet Layer 3 sub-interfaces are logical interfaces with Layer 3 characteristics configured on a physical interface, and multiple sub-interfaces can be configured on a physical interface.                                                                                                                           |
| Loopback interface             | Loopback interface is logical interface, and any data packets sent to it are considered to be sent to the switch itself. Once it has been created, its physical and link protocol state is always Up until it is deleted. Loopback interfaces are configured with an IP address and can then be published to the public. |

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

The default setting of the logical interfaces is shown in the table below.

<font color="#1d05a2">Table 6 Logical Interface Default Configuration</font>

| **Parameters**                 | **Default value**                 |
| ------------------------------ | --------------------------------- |
| VLANIF interface               | None                              |
| LAGIF interface                | None                              |
| Ethernet Layer 3 sub-interface | None                              |
| Loopback interface             | Default ip address is 10.1.0.1/32 |

### <font color="#1d50a2">Configuring the VLANIF Interface</font>

Please refer to [<font color="#1d05a2">VLAN configuration</font>](https://docs.asteraix.com/aidc/ethernet-switching-configuration-guide#7INut)

### <font color="#1d50a2">Configuring the LAGIF Interface</font>

Please refer to [<font color="#1d05a2">LAG configuration</font>](https://docs.asteraix.com/aidc/ethernet-switching-configuration-guide#K9rk6)

### <font color="#1d50a2">Configuring Ethernet Layer 3 Sub-Interfaces</font>

<font color="#1d50a2">**Configure Layer 3 Sub-interfaces**</font>

A Layer 3 Ethernet interface supports the configuration of multiple sub-interfaces, which can be individually configured with IP, MTU and MAC address, or can be maintained independently to perform on/off operations.

<font color="#1d05a2">Table 7 Configure Layer 3 Sub-interfaces</font>

| **Purpose**                                             | **Commands**                                                | **Description**                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                         | **configure terminal**                                      | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Create a sub-interface and enter the sub-interface view | **interface ethernet** *interface-name.subinterface-number* | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Configure the IP address of the sub-interface           | **ip address** \{*A.B.C.D/M*\|*A\::B/M*}                    | IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed.IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. |
| Configure the MTU of the sub-interface                  | **mtu** *mtu*                                               | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Shutdown sub-interface                                  | **shutdown**                                                | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Configure the MAC address of the sub-interface          | **mac-address** *HH\:HH\:HH\:HH\:HH*:HH                     | MAC addresses are not case-sensitive                                                                                                                                                                                                                                                                                                                                                               |

<font color="#1d50a2">**Configure LAG Sub-interfaces**</font>

<font color="#1d05a2">Table 8 Configure LAG Sub-interfaces</font>

| **Purpose**                                                 | **Commands**                                                        | **Description**                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                             | **configure terminal**                                              | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Create a LAG sub-interface and enter the sub-interface view | **interface link-aggregation** *interface-name.subinterface-number* | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Configure the IP address of the sub-interface               | **ip address** \{*A.B.C.D/M*\|*A\::B/M*}                            | IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed.IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. |
| Configure the MTU of the sub-interface                      | **mtu** *mtu*                                                       | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Shutdown sub-interface                                      | **shutdown**                                                        | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Configure the MAC address of the sub-interface              | **mac-address** *HH\:HH\:HH\:HH\:HH*:HH                             | MAC addresses are not case-sensitive                                                                                                                                                                                                                                                                                                                                                               |

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

The switch is shipped with a Loopback0 interface configured by default, which is a special and fixed Loopback interface. In addition to this, the user can configure multiple loopback ports, but only one IP address is supported for a single loopback port.

<font color="#1d05a2">Table 9 Configuring the Loopback Interface</font>

| **Purpose**                                                                | **Commands**                             | **Description** |
| -------------------------------------------------------------------------- | ---------------------------------------- | --------------- |
| Enter global configuration view                                            | **configure terminal**                   | -               |
| Enter Loopback interface configuration view or create a Loopback interface | **interface loopback** *lo-id*           | -               |
| Configure Loopback interface IP address                                    | **ip address** \{*A.B.C.D/M*\|*A\::B/M*} | -               |

### <font color="#1d50a2">Configure VXLAN Interfaces</font>

Please refer to [<font color="#1d05a2">VXLAN configuration</font>](https://docs.asteraix.com/aidc/vxlan-configuration-guide)

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

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

Ethernet interfaces are generally used as service interfaces to undertake service transmissions and are sometimes referred to as ports.

### <font color="#1d50a2">Rules for numbering</font>

<font color="#1d50a2">**Default Rules for numbering**</font>

The Ethernet interface numbering format for Asterfusion products is: `X/Y`.
`X` indicates the board number. There are no boards in the current series, so `X` is specified as 0.
`Y` indicates the interface number, starting from 0 and increasing. It should be noted that the naming intervals vary for different rate interfaces. 25GE interfaces are numbered in increments of 1, e.g., 0/0, 0/1......, and so on; 100GE and 200GE interfaces are numbered in increments of 4, e.g., 0/0, 0/4, 0/8......, and so on; and 400GE interfaces are numbered in increments of are 8, such as 0/0, 0/8, 0/16......, and so on.

<font color="#1d50a2">**Alias Mode Rules for numbering**</font>

In addition to the default mode, the Alias attribute (interface alias) is defined, with a one-to-one relationship with the physical port, related to the interface speed with the naming convention as Table 10 shown, where the numbering starts at 1.

<font color="#1d05a2">Table 10 Alias Schema of Interface\_id Naming Convention</font>

| **Interface Speed** | **Alias** |
| ------------------- | --------- |
| 1G                  | G         |
| 10G                 | X         |
| 25G                 | Y         |
| 40G                 | Q         |
| 100G                | C         |
| 200G                | D         |
| 400G                | QC        |
| 800G                | E         |

:::hint{type="info"}
**NOTE:**``
`X1` indicates the first 10G interface of the box switch.
`C1_Y1` indicates the first 25G interface of the first 100G interface after breakout.
:::

### <font color="#1d50a2">Interface Default Setting</font>

The default setting of the Ethernet interface is shown in the table below.

<font color="#1d05a2">Table 11 Ethernet Interface Default Setting</font>

| **Parameters**                         | **Default value**                                                         |
| -------------------------------------- | ------------------------------------------------------------------------- |
| Interface name mode                    | default                                                                   |
| Auto-negotiate                         | Close                                                                     |
| Interface FEC                          | 10G interface: none, others: rs                                           |
| Interface management status            | Up                                                                        |
| Interface speed                        | 10G/25G/100G/200G/400G/800G                                               |
| Interface description information      | N/A                                                                       |
| Interface splitting                    | Unsplit                                                                   |
| Interface MAC learning function        | Open                                                                      |
| Interface LLDP function                | Open                                                                      |
| Port ID type in interface LLDP         | ifname                                                                    |
| Interface MTU                          | 9216 bytes                                                                |
| Interface Layer 2 and 3 operating mode | Layer 2 model                                                             |
| Interface MAC address                  | Dynamically assigned by the system, or the same as the switch MAC address |
| ARP proxy for interface                | Disable                                                                   |
| Interface startup delay                | 150s                                                                      |

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

This section describes the basic configuration of Ethernet interfaces.

<font color="#1d50a2">**Configure the Administrative State of the Interface**</font>

The state of the Ethernet interface is divided into Admin and Oper, of which there are two physical states, Up and Down. The communication state may only be Up when the administrative state of the interface is Up; when the administrative state of the interface is Down, the communication state will also be Down. This command is used to switch the administrative state of an interface.
By default, the administrative status of the interface is Up and the user can turn the interface on or off according to needs.

<font color="#1d05a2">Table 12 Configure the Administrative Status of Interface</font>

| **Purpose**                     | **Commands**                            | **Description** |
| ------------------------------- | --------------------------------------- | --------------- |
| Enter global configuration view | **configure terminal**                  | -               |
| Enter Ethernet interface view   | **interface ethernet** *interface-name* | -               |
| Startup the interface           | **no shutdown**                         | -               |
| Shutdown the interface          | **shutdown**                            | -               |

:::hint{type="info"}
**NOTE:**
Once a Loopback interface has been created, it will remain UP and cannot be shut down or started using the command.
:::

<font color="#1d50a2">**Configure the Interface Speed**</font>

The series supports the following interface speeds: 10G, 25G, 40G, 100G, 200G, 400G and 800G.Users can configure the interface speed using the commands in the table below.

<font color="#1d05a2">Table 13 Configure the Interface Rate</font>

| **Purpose**                     | **Commands**                            | **Description** |
| ------------------------------- | --------------------------------------- | --------------- |
| Enter global configuration view | **configure terminal**                  | -               |
| Enter Ethernet interface view   | **interface ethernet** *interface-name* | -               |
| Configure the interface speed   | **speed** *speed*                       | speed in Mbit   |

Example：

```plaintext
Modify interface Ethernet1 speed to 10G
sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# no fec
sonic(config-if-0/1)# speed 10000
sonic(config-if-0/1)# show this
!
interface ethernet 0/1
mtu 9216
no fec
speed 10000
sonic# show interface summary
Interface Lanes Speed  MTU   FEC  Alias  Vlan   Oper   Admi   Type   Asym PFC
...
0/1        114   10G   9216  none   Y2  routed   N/A    up     N/A     N/A
...
```

<font color="#1d50a2">**Configure Interface Description Information**</font>****



| **Purpose**                                 | **Commands**                            | **Description**                                |
| ------------------------------------------- | --------------------------------------- | ---------------------------------------------- |
| Enter global configuration view             | **configure terminal**                  | -                                              |
| Enter Ethernet interface view               | **interface ethernet** *interface-name* | -                                              |
| Configure interface description information | **description** *description*           | The multiple configurations will overwrite it. |

<font color="#1d50a2">**Configure the Startup Delay of Interface**</font>

<font color="#1d05a2">Table 15 Configure the Startup Delay of Interface</font>

| **Purpose**                              | **Commands**                            | **Description**                                         |
| ---------------------------------------- | --------------------------------------- | ------------------------------------------------------- |
| Enter global configuration view          | **configure terminal**                  | -                                                       |
| Enter Ethernet interface view            | **interface ethernet** *interface-name* | -                                                       |
| Configure the startup delay of interface | **startup-delay** *time*                | time: startup-delay time, range \[1, 65535], in seconds |

### <font color="#1d50a2">Configure Interface Self-Negotiation</font>

In the network, if the switches at both ends of the link cannot negotiate the appropriate data transmission capacity, the two parties cannot communicate properly. The self-negotiation function provides a way for interconnected devices to exchange information so that the switches at both ends of the physical link automatically select the same operating parameters through interactive packets in order to achieve the maximum transmission capacity that both parties can support.
The self-negotiation includes the duplex mode and interface speed of the interfaces at both ends. Once the negotiation is passed, the switches on both ends of the link are locked to the same duplex mode and interface speed. In non-self-negotiating mode, the above parameters need to be configured manually.

<font color="#1d05a2">Table 16 Configure Interface Self-Negotiation</font>

| **Purpose**                       | **Commands**                              | **Description**                                                      |
| --------------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |
| Enter global configuration view   | **configure terminal**                    | -                                                                    |
| Enter Ethernet interface view     | **interface ethernet** *interface-name*   | -                                                                    |
| Enable interface self-negotiation | **autoneg**                               | -                                                                    |
| Advertise self-negotiation speed  | **advertised-speeds** \{*speed*\|**all**} | *speed*: specify negotiation speedall: advertise all supported speed |

### <font color="#1d50a2">Configure the Interface FEC Mode</font>

FEC (Forward Error Correction) is an error correction method that improves signal quality by attaching error correction information to the data packet at the transmitter side and using the error correction information at the receiver side to correct errors generated during transmission, but also causes some delay to the signal. The user can choose to turn this function off or on depending on the actual situation.
The FEC methods supported by the switch are RS, FC and None.

:::hint{type="warning"}
**NOTE:**&#x20;
The FEC method must be the same at both ends of the link, otherwise the interface will not be Up.
:::

<font color="#1d05a2">Table 17 Configure the Interface FEC Mode</font>

| **Purpose**                      | **Commands**                            | **Description** |
| -------------------------------- | --------------------------------------- | --------------- |
| Enter global configuration view  | **configure terminal**                  | -               |
| Enter Ethernet interface view    | **interface ethernet** *interface-name* | -               |
| Configure the interface FEC mode | **fec** \{**rs**\|**fc**}               | -               |

### <font color="#1d50a2">Configure Interface Layer 2 and 3 Mode Switch</font>

When using this command to switch between Layer 2 and Layer 3 modes of interface, only attribute configuration information (e.g. shutdown, description configuration) or configuration information that is supported by both Layer 2 and Layer 3 interfaces can be present under the interface for the mode switch function to take effect. There must not be any configuration that is not supported by the switched interface mode. If there are unsupported configurations on the interface, please clear all these configurations before executing the **switchport** or **no switchport** command.
For example, when an IP address is configured on interface 0/1, the IP needs to be removed before the **switchport** command can be executed.

<font color="#1d05a2">Table 18 Configure Layer 2 and 3 Mode Switch for Interfaces</font>

| **Purpose**                                            | **Commands**                            | **Description** |
| ------------------------------------------------------ | --------------------------------------- | --------------- |
| Enter global configuration view                        | **configure terminal**                  | -               |
| Enter Ethernet interface view                          | **interface ethernet** *interface-name* | -               |
| Switche the operating mode of the interface to layer 3 | **no switchport**                       | -               |
| Switche the operating mode of the interface to layer 2 | **switchport**                          | -               |

### <font color="#1d50a2">Configure Interface Isolation</font>

Only **[CX308P-48Y-N-V2](https://cloudswit.ch/product/48-port-25g-data-center-switch-sonic-enterprise-marvell-falcon/)** and **[CX532P-N-V2](https://cloudswit.ch/product/data-center-100g-switch-enterprise-sonic/)** devices support this feature.

<font color="#1d05a2">Table 19 Configure Interface Isolation</font>

| **Purpose**                     | **Commands**                            | **Description**                   |
| ------------------------------- | --------------------------------------- | --------------------------------- |
| Enter global configuration view | **configure terminal**                  | -                                 |
| Enter Ethernet interface view   | **interface ethernet** *interface-name* | -                                 |
| Enable interface isolation      | **port-isolate enable** *group-name*    | group-name : isolation group name |
| Disable interface isolation     | **no port-isolate enable**              | -                                 |

### <font color="#1d50a2">Configure Interface Breakout</font>

Interface breakout can split a high-speed port into multiple low-speed ports for use.
The interfaces supported by the switch can be used as a separate interface or split into multiple independent interfaces for use.
The interface splitting command is as follows:

<font color="#1d05a2">Table 20 Configure Interface Breakout</font>

| **Purpose**                     | **Commands**                                                                                                                                 | **Description** |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| Enter global configuration view | **configure terminal**                                                                                                                       | -               |
| Enter Ethernet interface view   | **interface ethernet** interface-name                                                                                                        | -               |
| Enable interface breakout.      | **breakout \{4x25G\[10G]**\|**4x50G\[10G]**\|**2x200G\[100G]**\|**4x100G\[50G]**\|**2x100G\[50G]**\|   **4x200G\[100G]**\|**2x400G\[200G]}** | -               |

The support of different product models for the number and speed of interface breakout is shown in the table below.

<font color="#1d05a2">Table 21 Support for interface Breakout Capability</font>

| **Parameter**     | **Description**                          | **Supported Devices**                                                                                                     |
| ----------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **4x25G\[10G]**   | Split one 100G port into four 25G ports  | - CX308P-48Y-N<br />- CX308P-48Y-N-V2<br />-  CX532P-N<br />- CX532P-N-V2<br />- CX564P-N<br />- CX664D-N<br />- CX732Q-N |
| **4x50G\[10G]**   | Split one 200G port into four 50G ports  | - CX664D-N                                                                                                                |
| **2x200G\[100G]** | Split one 400G port into two 200G ports  | - CX732Q-N                                                                                                                |
| **4x100G\[50G]**  | Split one 400G port into four 100G ports | - CX732Q-N                                                                                                                |
| **2x100G\[50G]**  | Split one 200G port into two 50G ports   | - CX664D-N                                                                                                                |
| **4x200G\[100G]** | Split one 800G port into four 200G ports | - CX864E-N                                                                                                                |
| **2x400G\[200G]** | Split one 800G port into two 400G ports  | - CX864E-N                                                                                                                |

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

Layer 2 Ethernet interfaces work at the data link layer, handling Layer 2 protocols and enabling fast Layer 2 forwarding.

<font color="#1d50a2">**Configure the MAC learning switch for interface**</font>

Configure the interface's MAC learning switch to require the operated interface to join the VLAN.

<font color="#1d05a2">Table 22 Configure MAC Learning Switche for Interfaces</font>

| **Purpose**                           | **Commands**                            | **Description** |
| ------------------------------------- | --------------------------------------- | --------------- |
| Enter global configuration view       | **configure terminal**                  | -               |
| Enter Ethernet interface view         | **interface ethernet** *interface-name* | -               |
| Enable MAC learning for the interface | **mac-address learning**                | -               |

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

Layer 3 Ethernet interface, also known as a RIF (Router Interface). The Layer 3 port works at the network layer and can be configured with IPv4/IPv6 addresses, handle Layer 3 protocols and provide route functions.

<font color="#1d50a2">**Configure the Interface IP Address**</font>

<font color="#1d05a2">Table 23 Configure the Interface IP Address</font>

| **Purpose**                        | **Commands**                             | **Description**                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view    | **configure terminal**                   | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Enter Ethernet interface view      | **interface ethernet** *interface-name*  | -                                                                                                                                                                                                                                                                                                                                                                                                  |
| Configure the interface IP address | **ip address** *\{A.B.C.D/M*\|*A\::B/M}* | IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed.IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. |

<font color="#1d50a2">**Configure the Interface MTU**</font>

The network layer generally needs to limit the maximum length of each packet sent. When the network layer receives a copy of an IP packet to be sent, it  which interface it should be forwarded to and queries the Maximum Transmission Unit (MTU) of that interface. The network layer compares the MTU value with the length of the IP packet to be sent. If the length of the IP packet is greater than the MTU value, then the packet is fragmented and the length of the fragmented packet is less than or equal to the MTU.
The size of the MTU determines the maximum number of bytes that can be sent at one time by the sender. A correctly configured MTU value is a prerequisite for proper and efficient communication between devices. When the packet size in the network is large but the MTU configuration is too small, it may cause excessive packet fragmentation, which may be discarded by the QoS queue and affect normal data transmission; if the MTU configuration is too large, it may exceed the maximum value that the receiving end can handle or exceed the maximum value that a device passing through on the sending path can handle, which may also cause packet fragmentation or even discard, adding to the burden of network transmission and affecting the normal transmission of data.
By default, the MTU of the interface is 9216 bytes.

<font color="#1d05a2">Table 24 Configure the Interface MTU</font>

| **Purpose**                     | **Commands**                            | **Description**         |
| ------------------------------- | --------------------------------------- | ----------------------- |
| Enter global configuration view | **configure terminal**                  | -                       |
| Enter Ethernet interface view   | **interface ethernet** *interface-name* | -                       |
| Configure the interface MTU     | **mtu** *mtu*                           | MTU range: 1312 to 9216 |

<font color="#1d50a2">**Configure the MAC Address of the Interface**</font>

By default, the MAC address of the interface is dynamically assigned by the system or is the same as the MAC address of the switch. This series supports users to reconfigure the MAC of physical interfaces, VLAN interfaces and link aggregate interfaces.

<font color="#1d05a2">Table 25 Configure the MAC Address of the Interface</font>

| **Purpose**                                | **Commands**                            | **Description**                      |
| ------------------------------------------ | --------------------------------------- | ------------------------------------ |
| Enter global configuration view            | **configure terminal**                  | -                                    |
| Enter Ethernet interface view              | **interface ethernet** *interface-name* | -                                    |
| Configure the MAC address of the interface | **mac-address** *HH\:HH\:HH\:HH\:HH*:HH | MAC addresses are not case-sensitive |

### <font color="#1d50a2">Configure Interface Loop Traffic Drop</font>

<font color="#1d05a2">Table 26 Configure Interface Loop Traffic Drop</font>

| **Purpose**                     | **Commands**                            | **Description** |
| ------------------------------- | --------------------------------------- | --------------- |
| Enter global configuration view | **configure terminal**                  | -               |
| Enter Ethernet interface view   | **interface ethernet** *interface-name* | -               |
| Enable loop traffic drop        | **loopback-pkt-drop**                   | -               |

### <font color="#1d50a2">CRC check</font>

CRC (Cyclic Redundancy Check) error packet detection is a commonly used error detection technique in data communication. When a switch port receives a CRC error packet, it indicates that an error occurred during data transmission. After enabling CRC error packet detection, if the switch receives 100 CRC error packets within 10 seconds, it will set the interface to err down.

<font color="#1d05a2">Table 27 Configure CRC check</font>

| **Purpose**                                                      | **Commands**                            | **Description**                                                                                                                                                                               |
| ---------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view                                  | **configure terminal**                  | -                                                                                                                                                                                             |
| Enable CRC error packet detection function                       | **crc-check enable**                    | -                                                                                                                                                                                             |
| Configure the threshold parameter for CRC error packet detection | **crc-check threshod** *interval count* | *interval*: Set the interval in seconds, the range is 2-60, the default value is 10.*count*: Set the maximum count of CRC error packets in the range of \[1,65535], the default value is 100. |

### <font color="#1d50a2">Display and Maintenance</font>

<font color="#1d50a2">**Display Interface Configuration Information**</font>****

<font color="#1d05a2">Table 28 Display Interface Configuration Information</font>

| **Purpose**                                | **Commands**                                 | **Description** |
| ------------------------------------------ | -------------------------------------------- | --------------- |
| Check interface description information    | **show interface description**               | -               |
| Check interface status information         | **show interface summary**                   | -               |
| Check information about the interface      | **show interface ethernet** *interface-name* | -               |
| Check interface IPv4 address configuration | **show ip interfaces**                       | -               |

<font color="#1d50a2">**Display Interface Status Information**</font>

<font color="#1d05a2">Table 29 Display Interface Status Information</font>

| **Purpose**                                          | **Commands**                                                                           | **Description** |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------- | --------------- |
| Check interface status information                   | **show interface summary**                                                             | -               |
| Check information about the interface                | **show interface ethernet** *interface-name*                                           | -               |
| Check interface statistics                           | **show counters interface** \[**ethernet** *interface-name*]                           | -               |
| Check layer 3 port statistics                        | **show counters rif** \{**ethernet**\|**vlan**\|**link-aggregation**} *interface-name* | -               |
| Check LLDP neighbor information                      | **show lldp neighbor** \{ **summary**\|**interface** interface-name}                   | -               |
| Check startup\_delay information about the interface | **show interface startup\_delay**                                                      | -               |

<font color="#1d50a2">**Clear Interface Statistics Count**</font>

<font color="#1d05a2">Table 30 Clear Interface Statistics Count</font>

| **Purpose**                                  | **Commands**                                 | **Description** |
| -------------------------------------------- | -------------------------------------------- | --------------- |
| Clear interface statistics count information | **clear counters** \{**interface**\|**rif**} | -               |

<font color="#1d50a2">**Display Information on Interface Optical Modules**</font>

<font color="#1d05a2">Table 31 Display Information on Interface Optical Modules</font>

| **Purpose**                                            | **Commands**                                                                     | **Description** |
| ------------------------------------------------------ | -------------------------------------------------------------------------------- | --------------- |
| Display presence information of optical modules.       | **show interface transceiver** \[**ethernet** *interface-name*] **presence**     | -               |
| Display detailed information of optical modules.       | **show interface transceiver \[ethernet** *interface-name*] **eeprom \[detail**] | -               |
| Display low-power mode information of optical modules. | **show interface transceiver \[ethernet** *interface\_name*] **lpmode**          | -               |

<font color="#1d50a2">**Display Interface Isolation Configuration Information**</font>****

<font color="#1d05a2">Table 32 Display Interface Isolation Configuration Information</font>

| **Purpose**                                           | **Commands**                                                         | **Description** |
| ----------------------------------------------------- | -------------------------------------------------------------------- | --------------- |
| Display interface isolation configuration information | **show isolate-group summary&#x20;**\[**ethernet** *interface-name*] | -               |

## <font color="#1d50a2">Console Interface</font>

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

Console interface, or serial port, generally with RJ-45 connector, which is connected to the COM serial port of the configuration terminal and is used to build the field configuration environment. By default, AsterNOS 3.0 and above support serial console-based logins and SSH-based logins. The default username/password for login are **admin/asteros.** After logging into the switch via the serial port the user can configure the IP address of the management port (eth0) ,thereafter the user can log in to the switch using SSH.

<font color="#1d50a2">**Example**</font>

For details on how to use the serial port, please refer to [<font color="#1d05a2">First Login to the switch</font>](https://docs.asteraix.com/aidc/first-use#8au7r)

```plaintext
Debian GNU/Linux 9 sonic ttyS0
sonic login: admin
Password:
Last login: Mon Jun 3 14:44:09 CST 2019 from 192.168.10.161 on pts/4
Linux sonic 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2015-12-19) x86_64
    _          _                _   _   ___   ____
   / \    ___ | |_   ___  _ __ | \ | | / _ \ / ___|
  / _ \  / __|| __| / _ \| '__||  \| || | | |\___ \
 / ___ \ \__ \| |_ |  __/| |   | |\  || |_| | ___) |
/_/   \_\|___/ \__| \___||_|   |_| \_| \___/ |____/

------- Asterfusion Network Operating System -------
Help: http://www.asterfusion.com/
sonic#
```

****

