source
Use source to specify the source address or source interface for the tunnel interface.
Use undo source to restore the default.
Syntax
source { ip-address | ipv6-address | interface-type interface-number }
undo source
Default
No source address or source interface is specified for the tunnel interface.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the tunnel source IPv4 address.
ipv6-address: Specifies the tunnel source IPv6 address.
interface-type interface-number: Specifies the source interface. 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 view the configured tunnel source address, use the display interface tunnel command.
The source address of the local tunnel interface must be the destination address of the peer tunnel interface, and vice versa.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Specify VLAN-interface 10 as the source interface of interface 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 interface 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