ip address

Configures the IPv4 address for the interfaces.

Syntax

ip address A.B.C.D/M
ip address dhcp
no ip address A.B.C.D/M
no ip address dhcp

Parameters

A.B.C.D/M
Specifies the valid IPv4 unicast address.
dhcp
Specifies the DHCP IPv4 address.

Modes

Interface config mode

Usage Guidelines

This command is available only to users with the admin role.

This command is supported on management interfaces.

The no ip address command removes the IPv4 address configured on the interface.

The no ip address dhcp command removes the DHCP IPv4 address configured on the interface.

Examples

The following example configures the IPv4 address.

device# configure terminal
device(config)# interface management 0
device(config-if-mgmt-0)# ip address 192.168.122.10/24 

device# show running interface management 0 
interface management 0 
no ip address dhcp
ip address 192.168.122.10/24 
shutdown

The following example configures the DHCP IPv4 address.

device# configure terminal 
device(config)# interface management 0 
device(config-if-mgmt-0)# ip address dhcp

device# show running interface management 0 
interface management 0 
ip address dhcp 
shutdown