ip-address

This command assigns the primary network address for the aggregate interface.

Syntax

ip-address 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-address command assigns the primary network address to the interface. The network address is an IP address with its subnet mask.

To assign secondary, or auxiliary, IP addresses, use the ip-secondary-address command.

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

Examples

  • Assign an IP address in version 4 format.
    # ip-address 192.168.7.6/27
    
  • Assign an IP address in version 6 format.
    # ip-address 2001:0db8:3c4d:0015::abcd:ef12/34