ip-secondary-address

This command manages secondary network addresses for the VLAN interface.

Syntax

Add a secondary address
ip-secondary-address address
Remove a secondary address
no ip-secondary-address address
Remove all secondary addresses
no ip-secondary-address

Parameters

address
Specifies the IP address and netmask. The netmask is in CIDR format and is the integer that assigns the prefix length.
  • For version 4, the prefix length can be in the range of 0 through 32.
  • For version 6, the prefix length can be in the range of 0 through 128.

Guidelines

The ip-secondary-address command manages secondary network addresses for the current interface. The network address is the IP address and its subnet mask. A secondary IP address is a bind address. The secondary IP address is used only as a source IP address when it responds to incoming traffic to the secondary IP address.

To create the primary IP address, use the ip-address command.

To remove secondary IP addresses, use the no ip-secondary-address command.

This command is meaningful except when you use the ip-config-mode command for autoconfiguration with DHCP or SLAAC.

Examples

  • Add 192.168.7.6/27 as a secondary IP address to the interface.
    # ip-secondary-address 192.168.7.6/27
    
  • Remove 192.168.7.6/27 as a secondary IP address.
    # no ip-secondary-address 192.168.7.6/27
    
  • Remove all secondary IP addresses.
    # no ip-secondary-address