source ip

Syntax

source ip <IPV4-ADDR>

no source ip <IPV4-ADDR>

Description

Sets the source IP address for an IP tunnel. Specify the IP address of a layer 3 interface on the switch. A maximum of 16 source IP addresses are supported for both GRE and IPv6 in IPv4 tunnels. Tunnels can have the same source IP address and different destination IP addresses.

The no form of this command deletes the source IP address for an IP tunnel.

Command context

config-gre-if

config-ip-if

Parameters

<IPV4-ADDR>

Specifies the source IP address in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255. You can remove leading zeros. For example, the address 192.169.005.100 becomes 192.168.5.100.

Authority

Administrators

Examples

Defines the source IP address to be 10.10.20.1 for GRE tunnel 33.

switch(config)# interface tunnel 33 mode gre ipv4
switch(config-gre-if)# source ip 10.10.20.1

Deletes the source IP address 10.1.20.1 from GRE tunnel 33.

switch(config)# interface tunnel 33
 switch(config-gre-if)# no source ip 10.10.20.1

Defines the source IP address to be 10.10.10.1 for IPv6 in IPv4 tunnel 27.

switch(config)# interface tunnel 27 mode ip 6in4
switch(config-ip-if)# source ip 10.10.10.1

Deletes the source IP address 10.1.10.1 from IPv6 in IPv4 tunnel 27.

switch(config)# interface tunnel 27
 switch(config-ip-if)# no source ip 10.10.10.1