ip address
To define an IP address for an interface, use the ip address command in interface switch configuration mode. Use the no form of this command to remove an IP address definition.
ip address ip-address mask
no ip address
Syntax Description
ip-address |
Specifies the IP address. |
mask |
Specifies the network mask of the IP address. |
Command Default
No IP address is defined for interfaces.
Command Modes
Interface (VLAN) switch configuration (config-switch-if)
Command History
Release | Modification |
---|---|
3.5.1 |
This command was introduced. |
Usage Guidelines
Use the ip address command to define a static IP address on an interface.
Defining a static IP address on an interface stops the DHCP client running on the interface and removes the IP address assigned by the DHCP client.
There is no default IP address assigned to default VLAN.
Examples
The following example configures VLAN 20 with the IP address 209.165.201.2 and the subnet mask 255.255.255.0.
nfvis(config)# switch
nfvis(config-switch)# interface vlan 20
nfvis(config-switch-if)# ip address 209.165.201.2 255.255.255.0
nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end