ip address

Syntax

ip address <IPV4-ADDR/MASK> [secondary]

no ip address <IPV4-ADDR/MASK> [secondary]

Description

Sets the IPv4 address for a loopback interface.

The no form of this command reverses the set of the IPv4 address for a loopback interface.

Command context

config

Parameters

<IPV4-ADDR>

Specifies an IP address in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255.

<MASK>

Specifies the number of bits in the address mask in CIDR format (x), where x is a decimal number from 0 to 128.

secondary

Indicates that the IPv4 address is a secondary address.

Authority

Operators or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.

Examples

switch(config)# interface loopback 1
switch(config-loopback-if)# ip address 16.93.50.2/24
switch(config-loopback-if)# ip address 20.1.1.1/24 secondary