ipv6 source-interface

Syntax

ipv6 source-interface {sflow |  tftp |  radius | tacacs | all} {interface <IFNAME> | <IPV6-ADDR>} [vrf <VRF-NAME>]

no ipv6 source-interface {sflow |  tftp |  radius | tacacs | all} [interface <IFNAME> | <IPV6-ADDR>] [vrf <VRF-NAME>]

Description

Sets a single source IP address for TFTP, sFlow, RADIUS, and/or TACACS. This ensures that all traffic sent by these clients has the same source IP address regardless of how it egresses the switch. You can define a single global address that applies to all supported protocols, or an individual address for each protocol.

This command provides two ways to set the source IP addresses: either by specifying a static IP address, or by using the address assigned to a switch interface. If you define both options, then the static IP address takes precedence.

The no form of this command deletes the single source IP address for all supported protocols, or a specific protocols.

Command context

config

Parameters

sflow | tftp | radius | tacacs | all

Sets a single source IP address for a specific protocol. The all option sets a global address that applies to all protocols that do not have an address set.

interface <IFNAME>

Specifies the name of the interface from which the specified protocol obtains its source IP address.

<IPV6-ADDR>

Specifies the source IP address to use for the specified protocol. The IP address must be defined on the switch, and it must exist on the specified VRF (which is the default VRF, if the vrf option is not used). Specify the IP address in IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), where x is a hexadecimal number from 0 to F. You can use two colons (::) to represent consecutive zeros (but only once), remove leading zeros, and collapse a hextet of four zeros to a single 0. For example, this address 2222:0000:3333:0000:0000:0000:4444:0055 becomes 2222:0:3333::4444:55.

vrf <VRF-NAME>

Specifies the name of the VRF from which the specified protocol sets its source IP address.

Authority

Administrators

Examples

Configuring the IPv6 address 2001:DB8::1 as the global single source address:

switch# config
switch(config)# ip source-interface all 2001:DB8::1/32

Configuring the IPv6 address 2001:DB8::1 on VRF sflow-vrf on interface 1/1/2 as the single source address for sFlow:

switch(config)# vrf sflow-vrf
switch(config-vrf)# exit
switch(config)# interface 1/1/2
switch(config-if)# no shutdown
switch(config-if)# vrf attach sflow-vrf
switch(config-if)# ipv6 address 2001:DB8::1/32
switch(config-if)# exit
switch(config)# ip source-interface sflow interface 1/1/2 vrf sflow-vrf

Stop the source IP address from using the IP address on interface 1/1/1 on VRF one.

switch(config)# no ip source-interface all interface 1/1/1 vrf one

Clear the source IP address 2001:DB8::1.

switch(config)# no ip source-interface all 2001:DB8::1