Chapter 27
| IP Interface Commands
IPv4 Interface
– 652 –
Basic IPv4 Configuration This section describes commands used to configure IP addresses for VLAN
interfaces on the switch.
ip address
This command sets the IPv4 address for the currently selected VLAN interface. Use
the
no
form to remove an IP address.
Syntax
ip address
{ip-address netmask [
secondary
]
[
default-gateway
ip-address] |
bootp
|
dhcp
}
no ip address
[ip-address netmask [
secondary
] |
dhcp
]
ip-address - IP address
netmask - Network mask for the associated IP subnet. This mask identifies
the host address bits used for routing to specific subnets. The network
mask can be either in the traditional format xxx.xxx.xxx.xxx or use classless
format with the range /5 to /32. For example the subnet 255.255.224.0
would be /19.
secondary
- Specifies a secondary IP address.
default-gateway
- The default gateway. (Refer to the ip default-gateway
command which provides the same function.)
bootp
- Obtains IP address from BOOTP.
dhcp -
Obtains IP address from DHCP.
Default Setting
192.168.2.10/24
Command Mode
Interface Configuration (VLAN)
Table 137: Basic IP Configuration Commands
Command Function Mode
ip address Sets the IP address for the current interface IC
ip default-gateway Defines the default gateway through which this switch can
reach other subnetworks
GC
show ip default-gateway Displays the default gateway configured for this device PE
show ip interface Displays the IP settings for this device PE
show ip traffic Displays statistics for IP, ICMP, UDP, TCP and ARP protocols PE
traceroute Shows the route packets take to the specified host PE
ping Sends ICMP echo request packets to another node on the
network
NE, PE