跳转到内容
Ask AI

Interface Configuration Guide

此内容尚不支持你的语言。

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.

Ethernet Interface for Management Configuration

Section titled “Ethernet Interface for Management Configuration”

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.

Table 1 Management Port Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter management port configuration viewinterface mgmt 0-
Configure the management port IPv4 addressip address A.B.C.D/M gw A.B.C.DIPv4 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 addressip address A::B/M gw A::BIPv6 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 DHCPip address dhcp-allocIf the management port IP address is obtained via DHCP, manually configured management port IP addresses will not take effect.
Exit management port configuration viewexit-
Save the configurationwrite-

Table 2 Management Port Display and Maintenance

PurposeCommandsDescription
Check management port informationshow interface mgmtThe IP of management port configured by the ifconfig or ip command is not displayed by this command.

First Login

Table 3 First Login

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter management port configuration viewinterface mgmt 0-
Configure the management port IPv4 addressip address A.B.C.D/M gw A.B.C.DIPv4 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 addressip address A::B/M gw A::BIPv6 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 viewexit-
Save the configurationwrite-

Restore to Default Configuration

Table 4 Restore to Default Configuration

PurposeCommandsDescription
Restore to default configuration.delete startup-config[reserve-mgmt]Run commandreloadto take effect.Optionreserve-mgmtdetermines whether to reserve mgmt IP and gateway.
Reload.reload-

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.

Table 5 Types of Logical Interface

Type of logical interfaceDescription
VLANIF interfaceVLANIF interfaces are VLAN-based logical interfaces with Layer 3 characteristics, each VLAN corresponds to a VLANIF interface.
LAGIF interfaceLAGIF 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-interfaceEthernet 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 interfaceLoopback 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.

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

Table 6 Logical Interface Default Configuration

ParametersDefault value
VLANIF interfaceNone
LAGIF interfaceNone
Ethernet Layer 3 sub-interfaceNone
Loopback interfaceDefault ip address is 10.1.0.1/32

Please refer to [] (https://docs.asternos.com/aidc/configuration-guide/vlan-configuration-guide/)

Please refer to [] (https://docs.asternos.com/aidc/configuration-guide/lag-configuration-guide/)

Configuring Ethernet Layer 3 Sub-Interfaces

Section titled “Configuring Ethernet Layer 3 Sub-Interfaces”

Configure Layer 3 Sub-interfaces

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.

Table 7 Configure Layer 3 Sub-interfaces

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create a sub-interface and enter the sub-interface viewinterface ethernet interface-name.subinterface-number-
Configure the IP address of the sub-interfaceip 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-interfacemtu mtu-
Shutdown sub-interfaceshutdown-
Configure the MAC address of the sub-interfacemac-address HH:HH:HH:HH:HH:HHMAC addresses are not case-sensitive

Configure LAG Sub-interfaces

Table 8 Configure LAG Sub-interfaces

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create a LAG sub-interface and enter the sub-interface viewinterface link-aggregation interface-name.subinterface-number-
Configure the IP address of the sub-interfaceip 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-interfacemtu mtu-
Shutdown sub-interfaceshutdown-
Configure the MAC address of the sub-interfacemac-address HH:HH:HH:HH:HH:HHMAC addresses are not case-sensitive

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.

Table 9 Configuring the Loopback Interface

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Loopback interface configuration view or create a Loopback interfaceinterface loopback lo-id-
Configure Loopback interface IP addressip address {A.B.C.D/M|A::B/M}-

Please refer to [] (https://docs.asternos.com/aidc/configuration-guide/vxlan-configuration-guide/)

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

Default Rules for numbering

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.

Alias Mode Rules for numbering

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.

Table 10 Alias Schema of Interface_id Naming Convention

Interface SpeedAlias
1GG
10GX
25GY
40GQ
100GC
200GD
400GQC
800GE

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

Table 11 Ethernet Interface Default Setting

ParametersDefault value
Interface name modedefault
Auto-negotiateClose
Interface FEC10G interface: none, others: rs
Interface management statusUp
Interface speed10G/25G/100G/200G/400G/800G
Interface description informationN/A
Interface splittingUnsplit
Interface MAC learning functionOpen
Interface LLDP functionOpen
Port ID type in interface LLDPifname
Interface MTU9216 bytes
Interface Layer 2 and 3 operating modeLayer 2 model
Interface MAC addressDynamically assigned by the system, or the same as the switch MAC address
ARP proxy for interfaceDisable
Interface startup delay150s

This section describes the basic configuration of Ethernet interfaces.

Configure the Administrative State of the Interface

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.

Table 12 Configure the Administrative Status of Interface

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Startup the interfaceno shutdown-
Shutdown the interfaceshutdown-

Configure the Interface Speed

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.

Table 13 Configure the Interface Rate

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the interface speedspeed speedspeed in Mbit

Example:

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
...

Configure Interface Description Information

Table 14 Configure Interface Description Information

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure interface description informationdescription descriptionThe multiple configurations will overwrite it.

Configure the Startup Delay of Interface

Table 15 Configure the Startup Delay of Interface

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the startup delay of interfacestartup-delay timetime: startup-delay time, range [1, 65535], in seconds

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.

Table 16 Configure Interface Self-Negotiation

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Enable interface self-negotiationautoneg-
Advertise self-negotiation speedadvertised-speeds {speed|all}speed: specify negotiation speedall: advertise all supported speed

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.

Table 17 Configure the Interface FEC Mode

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the interface FEC modefec {rs|fc}-

Configure Interface Layer 2 and 3 Mode Switch

Section titled “Configure Interface Layer 2 and 3 Mode Switch”

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.

Table 18 Configure Layer 2 and 3 Mode Switch for Interfaces

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Switche the operating mode of the interface to layer 3no switchport-
Switche the operating mode of the interface to layer 2switchport-

Only CX308P-48Y-N-V2 and CX532P-N-V2 devices support this feature.

Table 19 Configure Interface Isolation

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Enable interface isolationport-isolate enable group-namegroup-name : isolation group name
Disable interface isolationno port-isolate enable-

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:

Table 20 Configure Interface Breakout

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface 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.

Table 21 Support for interface Breakout Capability

ParameterDescriptionSupported Devices
4x25G[10G]Split one 100G port into four 25G portsCX308P-48Y-N
CX308P-48Y-N-V2
CX532P-N
CX532P-N-V2
CX564P-N
CX664D-N
CX732Q-N
4x50G[10G]Split one 200G port into four 50G portsCX664D-N
2x200G[100G]Split one 400G port into two 200G portsCX732Q-N
4x100G[50G]Split one 400G port into four 100G portsCX732Q-N
2x100G[50G]Split one 200G port into two 50G portsCX664D-N
4x200G[100G]Split one 800G port into four 200G portsCX864E-N
2x400G[200G]Split one 800G port into two 400G portsCX864E-N

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

Configure the MAC learning switch for interface

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

Table 22 Configure MAC Learning Switche for Interfaces

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Enable MAC learning for the interfacemac-address learning-

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.

Configure the Interface IP Address

Table 23 Configure the Interface IP Address

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the interface IP addressip 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 Interface MTU

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.

Table 24 Configure the Interface MTU

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the interface MTUmtu mtuMTU range: 1312 to 9216

Configure the MAC Address of the Interface

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.

Table 25 Configure the MAC Address of the Interface

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the MAC address of the interfacemac-address HH:HH:HH:HH:HH:HHMAC addresses are not case-sensitive

Table 26 Configure Interface Loop Traffic Drop

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Enable loop traffic droploopback-pkt-drop-

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.

Table 27 Configure CRC check

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enable CRC error packet detection functioncrc-check enable-
Configure the threshold parameter for CRC error packet detectioncrc-check threshod interval countinterval: 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.

Display Interface Configuration Information

Table 28 Display Interface Configuration Information

PurposeCommandsDescription
Check interface description informationshow interface description-
Check interface status informationshow interface summary-
Check information about the interfaceshow interface ethernet interface-name-
Check interface IPv4 address configurationshow ip interfaces-

Display Interface Status Information

Table 29 Display Interface Status Information

PurposeCommandsDescription
Check interface status informationshow interface summary-
Check information about the interfaceshow interface ethernet interface-name-
Check interface statisticsshow counters interface [ethernet interface-name]-
Check layer 3 port statisticsshow counters rif {ethernet|vlan|link-aggregation} interface-name-
Check LLDP neighbor informationshow lldp neighbor { summary|interface interface-name}-
Check startup_delay information about the interfaceshow interface startup_delay-

Clear Interface Statistics Count

Table 30 Clear Interface Statistics Count

PurposeCommandsDescription
Clear interface statistics count informationclear counters {interface|rif}-

Display Information on Interface Optical Modules

Table 31 Display Information on Interface Optical Modules

PurposeCommandsDescription
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-

Display Interface Isolation Configuration Information

Table 32 Display Interface Isolation Configuration Information

PurposeCommandsDescription
Display interface isolation configuration informationshow isolate-group summary[ethernet interface-name]-

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.

Example

For details on how to use the serial port, please refer to [] (https://docs.asternos.com/aidc/configuration-guide/first-use/)

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#