source (Tunnel interface view)

Function

The source command configures a source IP address or a source interface for a tunnel.

The undo source command deletes the source IP address or source interface of a tunnel.

By default, no source IP address or source interface is configured for a tunnel.

Format

source source-ip-address

source { interface-name | interface-type interface-number }

undo source [ source-ip-address | { interface-name | interface-type interface-number } ]

Parameters

Parameter Description Value
source-ip-address

Specifies the source address of a tunnel.

The value is in dotted decimal notation.

interface-type

Specifies the name of the source interface of a tunnel.

The value is a string of 1 to 63 case-sensitive characters, spaces not supported.

interface-number

Specifies the number of the source interface of a tunnel.

The value is a string of 1 to 63 case-sensitive characters, spaces not supported.

Views

Tunnel interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
gre write

Usage Guidelines

Usage Scenario

When configuring a tunnel, you must create a tunnel interface and run the source command to configure the source address on the tunnel interface. The IP address of the interface that sends packets should be specified as the source address on the tunnel interface.

Prerequisites

The tunnel mode has been configured using the tunnel-protocol command.

Configuration Impact

The same source or destination IP address cannot be configured for two or more tunnel interfaces that use the same encapsulation protocol.

Precautions

For a tunnel, its source IP address is the same as the destination IP address specified on the remote tunnel interface. Ensure that there is a reachable route between the source and destination tunnel interfaces.

A source tunnel interface can be a physical interface or a loopback interface. Similarly, a source IP address for a tunnel interface can be the IP address of a physical interface or a loopback interface.

The source command is mutually exclusive with the data-link command.

Example

# Configure Tunnel 10 and specify the source interface encapsulated into packets as Loopback1.
<HUAWEI> system-view
[~HUAWEI] interface LoopBack 1
[*HUAWEI-LoopBack1] quit
[*HUAWEI] interface Tunnel 10
[*HUAWEI-Tunnel10] tunnel-protocol gre
[*HUAWEI-Tunnel10] source loopback 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >