C
HAPTER
44
| IP Interface Commands
IPv4 Interface
– 1029 –
â—† An interface can have only one primary IP address, but can have many
secondary IP addresses. In other words, secondary addresses need to
be specified if more than one IP subnet can be accessed through this
interface. Note that a secondary address cannot be configured prior to
setting the primary IP address, and the primary address cannot be
removed if a secondary address is still present. Also, if any router/
switch in a network segment uses a secondary address, all other
routers/switches in that segment must also use a secondary address
from the same network or subnet address space.
â—† If bootp or dhcp options are selected, the system will immediately
start broadcasting service requests for all VLANs configured to obtain
address assignments through BOOTP or DHCP. IP is enabled but will not
function until a BOOTP or DHCP reply has been received. Requests are
broadcast periodically by the router in an effort to learn its IP address.
(BOOTP and DHCP values can include the IP address, default gateway,
and subnet mask). If the DHCP/BOOTP server is slow to respond, you
may need to use the ip dhcp restart client command to re-start
broadcasting service requests, or reboot the switch.
EXAMPLE
In the following example, the device is assigned an address in VLAN 1.
Console(config)#interface vlan 1
Console(config-if)#ip address 192.168.1.5 255.255.255.0
Console(config-if)#
RELATED COMMANDS
ip dhcp restart client (1022)
ip default-gateway (1029)
ipv6 address (1037)
ip default-gateway This command specifies the default gateway for destinations not found in
the local routing tables. Use the no form to remove a default gateway.
SYNTAX
ip default-gateway gateway
no ip default-gateway
gateway - IP address of the default gateway
DEFAULT SETTING
No default gateway is established.
COMMAND MODE
Global Configuration