Table Of Contents
idle
import all
inservice (real server)
inservice (server farm virtual server)
inservice (virtual server)
ip access-group
ip access-list resequence
ip access-list
ip accounting
ip accounting-list
ip accounting mac-address
ip accounting precedence
ip accounting-threshold
ip accounting-transits
ip address dhcp
ip address pool (DHCP)
ip address
ip broadcast-address
ip casa
ip cef traffic-statistics
ip classless
ip default-gateway
ip dhcp aaa default username
ip dhcp bootp ignore
ip dhcp-client broadcast-flag
ip dhcp-client default-router distance
ip dhcp conflict logging
ip dhcp database
ip dhcp excluded-address
ip dhcp limited-broadcast-address
ip dhcp ping packets
ip dhcp ping timeout
ip dhcp pool
ip dhcp relay information check
ip dhcp relay information option
ip dhcp relay information policy
ip dhcp relay information trusted
ip dhcp relay information trust-all
ip dhcp smart-relay
ip directed-broadcast
ip dns primary
ip domain list
ip domain lookup
ip domain name
ip domain retry
ip domain round-robin
ip domain timeout
ip drp access-group
ip drp authentication key-chain
ip drp server
ip forward-protocol
ip forward-protocol spanning-tree
ip forward-protocol turbo-flood
ip helper-address
ip host
ip icmp rate-limit unreachable
ip icmp redirect
ip information-reply
ip irdp
ip local-proxy-arp
idle
To specify the minimum amount of time for which IOS SLB maintains connection information in the absence of packet activity, use the idle command in virtual server configuration mode. To restore the default idle duration value, use the no form of this command.
idle duration
no idle
Syntax Description
duration
|
Idle connection timer duration (in seconds). Valid values range from 10 to 65535. The default is 3600 seconds (1 hour).
|
Defaults
The default duration is 3600 seconds.
Command Modes
SLB virtual server configuration
Command History
Release
|
Modification
|
12.0(7)XE
|
This command was introduced.
|
12.1(5)T
|
This command was integrated into Cisco IOS Release 12.1(5)T.
|
Usage Guidelines
TCP connections that do not send flows or keepalives before the idle timer expires are assumed to be inactive and are reset (RST).
If you are configuring an idle timer for HTTP flows, choose a low number such as 120 seconds as a starting point. A low number ensures that the IOS SLB connection database maintains a manageable size if problems at the server, client, or network result in a large number of connections. However, do not choose a value under 60 seconds; such a low value can reduce the efficiency of the IOS SLB feature.
Examples
The following example instructs the IOS SLB feature to maintain connection information for an idle connection for 120 seconds:
ip slb vserver PUBLIC_HTTP
Related Commands
Command
|
Description
|
show ip slb vservers
|
Displays information about the virtual servers.
|
virtual
|
Configures the virtual server attributes.
|
import all
To import Dynamic Host Configuration Protocol (DHCP) option parameters into the DHCP Server database, use the import all command in DHCP pool configuration mode. To disable this feature, use the no form of this command.
import all
no import all
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.1(2)T
|
This command was introduced.
|
Usage Guidelines
When the no import all command is used, the Cisco IOS DHCP Server deletes all "imported" option parameters that were added to the specified pool in the server database. Manually configured DHCP option parameters override imported DHCP option parameters.
Imported option parameters are not part of the router configuration and are not saved in NVRAM.
Examples
The following example allows the importing of all DHCP options for a pool named pool1:
Related Commands
Command
|
Description
|
ip dhcp database
|
Configures a Cisco IOS DHCP Server to save automatic bindings on a remote host called a database agent.
|
show ip dhcp import
|
Displays the option parameters that were imported into the DHCP Server database.
|
inservice (real server)
To enable the real server for use by the IOS SLB feature, use the inservice SLB real server configuration command. To remove the real server from service, use the no form of this command.
inservice
no inservice
Syntax Description
This command has no arguments or keywords.
Defaults
If you do not specify the inservice command, the real server is defined to IOS SLB but is not used.
Command Modes
SLB real server configuration
Command History
Release
|
Modification
|
12.0(7)XE
|
This command was introduced.
|
12.1(5)T
|
This command was integrated into Cisco IOS Release 12.1(5)T.
|
Examples
The following example enables the real server for use by the IOS SLB feature:
Related Commands
Command
|
Description
|
real
|
Identifies a real server.
|
show ip slb reals
|
Displays information about the real servers.
|
show ip slb serverfarms
|
Displays information about the server farm configuration.
|
inservice (server farm virtual server)
To enable the virtual server for use by IOS Server Load Balancing (IOS SLB), use the inservice command in SLB server farm virtual server configuration mode. To remove the virtual server from service, use the no form of this command.
inservice [standby group-name]
no inservice [standby group-name]
Syntax Description
standby
|
(Optional) Configures the Hot Standby Router Protocol (HSRP) standby virtual server for use with stateless and stateful backup.
|
group-name
|
(Optional) HSRP group name with which the IOS SLB virtual server is associated.
|
Defaults
The virtual server is defined to IOS SLB but is not used.
Command Modes
SLB server farm virtual server configuration
Command History
Release
|
Modification
|
12.0(7)XE
|
This command was introduced.
|
12.1(1)E
|
The standby keyword and group-name argument were added.
|
12.1(5)T
|
This command was integrated into Cisco IOS Release 12.1(5)T.
|
12.2(14)S
|
This command was integrated into Cisco IOS Release 12.2(14)S.
|
12.2(18)SXE
|
This command was integrated into Cisco IOS Release 12.2(18)SXE.
|
Usage Guidelines
When you use the no form of this command to remove a virtual server from service, the virtual server acquiesces gracefully. No new connections are assigned, and existing connections are allowed to complete.
Examples
In the following example, the virtual server is enabled for use by the IOS SLB feature:
Router(config)# ip slb vserver PUBLIC_HTTP
Router(config-slb-vserver)# inservice
Related Commands
Command
|
Description
|
show ip slb vservers
|
Displays information about the virtual servers.
|
virtual
|
Configures the virtual server attributes.
|
inservice (virtual server)
To enable the virtual server for use by the IOS SLB feature, use the inservice SLB virtual server configuration command. To remove the virtual server from service, use the no form of this command.
inservice [standby group-name]
no inservice [standby group-name]
Syntax Description
standby
|
(Optional) Configures the Hot Standby Router Protocol (HSRP) standby virtual server.
|
group-name
|
(Optional) Specifies the HSRP group name with which the IOS SLB virtual server is associated.
|
Defaults
If you do not specify the inservice command, the virtual server is defined to IOS SLB but is not used.
Command Modes
SLB virtual server configuration
Command History
Release
|
Modification
|
12.0(7)XE
|
This command was introduced.
|
12.1(1)E
|
The standby keyword and group-name argument were added.
|
12.1(5)T
|
This command was integrated into Cisco IOS Release 12.1(5)T.
|
Examples
The following example enables the real server for use by the IOS SLB feature:
ip slb vserver PUBLIC_HTTP
Related Commands
Command
|
Description
|
show ip slb vservers
|
Displays information about the virtual servers.
|
virtual
|
Configures the virtual server attributes.
|
ip access-group
To control access to an interface, use the ip access-group command in interface configuration mode. To remove the specified access group, use the no form of this command.
ip access-group {access-list-number | access-list-name}{in | out}
no ip access-group {access-list-number | access-list-name}{in | out}
Syntax Description
access-list-number
|
Number of an access list. This is a decimal number from 1 to 199 or from 1300 to 2699.
|
access-list-name
|
Name of an IP access list as specified by an ip access-list command.
|
in
|
Filters on inbound packets.
|
out
|
Filters on outbound packets.
|
Defaults
No access list is applied to the interface.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The access-list-name argument was added.
|
Usage Guidelines
Access lists are applied on either outbound or inbound interfaces. For standard inbound access lists, after receiving a packet, the Cisco IOS software checks the source address of the packet against the access list. For extended access lists, the router also checks the destination access list. If the access list permits the address, the software continues to process the packet. If the access list rejects the address, the software discards the packet and returns an ICMP host unreachable message.
For standard outbound access lists, after receiving and routing a packet to a controlled interface, the software checks the source address of the packet against the access list. For extended access lists, the router also checks the destination access list. If the access list permits the address, the software sends the packet. If the access list rejects the address, the software discards the packet and returns an ICMP host unreachable message.
If the specified access list does not exist, all packets are passed.
When you enable outbound access lists, you automatically disable autonomous switching for that interface. When you enable input access lists on any CBus or CxBus interface, you automatically disable autonomous switching for all interfaces (with one exception—an SSE configured with simple access lists can still switch packets, on output only).
Examples
The following example applies list 101 on packets outbound from Ethernet interface 0:
Related Commands
Command
|
Description
|
access-list (IP extended)
|
Defines an extended IP access list.
|
access-list (IP standard)
|
Defines a standard IP access list.
|
ip access-list
|
Defines an IP access list by name.
|
show access-lists
|
Displays the contents of current IP and rate-limit access lists.
|
ip access-list resequence
ip access-list resequence access-list-name starting-sequence-number increment
Syntax Description
access-list-name
|
Name of the access list. Names cannot contain a space or quotation mark.
|
starting-sequence-number
|
Access list entries will be resequenced using this initial value. The default value is 10. The range of possible sequence numbers is 1 through 2147483647.
|
increment
|
The number by which the sequence numbers change. The default value is 10. For example, if the increment value is 5 and the beginning sequence number is 20, the subsequent sequence numbers are 25, 30, 35, 40, and so on.
|
Defaults
Disabled
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(14)S
|
This command was introduced.
|
12.2(15)T
|
This command was integrated into Cisco IOS Release 12.2(15)T.
|
Usage Guidelines
This command allows the permit and deny entries of a specified access list to be resequenced with an initial sequence number value determined by the starting-sequence-number argument, and continuing in increments determined by the increment argument. If the highest sequence number exceeds the maximum possible sequence number, then no sequencing occurs.
For backward compatibility with previous releases, if entries with no sequence numbers are applied, the first entry is assigned a sequence number of 10, and successive entries are incremented by 10. The maximum sequence number is 2147483647. If the generated sequence number exceeds this maximum number, the following message is displayed:
Exceeded maximum sequence number.
If the user enters an entry without a sequence number, it is assigned a sequence number that is 10 greater than the last sequence number in that access list and is placed at the end of the list.
If the user enters an entry that matches an already existing entry (except for the sequence number), then no changes are made.
If the user enters a sequence number that is already present, the following error message is generated:
Duplicate sequence number.
If a new access list is entered from global configuration mode, then sequence numbers for that access list are generated automatically.
Distributed support is provided so that the sequence numbers of entries in the Route Processor (RP) and line card (LC) are in synchronization at all times.
Sequence numbers are not nvgened. That is, the sequence numbers themselves are not saved. In the event that the system is reloaded, the configured sequence numbers revert to the default sequence starting number and increment.
This command works with named standard and extended IP access lists. Because the name of an access list can be designated as a number, numbers are acceptable as names as long as they are entered in named access list configuration mode.
Examples
The following example resequences an access list named kmd1. The starting sequence number is 100, and the increment value is 5:
Router(config)# ip access-list resequence kmd1 100 5
Related Commands
Command
|
Description
|
deny (IP)
|
Sets conditions under which a packet does not pass a named IP access list.
|
permit (IP)
|
Sets conditions under which a packet passes a named IP access list.
|
ip access-list
To define an IP access list by name, use the ip access-list global configuration command. To remove a named IP access list, use the no form of this command.
ip access-list {standard | extended} access-list-name
no ip access-list {standard | extended} access-list-name
Syntax Description
standard
|
Specifies a standard IP access list.
|
extended
|
Specifies an extended IP access list.
|
access-list-name
|
Name of the access list. Names cannot contain a space or quotation mark, and must begin with an alphabetic character to prevent ambiguity with numbered access lists.
|
Defaults
No named IP access list is defined.
Command Modes
Global configuration
Command History
Release
|
Modification
|
11.2
|
This command was introduced.
|
Usage Guidelines
Use this command to configure a named IP access list as opposed to a numbered IP access list. This command will place the router in access-list configuration mode, where you must define the denied or permitted access conditions with the deny and permit commands.
Specifying the standard or extended keyword with the ip access-list command determines the prompt you get when you enter access-list configuration mode.
Use the ip access-group command to apply the access list to an interface.
Named access lists are not compatible with Cisco IOS releases prior to Release 11.2.
Examples
The following example defines a standard access list named Internetfilter:
ip access-list standard Internetfilter
permit 192.5.34.0 0.0.0.255
permit 128.88.0.0 0.0.255.255
permit 36.0.0.0 0.255.255.255
! (Note: all other access implicitly denied)
Related Commands
Command
|
Description
|
access list (IP extended)
|
Defines an extended IP access list.
|
access list (IP standard)
|
Defines a standard IP access list.
|
access-list remark
|
Writes a helpful comment (remark) for an entry in a numbered access list.
|
deny (IP)
|
Sets conditions for a named IP access list.
|
ip access-group
|
Controls access to an interface.
|
permit (IP)
|
Sets conditions for a named IP access list.
|
remark
|
Writes a helpful comment (remark) for an entry in a named IP access list.
|
show ip access-list
|
Displays the contents of all current IP access lists.
|
ip accounting
To enable IP accounting on an interface, use the ip accounting command in interface configuration mode. To disable IP accounting, use the no form of this command.
ip accounting [access-violations] [output-packets]
no ip accounting [access-violations] [output-packets]
Syntax Description
access-violations
|
(Optional) Enables IP accounting with the ability to identify IP traffic that fails IP access lists.
|
output-packets
|
(Optional) Enables IP accounting based on the IP packets output on the interface.
|
Defaults
Disabled
Command Modes
Interface configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
10.3
|
The access-violations keyword was added.
|
Usage Guidelines
The ip accounting command records the number of bytes (IP header and data) and packets switched through the system on a source and destination IP address basis. Only transit IP traffic is measured and only on an outbound basis; traffic generated by the router access server or terminating in this device is not included in the accounting statistics. Traffic coming from a remote site and transiting through a router is also recorded.
If you specify the access-violations keyword, the ip accounting command provides information identifying IP traffic that fails IP access lists. Identifying IP source addresses that violate IP access lists alerts you to possible attempts to breach security. The data might also indicate that you should verify IP access list configurations.
To receive a logging message on the console when an extended access list entry denies a packet access (to log violations), you must include the log keyword in the access-list (IP extended) or access-list (IP standard) command.
Statistics are accurate even if IP fast switching or IP access lists are being used on the interface.
IP accounting disables autonomous switching, SSE switching, and distributed switching (dCEF) on the interface. IP accounting will cause packets to be switched on the Route Switch Processor (RSP) instead of the Versatile Interface Processor (VIP), which can cause performance degradation.
Examples
The following example enables IP accounting on Ethernet interface 0:
Related Commands
Command
|
Description
|
access-list (IP extended)
|
Defines an extended IP access list.
|
access-list (IP standard)
|
Defines a standard IP access list.
|
clear ip accounting
|
Clears the active or checkpointed database when IP accounting is enabled.
|
ip accounting-list
|
Defines filters to control the hosts for which IP accounting information is kept.
|
ip accounting-threshold
|
Sets the maximum number of accounting entries to be created.
|
ip accounting-transits
|
Controls the number of transit records that are stored in the IP accounting database.
|
show ip accounting
|
Displays the active accounting or checkpointed database or displays access list violations.
|
ip accounting-list
To define filters to control the hosts for which IP accounting information is kept, use the ip accounting-list command in global configuration mode. To remove a filter definition, use the no form of this command.
ip accounting-list ip-address wildcard
no ip accounting-list ip-address wildcard
Syntax Description
ip-address
|
IP address in dotted decimal format.
|
wildcard
|
Wildcard bits to be applied to the ip-address argument.
|
Defaults
No filters are defined.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The wildcard argument is a 32-bit quantity written in dotted-decimal format. Address bits corresponding to wildcard bits set to 1 are ignored in comparisons; address bits corresponding to wildcard bits set to zero are used in comparisons.
Examples
The following example adds all hosts with IP addresses beginning with 192.31 to the list of hosts for which accounting information will be kept:
ip accounting-list 192.31.0.0 0.0.255.255
Related Commands
Command
|
Description
|
clear ip accounting
|
Clears the active or checkpointed database when IP accounting is enabled.
|
ip accounting
|
Enables IP accounting on an interface.
|
ip accounting-threshold
|
Sets the maximum number of accounting entries to be created.
|
ip accounting-transits
|
Controls the number of transit records that are stored in the IP accounting database.
|
show ip accounting
|
Displays the active accounting or checkpointed database or displays access list violations.
|
ip accounting mac-address
To enable IP accounting on a LAN interface based on the source and destination MAC address, use the ip accounting mac-address command in interface configuration mode. To disable IP accounting based on the source and destination MAC address, use the no form of this command.
ip accounting mac-address {input | output]
no ip accounting mac-address {input | output]
Syntax Description
input
|
Performs accounting based on the source MAC address on received packets.
|
output
|
Performs accounting based on the destination MAC address on transmitted packets.
|
Defaults
Disabled
Command Modes
Interface configuration
Command History
Release
|
Modification
|
11.1CC
|
This command was introduced.
|
Usage Guidelines
This feature is supported on Ethernet, Fast Ethernet, and FDDI interfaces.
To display the MAC accounting information, use the show interface mac EXEC command.
MAC address accounting provides accounting information for IP traffic based on the source and destination MAC address on LAN interfaces. This calculates the total packet and byte counts for a LAN interface that receives or sends IP packets to or from a unique MAC address. It also records a timestamp for the last packet received or sent. With MAC address accounting, you can determine how much traffic is being sent to and/or received from various peers at NAPS/peering points.
Examples
The following example enables IP accounting based on the source and destination MAC address for received and transmitted packets:
ip accounting mac-address input
ip accounting mac-address output
Related Commands
Command
|
Description
|
show interface mac
|
Displays MAC accounting information for interfaces configured for MAC accounting.
|
ip accounting precedence
To enable IP accounting on any interface based on IP precedence, use the ip accounting precedence command in interface configuration mode. To disable IP accounting based on IP precedence, use the no form of this command.
ip accounting precedence {input | output]
no ip accounting precedence {input | output]
Syntax Description
input
|
Performs accounting based on IP precedence on received packets.
|
output
|
Performs accounting based on IP precedence on transmitted packets.
|
Defaults
Disabled
Command Modes
Interface configuration
Command History
Release
|
Modification
|
11.1CC
|
This command was introduced.
|
Usage Guidelines
To display IP precedence accounting information, use the show interface precedence EXEC command.
The precedence accounting feature provides accounting information for IP traffic, summarized by IP precedence values. This feature calculates the total packet and byte counts for an interface that receives or sends IP packets and sorts the results based on IP precedence. This feature is supported on all interfaces and subinterfaces and supports CEF, dCEF, flow, and optimum switching.
Examples
The following example enables IP accounting based on IP precedence for received and transmitted packets:
ip accounting precedence input
ip accounting precedence output
Related Commands
Command
|
Description
|
show interface precedence
|
Displays precedence accounting information for an interface configured for precedence accounting.
|
ip accounting-threshold
To set the maximum number of accounting entries to be created, use the ip accounting-threshold command in global configuration mode. To restore the default number of entries, use the no form of this command.
ip accounting-threshold threshold
no ip accounting-threshold threshold
Syntax Description
threshold
|
Maximum number of entries (source and destination address pairs) that the Cisco IOS software accumulates.
|
Defaults
The default maximum number of accounting entries is 512 entries.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The accounting threshold defines the maximum number of entries (source and destination address pairs) that the software accumulates, preventing IP accounting from possibly consuming all available free memory. This level of memory consumption could occur in a router that is switching traffic for many hosts. Overflows will be recorded; see the monitoring commands for display formats.
The default accounting threshold of 512 entries results in a maximum table size of 12,928 bytes. Active and checkpointed tables can reach this size independently.
Examples
The following example sets the IP accounting threshold to 500 entries:
ip accounting-threshold 500
Related Commands
Command
|
Description
|
clear ip accounting
|
Clears the active or checkpointed database when IP accounting is enabled.
|
ip accounting
|
Enables IP accounting on an interface.
|
ip accounting-list
|
Defines filters to control the hosts for which IP accounting information is kept.
|
ip accounting-transits
|
Controls the number of transit records that are stored in the IP accounting database.
|
show ip accounting
|
Displays the active accounting or checkpointed database or displays access list violations.
|
ip accounting-transits
To control the number of transit records that are stored in the IP accounting database, use the ip accounting-transits command in global configuration mode. To return to the default number of records, use the no form of this command.
ip accounting-transits count
no ip accounting-transits
Syntax Description
count
|
Number of transit records to store in the IP accounting database.
|
Defaults
The default number of transit records that are stored in the IP accounting database is 0.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
Transit entries are those that do not match any of the filters specified by ip accounting-list global configuration commands. If no filters are defined, no transit entries are possible.
To maintain accurate accounting totals, the Cisco IOS software maintains two accounting databases: an active and a checkpointed database.
Examples
The following example specifies that no more than 100 transit records are stored:
ip accounting-transits 100
Related Commands
Command
|
Description
|
clear ip accounting
|
Clears the active or checkpointed database when IP accounting is enabled.
|
ip accounting
|
Enables IP accounting on an interface.
|
ip accounting-list
|
Defines filters to control the hosts for which IP accounting information is kept.
|
ip accounting-threshold
|
Sets the maximum number of accounting entries to be created.
|
show ip accounting
|
Displays the active accounting or checkpointed database or displays access list violations.
|
ip address dhcp
To acquire an IP address on an interface from the Dynamic Host Configuration Protocol (DHCP), use the ip address dhcp command in interface configuration mode. To unconfigure any address that was acquired, use the no form of this command.
ip address dhcp [client-id interface-name] [hostname host-name]
no ip address dhcp [client-id interface-name] [hostname host-name]
Syntax Description
client-id
|
(Optional) Specifies the client identifier. By default, the client identifier is an ASCII value. The client-id interface-name option sets the client identifier to the hexadecimal MAC address of the named interface.
|
interface-name
|
(Optional) The interface name from which the MAC address is taken.
|
hostname
|
(Optional) Specifies the host name.
|
host-name
|
(Optional) Name of the host to be placed in the DHCP option 12 field. This name need not be the same as the host name entered in global configuration mode.
|
Defaults
The host name is the globally configured host name of the router.
The client identifier is an ASCII value.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.1(2)T
|
This command was introduced.
|
12.1(3)T
|
The client-id keyword and interface-name argument were added.
|
12.2(3)
|
The hostname keyword and host-name argument were added:
The behavior of the client-id interface-name option changed. See the "Usage Guidelines" section for details.
|
12.2(8)T
|
The command was expanded for use on PPP over ATM (PPPoA) interfaces and certain ATM interfaces. Prior to Release 12.2(8)T, the ip address dhcp command could be used only on Ethernet interfaces.
|
Usage Guidelines
The ip address dhcp command allows any interface to dynamically learn its IP address by using the DHCP protocol. It is especially useful on Ethernet interfaces that dynamically connect to an internet service provider (ISP). Once assigned a dynamic address, the interface can be used with the Port Address Translation (PAT) of Cisco IOS Network Address Translation (NAT) to provide Internet access to a privately addressed network attached to the router.
The ip address dhcp command also works with ATM point-to-point interfaces and will accept any encapsulation type. However, for ATM multipoint interfaces you must specify Inverse ARP via the protocol ip inarp interface configuration command and use only the aa15snap encapsulation type.
Some ISPs require that the DHCPDISCOVER message have a specific host name and client identifier that is the MAC address of the interface. The most typical usage of the ip address dhcp client-id interface-name hostname host-name command is when interface-name is the Ethernet interface where the command is configured and host-name is the host name provided by the ISP.
A client identifier (DHCP option 61) can be a hexadecimal or an ASCII value. By default, the client identifier is an ASCII value. The client-id interface option overrides the default and forces the use of the hexadecimal MAC address of the named interface.
Note
Between Cisco IOS Releases 12.1(3)T and 12.2(3), the client-id optional keyword allowed the change of the fixed ASCII value for the client identifier. After Release 12.2(3), the optional client-id keyword forced the use of the hexadecimal MAC address of the named interface as the client identifier.
If a Cisco 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 you use the ip address dhcp command with or without any of the optional keywords, the DHCP option 12 field (host name option) is included in the DISCOVER message. By default, the host name specified in option 12 will be the globally configured host name of the router. However, you can use the ip address dhcp hostname host-name command to place a different name in the DHCP option 12 field than the globally configured host name of the router.
The no ip address dhcp command unconfigures any IP address that was acquired, thus sending a DHCPRELEASE message.
You might need to experiment with different configurations to determine the one required by your DHCP server. Table 1 shows the possible configuration methods and the information placed in the DISCOVER message for each method.
Table 1 Configuration Method and Resulting Contents of the DISCOVER Message
Configuration Method
|
Contents of DISCOVER Messages
|
ip address dhcp
|
The DISCOVER message contains "cisco- mac-address -Eth1" in the client ID field. The mac-address is the MAC address of the Ethernet 1 interface and contains the default host name of the router in the option 12 field.
|
ip address dhcp hostname host-name
|
The DISCOVER message contains "cisco- mac-address -Eth1" in the client ID field. The mac-address is the MAC address of the Ethernet 1 interface, and contains host-name in the option 12 field.
|
ip address dhcp client-id ethernet 1
|
The DISCOVER message contains the MAC address of the Ethernet 1 interface in the client ID field and contains the default host name of the router in the option 12 field.
|
ip address dhcp client-id ethernet 1 hostname host-name
|
The DISCOVER message contains the MAC address of the Ethernet 1 interface in the client ID field and contains host-name in the option 12 field.
|
Examples
In the examples that follow, the command ip address dhcp is entered for the Ethernet interface 1. The DISCOVER message sent by a router configured as shown in the following example would contain "cisco- mac-address -Eth1" in the client-ID field, and the value fresno in the option 12 field.
The DISCOVER message sent by a router configured as shown in the following example would contain "cisco- mac-address -Eth1" in the client-ID field, and the value sanfran in the option 12 field.
ip address dhcp hostname sanfran
The DISCOVER message sent by a router configured as shown in the following example would contain the MAC address of the Ethernet 1 interface in the client-id field, and the value fresno in the option 12 field.
ip address dhcp client-id Ethernet 1
The DISCOVER message sent by a router configured as shown in the following example would contain the MAC address of the Ethernet 1 interface in the client-id field, and the value sanfran in the option 12 field.
ip address dhcp client-id Ethernet 1 hostname sanfran
Related Commands
Command
|
Description
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP Server and enters DHCP pool configuration mode.
|
ip address pool (DHCP)
To enable the IP address of an interface to be automatically configured when a DHCP pool is populated with a subnet from IP Control Protocol (IPCP) negotiation, use the ip address pool command in interface configuration mode. To disable autoconfiguring of the IP address of the interface, use the no form of this command.
ip address pool name
no ip address pool
Syntax Description
name
|
Name of the DHCP pool. The IP address of the interface will be automatically configured from the DHCP pool specified in name.
|
Defaults
IP address pooling is disabled.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use this command to automatically configure the IP address of a LAN interface when there are DHCP clients on the attached LAN that should be serviced by the DHCP pool on the router. The DHCP pool obtains its subnet dynamically through IPCP subnet negotiation.
Examples
The following example specifies that the IP address of Ethernet interface 2 will be automatically configured from the address pool named abc:
Related Commands
Command
|
Description
|
show ip interface
|
Displays the usability status of interfaces configured for IP.
|
ip address
To set a primary or secondary IP address for an interface, use the ip address interface configuration command. To remove an IP address or disable IP processing, use the no form of this command.
ip address ip-address mask [secondary]
no ip address ip-address mask [secondary]
Syntax Description
ip-address
|
IP address.
|
mask
|
Mask for the associated IP subnet.
|
secondary
|
(Optional) Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address.
|
Defaults
No IP address is defined for the interface.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
An interface can have one primary IP address and multiple secondary IP addresses. Packets generated by the Cisco IOS software always use the primary IP address. Therefore, all routers and access servers on a segment should share the same primary network number.
Hosts can determine subnet masks using the Internet Control Message Protocol (ICMP) mask request message. Routers respond to this request with an ICMP mask reply message.
You can disable IP processing on a particular interface by removing its IP address with the no ip address command. If the software detects another host using one of its IP addresses, it will print an error message on the console.
The optional secondary keyword allows you to specify an unlimited number of secondary addresses. Secondary addresses are treated like primary addresses, except the system never generates datagrams other than routing updates with secondary source addresses. IP broadcasts and Address Resolution Protocol (ARP) requests are handled properly, as are interface routes in the IP routing table.
Secondary IP addresses can be used in a variety of situations. The following are the most common applications:
•
There may not be enough host addresses for a particular network segment. For example, your subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you need 300 host addresses. Using secondary IP addresses on the routers or access servers allows you to have two logical subnets using one physical subnet.
•
Many older networks were built using Level 2 bridges. The judicious use of secondary addresses can aid in the transition to a subnetted, router-based network. Routers on an older, bridged segment can be easily made aware that many subnets are on that segment.
•
Two subnets of a single network might otherwise be separated by another network. This situation is not permitted when subnets are in use. In these instances, the first network is extended, or layered on top of the second network using secondary addresses.
Note
If any router on a network segment uses a secondary address, all other devices on that same segment must also use a secondary address from the same network or subnet. Inconsistent use of secondary addresses on a network segment can very quickly cause routing loops.
Note
When you are routing using the Open Shortest Path First (OSPF) algorithm, ensure that all secondary addresses of an interface fall into the same OSPF area as the primary addresses.
To transparently bridge IP on an interface, you must perform the following two tasks:
•
Disable IP routing (specify the no ip routing command).
•
Add the interface to a bridge group, see the bridge-group command.
To concurrently route and transparently bridge IP on an interface, see the bridge crb command.
Examples
In the following example, 131.108.1.27 is the primary address and 192.31.7.17 and 192.31.8.17 are secondary addresses for Ethernet interface 0:
ip address 131.108.1.27 255.255.255.0
ip address 192.31.7.17 255.255.255.0 secondary
ip address 192.31.8.17 255.255.255.0 secondary
Related Commands
Command
|
Description
|
bridge crb
|
Enables the Cisco IOS software to both route and bridge a given protocol on separate interfaces within a single router.
|
bridge-group
|
Assigns each network interface to a bridge group.
|
ip broadcast-address
To define a broadcast address for an interface, use the ip broadcast-address interface configuration command. To restore the d