beautypg.com

3 ip default-gateway, Default configuration, Command mode – Planet Technology WGSW-48040 User Manual

Page 221: User guidelines, Example, Syntax

background image

User’s Manual of WGSW-24020/WGSW-48040

-22

mode.

Default Configuration

This command has no default configuration.

Command Mode

Interface configuration (Ethernet, VLAN, port-channel, out-of-band Ethernet)

User Guidelines

The ip address dhcp command allows any interface to dynamically learn its IP address by using the DHCP protocol.

Some DHCP Servers require that the DHCPDISCOVER message have a specific host name. The most typical usage of the ip

address dhcp hostname host-name

command is when host-name is the host name provided by the system administrator.

If a router is configured to obtain its IP address from a DHCP server, it sends a DHCPDISCOVER message to provide

information about itself to the DHCP server on the network.

If the ip address dhcp command is used with or without the optional keyword, the DHCP option 12 field (host name option) is

included in the DISCOVER message. By default, the specified DHCP host name is the device globally configured host name.

When the device is reset, the DHCP command is saved in the configuration file, but the IP address is not. It is recommended not

to define a DHCP address on an inband port or LAG. If a DHCP IP address is configured, this address is dynamically retrieved,

and the "ip address dhcp" command is saved in the configuration file. In the event of a master failure, the backup will again

attempt to retrieve a DHCP address. This could result in one of the following:

ƒ

The same IP address may be assigned;

ƒ

A different IP address may be assigned, which could result in loss of connectivity to the management station;

ƒ

The DHCP server may be down, which would result in IP address retrieval failure, and possible loss of connectivity to the

management station.

Example

The following example acquires an IP address from DHCP.

Console (config)# interface vlan 1

Console (config-if)# ip address dhcp

5.10.3 ip default-gateway

The ip default-gateway command defines a default gateway (router). To remove the default gateway use the no form of this

command.

Syntax

ip default-gateway ip-address

no ip default-gateway

ƒ

ip-address — Valid IP address that specifies the IP address of the default gateway.

This manual is related to the following products: