< Home

direct-command

Function

The direct-command command configures ASs on the parent. The parent directly delivers the configuration to the ASs, and you do not need to run the commit as command.

The undo direct-command command cancels the configuration for ASs on the parent.

The following table lists the service configurations that can be delivered using the direct-command command. If no configuration dependency and restriction are provided for a command, see the details in the command reference.

This command can only be executed on a parent switch.

Format

direct-command view { system | eth-trunk trunk-id | interface-type interface-number | stack-port member-id/port-id } command command-text

undo direct-command view { system | eth-trunk trunk-id | interface-type interface-number | stack-port member-id/port-id } command command-text

Parameters

Parameter Description Value

view { system | eth-trunk trunk-id | interface-type interface-number | stack-port member-id/port-id }

Specifies the view in which a command is executed.

  • system: system view
  • interface-type interface-number: interface view
  • stack-port member-id/port-id: stack port view
  • eth-trunk trunk-id: Eth-Trunk interface view

-

command command-text

Specifies the command to be delivered to ASs.

The value is a string of 1 to 128 characters.

This command does not support auto-completion of keywords by pressing Tab.

Views

AS view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The following lists the commands that can be directly delivered to ASs. You can run the undo direct-command view { system | interface-type interface-number } command command-text command to cancel the configuration or restore default settings. The command-text parameter specifies the commands listed in the following table.

Service Category

Format

View

Function

Configuration Dependency and Restriction

Energy-saving management

port-auto-sleep enable

Interface view

Enables the port sleeping function on an electrical interface.

This command cannot be configured on combo interfaces.

PoE

poe force-power

Interface view

Enables forcible PoE power supply on an interface.

-

poe legacy enable

Interface view

Enables an interface to check compatibility of PDs.

-

poe priority { critical | high | low }

Interface view

Sets the power supply priority of a PoE interface.

-

poe af-inrush enable slot slot-id

System view

Configures the IEEE 802.3at-compliant device to provide power in accordance with IEEE 802.3af.

-

poe high-inrush enable slot slot-id

System view

Configures a device to allow high inrush current during power-on.

-

undo poe enable (supported in V200R011C10 and later versions)

Interface view

Disables the PoE function on an interface.

-

Ethernet interfaces

undo negotiation auto

Interface view

Configures an interface to work in non-auto negotiation mode.

After you run the undo direct-command command, the interface works in auto negotiation mode.

  • This command cannot be configured on combo interfaces.
  • Do not cancel the undo negotiation auto command when speed or duplex is specified.

speed { 10 | 100 | 1000 | 2500 | 5000 | 10000 }

Interface view

Sets the rate in non-auto negotiation mode.

  • This command cannot be configured on combo interfaces.

  • Ensure that the interface works in non-auto negotiation mode before configuring this command.

speed auto-negotiation

Interface view

Enables auto-negotiation on a GE optical interface.

  • Support for this command varies depending on switch models. For details, see the speed auto-negotiation command in the Command Reference - Interface Management Commands - Ethernet Interface Configuration Commands.

  • Ensure that the interface works in auto-negotiation mode before configuring this command.

duplex { full | half }

Interface view

Sets the duplex mode for an electrical interface in non-auto negotiation mode.

  • This command cannot be configured on combo interfaces.

  • Ensure that the interface works in non-auto negotiation mode before configuring this command.

  • When the working rate of a GE electrical interface is 1000 Mbit/s, the interface supports only the full duplex mode.

loopback internal

Interface view

Configures a loopback detection mode on an interface.

-

description description (supported in V200R011C10 and later versions)

Interface view

Configures the description for an interface.

The description contains a maximum of 52 characters in V200R011C10, and the description contains a maximum of 116 characters in V200R012C00 and later versions.

Eth-Trunk interface

description description (supported in V200R019C00 and later versions)

Eth-Trunk interface view

Configures the description for an Eth-Trunk interface.

The description contains a maximum of 116 characters.

The description can be configured for a service Eth-Trunk interface or an Eth-Trunk interface used in an SVF system to connect upstream and downstream devices. The description cannot be configured for Eth-Trunk0.

Port bridge

port bridge enable

Interface view

Enables the bridging function on an interface.

-

Port Security

(supported in V200R019 and later versions)

port-security mac-address sticky mac-address vlan vlan-id

Interface view

Configures a sticky MAC address entry.

-

save sticky-mac configuration

System view

Saves the sticky MAC addresses on an AS to a file named unimng-xxxx.ztbl. xxxx in the file name represents the management MAC address of the AS.

-

port-security max-mac-num max-number

Interface view

Sets the maximum number of secure MAC addresses that can be learned on an interface.

The port-security max-mac-num max-number command in direct configuration mode is mutually exclusive with the mac-limit maximum max-num command configured in a user access profile and cannot be both configured.

Voice VLAN

voice-vlan mac-address mac-address mask mask (supported in V200R011C10 and later versions)

System view

Configures the OUI address of the voice VLAN.

-

LBDT

loopback-detect enable

Interface view

Enables loopback detection on an interface.

-

loopback-detect packet vlan vlan-id

Interface view

Enables loopback detection for a specified VLAN.

If you configure this command multiple times, loopback detection is enabled for multiple VLANs.

ARP rate limiting

arp speed-limit source-mac maximum maximum

System view

Configures ARP rate limiting based on source MAC addresses.

  • Only the S5720-EI, S6720S-EI, and S6720-EI support this command.

  • This function takes effect only for the ARP packets sent to the CPU.

arp speed-limit source-ip maximum maximum

System view

Configures ARP rate limiting based on source IP addresses.

This function takes effect only for the ARP packets sent to the CPU.

Stack

port interface { interface-type interface-number1 [ to interface-type interface-number2 ] } enable (supported in V200R010 and later versions)

Stack interface view:

stack-port member-id/port-id

Configures a service interface as a stack member port and adds it to a stack port.

Before restoring the stack member ports that are added to a stack port in direct configuration mode as common service interfaces, you do not need to run the shutdown interface command in the stack interface view.

stack slot slot-id priority priority (supported in V200R010 and later versions)

System view

Sets a stack priority for a member switch in a stack.

-

stack slot slot-id renumber new-slot-id (supported in V200R011C10 and later versions)

System view

Changes the stack ID of a specified member switch in a stack.

NOTICE:

If there are services running, delivering this command may cause service interruptions and configuration loss. Therefore, you are advised to deliver this command when an AS is unconfigured.

A stack ID cannot be changed in the following situations:
  • The switch is a standalone switch that does not join any stack.
  • The newly configured stack ID is an existing stack ID of a specified member switch in a stack.
  • Ports with the specified slot-id have been configured as member ports of an uplink fabric port.
  • Ports with the specified slot-id have been configured as member ports of a downlink fabric port.

User Access and Authentication (supported in V200R012C00 and later versions)

access-user arp-detect vlan vlan-id ip-address ip-address mac-address mac-address

System view

Sets the source IP address and source MAC address of offline detection packets in a VLAN.

  • In other V200R012C00 versions except V200R012C00SPC710, this command can be configured only one. If you want to modify the configuration, delete the existing configuration and then perform the configuration again.
  • In V200R012C00SPC710 and V200R013C00, when vlan, ip-address, and mac-address are all different, multiple configurations of this command can be generated. If any one of vlan, ip-address, and mac-address has been configured, delete the existing configuration before reconfiguring them.
  • In V200R019 and later versions, multiple configurations of this command can be generated regardless of whether the VLAN, IP address, and MAC address are the same. You do not need to delete the existing configuration. If the newly configured VLAN is the same as the existing one, the IP address and MAC address in the original configuration are replaced with the newly configured IP address and MAC address. If the newly configured VLAN is different from the existing one, a new configuration is generated.

access-user arp-detect default ip-address ip-address

System view

Sets the default source IP address of offline detection packets.

-

undo user-detect

System view

Disables the online user detection function.

-

authentication speed-limit max-num max-num-value interval interval-value (supported in V200R013C00 and later versions)

System view

Configures the rate limit for an access device to send user association and disassociation request messages.

-

access-user arp-detect fallback ip-address mask-length (supported in V200R013C00 and later versions)

System view

Configures an IP address required for calculating the source address of offline detection packets.

If you run this command multiple times, only the latest configuration takes effect.

access-user arp-detect delay delay (supported in V200R013C00 and later versions)

System view

Configures the delay for sending offline detection packets.

-

static-user start-ip-address [ end-ip-address ] [ mac-address mac-address | vlan vlan-id ] (supported in V200R019C00 and later versions)

System view

Configures a static user.

If the IP address of a static user is set to an IP address range, any IP address in this address range cannot be modified or deleted.

Precautions

  • When you configure a directly delivered command on the parent, enter the complete and correct command instead of the abbreviated form. No info message is displayed for confirming your input.
  • A directly delivered command supports the help and typeahead functions but not real-time check during input. The system checks the input only after you complete typing a command and press Enter. No detailed description is provided in help information. If you fail to configure a command for an AS, an info message is displayed.
  • When you configure a directly delivered command, the AS to which the command is to be delivered must be online. If you need to specify a port or slot-id in a command, the corresponding member device must be available. If the AS is offline, run the clear direct-command command to delete the completed configuration on the parent.
  • If a port has the configuration directly delivered using commands, the port cannot be configured as a member port of the Eth-Trunk to which a fabric port is bound. If a port has been configured as a member port of the Eth-Trunk to which a fabric port is bound, the configuration cannot be directly delivered to the port using commands.
  • Directly delivering configuration using commands and delivering configuration using service profiles are mutually exclusive and cannot be performed simultaneously.
  • In versions earlier than V200R019C00, a maximum of 4096 commands can be configured. In V200R019C00 and later versions, a maximum of 8192 commands can be configured.

Example

# Configure the parent to deliver the loopback-detect enable command to GigabitEthernet0/0/1 on as1 to enable loopback detection on GigabitEthernet0/0/1.

<HUAWEI> system-view
[HUAWEI] uni-mng
[HUAWEI-um] as name as1
[HUAWEI-um-as-as1] direct-command view gigabitethernet 0/0/1 command loopback-detect enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >