[Description]
Shows the IPv4 address for each interface.
The following content is shown.
• IPv4 address
• If an IPv4 address has been specified by the
ip address dhcp
command, an "*" is shown added before the displayed
IPv4 address.
• If the IPv4 address is not specified after setting the
ip address dhcp
command (such as while searching for the server),
then "searching" is shown.
• If the
ip address
command has not been set, the indication "unassigned" is shown.
• Physical layer status
• Data link layer status
If an interface is specified, information for that interface is shown. If the interface is omitted, information is shown for all
interfaces for which an IPv4 address can be specified.
[Note]
An error occurs if the specified interface is one to which an IP address cannot be assigned.
[Example]
Show the IP address of every VLAN interface.
SWR2311P>show ip interface brief
Interface IP-Address Admin-Status Link-Status
vlan1 192.168.1.100/24 up up
vlan2 192.168.2.100/24 up down
vlan3 unassigned up down
7.1.3 Automatically set IPv4 address by DHCP client
[Syntax]
ip
address
dhcp
[
hostname
hostname
]
no
ip
address
[Keyword]
hostname
:
Set host name of DHCP server
[Parameter]
hostname
:
Host name or IPv4 address (A.B.C.D)
[Initial value]
none
[Input mode]
interface mode
[Description]
Using the DHCP client, assigns the IPv4 address granted by the DHCP server to the VLAN interface.
If the DHCP server is specified, the HostName option (option code 12) can be added to the Discover/Request message.
If an IPv4 address has been obtained, you can execute the
no ip address
command to send a release message for the obtained
IP address to the DHCP server.
IPv4 addresses can be assigned to a maximum of 8 VLAN interfaces.
If this command is executed with the "no" syntax, the DHCP client setting is deleted.
[Note]
The lease time requested from the DHCP server is fixed at 72 hours. However, the actual lease time will depend on the setting
of the DHCP server.
Even if this command is used to obtain the default gateway, DNS server, and default domain name from the DHCP server, the
settings of the
ip route, ip name-server, ip domain-name
commands take priority.
If an IPv4 address cannot be obtained from the DHCP server even by using this command, then an IPv4 link local address
(169.254.xxx.xxx/16) is automatically assigned only to VLAN interfaces for which the Auto IP function is enabled.
[Example]
Use the DHCP client to assign an IPv4 address to VLAN #100.
192
| Command Reference | Layer 3 functions