IP
ip address
Command Objective: This command sets the IP address for an interface.
Syntax:
ip address <ucast_addr> <ip_mask>
no ip address <ucast_addr>
Parameter Description:
- ucast_addr: Sets the IP address for an interface. When you connect the switch to a network containing a DHCP server that dynamically allocates IP addresses, the configured IP address must not be within the range of addresses that the DHCP server allocates to other switches. This will prevent IP address conflicts between your switches.
- ip_mask: Sets the subnet mask for the configured IP address. The configured subnet mask must be in the same subnet of the network in which you place the switch.
Mode: Interface configuration mode.
This command is applicable in VLAN interface mode and OOB interface mode.
ip address dhcp
Command Objective: This command sets the DHCP IP address for an interface.
Syntax: ip address dhcp no ip address
Parameter Description:
- dhcp: Get IP by using DHCP protocol.
Mode: Interface configuration mode.
This command is applicable in VLAN interface mode and OOB interface mode.
show ip source binding dhcp snooping
Command Objective: This command displays the dynamic IP binding updation through DHCP snooping.
Syntax: show ip source binding dhcp-snooping [interface <interface-type> <interface-id>] [vlan <vlan-id (1-4094)>] [switch] <switch_name>]
Parameter Description:
-
<interface-type>: Clears all port-level spanning-tree statistics information for the specified interface type. The interface can be:
- gigabitethernet: A version of LAN standard architecture that supports data transfer up to 1 gigabit per second.
Mode: Privileged EXEC mode.
ip dhcp snooping
Command Objective: This command turns on layer 2 DHCP snooping globally or for a specific VLAN. The DHCP snooping module will start the protocol operation when the snooping is turned on globally.
Syntax:
ip dhcp snooping [vlan < vlan-id (1-4094)>]
no ip dhcp snooping [vlan <vlan-id (1-4094)>]
Mode: Global configuration mode.
ip dhcp snooping verify mac-address
Command Objective: This command globally enables DHCP MAC verification in the switch.
Syntax:
ip dhcp snooping verify mac-address
no ip dhcp snooping verify mac-address
Mode: Global configuration mode.
ip dhcp snooping verify mac-address
Command Objective: This command enables layer 2 DHCP snooping in the VLAN.
Syntax:
ip dhcp snooping
no ip dhcp snooping
Mode: Config-VLAN mode.
ip dhcp snooping trust
Command Objective: This command configures the port as a trusted port.
Syntax:
ip dhcp snooping trust
no ip dhcp snooping trust
Mode: Interface configuration mode.
This command is applicable in port and port-channel interface mode.
show ip dhcp snooping globals
Command Objective: This command displays the global configuration of DHCP snooping. The global status of layer 2 DHCP snooping and MAC verification is displayed.
Syntax: show ip dhcp snooping globals [switch <string (32)>]
Mode: Privileged EXEC mode.
show ip dhcp snooping
Command Objective: This command displays the DHCP snooping configuration and statistics of all VLANs that have the DHCP snooping feature turned on.
Syntax: show ip dhcp snooping [vlan <vlan-id (1-4094)>] [switch <context name>]
Mode: Privileged EXEC mode.
show ip route
Command Objective: This command displays the IP routing table.
Syntax: show ip route [{<ip_addr> [<ip_mask>] | connected | static | summary | details}]
Parameter Description:
- <ip-address>: Displays the IP routing table for the specified destination IP Address.
- <mask>: Displays the IP routing table for the specified prefix mask address.
- connected: Displays the Directly Connected Network Routes.
- static: Displays the Static Routes in the table.
- summary: Displays the Summary of all routes.
- details: Displays the details of all routes.
Mode: Privileged EXEC mode.
show ip arp
Command Objective: This command displays IP ARP table.
Syntax: show ip arp [{Vlan <vlan_vfi_id> | <ucast_addr> | <ucast_mac> | summary | information | statistics}]
Parameter Description:
- Vlan <vlan_vfi_id>: VLAN ID is a unique value that represents the specific VLAN. This value ranges between 1 and 4094.
- <ucast_addr>: Displays the IP Address of ARP Entry.
- <ucast_mac>: Displays the MAC Address of ARP Entry.
- summary: Displays IP ARP Table summary.
- information: Displays the ARP Configuration information regarding maximum retries and ARP cache timeout.
- statistics: Displays the ARP packet statistics.
Mode: Privileged EXEC mode.
ip route
Command Objective: This command adds a static route. The Route defines the IP address or interface through which traffic can reach the destination.
The no form of this command deletes a static route.
Syntax:
ip route <ip_addr> <ip_mask> <ucast_addr> [<short (1-254)>]
no ip route <ip_addr> <ip_mask>
Parameter Description:
- <ip-address>: Configures the IP Address of ARP entry.
- <mask>: Configures the subnet mask for the IP address. This is a 32-bit number used to divide the IP address into network and host addresses.
- <next-hop>: Defines the next hop's IP address or IP alias that can be used to reach that network.
Mode: Global configuration mode.
arp timeout
Command Objective: This command sets the ARP (Address Resolution Protocol) cache timeout. The ARP timeout defines the time an ARP entry remains in the cache. When a new timeout value is assigned, it only affects the new ARP entries. All the older entries retain their old timeout values. You can assign the timeout values to dynamic ARP entries only. All static ARP entries remain unaltered by the timeout value. This value ranges between 30 and 86400 seconds.
The no form of this command sets the ARP cache timeout to its default value.
Syntax:
arp timeout <integer (30-86400)>
no arp timeout
Mode: Global configuration mode.
arp
Command Objective: This command adds a static entry in the ARP cache.
Syntax:
arp <ucast_addr> <ucast_mac> {Vlan <vlan_vfi_id>}
no arp {<ucast_addr>}
Parameter Description:
- <ucast_addr>: Configures the IP Address of ARP Entry.
- <ucast_mac>: The MAC address corresponding to the IP address above.
- <vlan_vfi_id>: VLAN ID is a unique value representing the specific VLAN. This value ranges between 1 and 4094.
Mode: Global configuration mode.
ip arp max-retries
Command Objective: This command sets the maximum number of ARP request retries. The maximum number of ARP requests the switch generates before deleting an un-resolved ARP entry is defined.
The no form of this command sets the maximum number of ARP request retries to its default value.
Syntax:
ip arp max-retries <short (2-10)>
no ip arp max-retries
Parameter Description:
- <short (2-10)>: Configures the maximum number of ARP request entries. The value ranges between 2 and 10.
Mode: Global configuration mode.