Cisco IOS IP Addressing Services Command Reference
clear ip route dhcp through ip arp entry learn
Downloads: This chapterpdf (PDF - 422.0KB) The complete bookPDF (PDF - 3.36MB) | Feedback

clear ip route dhcpclear ip snat sessionsclear ip snat translation distributedclear ip snat translation peerclear ip dhcp snooping database statisticsclear ip translation peerclear logging ip access-list cacheclear nat64 ha statisticsclear nat64 statisticsclient-identifierclient-namecontroldataddns (DDNS-update-method)default-routerdns forwarderdns forwardingdns forwarding source-interfacedns-serverdomain listdomain lookupdomain multicastdomain namedomain name-serverdomain name-server interfacedomain resolver source-interfacedomain retrydomain round-robindomain timeoutdomain-name (DHCP)group (firewall)hardware-addresshosthost (host-list)http (DDNS-update-method)import allinternal (DDNS-update-method)interval maximuminterval minimumip addressip address dhcpip address pool (DHCP)ip arp entry learn

Contents

clear ip route dhcp through ip arp entry learn

clear ip route dhcp

To remove routes from the routing table added by the Cisco IOS Dynamic Host Configuration Protocol (DHCP) server and relay agent for the DHCP clients on unnumbered interfaces, use the clear ip route dhcpcommand in EXEC mode.

clear ip route [ vrf vrf-name] dhcp [ip-address]

Syntax Description

vrf

(Optional) VPN routing and forwarding instance (VRF).

vrf-name

(Optional) Name of the VRF.

ip-address

(Optional) Address about which routing information should be removed.

Command Default

No default behavior or values.

Command Modes

EXEC

Command History

Release

Modification

12.2

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

To remove information about global routes in the routing table, use the clear ip route dhcp command. To remove routes in the VRF routing table, use the clear ip route vrf vrf-name dhcp command.

Examples

The following example removes a route to network 10.5.5.217 from the routing table:

Router# clear ip route dhcp 10.5.5.217

Related Commands

Command

Description

show ip route dhcp

Displays the routes added to the routing table by the Cisco IOS DHCP server and relay agent.

clear ip snat sessions

To clear dynamic Stateful Network Address Translation (SNAT) sessions from the translation table, use the clear ip snat sessionscommand in EXEC mode.

clear ip snat sessions * [ip-address-peer]

Syntax Description

*

Removes all dynamic entries.

ip-address-peer

(Optional) Removes SNAT entries of the peer translator.

Command Modes

EXEC

Command History

Release

Modification

12.2(13)T

This command was introduced.

Usage Guidelines

Use this command to clear entries from the translation table before they time out.

Examples

The following example shows the SNAT entries before and after using the clear ip snat sessions command:

Router> show ip snat distributed
SNAT:Mode PRIMARY
    :State READY
    :Local Address 10.168.123.2
    :Local NAT id 100
    :Peer Address 10.168.123.3
    :Peer NAT id 200
    :Mapping List 10
Router> clear ip snat sessions *
Closing TCP session to peer:10.168.123.3
Router> show ip snat distributed

clear ip snat translation distributed

To clear dynamic Stateful Network Address Translation (SNAT) translations from the translation table, use the clear ip snat translation distributedcommand in EXEC mode.

clear ip snat translation distributed *

Syntax Description

*

Removes all dynamic SNAT entries.

Command Modes

EXEC

Command History

Release

Modification

12.2(13)T

This command was introduced.

Usage Guidelines

Use this command to clear entries from the translation table before they time out.

Examples

The following example clears all dynamic SNAT translations from the translation table:

Router# clear ip snat translation distributed *

clear ip snat translation peer

To clear peer Stateful Network Address Translation (SNAT) translations from the translation table, use the clear ip snat translation peercommand in EXEC mode.

clear ip snat translation peer ip-address-peer [refresh]

Syntax Description

ip-address-peer

IP address of the peer translator.

refresh

(Optional) Provides a fresh dump of the NAT table from the peer.

Command Modes

EXEC

Command History

Release

Modification

12.2(13)T

This command was introduced.

Usage Guidelines

Use this command to clear peer entries from the translation table before they time out.

Examples

The following example shows the SNAT entries before and after the peer entry is cleared:

Router# show ip snat peer 
Pro Inside global      Inside local       Outside local      Outside global
--- 192.168.25.20      192.168.122.20     ---                ---
tcp 192.168.25.20:33528 192.168.122.20:33528 192.168.24.2:21 192.168.24.2:21
Router# clear ip snat translation peer 192.168.122.20

clear ip dhcp snooping database statistics

To clear the DHCP binding database statistics, use the clear ip dhcp snooping database statistics command in privileged EXEC mode.

clear ip dhcp snooping database statistics

Syntax Description

This command has no arguments or keywords.

Command Default

This command has no default settings.

Command Modes

Privileged EXEC

Command History

Release

Modification

12.2(14)SX

Support for this command was introduced on the Supervisor Engine 720.

12.2(17d)SXB

Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Examples

This example shows how to clear the statistics from the DHCP binding database:

Router# clear ip dhcp snooping database statistics

clear ip translation peer

To clear or reset the Network Address Translation (NAT) entries created by the Stateful Failover of Network Address Translation (SNAT) peer router and retreive a list of NAT entries, use the clear ip translation peer command in privileged EXEC mode.

clear ip translation peer ip-address refresh

Syntax Description

ip-address

IP address of the SNAT peer router.

refresh

Retrieves a list of NAT entries from the SNAT peer router.

Command Default

The NAT entries created by the SNAT peer router are recorded.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

15.0(1)M

This command was introduced in a release earlier than Cisco IOS Release 15.0(1)M.

Examples

The following example shows how to retrieve a list of NAT entries and clear the NAT entries created by the SNAT peer router:

Router# clear ip translation peer 10.1.1.1 refresh

Related Commands

Command

Description

clear ip nat translation

Clears dynamic NAT translations from the translation table.

clear logging ip access-list cache

To clear all the entries from the Optimized ACL Logging (OAL) cache and send them to the syslog, use the clear logging ip access-list cache command in privileged EXEC mode.

clear logging ip access-list cache

Syntax Description

This command has no arguments or keywords.

Command Default

This command has no default settings.

Command Modes

Privileged EXEC

Command History

Release

Modification

12.2(17d)SXB

Support for this command was introduced on the Supervisor Engine 720.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

This command is supported on Cisco 7600 series routers that are configured with a Supervisor Engine 720 only.

Examples

This example shows how to clear all the entries from the OAL cache and send them to the syslog:

Router# 
clear logging ip access-list cache

Related Commands

Command

Description

logging ip access-list cache (global configuration )

Configures the OAL parameters globally.

logging ip access-list cache (interface configuration )

Enables an OAL-logging cache on an interface that is based on direction.

show logging ip access-list

Displays information about the logging IP access list.

clear nat64 ha statistics

To clear the Network Address Translation 64 (NAT64) high availability (HA) statistics, use the clear nat64 ha statistics command in privileged EXEC mode.

clear nat64 ha statistics

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

Cisco IOS XE Release 3.2S

This command was introduced.

Usage Guidelines

The HA statistics include the number of HA messages that are transmitted and received by the Route Processor (RP).

Examples

The following example shows how to use the clear nat64 ha statistics command to clear the NAT64 HA statistics:

Router# clear nat64 ha statistics

Related Commands

Command

Description

show nat64 ha status

Displays information about the NAT64 HA state.

clear nat64 statistics

To clear the Network Address Translation 64 (NAT64) statistics, use the clear nat64 statistics command in privileged EXEC mode.

clear nat64 statistics [ global | interface type number | prefix ipv6-prefix / prefix-length]

Syntax Description

global

(Optional) Clears global NAT64 statistics.

interface

(Optional) Clears interface statistics.

type

(Optional) Interface type. For more information, use the question mark (?) online help function.

number

(Optional) Interface or subinterface number. For more information about the numbering syntax for your networking device, use the question mark (?) online help function.

prefix

(Optional) Clears statistics for a specified prefix.

ipv6-prefix

(Optional) IPv6 network number to include in router advertisements. This argument must be in the form documented in RFC 2373 where the address is specified in hexadecimal using 16-bit values between colons.

/ prefix-length

(Optional) Length of the IPv6 prefix. A decimal value that indicates how many of the high-order contiguous bits of the address comprise the prefix (the network portion of the address). A slash mark must precede the decimal value.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

Cisco IOS XE Release 3.2S

This command was introduced.

Usage Guidelines

You can use the clear nat64 statistics command to clear the statistics of a specified interface or all the interfaces for a given stateless prefix.

Examples

The following example shows how to clear NAT64 statistics:

Router# clear nat64 statistics 

Related Commands

Command

Description

show nat64 statistics

Displays statistics about NAT64 interfaces and the translated and dropped packet count.

client-identifier

To specify the unique identifier (in dotted hexadecimal notation) for a Dynamic Host Configuration Protocol (DHCP) client, use the client-identifier command in DHCP pool configuration mode. To delete the client identifier, use the no form of this command.

client-identifier unique-identifier
no client-identifier

Syntax Description

unique-identifier

The distinct identification of the client in dotted-hexadecimal notation, for example, 01b7.0813.8811.66.

Command Default

No default behavior or values.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

This command is valid for manual bindings only. DHCP clients require client identifiers instead of hardware addresses. The client identifier is formed by concatenating the media type and the MAC address. For example, the Microsoft client identifier for Ethernet address b708.1388.f166 is 01b7.0813.88f1.66, where 01 represents the Ethernet media type. For a list of media type codes, refer to the “Address Resolution Protocol Parameters” section of RFC 1700, Assigned Numbers.

You can determine the client identifier by using the debug ip dhcp server packet command.

Examples

The following example specifies the client identifier for MAC address 01b7.0813.8811.66 in dotted hexadecimal notation:

client-identifier 01b7.0813.8811.66

Related Commands

Command

Description

hardware-address

Specifies the hardware address of a BOOTP client.

host

Specifies the IP address and network mask for a manual binding to a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

client-name

To specify the name of a Dynamic Host Configuration Protocol (DHCP) client, use the client-name command in DHCP pool configuration mode. To remove the client name, use the no form of this command.

client-name name
no client-name

Syntax Description

name

Specifies the name of the client, using any standard ASCII character. The client name should not include the domain name. For example, the name abc should not be specified as abc.cisco.com.

Command Default

No default behavior or values

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

The client name should not include the domain name.

Examples

The following example specifies a string client1 that will be the name of the client:

client-name client1

Related Commands

Command

Description

host

Specifies the IP address and network mask for a manual binding to a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP Server and enters DHCP pool configuration mode.

control

To configure the control interface type and number for a redundancy group, use the controlcommand in redundancy application group configuration mode. To remove the control interface for the redundancy group, use the no form of this command.

control interface-type interface-number protocol id
no control

Syntax Description

interface-type

Interface type.

interface-number

Interface number.

protocol

Specifies redundancy group protocol media.

id

Redundancy group protocol instance. The range is from 1 to 8.

Command Default

The control interface is not configured.

Command Modes

Redundancy application group configuration (config-red-app-grp)

Command History

Release

Modification

Cisco IOS XE Release 3.1S

This command was introduced.

Examples

The following example shows how to configure the redundancy group protocol media and instance for the control Gigabit Ethernet interface:

Router# configure terminal
Router(config)# redundancy
Router(config-red)# application redundancy
Router(config-red-app)# group 1
Router(config-red-app-grp)# control GigabitEthernet 0/0/0 protocol
 1

Related Commands

Command

Description

application redundancy

Enters redundancy application configuration mode.

authentication

Configures clear text authentication and MD5 authentication for a redundancy group.

data

Configures the data interface type and number for a redundancy group.

group(firewall)

Enters redundancy application group configuration mode.

name

Configures the redundancy group with a name.

preempt

Enables preemption on the redundancy group.

protocol

Defines a protocol instance in a redundancy group.

data

To configure the data interface type and number for a redundancy group, use the datacommand in redundancy application group configuration mode. To remove the configuration, use the no form of this command.

data interface-type interface-number
no data interface-type interface-number

Syntax Description

interface-type

Interface type.

interface-number

Interface number.

Command Default

No data interface is configured.

Command Modes

Redundancy application group configuration (config-red-app-grp)

Command History

Release

Modification

Cisco IOS XE Release 3.1S

This command was introduced.

Usage Guidelines

Use the data command to configure the data interface. The data interface can be the same physical interface as the control interface.

Examples

The following example shows how to configure the data Gigabit Ethernet interface for group1:

Router# configure terminal
Router(config)# redundancy
Router(config-red)# application redundancy
Router(config-red-app)# group 1
Router(config-red-app-grp)# data GigabitEthernet 0/0/0

Related Commands

Command

Description

application redundancy

Enters redundancy application configuration mode.

authentication

Configures clear text authentication and MD5 authentication for a redundancy group.

control

Configures the control interface type and number for a redundancy group.

group(firewall)

Enters redundancy application group configuration mode.

name

Configures the redundancy group with a name.

preempt

Enables preemption on the redundancy group.

protocol

Defines a protocol instance in a redundancy group.

ddns (DDNS-update-method)

To specify an update method for address (A) Resource Records (RRs) as IETF standardized Dynamic Domain Name System (DDNS), use the ddnscommand in DDNS-update-method configuration mode. To disable the DDNS method for updating, use the no form of this command.

ddns [both]
no ddns

Syntax Description

both

(Optional) Both A and PTR RRs are updated.

Command Default

No DDNS updating is configured.

Command Modes

DDNS-update-method configuration

Command History

Release

Modification

12.3(8)YA

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

Usage Guidelines

If Dynamic Host Configuration Protocol (DHCP) is used to configure the IP address on the interface, a DHCP client may not perform both A and PTR RRs or any updates. Also, if the DHCP server notifies the client during the DHCP interaction that it will perform the updates, then the DHCP client will not perform the updates. The DHCP server can always override the client even if the client is configured to perform the updates.

If the interface is configured using DHCP and if the DDNS update method is configured on that interface, then the DHCP fully qualified domain name (FQDN) option is included in the DHCP packets between the client and the server. The FQDN option contains the hostname, which is used in the update as well as information about what types of updates the client has been configured to perform.

If the ddns keyword is specified, the A RRs only are updated, but if the ddns both keyword are specified, both the A and the PTR RRs are updated. Also, if the DHCP server returns the the FQDN option with an updated hostname, that hostname is used in the update instead.

Examples

The following example shows how to configure a DHCP server to perform both A and PTR RR updates:

ip ddns update method unit-test
 ddns both

Related Commands

Command

Description

ip ddns update method

Enables DDNS as the update method and assigns a method name.

default-router

To specify the default router list for a Dynamic Host Configuration Protocol (DHCP) client, use the default-router command in DHCP pool configuration mode. To remove the default router list, use the no form of this command.

default-router address [ address2 . . . address8]
no default-router

Syntax Description

address

Specifies the IP address of a router. One IP address is required, although you can specify up to eight addresses in one command line.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

Command Default

No default behavior or values.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

The IP address of the router should be on the same subnet as the client subnet. You can specify up to eight routers in the list. Routers are listed in order of preference (address1 is the most preferred router, address2 is the next most preferred router, and so on).

Examples

The following example specifies 10.12.1.99 as the IP address of the default router:

default-router 10.12.1.99

Related Commands

Command

Description

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

dns forwarder

To add an address to the end of the ordered list of IP addresses for a Domain Name System (DNS) view to use when forwarding incoming DNS queries, use the dns forwarder command in DNS view configuration mode. To remove an IP address from the list, use the no form of this command.

dns forwarder [ vrf vrf-name] forwarder-ip-address
no dns forwarder [ vrf vrf-name] forwarder-ip-address

Syntax Description

vrf vrf-name

(Optional) The vrf-name argument specifies the name of the Virtual Private Network (VPN) routing and forwarding (VRF) instance of the forwarder-ip-address.

Note    If no VRF is specified, the default is the global VRF.

forwarder-ip-address

IP address to use when forwarding DNS queries handled using the DNS view.

Command Default

Provided that DNS forwarding (configured by using the dns forwarding command) is enabled and the interface to use when forwarding incoming DNS queries is configured (if using the dns forwarding source-interface command) and not shut down, incoming DNS queries handled using the DNS view are forwarded to one of the DNS forwarding name servers.

If no forwarding name servers are configured for the DNS view, the router uses any configured domain name server addresses.

If there are no domain name server addresses configured either, the router forwards incoming DNS queries to the limited broadcast address (255.255.255.255) so that the queries are received by all hosts on the local network segment but not forwarded by routers.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command can be entered multiple times to specify a maximum of six forwarding name servers. After six forwarding name servers have been specified, additional forwarding name servers cannot be specified unless an existing entry is removed.

To display the list of DNS forwarding name server addresses configured for the DNS view, use the show ip dns view command.


Note


DNS resolving name servers and DNS forwarding name servers are configured separately. The domain name-server and domain name-server interface commands are used to specify the DNS resolving name servers (the ordered list of IP addresses to use when resolving internally generated DNS queries handled using the DNS view). The dns forwarder command specifies the forwarder addresses (the ordered list of IP addresses to use when forwarding incoming DNS queries handled using the DNS view). Versions of Cisco IOS prior to Release 12.4(9)T used the resolving name server list for both resolving internal DNS queries and forwarding DNS queries received by the DNS server. For backward compatibility, if there are no forwarding name servers configured, the resolving name server list will be used instead.

Examples

The following example shows how to add three IP addresses to the list of forwarder addresses for the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# dns forwarder 192.168.2.0
 
Router(cfg-dns-view)# dns forwarder 192.168.2.1
 
Router(cfg-dns-view)# dns forwarder 192.168.2.2

The following example shows how to add the IP address 192.0.2.3 to the list of forwarder addresses for the DNS view named user1 that is associated with the VRF vpn32, with the restriction that incoming DNS queries will be forwarded to 192.0.2.3 only if the queries are from the VRF named vpn1:

Router(config)# ip dns view vrf vpn32 user1
 
Router(cfg-dns-view)# dns forwarder vrf vpn1 192.168.2.3
 

Related Commands

Command

Description

dns forwarding

Enables forwarding of incoming DNS queries by the DNS view.

dns forwarding source-interface

Specifies the interface to use when forwarding incoming DNS queries handled using the DNS view.

domain name-server

Specifies the ordered list of IP addresses to use when resolving internally generated DNS queries handled using the DNS view.

domain name-server interface

Specifies the interface from which the router can learn (through either DHCP or PPP interaction on the interface) a DNS resolving name server address for the DNS view.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

dns forwarding

To enable forwarding of incoming Domain Name System (DNS) queries handled using the DNS view, use the dns forwarding command in DNS view configuration mode. To disable forwarding and revert to the default configuration, use the no form of this command.

dns forwarding [ retry number | timeout seconds]
no dns forwarding [ retry | timeout]

Syntax Description

retry

(Optional) Specifies the time to retry forwarding a DNS query.

number

(Optional) Number of retries. The range is from 0 to 100.

timeout

(Optional) Specifies the timeout waiting for response to a forwarded DNS.

seconds

(Optional) Timeout in seconds. The range is from 1 to 3600.

Command Default

The default value is inherited from the global setting configured using the ip domain lookup global configuration command. However, the dns forwarding command for the DNS view does not have a reciprocal side effect on the setting configured by the ip domain lookup command.

Command Modes

DNS view configuration (cfg-dns-view)

Command History

Release

Modification

12.4(9)T

This command was introduced.

15.0(1)M

This command was modified. The retry number and timeout seconds keywords and arguments were added.

Usage Guidelines

This command enables forwarding of incoming DNS queries handled using the DNS view.

To display the DNS forwarding setting for a DNS view, use the show ip dns view command.

If you configure the no domain lookup command for a DNS view while the dns forwarding command has not been disabled for that view, then the dns forwarding command setting will appear in the show ip dns view command output in order to make it clear that DNS forwarding is still enabled.

If you configure the no ip domain lookup global configuration command, however, the no dns forwarding setting is automatically configured also, in order to be backward compatible with the global command form.


Note


DNS lookup and DNS forwarding are configured separately. The domain lookup command enables the resolution of internally generated DNS queries handled using the DNS view. The dns forwarding command enables the forwarding of incoming DNS queries handled using the DNS view. By default, domain lookup and DNS forwarding are both enabled for a view. If you then configure the no domain lookupcommand, DNS forwarding is still enabled. However, if you instead use the older Cisco IOS command no ip domain lookup to disable domain lookup for the global default view, then DNS forwarding is disabled automatically. This is done for backward compatibility with the functionality of the no ip domain lookup global configuration command.

Examples

The following example shows how to enable forwarding of incoming DNS queries handled using the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# dns forwarding
 

Related Commands

Command

Description

dns forwarding source-interface

Specifies the interface to use when forwarding incoming DNS queries handled using the DNS view.

domain lookup

Enables the IP DNS-based hostname-to-address translation for internally generated DNS queries handled using the DNS view.

ip domain lookup

Enables the IP DNS-based hostname-to-address translation.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

dns forwarding source-interface

To specify the interface to use when forwarding incoming Domain Name System (DNS) queries handled using the DNS view, use the dns forwarding source-interface command in DNS view configuration mode. To remove the specification of the source interface for a DNS view to use when forwarding DNS queries, use the no form of this command.

dns forwarding source-interface interface
no dns forwarding source-interface

Syntax Description

interface

Router interface to use when forwarding DNS queries.

Command Default

No interface is specified for forwarding incoming DNS queries handled using the DNS view, so the router selects the appropriate source IP address automatically, according to the interface used to send the packet, when the query is forwarded.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command specifies the interface to use when forwarding incoming DNS queries handled using the DNS view.

To display the interface configured by this command, use the show ip dns view command.


Tip


To list all the interfaces configured on the router or access server, use the show interfaces command with the summary keyword. Use the appropriate interface specification, typed exactly as it is displayed under the Interface column of the show interfaces command output, to replace the interface argument in the dns forwarding source-interface command.


Examples

The following is sample output from the show interfaces command used with the summary keyword:

Router# show interfaces summary
 
 *: interface is up
 IHQ: pkts in input hold queue     IQD: pkts dropped from input queue
 OHQ: pkts in output hold queue    OQD: pkts dropped from output queue
 RXBS: rx rate (bits/sec)          RXPS: rx rate (pkts/sec)
 TXBS: tx rate (bits/sec)          TXPS: tx rate (pkts/sec)
 TRTL: throttle count
  Interface              IHQ   IQD  OHQ   OQD  RXBS RXPS  TXBS TXPS TRTL
------------------------------------------------------------------------
* FastEthernet0/0          0     0    0     0     0    0     0    0    0
  FastEthernet0/1          0     0    0     0     0    0     0    0    0
  ATM2/0                   0     0    0     0     0    0     0    0    0
  Ethernet3/0              0     0    0     0     0    0     0    0    0
  Ethernet3/1              0     0    0     0     0    0     0    0    0
  Ethernet3/2              0     0    0     0     0    0     0    0    0
  Ethernet3/3              0     0    0     0     0    0     0    0    0
  ATM6/0                   0     0    0     0     0    0     0    0    0
NOTE:No separate counters are maintained for subinterfaces
     Hence Details of subinterface are not shown

The following example shows how to configure FastEthernet slot 0, port 1 as the interface to be used to forward DNS queries for the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# dns forwarder source-interface FastEthernet0/1
 

Related Commands

Command

Description

dns forwarding

Enables forwarding of incoming DNS queries by the DNS view.

show interfaces

Display statistics for all interfaces configured on the router or access server.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

dns-server

To specify the Domain Name System (DNS) IP servers available to a Dynamic Host Configuration Protocol (DHCP) client, use the dns-server command in DHCP pool configuration mode. To remove the DNS server list, use the no form of this command.

dns-server address [ address2 . . . address8]
no dns-server

Syntax Description

address

The IP address of a DNS server. One IP address is required, although you can specify up to eight addresses in one command line.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

Command Default

If DNS IP servers are not configured for a DHCP client, the client cannot correlate host names to IP addresses.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Servers are listed in order of preference (address1 is the most preferred server, address2 is the next most preferred server, and so on).

Examples

The following example specifies 10.12.1.99 as the IP address of the domain name server of the client:

dns-server 10.12.1.99

Related Commands

Command

Description

domain-name (DHCP)

Specifies the domain name for a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

domain list

To add a domain name to the end of the ordered list of domain names used to complete unqualified hostnames (names without a dotted-decimal domain name) in Domain Name System (DNS) queries handled using the DNS view, use the domain list command in DNS view configuration mode. To remove a name from the domain search list, use the no form of this command.

domain list domain-name
no domain list domain-name

Syntax Description

domain-name

Domain name to add or delete from the domain search list.

Note    Do not include the initial period that separates an unqualified name from the domain name.

Command Default

No domain list is defined for the DNS view.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command adds a domain name to the end of the domain search list for the DNS view.


Note


The domain list and domain name commands are similar, except that the domain list command can be used to define a list of domain names for the view, each to be tried in turn. If DNS lookup is enabled for the DNS view but the domain search list (specified using the domain list command) is empty, the default domain name (specified by using the domain name command) is used instead. If the domain search list is not empty, the default domain name is not used.

To display the list of domain names used to complete unqualified hostnames in DNS queries received by a DNS view, use the show hosts command or the show ip dns view command.

Examples

The following example shows how to add two domain names to the list for the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain list example1.com
 
Router(cfg-dns-view)# domain list example1.org

The following example shows how to add two domain names to the list for the DNS view and then delete one of the domain names from the list:

Router(cfg-dns-view)# domain list example2.com
 
Router(cfg-dns-view)# domain list example2.org
 
Router(cfg-dns-view)# no domain list example2.net
 

Related Commands

Command

Description

domain name

Specifies a single default domain name to use to complete unqualified hostnames in internally generated DNS queries handled using the DNS view.

show hosts

Displays the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of hostnames and addresses specific to a particular DNS view or for all configured DNS views.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain lookup

To enable the IP Domain Name System (DNS)-based hostname-to-address translation for internally generated DNS queries handled using the DNS view, use the domain lookup command in DNS view configuration mode. To disable domain lookup for hostname resolution, use the no form of this command.

domain lookup
no domain lookup

Syntax Description

This command has no arguments or keywords.

Command Default

The default value is inherited from the global setting configured using the ip domain lookup global command. However, the domain lookup DNS view command does not have a reciprocal side effect on the setting configured by the ip domain lookup global command.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command enables DNS-based hostname-to-address translation for internally generated DNS queries handled using the DNS view.

To display the DNS lookup setting for a DNS view, use the show ip dns view command.

If you configure no dns forwarding for a DNS view while domain lookup has not been disabled for that view, then the domain lookup setting will appear in the show ip dns view command output in order to make it clear that domain lookup is still enabled.

If you configure the no ip domain lookup global command, however, the no domain lookup setting is automatically configured also, in order to be backward compatible with the global command form.


Note


DNS lookup and DNS forwarding are configured separately. The domain lookup command enables the resolution of internally generated DNS queries handled using the DNS view. The dns forwarding command enables the forwarding of incoming DNS queries handled using the DNS view. By default, both domain lookup and DNS forwarding are both enabled for a view. If you then configure no domain lookup, DNS forwarding is still enabled. However, if you instead uses the older Cisco IOS command no ip domain lookup to disable domain lookup for the global default view, then DNS forwarding is disabled automatically. This is done for backward compatibility with the functionality of the no ip domain lookup global command.

Examples

The following example shows how to enable IP DNS-based hostname-to-address translation in the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain lookup
 

Related Commands

Command

Description

dns forwarding

Enables forwarding of incoming DNS queries by the DNS view.

domain name-server

Specifies the ordered list of IP addresses to use when resolving internally generated DNS queries handled using the DNS view.

domain name-server interface

Specifies the interface from which the router can learn (through either DHCP or PPP interaction on the interface) a DNS resolving name server address for the DNS view.

ip domain lookup

Enables the IP DNS-based hostname-to-address translation.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain multicast

To configure the domain name to be used when performing multicast address lookups for internally generated Domain Name System (DNS) queries handled using the DNS view, use the domain multicast command in DNS view configuration mode. To remove the specification of the domain name for multicast address lookups, use the no form of this command.

domain multicast domain-name
no domain multicast

Syntax Description

domain-name

Domain name to be used when performing multicast address lookups.

Command Default

No IP address is specified for performing multicast address lookups for the DNS view.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command configures the domain name to be used when performing multicast address lookups for internally generated DNS queries handled using the DNS view.

To display the domain name for multicast address lookups, use the show ip dns view command.

Examples

The following example shows how to configure the domain name www.example.com as the domain name to be used when performing multicast lookups for internally generated DNS queries handled using the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain multicast www.example.com
 

Related Commands

Command

Description

ip domain multicast

Changes the domain prefix used by Cisco IOS software for DNS-based SSM mapping.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain name

To specify the default domain for a Domain Name System (DNS) view to use to complete unqualified hostnames (names without a dotted-decimal domain name), use the domain name command in DNS view configuration mode. To remove the specification of the default domain name for a DNS view, use the no form of this command.

domain name domain-name
no domain name

Syntax Description

domain-name

Default domain name used to complete unqualified hostnames.

Note    Do not include the initial period that separates an unqualified name from the domain name.

Command Default

No default domain name is defined for the DNS view.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command configures the default domain name used to complete unqualified hostnames in DNS queries handled using the DNS view.


Note


The domain list and domain name commands are similar, except that the domain list command can be used to define a list of domain names for the view, each to be tried in turn. If DNS lookup is enabled for the DNS view but the domain search list (specified using the domain list command) is empty, the default domain name (specified by using the domain name command) is used instead. If the domain search list is not empty, the default domain name is not used.

To display the default domain name configured for a DNS view, use the show hosts command or the show ip dns view command.

Examples

The following example shows how to define example.com as the default domain name for the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain name example.com
 

Related Commands

Command

Description

domain list

Defines the ordered list of default domain names to use to complete unqualified hostnames in internally generated DNS queries handled using the DNS view.

show hosts

Displays the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of hostnames and addresses specific to a particular DNS view or for all configured DNS views.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain name-server

To add a name server to the list of Domain Name System (DNS) name servers to be used for a DNS view to resolve internally generated DNS queries, use the domain name-server command in DNS view configuration mode. To remove a DNS name server from the list, use the no form of this command.

domain name-server name-server-ip-address
no domain name-server name-server-ip-address

Syntax Description

name-server-ip-address

IP address of a DNS name server.

Command Default

No IP address is explicitly added to the list of resolving name servers for this view, although an IP address can be added to the list if dynamic name server acquisition is enabled. If the list of resolving name servers is empty, the router will send the query to the limited broadcast address 255.255.255.255 when this view is used.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command can be entered multiple times to specify a maximum of six resolving name servers. After six resolving name servers have been specified, additional resolving name servers cannot be specified unless an existing entry is removed.

This method of explicitly populating the list of resolving name servers is useful in an enterprise network where the population of available DNS servers is relatively static. In an Internet service provider (ISP) environment, where primary and secondary DNS server addresses can change frequently, the router can learn a DNS server address through either DHCP or PPP on the interface. To configure the dynamic acquisition of DNS resolving name server addresses, use the domain name-server interface command. Regardless of the method or methods used to populate the list of DNS resolving name servers for the view, no more than six resolving name servers are maintained for the view.

To display the list of DNS resolving name server IP addresses configured for a DNS view, use the show hosts command or the show ip dns view command.


Note


The DNS resolving name servers and DNS forwarding name servers are configured separately. The domain name-server and domain name-server interface commands are used to specify the DNS resolving name servers (the ordered list of IP addresses to use when resolving internally generated DNS queries for the DNS view). The dns forwarder command specifies the forwarder addresses (the ordered list of IP addresses to use when forwarding incoming DNS queries for the DNS view). If there is no DNS forwarder configuration in a view, then the domain name server list will be used when forwarding DNS queries. This is done for backward compatibility with the ip name-server global command.

Examples

The following example shows how to specify the hosts at 192.168.2.111 and 192.168.2.112 as the name servers for the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain name-server 192.168.2.111
 
Router(cfg-dns-view)# domain name-server 192.168.2.112
 

Related Commands

Command

Description

dns forwarder

Specifies the ordered list of IP addresses to use when forwarding incoming DNS queries handled using the DNS view.

domain name-server interface

Specifies the interface from which the router can learn (through either DHCP or PPP interaction on the interface) a DNS resolving name server address for the DNS view.

ip name-server

Specifies the address of one or more name servers to use for name and address resolution.

show hosts

Displays the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of hostnames and addresses specific to a particular DNS view or for all configured DNS views.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain name-server interface

To specify the interface on which the router can learn (through either DHCP or PPP) Domain Name System (DNS) a resolving name server address for the DNS view, use the domain name-server interface command in DNS view configuration mode. To remove the definition of the interface, use the no form of this command.

domain name-server interface interface
no domain name-server interface interface

Syntax Description

interface

Interface on which to acquire the IP address of a DNS name server that the DNS view can use to resolve internally generated DNS queries. The interface must connect to another router on which the DHCP agent or the PPP agent has been configured to allocate the IP address of the DNS server.

Command Default

No interface is used to acquire the DHCP or PPP address to be used for a DNS view to resolve internally generated DNS queries.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command specifies the interface from which to acquire (through DHCP or PPP interaction on the interface) the IP address of a DNS server to add to the list of DNS name servers used to resolve internally generated DNS queries for the DNS view.

The dynamic acquisition of DNS resolving name server addresses is useful in an Internet service provider (ISP) environment, where primary and secondary DNS server addresses can change frequently. To explicitly populate the list of resolving name servers in an enterprise network where the population of available DNS servers is relatively static, use the domain name-server command. Regardless of the method or methods used to populate the list of DNS resolving name servers for the view, no more than six resolving name servers are maintained for the view.


Note


The DNS resolving name servers and DNS forwarding name servers are configured separately. The domain name-server and domain name-server interface commands are used to specify the DNS resolving name servers (the ordered list of IP addresses to use when resolving internally generated DNS queries for the DNS view). The dns forwarder command specifies the forwarder addresses (the ordered list of IP addresses to use when forwarding incoming DNS queries for the DNS view). If there is no DNS forwarder configuration in a view, then the domain name server list will be used when forwarding DNS queries. This is done for backward compatibility with the ip name-server global command.

Tip


To list all the interfaces configured on the router or access server, use the show interfaces command with the summary keyword. Use the appropriate interface specification, typed exactly as it is displayed under the Interface column of the show interfaces command output, to replace the interface argument in the domain name-server interface command.


Examples

The following is sample output from the show interfaces command used with the summary keyword:

Router# show interfaces summary 
 *: interface is up
 IHQ: pkts in input hold queue     IQD: pkts dropped from input queue
 OHQ: pkts in output hold queue    OQD: pkts dropped from output queue
 RXBS: rx rate (bits/sec)          RXPS: rx rate (pkts/sec)
 TXBS: tx rate (bits/sec)          TXPS: tx rate (pkts/sec)
 TRTL: throttle count
  Interface              IHQ   IQD  OHQ   OQD  RXBS RXPS  TXBS TXPS TRTL
------------------------------------------------------------------------
* FastEthernet0/0          0     0    0     0     0    0     0    0    0
  FastEthernet0/1          0     0    0     0     0    0     0    0    0
  ATM2/0                   0     0    0     0     0    0     0    0    0
  Ethernet3/0              0     0    0     0     0    0     0    0    0
  Ethernet3/1              0     0    0     0     0    0     0    0    0
  Ethernet3/2              0     0    0     0     0    0     0    0    0
  Ethernet3/3              0     0    0     0     0    0     0    0    0
  ATM6/0                   0     0    0     0     0    0     0    0    0
NOTE:No separate counters are maintained for subinterfaces
     Hence Details of subinterface are not shown

The following example shows how to specify a list of name servers for the DNS view named user3 that is associated with the VRF vpn32. First, the list of name server addresses is cleared, then five DNS server IP addresses are added to the list. Finally, FastEthernet slot 0, port 0 is specified as the interface on which to acquire, by DHCP or PPP interaction, a sixth DNS server IP address.

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# no domain name-server
 
Router(cfg-dns-view)# domain name-server 192.168.2.1
 
Router(cfg-dns-view)# domain name-server 192.168.2.2
 
Router(cfg-dns-view)# domain name-server 192.168.2.3
 
Router(cfg-dns-view)# domain name-server 192.168.2.4
 
Router(cfg-dns-view)# domain name-server 192.168.2.5
 
Router(cfg-dns-view)# domain name-server interface FastEthernet0/0
 

Related Commands

Command

Description

domain name-server

Specifies the ordered list of IP addresses to use when resolving internally generated DNS queries handled using the DNS view.

show interfaces

Display statistics for all interfaces configured on the router or access server.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain resolver source-interface

To set the source IP address of the Domain Name Server (DNS) queries for the DNS resolver functionality, use the domain resolver source-interface command in DNS view configuration mode. To disable the configuration, use the no form of this command.

domain resolver source-interface interface-type number
no domain resolver source-interface

Syntax Description

interface-type

Interface type. For more information, use the question mark (?) online help function.

number

Interface or subinterface number. For more information about the numbering syntax for your networking device, use the question mark (?) online help function.

Command Default

Disabled. (DNS queries are not forwarded through the expected interface.)

Command Modes

DNS view configuration (cfg-dns-view)

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

Sometimes, when a source interface is configured on a router with the split DNS feature to forward DNS queries, the router does not forward the DNS queries through the configured interface. If you want the router to forward the DNS queries through a particular source interface, configure the router using the domain resolver source-interface command.

Examples

The following example shows how to set the source IP address of the DNS queries for the DNS resolver functionality:

Router(config)# ip dns view vrf vpn32 user3
Router(cfg-dns-view)# domain resolver source-interface fastethernet 0/0

Related Commands

Command

Description

ip dns view

Creates the DNS view of the specified name associated with the specified VRF instance and then enters DNS view configuration mode.

domain retry

To configure the number of retries to perform when sending or forwarding Domain Name System (DNS) queries handled using the DNS view, use the domain retry command in DNS view configuration mode. To remove the specification of the number of retries for a DNS view, use the no form of this command.

domain retry number
no domain retry

Syntax Description

number

Number of times to retry sending or forwarding a DNS query. The range is from 0 to 100.

Command Default

number : 2 times

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command configures the number of retries to perform when sending or forwarding DNS queries handled using the DNS view.

To display the number of retries configured for the DNS view, use the show ip dns view command.

Examples

The following example shows how to configure the router to send out or forward ten DNS queries from the DNS view named user3 that is associated with the VRF vpn32 before giving up:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain retry 10
 

Related Commands

Command

Description

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain round-robin

To enable round-robin rotation of multiple IP addresses associated with a name in the hostname cache used by the DNS view, use the domain round-robin command in DNS view configuration mode. To disable round-robin functionality for the DNS view, use the no form of this command.

domain round-robin
no domain round-robin

Syntax Description

This command has no arguments or keywords.

Command Default

Round-robin rotation of multiple IP addresses associated with a name in the hostname cache is disabled for the DNS view.

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command enables round-robin rotation such that each time a hostname in the internal cache is accessed, the system returns the next IP address in the cache, rotated such that the second IP address in the list becomes the first one and the first one is moved to the end of the list. For a more detailed description of round-robin functionality, see the description of the ip domain round-robin global command in the Cisco IOS IP Addressing Services Command Reference .

To display the cached list of hostnames and addresses specific to a particular DNS view or for all configured DNS views, use the show hosts command. To define static hostname-to-address mappings in the global hostname cache or VRF hostname cache for the specified DNS view, use the ip host command. To display the round-robin setting for the DNS view, use the show ip dns view command.

Examples

The following example shows how to define the hostname www.example.com with three IP addresses and then enable round-robin rotation for the default DNS view associated with the global VRF. Each time that hostname is referenced internally or queried by a DNS client sending a query to the Cisco IOS DNS server on this system, the order of the IP addresses associated with the host www.example.com will be changed. Because most client applications look only at the first IP address associated with a hostname, this results in different clients using each of the different addresses and thus distributing the load among the three different IP addresses.

Router(config)# ip host view www.example.com 192.168.2.100 192.168.2.200 192.168.2.250
 
Router(config)# ip dns view default
 
Router(cfg-dns-view)# domain lookup
 
Router(cfg-dns-view)# domain round-robin
 

Related Commands

Command

Description

ip host

Defines static hostname-to-address mappings in the DNS hostname cache for a DNS view.

ip domain round-robin

Enables round-robin functionality on DNS servers.

show hosts

Displays the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of hostnames and addresses specific to a particular DNS view or for all configured DNS views.

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain timeout

To configure the number of seconds to wait for a response to a Domain Name System (DNS) query sent or forwarded by the DNS view, use the domain timeout command in DNS view configuration mode. To remove the specification of the number of seconds for a DNS view to wait, use the no form of this command.

domain timeout seconds
no domain timeout

Syntax Description

seconds

Time, in seconds, to wait for a response to a DNS query. The range is from 0 to 3600.

Command Default

number : 3 seconds

Command Modes

DNS view configuration

Command History

Release

Modification

12.4(9)T

This command was introduced.

Usage Guidelines

This command configures the number of seconds to wait for a response to a DNS query sent or forwarded by the DNS view.

To display the number of seconds configured for the DNS view, use the show ip dns view command.

Examples

The following example shows how to configure the router to wait 8 seconds for a response to a DNS query received in the DNS view named user3 that is associated with the VRF vpn32:

Router(config)# ip dns view vrf vpn32 user3
 
Router(cfg-dns-view)# domain timeout 8
 

Related Commands

Command

Description

show ip dns view

Displays information about a particular DNS view or about all configured DNS views, including the number of times the DNS view was used.

domain-name (DHCP)

To specify the domain n ame for a Dynamic Host Configuration Protocol (DHCP) client, use the domain-name command in DHCP pool configuration mode. To remove the domain name, use the no form of this command.

domain-name domain
no domain-name

Syntax Description

domain

Specifies the domain name string of the client.

Command Default

No default behavior or values.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Examples

The following example specifies cisco.com as the domain name of the client:

domain-name cisco.com

Related Commands

Command

Description

dns-server

Specifies the DNS IP servers available to a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

group (firewall)

To enter redundancy application group configuration mode, use the group command in redundancy application configuration mode. To remove the group configuration, use the no form of this command.

group id
no group id

Syntax Description

id

Redundancy group ID. Valid values are 1 and 2.

Command Default

No group is configured.

Command Modes

Redundancy application configuration (config-red-app)

Command History

Release

Modification

Cisco IOS XE Release 3.1S

This command was introduced.

Examples

The following example shows how to configure a redundancy group with group ID 1:

Router# configure terminal
Router(config)# redundancy
Router(config-red)# application redundancy
Router(config-red-app)# group 1
Router(config-red-app-grp)#

Related Commands

Command

Description

application redundancy

Enters redundancy application configuration mode.

hardware-address

To specify the hardware address of a BOOTP client, use the hardware-address command in DHCP pool configuration mode. To remove the hardware address, use the no form of this command.

hardware-address hardware-address [ protocol-type | hardware-number]
no hardware-address

Syntax Description

hardware-address

MAC address of the client.

protocol-type

(Optional) Protocol type. The valid entries are:

  • ethernet
  • ieee802

If no protocol type is specified, the default is Ethernet.

hardware-number

(Optional) ARP hardware specified in an online database at http://www.iana.org/assignments/arp-parameters. The valid range is from 0 to 255. See the table below for valid entries.

Command Default

Only the hardware address is enabled.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

This command is valid for manual bindings only.

The table below lists the valid assigned hardware numbers found online at http://www.iana.org/assignments/arp-parameters.

Table 1 ARP Hardware Numbers and Types

Hardware Number

Hardware Type

1

Ethernet

2

Experimental Ethernet (3Mb)

3

Amateur Radio AX.25

4

ProNET Token Ring

5

Chaos

6

IEEE 802 Networks

7

ARCNET

8

Hyperchannel

9

Lanstar

10

Autonet Short Address

11

LocalTalk

12

LocalNet (IBM PCNet or SYTEK LocalNET)

13

Ultra link

14

SMDS

15

Frame Relay

16

Asynchronous Transmission Mode (ATM)

17

HDLC

18

Fibre Channel

19

Asynchronous Transmission Mode (ATM) (RFC2225)

20

Serial Line

21

Asynchronous Transmission Mode (ATM)

22

MIL-STD-188-220

23

Metricom

24

IEEE 1394.1995

25

MAPOS and Common Air Interface (CAI)

26

Twinaxial

27

EUI-64

28

HIPARP

29

IP and ARP over ISO 7816-3

30

ARPSec

31

IPsec tunnel (RFC3456)

32

InfiniBand (RFC-ietf-ipoib-ip-over-infiniband-09.txt)

33

TIA-102 Project

Examples

The following example specifies b708.1388.f166 as the MAC address of the client:

hardware-address b708.1388.f166 ieee802

Related Commands

Command

Description

client-identifier

Specifies the unique identifier of a DHCP client in dotted hexadecimal notation.

host

Specifies the IP address and network mask for a manual binding to a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

host

To specify the IP address and network mask for a manual binding to a Dynamic Host Configuration Protocol (DHCP) client, use the hostcommand in DHCP pool configuration mode. To remove the IP address of the client, use the no form of this command.

host address [ mask | / prefix-length]
no host

Syntax Description

address

Specifies the IP address of the client.

mask

(Optional) Specifies the network mask of the client.

/ prefix-length

(Optional) Specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

Command Default

The natural mask is used.

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

If the mask and prefix length are unspecified, DHCP examines its address pools. If no mask is found in the pool database, the Class A, B, or C natural mask is used. This command is valid for manual bindings only.

There is no limit on the number of manual bindings but you can configure only one manual binding per host pool.

Examples

The following example specifies 10.12.1.99 as the IP address of the client and 255.255.248.0 as the subnet mask:

host 10.12.1.99 255.255.248.0

Related Commands

Command

Description

client-identifier

Specifies the unique identifier of a Microsoft DHCP client in dotted hexadecimal notation.

hardware-address

Specifies the hardware address of a DHCP client.

ip dhcp pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.

network (DHCP)

Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server.

host (host-list)

To specify a list of hosts that will receive Dynamic Domain Name System (DDNS) updates of address (A) and pointer (PTR) Resource Records (RRs), use the hostcommand in host-list configuration mode. To disable the host list, use the no form of this command.

host [ vrf vrf-name] { host-ip-address | hostname}
no host [ vrf vrf-name] { host-ip-address | hostname}

Syntax Description

vrf vrf-name

(Optional) Specifies the virtual routing and forwarding (VRF) table. The vrf-name argument is a name with which the address pool is associated.

Note    All hostnames or IP addresses specified on the same line as the vrf keyword are associated with that VRF.

host-ip-address

List of server IP addresses that will receive DDNS updates.

hostname

Specifies a hostname.

Command Default

No list is configured for hosts.

Command Modes

Host-list configuration

Command History

Release

Modification

12.3(8)YA

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

Examples

The following example shows how to configure a list of hosts:

ip host-list test
 host vrf abc 10.10.0.0

Related Commands

Command

Description

debug dhcp

Displays debugging information about the DHCP client and monitors the status of DHCP packets.

debug ip ddns update

Enables debugging for DDNS updates.

debug ip dhcp server

Enables DHCP server debugging.

ip ddns update hostname

Enables a host to be used for DDNS updates of A and PTR RRs.

ip ddns update method

Specifies a method of DDNS updates of A and PTR RRs and the maximum interval between the updates.

ip dhcp client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp-client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp update dns

Enables DDNS updates of A and PTR RRs for most address pools.

ip host-list

Specifies a list of hosts that will receive DDNS updates of A and PTR RRs.

show ip ddns update

Displays information about the DDNS updates.

show ip ddns update method

Displays information about the DDNS update method.

show ip host-list

Displays the assigned hosts in a list.

update dns

Dynamically updates a DNS with A and PTR RRs for some address pools.

http (DDNS-update-method)

To specify an update method for address (A) and pointer (PTR) Resource Records (RRs) as HTTP and enter DDNS-HTTP configuration mode, use the httpcommand in DDNS-update-method configuration mode. To disable HTTP dynamic updates, use the no form of this command.

http { add url-string | remove url-string}
no http

Syntax Description

add url-string

URL to be used to add or change a mapping between a hostname and an IP address. The url-stringargumenttakes the following form:

http://userid:password@domain-name/update-folder-name/update?system= system-name &hostname= hostname &myip= myipaddr

  • userid and password--Strings for the organization website that you use for performing the A and PTR RRs updates.
  • domain-name --String for the organizational URL that you are using for the updates; for example www.Cisco.com.
  • update-folder-name --String of the folder name within the organizational website in which your updates are stored.
  • update?system =system-name --Update system (method) being used; for example, dydns is DDNS and dyn is EasyDNS.
Note    Before entering the question mark (?) character, press the control (Ctrl) key and the v key together on your keyboard. This will allow you to enter the ? without the software interpreting the ? as a help query.
  • &hostname= hostname-- Hostname to update.
  • &myip =myipaddr--IP address with which the specified hostname is associated, respectively.
Note    There is one additional special character string, <s>, which could also be entered into the url-string. If <s> is entered, when the update is processed, the IP address of the server to which the update is being sent is substituted at that location.

remove url-string

URL to be used to remove a mapping between a hostname and an IP address. The url-string argument takes the same form as the one shown in the add keyword description.

Command Default

No HTTP update method is configured.

Command Modes

DDNS-update-method configuration

Command History

Release

Modification

12.3(8)YA

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

Examples

The following example shows how to specify the DynDNS.org to process the updates:

ip ddns update method unit-test
 http add http://myuserid:secret@members.dyndns.org/nic/update?system=dyndns&hostname=
mywebsite&myip=10.10.10.10

The following are examples of URLs that can be used to update some HTTP DNS update services. These URLs are correct to the best of the knowledge of Cisco but have not been tested in all cases. Where the word “USERNAME:” appears in the URL, your account username at the HTTP site should be used. Where the word “PASSWORD” appears in the URL, your password for that account should be used:

Examples

http://USERNAME:PASSWORD@members.dyndns.org/nic/update?system=dyndns&hostname=<h>&myip=<a>
!Requires “interval max 28 0 0 0" in the update method definition.

Examples

http://cgi.tzo.com/webclient/signedon.html?TZOName=<h>&Email=USERNAME&TZOKey=PASSWORD&IP
Address=<a>

Examples

http://USERNAME:PASSWORD@members.easydns.com/dyn/ez-ipupdate.php?action=edit&myip=<a>&
host_id=<h>

Examples

http://USERNAME:PASSWORD@www.justlinux.com/bin/controlpanel/dyndns/jlc.pl?direst=1&
username=USERNAME&password=PASSWORD&host=<h>&ip=<a>

Examples

http://USERNAME:PASSWORD@www.dyns.cx/postscript.php?username=USERNAME&password=PASSWORD&
host=<h>&ip=<a>

Examples

http://USERNAME:PASSWORD@dup.hn.org/vanity/update?ver=1&IP=<a>

Examples

http://USERNAME:PASSWORD@www.zoneedit.com/auth/dynamic.html?host=<h>&dnsto=<a>

Note


Because these services are provided by the respective companies, the URLs may be subject to change or the service could be discontinued at any time. Cisco takes no responsibility for the accuracy or use of any of this information. The URLs were obtained using an application called “ez-ipupdate,” which is available for free on the Internet.

Related Commands

Command

Description

ddns

Specifies DDNS as the update method for A and PTR RRs.

debug dhcp

Displays debugging information about the DHCP client and monitors the status of DHCP packets.

debug ip ddns update

Enables debugging for DDNS updates.

debug ip dhcp server

Enables DHCP server debugging.

default

Specifies the command default.

host (host-list)

Specifies a list of hosts that will receive DDNS updates of A and PTR RRs.

internal

Specifies the internal Cisco IOS cache is used for DDNS updates of A and PTR RRs.

interval maximum

Specifies a maximum interval for DDNS updates of A and PTR RRs.

ip ddns update hostname

Enables a host to be used for DDNS updates of A and PTR RRs.

ip ddns update method

Enables DDNS as the update method and assigns a method name.

ip dhcp client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp-client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp update dns

Enables DDNS updates of A and PTR RRs for most address pools.

ip host-list

Specifies a list of hosts that will receive DDNS updates of A and PTR RRs.

show ip ddns update

Displays information about the DDNS updates.

show ip ddns update method

Displays information about the DDNS update method.

show ip host-list

Displays the assigned hosts in a list.

update dns

Dynamically updates a DNS with A and PTR RRs for some address pools.

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.

Command Default

Disabled

Command Modes

DHCP pool configuration

Command History

Release

Modification

12.1(2)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

When the no import all command is used, the 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:

ip dhcp pool pool1
 network 172.16.0.0 /16
 import all

Related Commands

Command

Description

ip dhcp database

Configures a 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.

internal (DDNS-update-method)

To specify an update method for Dynamic Domain Name System (DDNS) address (A) and pointer (PTR) Resource Records (RRs) as a Cisco IOS internal cache, use the internalcommand in DDNS-update-method configuration mode. To disable the internal dynamic updates, use the no form of this command.

internal
no internal

Syntax Description

This command has no arguments or keywords.

Command Default

No internal cache update method is configured.

Command Modes

DDNS-update-method configuration

Command History

Release

Modification

12.3(8)YA

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

Usage Guidelines

This command is useful in conjunction with turning on the internal Cisco IOS DNS name-server. The DNS name-server is enabled by using the ip dns server command. This command enables the name-server to reply to requests for an IP address associated with the hostname that was added to the internal name cache. Not all images have Cisco IOS DNS name-server functionality, so the internal command will not be available. Refer to Feature Navigator at http://www.cisco.com/go/fn to verify the name-server functionality in your image.

When the internal type of update is specified, an entry into the Cisco IOS name cache is added, which is basically the same as entering the ip host abc.com 10.0.0.1 command. The hostname “abc” and the IP address “10.0.0.1” are associated with an interface.

Examples

The following example shows how to configure a server to send DDNS updates to the internal Cisco IOS cache:

ip ddns update method mytest
 internal

Related Commands

Command

Description

ip ddns update method

Enables DDNS as the update method and assigns a method name.

interval maximum

To specify a maximum interval at which Dynamic Domain Name System (DDNS) updates of address (A) and pointer (PTR) Resource Records (RRs) occur, use the interval maximumcommand in DDNS-update-method configuration mode. To disable the interval, use the no form of this command.

interval maximum days hours minutes seconds
no interval maximum

Syntax Description

days

Maximum interval, in days, at which updates occur. The range is from 0 to 365.

hours

Maximum interval, in hours, at which updates occur. The range is from 0 to 23.

minutes

Maximum interval, in minutes, at which updates occur. The range is from 0 to 59.

seconds

Maximum interval, in seconds, at which updates occur. The range is from 0 to 59.

Command Default

No maximum interval is configured.

Command Modes

DDNS-update-method configuration

Command History

Release

Modification

12.3(8)YA

This command was introduced.

12.3(14)T

This command was integrated into Cisco IOS Release 12.3(14)T.

Examples

The following example shows how to configure the update method, the maximum interval of the updates (globally), and the hostname on the interface:

interface ethernet1
 ip ddns update hostname abc.dyndns.org
 ip ddns update mytest
ip ddns update method mytest
 http add http://test:test@members.dyndns.org/nic/update?system=dyndns&hostname=myhost&
 myip=10.10.10.10
 interval maximum 1 0 0 0

Related Commands

Command

Description

ip ddns update method

Enables DDNS as the update method and assigns a method name.

interval minimum

To specify a minimum interval at which Dynamic Domain Name System (DDNS) updates of address (A) and pointer (PTR) Resource Records (RRs) occur, use the interval minimumcommand in DDNS-update-method configuration mode. To disable the minimum interval, use the no form of this command.

interval minimum days hours minutes seconds
no interval minimum

Syntax Description

days

Minimum interval, in days, at which updates occur. The range is from 0 to 365.

hours

Minimum interval, in hours, at which updates occur. The range is from 0 to 23.

minutes

Minimum interval, in minutes, at which updates occur. The range is from 0 to 59.

seconds

Minimum interval, in seconds, at which updates occur. The range is from 0 to 59.

Command Default

No minimum interval is configured.

Command Modes

DDNS-update-method configuration

Usage Guidelines

DDNS updates for interfaces acquiring their address through DHCP occur every time the DHCP lease is renewed. If the lease is renewed more often than the minimum update interval needed, then a problem may occur with the updates. Sites accepting HTTP-style updates, such as DynDNS.org, may report an error if the updates occur too often. The interval minimum command forces the system to ignore updates that would occur too often.

Currently, the DynDNS.org policy is that updates can not be made more often than once every 10 minutes. This policy is subject to change in the future. The interval minimum command helps to guarantee that updates will not be sent too often.

Command History

Release

Modification

12.4

This command was introduced.

Examples

The following example shows how to configure the minimum interval so that updates would not be sent to DynDNS.org any more often than once every 15 minutes.

!
 ip ddns update method my test
 interval minimum 0 0 15 0
 http
 add  http://test:test@members.dyndns.org/nic/update?system=dyndns&hostname=myhostname&
 myip=10.10.10 .1 

Related Commands

Command

Description

ddns

Specifies DDNS as the update method for A and PTR RRs.

host (host-list)

Specifies a list of hosts that will receive DDNS updates of A and PTR RRs.

http

Specifies HTTP as the update method for A and PTR RRs.

internal

Specifies the internal Cisco IOS cache is used for DDNS udpates of A and PTR RRs.

interval maximum

Specifies a maximum interval at which DDNS updates of A and pointer PTR Resource RRs occur.

ip ddns update hostname

Enables a host to be used for DDNS updates of A and PTR RRs.

ip ddns update method

Enables DDNS as the update method and assigns a method name.

ip dhcp client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp-client update dns

Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client.

ip dhcp update dns

Enables DDNS updates of A and PTR RRs for most address pools.

ip host-list

Specifies a list of hosts that will receive DDNS updates of A and PTR RRs.

show ip ddns update

Displays information about the DDNS updates.

show ip ddns update method

Displays information about the DDNS update method.

show ip host-list

Displays the assigned hosts in a list.

update dns

Dynamically updates a DNS with A and PTR RRs for some address pools.

ip address

To set a primary or secondary IP address for an interface, use the ip address command in interface configuration mode. To remove an IP address or disable IP processing, use the noform of this command.

ip address ip-address mask [ secondary [ vrf vrf-name] ]
no ip address ip-address mask [ secondary [ vrf vrf-name] ]

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.

Note    If the secondary address is used for a VRF table configuration with the vrf keyword, the vrf keyword must be specified also.

vrf

(Optional) Name of the VRF table. The vrf-name argument specifies the VRF name of the ingress interface.

Command Default

No IP address is defined for the interface.

Command Modes

Interface configuration (config-if)

Command History

Release

Modification

10.0

This command was introduced.

12.2(28)SB

The vrf keyword and vrf-name argument were introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

Support for IPv6 was added.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

12.2(33)SB

This command was integrated into Cisco IOS Release 12.2(33)SB.

12.2(33)SCB

This command was integrated into Cisco IOS Release 12.2(33)SCB.

Cisco IOS XE Release 2.1

This command was introduced on Cisco ASR 1000 Series Routers.

15.1(1)S

This command was integrated into Cisco IOS Release 15.1(1)S.

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 crbcommand.

Examples

In the following example, 192.108.1.27 is the primary address and 192.31.7.17 and 192.31.8.17 are secondary addresses for Ethernet interface 0:

interface ethernet 0
 ip address 192.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

In the following example, Ethernet interface 0/1 is configured to automatically classify the source IP address in the VRF table vrf1:

interface ethernet 0/1
 ip address 10.108.1.27 255.255.255.0
 ip address 10.31.7.17 255.255.255.0 secondary vrf vrf1
 ip vrf autoclassify source

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 vrf autoclassify

Enables VRF autoclassify on a source interface.

match ip source

Specifies a source IP address to match to required route maps that have been set up based on VRF connected routes.

route-map

Defines the conditions for redistributing routes from one routing protocol into another, or to enable policy routing.

set vrf

Enables VPN VRF selection within a route map for policy-based routing VRF selection.

show ip arp

Displays the ARP cache, in which SLIP addresses appear as permanent ARP table entries.

show ip interface

Displays the usability status of interfaces configured for IP.

show route-map

Displays static and dynamic route maps.

ip address dhcp

To acquire an IP address on an interface from the DHCP, use the ip address dhcpcommand in interface configuration mode. To remove any address that was acquired, use the no form of this command.

ip address dhcp [ client-id interface-type number] [ hostname hostname]
no ip address dhcp [ client-id interface-type number] [ hostname hostname]

Syntax Description

client-id

(Optional) Specifies the client identifier. By default, the client identifier is an ASCII value. The client-id interface-type numberoption sets the client identifier to the hexadecimal MAC address of the named interface.

interface-type

(Optional) Interface type. For more information, use the question mark (?) online help function.

number

(Optional) Interface or subinterface number. For more information about the numbering syntax for your networking device, use the question mark (?) online help function.

hostname

(Optional) Specifies the hostname.

hostname

(Optional) Name of the host to be placed in the DHCP option 12 field. This name need not be the same as the hostname entered in global configuration mode.

Command Default

The hostname is the globally configured hostname of the router. The client identifier is an ASCII value.

Command Modes

Interface configuration (config-if)

Command History

Release

Modification

12.1(2)T

This command was introduced.

12.1(3)T

This command was modified. The client-idkeyword and interface-type numberargument were added.

12.2(3)

This command was modified. The hostnamekeyword and hostnameargument were added. The behavior of the client-id interface-type numberoption changed. See the “Usage Guidelines” section for details.

12.2(8)T

This command was modified. The command was expanded for use on PPP over ATM (PPPoA) interfaces and certain ATM interfaces.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.1(3)T

This command was modified. Support was provided on the tunnel interface.

Usage Guidelines


Note


Prior to Cisco IOS Release 12.2(8)T, the ip address dhcp command could be used only on Ethernet interfaces.

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 hostname and client identifier that is the MAC address of the interface. The most typical usage of the ip address dhcp client-id interface-type number hostname hostname command is when interface-typeis the Ethernet interface where the command is configured and interface-type numberis the hostname 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-type numberoption 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 allows the change of the fixed ASCII value for the client identifier. After Release 12.2(3), the optional client-id keyword forces 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 (hostname option) is included in the DISCOVER message. By default, the hostname specified in option 12 will be the globally configured hostname of the router. However, you can use the ip address dhcp hostname hostname command to place a different name in the DHCP option 12 field than the globally configured hostname of the router.

The no ip address dhcp command removes 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. The table below shows the possible configuration methods and the information placed in the DISCOVER message for each method.

Table 2 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 hostname of the router in the option 12 field.

ip address dhcp hostname hostname

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 hostname 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 hostname of the router in the option 12 field.

ip address dhcp client-id ethernet 1 hostname hostname

The DISCOVER message contains the MAC address of the Ethernet 1 interface in the client ID field and contains hostname in the option 12 field.

Examples

In the examples that follow, the command ip address dhcp is entered for 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 abc in the option 12 field.

hostname abc
!
interface Ethernet 1
 ip address dhcp

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 def in the option 12 field.

hostname abc
!
interface Ethernet 1
 ip address dhcp hostname def

The DISCOVER message sent by a router configured as shown in the following example would contain the MAC address of Ethernet interface 1 in the client-id field, and the value abc in the option 12 field.

hostname abc
!
interface Ethernet 1
 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 Ethernet interface 1 in the client-id field, and the value def in the option 12 field.

hostname abc
!
interface Ethernet 1
 ip address dhcp client-id Ethernet 1 hostname def

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 Dynamic Host Configuration Protocol (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.

Command Default

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:

ip dhcp pool abc
  import all
  origin ipcp
!
interface Ethernet 2
  ip address pool abc

Related Commands

Command

Description

show ip interface

Displays the usability status of interfaces configured for IP.

ip arp entry learn

To specify the maximum number of learned Address Resolution Protocol (ARP) entries, use the ip arp entry learn command in global configuration mode. To return to the default settings, use the no form of this command.

ip arp entry learn max-limit
no ip arp entry learn max-limit

Syntax Description

max-limit

The maximum number of learned ARP entries; valid values are from 1 to 512000.

Command Default

No maximum number of learned ARP entries is defined.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(33)SRD3

This command was introduced to support the Cisco 7600 router.

Usage Guidelines

The ip arp entry learn command is available on the Cisco 7600 series routers, which can support a maximum limit of learned ARP entries of 256,000. If a memory card is installed on the router the maximum limit is extended to 512,000.

When the number of ARP entries that can be created by the system is not limited, memory exhaustion can cause system instability. The ip arp entry learn command overcomes this problem by defining a maximum number of learned ARP entries.

The limit is not enforced on nonlearned entries. Upon reaching the learn ARP entry threshold limit, or 80 percent of the configured maximum limit, the system will generate a syslog message with a priority set to Level 3 (LOG_NOTICE). Upon reaching the configured maximum limit, the system starts discarding newly learned ARP entries and generates a syslog message. The priority will be set to Level 3 (LOG_NOTICE). The system administrator will have to take appropriate action.

A syslog message is also generated when the number of learned ARP entries in the ARP table decreases from the maximum configured limit to the permit threshold limit, or 95 percent of the maximum configured limit to notify the system administrator that the ARP table is back to normal operation.

The default behavior of the system is not to enforce a maximum limit of learned ARP entries on the system.

When a user tries to configure a maximum limit value for the number of ARP entries that is lower than the current number of ARP entries in the system, the configuration will be rejected with an error message.

The following example configures a maximum limit of the number of learned ARP entries of 512,000:

Router# configure terminal
Router(config)# ip arp entry learn 512000

Related Commands

Command

Description

show arp summary

Displays the total number of ARP table entries, the number of ARP table entries for each ARP entry mode, and the number of ARP table entries for each interface on the router.