source ip

Syntax

source ip <IPV4-ADDR>

Description

Configures the source IP address for a VXLAN interface. All VXLAN encapsulated packets use this source IP address in the outer IP header.

If you change an existing source IP address, all tunnels with the old source IP address are deleted, and new tunnels are created with the new source IP address.

The no form of this command deletes the source IP address for the VXLAN interface and deletes all VXLAN tunnels using this source IP address.

Command context

config-vxlan-if

Parameters

<IPV4-ADDR>

Specifies the IP address to assign to the VXLAN interface 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. This must be an address assigned to an existing switch interface, either a loopback interface or a layer 3 interface.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Configuring the loopback IP address as the source IP address:

switch(config)# interface loopback 1
switch(config-loopback-if)# ip address 1.1.1.1/24
switch(config)# interface vxlan 1
switch(config-vxlan-if)# source ip 1.1.1.1

Configuring a layer 3 interface IP address as the source IP address:

switch(config)# interface 1/1/2
switch(config-if)# no shutdown
switch(config-if)# ip address 11.10.10.1/24
switch(config)# interface vxlan 1
switch(config-vxlan-if)# source ip 10.10.10.1

Deleting the source IP address for VXLAN interface 1:

switch(config)# interface vxlan 1
switch(config-vxlan-if)# no source ip 10.10.10.1