Published On: August 6ᵗʰ, 2019 02:05
Cisco Enterprise Network Compute System Switch Command Reference
IP Addressing Commands
- ip address
- ip address dhcp
- switch renew dhcp
- ip default-gateway
- show switch ip interface
- arp
- arp timeout
- switch clear arp-cache
- show switch arp table
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.
Syntax Description
Command History
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
ip address dhcp
To acquire the IP address for an Ethernet interface from the Dynamic Host Configuration Protocol (DHCP) server, use the ip address dhcp command in interface configuration mode. To release the acquired IP address, use the no form of this command.
Syntax Description
Command History
Usage Guidelines
This command enables the DHCP client on the interface and removes all manually-configured addresses on the interface. The no form of this command disables the DHCP client on the interface. The default route (Default Gateway) received in DHCP Router option (Option 3) is assigned a metric of 8.
switch renew dhcp
Syntax Description
Command History
ip default-gateway
show switch ip interface
arp
To add a permanent entry to the Address Resolution Protocol (ARP) cache, use the arp command in switch configuration mode. To remove an entry from the ARP cache, use the no form of this command.
Syntax Description
ip-address |
Specifies the IP address or IP alias to map to the specified MAC address. |
vlan vlan-id | |
mac-address |
Specifies the MAC address to map to the specified IP address or IP alias. |
Command History
arp timeout
To set the time interval during which an entry remains in the ARP cache, use the arp timeout command in switch configuration mode. To restore the default configuration, use the no form of this command.
Syntax Description
seconds |
Specifies the time interval (in seconds) during which an entry remains in the ARP cache. Valid range is from 1to 40000000. |
Command Default
The default ARP timeout is 60000 seconds, if IP Routing is enabled, and 300 seconds if IP Routing is disabled.
Command History
switch clear arp-cache
show switch arp table
To display entries in the Address Resolution Protocol (ARP) table, use the show switch arp table command in privileged EXEC mode.
Syntax Description
Command History
Examples
The following is a sample output of the show switch arp table command:
nfvis# show switch arp table IP ADDR VLAN INTERFACE HW ADDRESS STATUS -------------------------------------------------------------- 192.0.2.4 VLAN2363 te1/2 00:50:22:00:2A:A4 dynamic 192.0.2.5 VLAN2364 te1/0 00:a6:ca:d6:30:c3 dynamic 192.0.2.6 VLAN2365 te1/1 00:50:22:00:2A:A5 dynamic