ip address

Configures a primary or secondary IP address on an interface.

Syntax

ip address ip-address/mask [secondary][ospf-ignore ][ospf-passive]
no ip address [ ip-address/mask ]

Parameters

ip-address
Specifies the IP address.
mask
Specifies the mask for the associated IP subnet. Dotted-decimal notation is not supported. For non-loopback interfaces, valid values are from 1 through 31. For loopback interfaces, the only valid value is 32.
secondary
Specifies that the address is a secondary IP address.
ospf-ignore
Disables adjacency formation with OSPF neighbors and disables advertisement of the interface to OSPF.
ospf-passive
Disables adjacency formation with OSPF neighbors but does not disable advertisement of the interface to OSPF.

Modes

Interface configuration mode

Management interface configuration mode

Port-channel configuration mode

Usage Guidelines

Gateway IPs from multiple subnets (maximum of 32) can be configured for each FVG session. Multiple gateway IPs from the same subnet can be configured, but the number of FVG sessions for each interface remains one. One RBridge becomes the ARP responder for all the gateway IPs configured for the session.

Multiple gateway IPs are supported only for IPv4.

All restrictions for configuring an FVG gateway also apply to multiple gateway IP addresses. If IP conflicts are detected for any gateway IP configured on the session, the configuration is accepted with a RASLOG, but the session is invalidated until the conflict is resolved.

Periodic gratuitous address resolution protocol (GARP), if configured, would be sent out only for the first gateway address. When a session moves to Master, GARP is sent out for all gateway IP addresses configured on the session.

After a downgrade to an earlier version of the OS, all gateway IP configurations are removed if multiple gateway IPs are present. If only one gateway IP present, then the configuration is retained.

Examples

The following example configures a primary IP address on a specified Ethernet interface.

device(config)# interface ethernet 3/2
device(conf-if-eth-3/2)# ip address 10.1.1.1/24 
device(config)# interface ethernet 3/2
device(conf-if-eth-3/2)# ip address 10.1.1.2/24 secondary 

The following example configures a primary IP address on a management interface.

device(config)# interface Management 0
device(config-Management-0)# no ip address 
device(config-Management-0)# ip address 10.1.1.2/24