ipv6 source-interface

Syntax

ipv6 source-interface {sflow | tftp | radius | tacacs | ntp | syslog | ubt | dhcp-relay | simplivity | dns | all} {interface|} [vrf] no ipv6 source-interface {sflow | tftp | radius | tacacs | ntp | syslog | ubt | dhcp-relay | simplivity | dns | all} [interface|] [vrf]

Description

Sets a single source IP address for a feature on the switch. This ensures that all traffic sent the feature 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 features, or an individual address for each feature.

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.

Thenoform of this command deletes the single source IP address for all supported protocols, or a specific protocol.

Command context

config

Parameters

sflow | tftp | radius | tacacs | ntp | syslog | ubt | dhcp-relay | simplivity | dns | all

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

interface

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

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 thedefaultVRF, if thevrf选择不使用)。Specify the IP address in IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), wherexis a hexadecimal number from 0 to F.

vrf

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

Authority

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

Examples

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

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

Configuring the IPv6 address2001:DB8::1on VRFsflow-vrfon interface1/1/2as the single source address for sFlow:

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

Stop the source IP address from using the IP address on interface1/1/1on VRFone.

switch(config)#没有ip源接口interface 1/1/1 vrf one

Clear the source IP address2001:DB8::1.

switch(config)#没有ip源接口2001:DB8::1