|
This chapter describes the function and displays the syntax for IP addressing commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Network Protocols Command Reference, Part 1.
To add a permanent entry in the Address Resolution Protocol (ARP) cache, use the arp global configuration command. To remove an entry from the ARP cache, use the no form of this command.
arp ip-address hardware-address type [alias]ip-address | IP address in four-part dotted-decimal format corresponding to the local data link address. |
hardware-address | Local data link address (a 48-bit address). |
type | Encapsulation description. For Ethernet interfaces, this is typically the arpa keyword. For Fiber Distributed Data Interface (FDDI) and Token Ring interfaces, this is always snap. |
alias | (Optional) Indicates that the Cisco IOS software should respond to ARP requests as if it were the owner of the specified address. |
To control the interface-specific handling of IP address resolution into 48-bit Ethernet, FDDI, and Token Ring hardware addresses, use the arp interface configuration command. To disable an encapsulation type, use the no form of this command.
arp {arpa | probe | snap}arpa | Standard Ethernet-style ARP (RFC 826). |
probe | HP Probe protocol for IEEE-802.3 networks. |
snap | ARP packets conforming to RFC 1042. |
To configure how long an entry remains in the ARP cache, use the arp timeout interface configuration command. To restore the default value, use the no form of this command.
arp timeout secondsseconds | Time (in seconds) that an entry remains in the ARP cache. A value of zero means that entries are never cleared from the cache. |
To delete all dynamic entries from the ARP cache, to clear the fast-switching cache, and to clear the IP route cache, use the clear arp-cache EXEC command.
clear arp-cacheTo delete entries from the host-name-and-address cache, use the clear host EXEC command.
clear host {name | *}name | Particular host entry to remove. |
* | Removes all entries. |
To clear dynamic Network Address Translation (NAT) translations from the translation table, use the clear ip nat translation EXEC command.
clear ip nat translation {* | [inside global-ip local-ip] [outside local-ip global-ip]}* | Clears all dynamic translations. |
inside | Clears the inside translations containing the specified global-ip and local-ip addresses. |
global-ip | When used without the arguments protocol, global-port, and local-port, clears a simple translation that also contains the specified local-ip address. When used with the arguments protocol, global-port, and local-port, clears an extended translation. |
local-ip | (Optional) Clears an entry that contains this local IP address and the specified global-ip address. |
outside | Clears the outside translations containing the specified global-ip and local-ip addresses. |
protocol | (Optional) Clears an entry that contains this protocol and the specified global-ip address, local-ip address, global-port, and local-port. |
global-port | (Optional) Clears an entry that contains this global-port and the specified protocol, global-ip address, local-ip address, and local-port. |
local-port | (Optional) Clears an entry that contains this local-port and the specified protocol, global-ip address, local-ip address, and global-port. |
To clear all dynamic entries from the Next Hop Resolution Protocol (NHRP) cache, use the clear ip nhrp EXEC command.
clear ip nhrpTo delete routes from the IP routing table, use the clear ip route EXEC command.
clear ip route {network [mask] | *}network | Network or subnet address to remove. |
mask | (Optional) Subnet address to remove. |
* | Removes all routing table entries. |
To set a primary or secondary IP address for an interface, use the ip address interface configuration command. To remove an IP address or disable IP processing, use the no form of this command.
ip address ip-address mask [secondary]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. |
To define a broadcast address for an interface, use the ip broadcast-address interface configuration command. To restore the default IP broadcast address, use the no form of this command.
ip broadcast-address [ip-address]ip-address | (Optional) IP broadcast address for a network. |
At times the router might receive packets destined for a subnet of a network that has no network default route. To have the Cisco IOS software forward such packets to the best supernet route possible, use the ip classless global configuration command. To disable this feature, use the no form of this command.
ip classlessTo define a default gateway (router) when IP routing is disabled, use the ip default-gateway global configuration command. To disable this function, use the no form of this command.
ip default-gateway ip-addressip-address | IP address of the router. |
To enable the translation of directed broadcast to physical broadcasts, use the ip directed-broadcast interface configuration command. To disable this function, use the no form of this command.
ip directed-broadcast [access-list-number]access-list-number | (Optional) Number of the access list. If specified, a broadcast must pass the access list to be forwarded. If not specified, all broadcasts are forwarded. |
To define a list of default domain names to complete unqualified host names, use the ip domain-list global configuration command. To delete a name from a list, use the no form of this command.
ip domain-list namename | Domain name. Do not include the initial period that separates an unqualified name from the domain name. |
To enable the IP Domain Naming System (DNS)-based host name-to-address translation, use the ip domain-lookup global configuration command. To disable the DNS, use the no form of this command.
ip domain-lookupTo allow DNS queries for Connectionless Network System (CLNS) addresses, use the ip domain-lookup nsap global configuration command. To disable this feature, use the no form of this command.
ip domain-lookup nsapTo define a default domain name that the Cisco IOS software uses to complete unqualified host names (names without a dotted-decimal domain name), use the ip domain-name global configuration command. To disable use of the DNS, use the no form of this command.
ip domain-name namename | Default domain name used to complete unqualified host names. Do not include the initial period that separates an unqualified name from the domain name. |
To specify which protocols and ports the router forwards when forwarding broadcast packets, use the ip forward-protocol global configuration command. To remove a protocol or port, use the no form of this command.
ip forward-protocol {udp [port] | nd | sdns}udp | Forward User Datagram Protocol (UDP) datagrams. See the "Default" section below for a list of port numbers forwarded by default. |
port | (Optional) Destination port that controls which UDP services are forwarded. |
nd | Forward Network Disk (ND) datagrams. This protocol is used by older diskless Sun workstations. |
sdns | Secure Data Network Service. |
To forward any broadcasts including local subnet broadcasts, use the ip forward-protocol any-local-broadcast global configuration command. To disable this type of forwarding, use the no form of this command.
ip forward-protocol any-local-broadcastTo permit IP broadcasts to be flooded throughout the internetwork in a controlled fashion, use the ip forward-protocol spanning-tree global configuration command. To disable the flooding of IP broadcasts, use the no form of this command.
ip forward-protocol spanning-treeTo speed up flooding of User Datagram Protocol (UDP) datagrams using the spanning-tree algorithm, use the ip forward-protocol turbo-flood global configuration command. To disable this feature, use the no form of this command.
ip forward-protocol turbo-floodTo have the Cisco IOS software forward User Datagram Protocol (UDP) broadcasts, including BOOTP, received on an interface, use the ip helper-address interface configuration command. To disable the forwarding of broadcast packets to specific addresses, use the no form of this command.
ip helper-address addressaddress | Destination broadcast or host address to be used when forwarding UDP broadcasts. There can be more than one helper address per interface. |
To define a static host name-to-address mapping in the host cache, use the ip host global configuration command. To remove the name-to-address mapping, use the no form of this command.
ip host name [tcp-port-number] address1 [address2...address8]name | Name of the host. The first character can be either a letter or a number. If you use a number, the operations you can perform are limited. |
tcp-port-number | (Optional) TCP port number to connect to when using the defined host name in conjunction with an EXEC connect or Telnet command. The default is Telnet (port 23). |
address1 | Associated IP address. |
address2...address8 | (Optional) Additional associated IP address. You can bind up to eight addresses to a host name. |
To enter into the host table the host name of an HP host to be used for HP Probe Proxy service, use the ip hp-host global configuration command. To remove a host name, use the no form of this command.
ip hp-host hostname ip-addresshostname | Name of the host. |
ip-address | IP address of the host. |
To enable ICMP Router Discovery Protocol (IRDP) processing on an interface, use the ip irdp interface configuration command. To disable IRDP routing, use the no form of this command.
ip irdp [multicast | holdtime seconds | maxadvertinterval seconds | minadvertintervalmulticast | (Optional) Use the multicast address (224.0.0.1) instead of IP broadcasts. |
holdtime seconds | (Optional) Length of time in seconds advertisements are held valid. Default is three times the maxadvertinterval value. Must be greater than maxadvertinterval and cannot be greater than 9000 seconds. |
maxadvertinterval seconds | (Optional) Maximum interval in seconds between advertisements. The default is 600 seconds. |
minadvertinterval seconds | (Optional) Minimum interval in seconds between advertisements. The default is 0.75 times the maxadvertinterval. If you change the maxadvertinterval value, this value defaults to three-quarters of the new value. |
preference number | (Optional) Preference value. The allowed range is -231 to 231. The default is 0. A higher value increases the router's preference level. You can modify a particular router so that it will be the preferred router to which others home. |
address address [number] | (Optional) IP address (address) to proxy-advertise, and optionally, its preference value (number). |
To enable local-area mobility, use the ip mobile arp interface configuration command. To disable local-area mobility, use the no form of this command.
ip mobile arp [timers keepalive hold-time] [access-group access-list-number | name]timers | (Optional) Indicates that you are setting local-area mobility timers. |
keepalive | (Optional) Frequency, in seconds, at which the Cisco IOS software sends unicast ARP messages to a relocated host to verify that the host is present and has not moved. The default keepalive time is 300 seconds (5 minutes). |
hold-time | (Optional) Hold time, in seconds. This is the length of time the software considers that a relocated host is present without receiving some type of ARP broadcast or unicast from the host. Normally, the hold time should be at least three times greater than the keepalive time. The default hold time is 900 seconds (15 minutes). |
access-group | (Optional) Indicates that you are applying an access list. This access list applies only to local-area mobility. |
access-list-number | (Optional) Number of a standard IP access list. It is a decimal number from 1 to 99. Only hosts with addresses permitted by this access list are accepted for local-area mobility. |
name | (Optional) Name of an IP access list. The name cannot contain a space or quotation mark, and must begin with an alphabetic character to avoid ambiguity with numbered access lists. |
To specify the address of one or more name servers to use for name and address resolution, use the ip name-server global configuration command. To remove the addresses specified, use the no form of this command.
ip name-server server-address1 [[server-address2]...server-address6]server-address1 | IP addresses of name server. |
server-address2...server-address6 | (Optional) IP addresses of additional name servers (a maximum of six name servers). |
To designate that traffic originating from or destined for the interface is subject to Network Address Translation (NAT), use the ip nat interface configuration command. To prevent the interface from being able to translate, use the no form of this command.
ip nat {inside | outside}inside | Indicates the interface is connected to the inside network (the network subject to NAT translation). |
outside | Indicates the interface is connected to the outside network. |
To enable Network Address Translation (NAT) of the inside destination address, use the ip nat inside destination global configuration command. To remove the dynamic association to a pool, use the no form of this command.
ip nat inside destination list {access-list-number | name} pool namelist access-list-number | Standard IP access list number. Packets with destination addresses that pass the access list are translated using global addresses from the named pool. |
list name | Name of a standard IP access list. Packets with destination addresses that pass the access list are translated using global addresses from the named pool. |
pool name | Name of the pool from which global IP addresses are allocated during dynamic translation. |
To enable Network Address Translation (NAT) of the inside source address, use the ip nat inside source global configuration command. To remove the static translation or remove the dynamic association to a pool, use the no form of this command.
ip nat inside source {list {access-list-number | name} pool name [overload] | static local-iplist access-list-number | Standard IP access list number. Packets with source addresses that pass the access list are dynamically translated using global addresses from the named pool. |
list name | Name of a standard IP access list. Packets with source addresses that pass the access list are dynamically translated using global addresses from the named pool. |
pool name | Name of the pool from which global IP addresses are allocated dynamically. |
overload | (Optional) Enables the router to use one global address for many local addresses. When overloading is configured, each inside host's TCP or UDP port number distinguishes between the multiple conversations using the same local IP address. |
static local-ip | Sets up a single static translation; this argument establishes the local IP address assigned to a host on the inside network. The address could be randomly chosen, allocated from RFC 1918, or obsolete. |
global-ip | Sets up a single static translation; this argument establishes the globally unique IP address of an inside host as it appears to the outside world. |
To enable Network Address Translation (NAT) of the outside source address, use the ip nat outside source global configuration command. To remove the static entry or the dynamic association, use the no form of this command.
ip nat outside source {list {access-list-number | name} pool name | static global-ip local-ip}list access-list-number | Standard IP access list number. Packets with source addresses that pass the access list are translated using global addresses from the named pool. |
list name | Name of a standard IP access list. Packets with source addresses that pass the access list are translated using global addresses from the named pool. |
pool name | Name of the pool from which global IP addresses are allocated. |
static global-ip | Sets up a single static translation. This argument establishes the globally unique IP address assigned to a host on the outside network by its owner. It was allocated from globally routable network space. |
local-ip | Sets up a single static translation. This argument establishes the local IP address of an outside host as it appears to the inside world. The address was allocated from address space routable on the inside (RFC 1918, perhaps). |
To define a pool of IP addresses for Network Address Translation (NAT), use the ip nat pool global configuration command. To remove one or more addresses from the pool, use the no form of this command.
ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}name | Name of the pool. |
start-ip | Starting IP address that defines the range of addresses in the address pool. |
end-ip | Ending IP address that defines the range of addresses in the address pool. |
netmask netmask | Network mask that indicates which address bits belong to the network and subnetwork fields and which bits belong to the host field. Specify the netmask of the network to which the pool addresses belong. |
prefix-length prefix-length | Number that indicates how many bits of the netmask are ones (how many bits of the address indicate network). Specify the netmask of the network to which the pool addresses belong. |
type rotary | (Optional) Indicates that the range of address in the address pool identify real, inside hosts among which TCP load distribution will occur. |
To change the amount of time after which Network Address Translation (NAT) translations time out, use the ip nat translation global configuration command. To disable the timeout, use the no form of this command.
ip nat translation {timeout | udp-timeout | dns-timeout | tcp-timeout | finrst-timeout}timeout | Specifies that the timeout value applies to dynamic translations except for overload translations. Default is 86400 seconds (24 hours). |
udp-timeout | Specifies that the timeout value applies to the UDP port. Default is 300 seconds (5 minutes). |
dns-timeout | Specifies that the timeout value applies to connections to the Domain Naming System (DNS). Default is 60 seconds. |
tcp-timeout | Specifies that the timeout value applies to the TCP port. Default is 86400 seconds (24 hours). |
finrst-timeout | Specifies that the timeout value applies to Finish and Reset TCP packets, which terminate a connection. Default is 60 seconds. |
seconds | Number of seconds after which the specified port translation times out. Default values are listed in the Default section. |
To specify the format in which netmasks are displayed in show command output, use the ip netmask-format line configuration command. To restore the default display format, use the no form of this command.
ip netmask-format {bitcount | decimal | hexadecimal}bitcount | Addresses are followed by a slash and the total number of bits in the netmask. For example, 131.108.11.0/24 indicates that the netmask is 24 bits. |
decimal | Network masks are displayed in dotted decimal notation (for example, 255.255.255.0). |
hexadecimal | Network masks are displayed in hexadecimal format, as indicated by the leading 0X (for example, 0XFFFFFF00). |
To configure the authentication string for an interface using Next Hop Resolution Protocol (NHRP), use the ip nhrp authentication interface configuration command. To remove the authentication string, use the no form of this command.
ip nhrp authentication stringstring | Authentication string configured for the source and destination stations that controls whether NHRP stations allow intercommunication. The string can be up to 8 characters long. |
To change the number of seconds that NHRP nonbroadcast, multiaccess (NBMA) addresses are advertised as valid in authoritative NHRP responses, use the ip nhrp holdtime interface configuration command. To restore the default value, use the no form of this command.
ip nhrp holdtime seconds-positive [seconds-negative]seconds-positive | Time in seconds that NBMA addresses are advertised as valid in positive authoritative NHRP responses. |
seconds-negative | (Optional) Time in seconds that NBMA addresses are advertised as valid in negative authoritative NHRP responses. |
To control which IP packets can trigger sending a Next Hop Resolution Protocol (NHRP) Request, use the ip nhrp interest interface configuration command. To restore the default value, use the no form of this command.
ip nhrp interest access-list-numberaccess-list-number | Standard or extended IP access list number in the range 1 to 199. |
To statically configure the IP-to-NBMA address mapping of IP destinations connected to a nonbroadcast, multiaccess (NBMA) network, use the ip nhrp map interface configuration command. To remove the static entry from NHRP cache, use the no form of this command.
ip nhrp map ip-address nbma-addressip-address | IP address of the destinations reachable through the NBMA network. This address is mapped to the NBMA address. |
nbma-address | NBMA address that is directly reachable through the NBMA network. The address format varies depending on the medium you are using. For example, ATM has an NSAP address, Ethernet has a MAC address, and SMDS has an E.164 address. This address is mapped to the IP address. |
To configure NBMA addresses used as destinations for broadcast or multicast packets to be sent over a tunnel network, use the ip nhrp map multicast interface configuration command. To remove the destinations, use the no form of this command.
ip nhrp map multicast nbma-addressnbma-address | Nonbroadcast, multiaccess (NBMA) address which is directly reachable through the NBMA network. The address format varies depending on the medium you are using. |
To change the maximum frequency at which NHRP packets can be sent, use the ip nhrp max-send interface configuration command. To restore this frequency to the default value, use the no form of this command.
ip nhrp max-send pkt-count every intervalpkt-count | Number of packets which can be transmitted in the range from 1 to 65535. Default is 5 packets. |
every interval | Time (in seconds) in the range from 10 to 65535. Default is 10 seconds. |
To enable the Next Hop Resolution Protocol (NHRP) on an interface, use the ip nhrp network-id interface configuration command. To disable NHRP on the interface, use the no form of this command.
ip nhrp network-id numbernumber | Globally unique, 32-bit network identifier for a nonbroadcast, multiaccess (NBMA) network. The range is 1 to 4294967295. |
To specify the address of one or more NHRP Next Hop Servers, use the ip nhrp nhs interface configuration command. To remove the address, use the no form of this command.
ip nhrp nhs nhs-address [net-address [netmask]]nhs-address | Address of the Next Hop Server being specified. |
net-address | (Optional) IP address of a network served by the Next Hop Server. |
netmask | (Optional) IP network mask to be associated with the net IP address. The net IP address is logically ANDed with the mask. |
To re-enable the use of forward record and reverse record options in NHRP Request and Reply packets, use the ip nhrp record interface configuration command. To suppress the use of such options, use the no form of this command.
ip nhrp recordTo designate which interface's primary IP address the Next Hop Server will use in NHRP Reply packets when the NHRP requestor uses the Responder Address option, use the ip nhrp responder interface configuration command. To remove the designation, use the no form of this command.
ip nhrp responder type numbertype | Interface type whose primary IP address is used when a Next Hop Server complies with a Responder Address option (for example, serial, tunnel). |
number | Interface number whose primary IP address is used when a Next Hop Server complies with a Responder Address option. |
To configure the software so that NHRP is deferred until the system has attempted to send data traffic to a particular destination multiple times, use the ip nhrp use interface configuration command. To restore the default value, use the no form of this command.
ip nhrp use usage-countusage-count | Packet count in the range from 1 to 65535. Default is 1. |
To enable the HP Probe Proxy support, which allows the Cisco IOS software to respond to HP Probe Proxy Name requests, use the ip probe proxy interface configuration command. To disable HP Probe Proxy, use the no form of this command.
ip probe proxyTo enable proxy ARP on an interface, use the ip proxy-arp interface configuration command. To disable proxy ARP on the interface, use the no form of this command.
ip proxy-arpTo enable the sending of redirect messages if the Cisco IOS software is forced to resend a packet through the same interface on which it was received, use the ip redirects interface configuration command. To disable the sending of redirect messages, use the no form of this command.
ip redirectsTo enable IP routing, use the ip routing global configuration command. To disable IP routing, use the no form of this command.
ip routingTo enable the use of subnet zero for interface addresses and routing updates, use the ip subnet-zero global configuration command. To restore the default, use the no form of this command.
ip subnet-zeroTo enable IP processing on a serial interface without assigning an explicit IP address to the interface, use the ip unnumbered interface configuration command. To disable the IP processing on the interface, use the no form of this command.
ip unnumbered type numbertype number | Type and number of another interface on which the router has an assigned IP address. It cannot be another unnumbered interface. |
To check host reachability and network connectivity, use the ping (IP packet internet groper function) privileged EXEC command.
ping [protocol] {host | address}protocol | (Optional) Protocol keyword. The default is IP. |
host | Host name of system to ping. |
address | IP address of system to ping. |
To check host reachability and network connectivity, use the ping (IP packet internet groper function) user EXEC command.
ping [protocol] {host | address}protocol | (Optional) Protocol keyword. The default is IP. |
host | Host name of system to ping. |
address | IP address of system to ping. |
To display the entries in the ARP table, use the show arp privileged EXEC command.
show arpTo display the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of host names and addresses, use the show hosts EXEC command.
show hostsTo display the IP addresses mapped to TCP ports (aliases) and SLIP addresses, which are treated similarly to aliases, use the show ip aliases EXEC command.
show ip aliasesTo display the Address Resolution Protocol (ARP) cache, where SLIP addresses appear as permanent ARP table entries, use the show ip arp EXEC command.
show ip arp [ip-address] [hostname] [mac-address] [type number]ip-address | (Optional) ARP entries matching this IP address are displayed. |
hostname | (Optional) Host name. |
mac-address | (Optional) 48-bit MAC address. |
type number | (Optional) ARP entries learned via this interface type and number are displayed. |
To display the usability status of interfaces configured for IP, use the show ip interface EXEC command.
show ip interface [type number]type | (Optional) Interface type. |
number | (Optional) Interface number. |
To display IRDP values, use the show ip irdp EXEC command.
show ip irdpTo display the masks used for network addresses and the number of subnets using each mask, use the show ip masks EXEC command.
show ip masks addressaddress | Network address for which a mask is required. |
To display Network Address Translation (NAT) statistics, use the show ip nat statistics EXEC command.
show ip nat statisticsTo display active Network Address Translation (NAT) translations, use the show ip nat translations EXEC command.
show ip nat translations [verbose]verbose | (Optional) Displays additional information for each translation table entry, including how long ago the entry was created and used. |
To display the Next Hop Resolution Protocol (NHRP) cache, use the show ip nhrp EXEC command.
show ip nhrp [dynamic | static] [type number]dynamic | (Optional) Displays only the dynamic (learned) IP-to-NBMA address cache entries. |
static | (Optional) Displays only the static IP-to-NBMA address entries in the cache (configured through the ip nhrp map command). |
type | (Optional) Interface type about which to display the NHRP cache (for example, atm, tunnel). |
number | (Optional) Interface number about which to display the NHRP cache. |
To display Next Hop Resolution Protocol (NHRP) traffic statistics, use the show ip nhrp traffic EXEC command.
show ip nhrp trafficTo display the address of a default gateway (router) and the address of hosts for which a redirect has been received, use the show ip redirects EXEC command.
show ip redirectsTo specify the format in which netmasks are displayed in show command output, use the term ip netmask-format EXEC command. To restore the default display format, use the no form of this command.
term ip netmask-format {bitcount | decimal | hexadecimal}bitcount | Addresses are followed by a slash and the total number of bits in the netmask. For example, 131.108.11.55/24 indicates that the netmask is 24 bits. |
decimal | Netmasks are displayed in dotted decimal notation (for example, 255.255.255.0). |
hexadecimal | Netmasks are displayed in hexadecimal format, as indicated by the leading 0X (for example, 0XFFFFFF00). |
To discover the routes the packets follow when traveling to their destination from the router, use the trace privileged EXEC command.
trace [destination]destination | (Optional) Destination address or host name on the command line. The default parameters for the appropriate protocol are assumed and the tracing action begins. |
To discover the routes the router packets follow when traveling to their destination, use the trace user EXEC command.
trace ip destinationdestination | Destination address or host name on the command line. The default parameters for the appropriate protocol are assumed and the tracing action begins. |
To set the encapsulation mode for the tunnel interface, use the tunnel mode interface configuration command. To set to the default, use the no form of this command.
tunnel mode {aurp | cayman | dvmrp | eon | gre ip [multipoint] | nos}aurp | AppleTalk Update-Based Routing Protocol (AURP). |
cayman | Cayman TunnelTalk AppleTalk encapsulation. |
dvmrp | Distance Vector Multicast Routing Protocol. |
eon | EON compatible CLNS tunnel. |
gre ip | Generic routing encapsulation (GRE) protocol over IP. |
multipoint | (Optional) Enables a GRE tunnel to be used in a multipoint fashion. Can be used with the gre ip keyword only, and requires the use of the tunnel key command. |
nos | KA9Q/NOS compatible IP over IP. |
|