< Home

gateway (Interface view)

Function

The gateway command sets the gateway address for an interface.

The undo gateway command deletes the default gateway address of the interface.

Format

gateway gateway-address [ route { enable | disable } ]

undo gateway

Parameters

Parameter Description Value

gateway-address

Specifies the gateway address for the interface.

-

enable

Indicates that a default route will be delivered.

-

disable

Indicates that no default route will be delivered.

-

Views

Ethernet interface view, Eth-Trunk interface view, VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

The gateway command cannot be configured on the USG6610E/6620E, USG6615E/6625E, USG6630E/6650E, USG6635E/6655E, USG6680E, and USG6712E/6716E management interface.

By default, after the gateway address is configured for an interface and the interface goes Up, the default route is delivered. The default route is a UNR with the priority of 70. The route configuration command (ip route-static) is not automatically generated when the device delivers route entries. The default route advertised by the gateway command cannot be deleted by the undo ip route-static command.

Each intelligent uplink selection member interface must be configured with a gateway address, and the corresponding default route shall be delivered.

Example

# Set the gateway address for interface GigabitEthernet 0/0/1 to 10.1.1.254, and no default route is generated.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] gateway 10.1.1.254 route disable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >