source

Use source to specify the source address or source interface for a tunnel interface.

Use undo source to restore the default.

Syntax

source { ipv4-address | ipv6-address | interface-type interface-number }

undo source

Default

No source address or source interface is specified for a tunnel interface.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ipv4-address: Specifies the tunnel source IPv4 address.

ipv6-address: Specifies the tunnel source IPv6 address.

interface-type interface-number: Specifies the source interface by its type and number. The interface must be up and must have an IP address.

Usage guidelines

The specified source address or the address of the specified source interface is used as the source address of tunneled packets. To display the configured tunnel source address, use the display interface tunnel command.

The destination address of the local tunnel interface must be the source address of the peer tunnel interface. The source address of the local tunnel interface must be the destination address of the peer tunnel interface.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Specify VLAN-interface 10 as the source interface of Tunnel 1.

<Sysname> system-view
[Sysname] interface tunnel 1 mode gre
[Sysname-Tunnel1] source vlan-interface 10

# Specify 192.100.1.1 as the source address of Tunnel 1.

<Sysname> system-view
[Sysname] interface tunnel 1 mode gre
[Sysname-Tunnel1] source 192.100.1.1

Related commands

destination

display interface tunnel

interface tunnel