5000 Series Layer 2/3 Managed Data Center Switch CLI Reference Guide
639
7-15
ip address
Configure an IP address on an interface or range of interfaces. Use this command to configure one or
more secondary IP addresses on the interface. The command supports RFC 3021 and accepts 31-bit
prefixes on IPv4 point-to-point links, and adds the label IP address in the command.
Note:
The 31-bit subnet mask is only supported on routing interfaces. The feature is not supported on
network port and service port interfaces because D-LINK OS acts as a host, not a router, on these
management interfaces.
No
command deletes an IP address from an interface. The value for
ipaddr
is the IP address of the
interface in a.b.c.d format where the range for a, b, c, and d is 1-255. The value for subnetmask is a 4-
digit dotted-decimal number which represents the Subnet Mask of the interface. To remove all of the IP
addresses (primary and secondary) configured on the interface, enter the command
no ip address
.
ip address ipaddr {subnetmask | masklen} [secondary]
no ip address [{ipaddr subnetmask [secondary]}]
Parameters
ipaddr
IP address of the interface.
subnetmask
4-digit dotted-decimal number which represents the subnet mask of the
interface.
masklen
Implements RFC 3021. Using the / notation of the subnet mask, this is
an integer that indicates the length of the subnet mask. Range is 5 to 32
bits.
secondary
(Optional) Indicates a secondary IP address interface.
Default
The default is None.
Command Mode
Interface Config
Example
The following example of the command shows the configuration of the subnet mask with an IP
address in the dotted decimal format on the interface VLAN 100.
(Routing)(Interface vlan 100)#ip address 192.168.10.1 255.255.255.254
The next example of the command shows
the configuration of the subnet mask with an IP address in the /
notation on interface VLAN 30.
(Routing)(Config)#interface vlan 30
(Routing)(Interface vlan 30)#ip address 192.168.10.1 /31