ip address
Syntax
Not supported on the 6100 and 6200 Switch Series.ip address <IPV4-ADDR>/<MASK> [secondary]
no ip address <IPV4-ADDR>/<MASK> [secondary]
Description
Sets an IPv4 address and subnet mask to a LAG interface. One primary and up to 31 secondary address can be configured per interface.
The
no
form of this command removes the IPv4 address from the interface.
Command context
config-lag-if
Parameters
<IPV4-ADDR>
Specifies an IP address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255. You can remove leading zeros. For example, the address192.169.005.100
becomes192.168.5.100
.<MASK>
Specifies the number of bits in the address mask in CIDR format (
x
), wherex
is a decimal number from 0 to 32.secondary
Specifies a secondary IP address.
Authority
Administrators or local user group members with execution rights for this command.
Examples
Setting an IP address on the LAG interface 1 to 198.51.100.1 with a mask of 24 bits:
switch(config)# interface lag 1 switch(config-lag-if)# ip address 198.51.100.1/24
Removing the IP address 198.51.100.1 with a mask of 24 bits from LAG interface 1:
switch(config)# interface lag 1 switch(config-lag-if)# no ip address 198.51.100.1/24