Chapter 7 Cisco

  • Upload
    onakis

  • View
    229

  • Download
    0

Embed Size (px)

Citation preview

  • 8/9/2019 Chapter 7 Cisco

    1/18

    Chapter 7 Accessing the WAN : IP Addressing Services

    The Internet and IP-related technologies have experienced rapid growth. One reason for the growth hasbeen due in part to the flexibility of the original design. However, that design did not anticipate theInternet's popularity and the resulting demand for IP addresses. For example, every host and device onthe Internet requires a unique IP version 4 (IPv4) address. Because of the dramatic growth, the number ofavailable IP addresses is quickly running out.

    To cope with the depletion of IP addresses, several short-term solutions were developed. Two short-termsolutions are private addresses and Network Address Translation (NAT).

    An inside host typically receives its IP address, subnet mask, default gateway IP address, DNS server IPaddress, and other information from a Dynamic Host Configuration Protocol (DHCP) server. Instead ofproviding inside hosts with valid Internet IP addresses, the DHCP server usually provides IP addressesfrom a private pool of addresses. The problem is that these hosts may still require valid IP addresses toaccess Internet resources. This is where NAT comes in.

    NAT enables inside network hosts to borrow a legitimate Internet IP address while accessing Internetresources. When the requested traffic returns, the legitimate IP address is repurposed and available forthe next Internet request by an inside host. Using NAT, network administrators only need one or a few IP

    addresses for the router to provide to the hosts, instead of one unique IP address for every client joiningthe network. Although it sounds inefficient, the process is actually very efficient, because host trafficoccurs very quickly.

    Although private addresses with DHCP and NAT have helped reduce the need for IP addresses, it isestimated that we will run out of unique IPv4 addresses by 2010. For this reason, in the mid-1990s, theIETF requested proposals for a new IP addressing scheme. The IP Next Generation (IPng) working groupresponded. By 1996, the IETF started releasing a number of RFCs defining IPv6.

    The main feature of IPv6 that is driving adoption today is the larger address space: addresses in IPv6 are128 bits long versus 32 bits in IPv4.

    This chapter describes how to implement DHCP, NAT, and IPv6 on enterprise networks.

    What is DHCP?

    Every device that connects to a network needs an IP address. Network administrators assign static IPaddresses to routers, servers, and other network devices whose locations (physical and logical) are notlikely to change. Administrators enter static IP addresses manually when they configure devices to jointhe network. Static addresses also enable administrators to manage those devices remotely.

  • 8/9/2019 Chapter 7 Cisco

    2/18

    However, computers in an organization often changelocations, physically and logically. Administrators areunable to keep up with having to assign new IPaddresses every time an employee moves to a differentoffice or cubicle. Desktop clients do not require a staticaddress. Instead, a workstation can use any addresswithin a range of addresses. This range is typically withinan IP subnet. A workstation within a specific subnet canbe assigned any address within a specified range. Otheritems such as the subnet mask, default gateway, andDomain Name System (DNS) server are assigned avalue which is common either to that subnet or entireadministrated network. For example, all hosts within thesame subnet will receive different host IP addresses, butwill receive the same subnet mask and default gatewayIP address."

    Recall from CCNA Exploration: Network Fundamentalsthat DHCP makes the process of assigning new IP

    addresses almost transparent. DHCP assigns IPaddresses and other important network configurationinformation dynamically. Because desktop clientstypically make up the bulk of network nodes, DHCP is anextremely useful and timesaving tool for networkadministrators. RFC 2131 describes DHCP.

    Administrators typically prefer a network server to offer DHCP services, because these solutions arescalable and relatively easy to manage. However, in a small branch or SOHO location, a Cisco router canbe configured to provide DHCP services without the need for an expensive dedicated server. A Cisco IOSfeature set called Easy IP offers an optional, full-featured DHCP server.

    DHCP Operation

    Providing IP addresses to clients is the most fundamental task performed by a DHCP server. DHCPincludes three different address allocation mechanisms to provide flexibility when assigning IP addresses:

    Manual Allocation: The administrator assigns a pre-allocated IP address to the client and DHCPonly communicates the IP address to the device.

    Automatic Allocation: DHCP automatically assigns a static IP address permanently to a device,selecting it from a pool of available addresses. There is no lease and the address is permanentlyassigned to a device.

    Dynamic Allocation: DHCP automatically dynamically assigns, or leases, an IP address from apool of addresses for a limited period of time chosen by the server, or until the client tells the

    DHCP server that it no longer needs the address.

    This section focuses on dynamic allocation.

    DHCP works in a client/server mode and operates like any other client/server relationship. When a PCconnects to a DHCP server, the server assigns or leases an IP address to that PC. The PC connects tothe network with that leased IP address until the lease expires. The host must contact the DHCP serverperiodically to extend the lease. This lease mechanism ensures that hosts that move or power off do nothold onto addresses that they do not need. The DHCP server returns these addresses to the addresspool and reallocates them as necessary.

  • 8/9/2019 Chapter 7 Cisco

    3/18

  • 8/9/2019 Chapter 7 Cisco

    4/18

  • 8/9/2019 Chapter 7 Cisco

    5/18

    means that the binding between the MAC address and the IP address must have already beenconfigured in the BOOTP server.

    * DHCP allows for recovery and reallocation of network addresses through a leasing mechanism.Specifically, DHCP defines mechanisms through which clients can be assigned an IP address fora finite lease period. This lease period allows for reassignment of the IP address to another clientlater, or for the client to get another assignment if the client moves to another subnet. Clients mayalso renew leases and keep the same IP address. BOOTP does not use leases. Its clients havereserved IP address which cannot be assigned to any other host.

    * BOOTP provides a limited amount of information to a host. DHCP provides additional IPconfiguration parameters, such as WINS and domain name.

    DHCP Message Format

    The developers of DHCP needed to maintain compatibility with BOOTP and consequently used the sameBOOTP message format. However, because DHCP has more functionality than BOOTP, the DHCPoptions field was added. When communicating with older BOOTP clients, the DHCP options field isignored.

    The figure shows the format of a DHCP message. The fields are as follows:

    Operation Code (OP) - Specifies the general type of message. A value of 1 indicates a requestmessage; a value of 2 is a reply message.

    Hardware Type - Identifies the type of hardware used in the network. For example, 1 is Ethernet,15 is Frame Relay, and 20 is a serial line. These are the same codes used in ARP messages.

    Hardware Address length - 8 bits to specify the length of the address.

    Hops - Set to 0 by a client before transmitting a request and used by relay agents to control theforwarding of DHCP messages.

    Transaction Identifier - 32-bit identification generated by the client to allow it to match up therequest with replies received from DHCP servers.

    Seconds - Number of seconds elapsed since a client began attempting to acquire or renew alease. Busy DHCP servers use this number to prioritize replies when multiple client requests areoutstanding.

    Flags - Only one of the 16 bits is used, which is the broadcast flag. A client that does not know itsIP address when it sends a request, sets the flag to 1. This value tells the DHCP server or relayagent receiving the request that it should send the reply back as a broadcast.

    Client IP Address - The client puts its own IP address in this field if and only if it has a valid IPaddress while in the bound state; otherwise, it sets the field to 0. The client can only use this field

    when its address is actually valid and usable, not during the process of acquiring an address.

    Your IP Address - IP address that the server assigns to the client.

    Server IP Address - Address of the server that the client should use for the next step in thebootstrap process, which may or may not be the server sending this reply. The sending serveralways includes its own IP address in a special field called the Server Identifier DHCP option.Gateway IP Address - Routes DHCP messages when DHCP relay agents are involved. Thegateway address facilitates communications of DHCP requests and replies between the clientand a server that are on different subnets or networks.

  • 8/9/2019 Chapter 7 Cisco

    6/18

    Client Hardware Address - Specifies the Physical layer of the client.

    Server Name - The server sending a DHCPOFFER or DHCPACK message may optionally put itsname in this field. This can be a simple text nickname or a DNS domain name, such asdhcpserver.netacad.net.

    Boot Filename - Optionally used by a client to request a particular type of boot file in aDHCPDISCOVER message. Used by a server in a DHCPOFFER to fully specify a boot filedirectory and filename.

    Options - Holds DHCP options, including several parameters required for basic DHCP operation.This field is variable in length. Both client and server may use this field.

    DHCP Discovery and Offer Methods

    These figures provide some detail of the packet content of the DHCP discover and offer messages.

    When a client wants to join the network, it requests addressing values from the network DHCP server. If aclient is configured to receive its IP settings dynamically, it transmits a DHCPDISCOVER message on itslocal physical subnet when it boots or senses an active network connection. Because the client has no

    way of knowing the subnet to which it belongs, the DHCPDISCOVER is an IP broadcast (destination IPaddress of 255.255.255.255). The client does not have a configured IP address, so the source IP addressof 0.0.0.0 is used. As you see in the figure, the client IP address (CIADDR), default gateway address(GIADDR), and subnetwork mask are all marked with question marks.

  • 8/9/2019 Chapter 7 Cisco

    7/18

    The DHCP server manages the allocation of the IP addresses and answers configuration requests fromclients.

    When the DHCP server receives the DHCPDISCOVER message, it responds with a DHCPOFFERmessage. This message contains initial configuration information for the client, including the MACaddress of the client, followed by the IP address that the server is offering, the subnet mask, the leaseduration, and the IP address of the DHCP server making the offer. The subnet mask and default gatewayare specified in the options field, subnet mask, and router options, respectively. The DHCPOFFERmessage can be configured to include other information, such as the lease renewal time, domain nameserver, and NetBIOS Name Service (Microsoft Windows Internet Name Service [Microsoft WINS]).

    The server determines the configuration, based on the hardware address of the client as specified in theCHADDR field.

    As shown in the diagram, the DHCP server has responded to the DHCPDISCOVER by assigning valuesto the CIADDR and subnetwork mask.

    Administrators set up DHCP servers to assign addresses from predefined pools. Most DHCP servers alsoallow the administrator to define specifically which client MAC addresses can be serviced andautomatically assign them the same IP address each time.

    DHCP uses User Datagram Protocol (UDP) as its transport protocol. The client sends messages to theserver on port 67. The server sends messages to the client on port 68.

    The client and server acknowledge messages, and the process is complete. The client sets the CIADDRonly when a host is in a bound state, which means that the client has confirmed and is using the IPaddress.

    Configuring a DHCP Server

    Cisco routers running Cisco IOS software provide full support for a router to act as a DHCP server. TheCisco IOS DHCP server assigns and manages IP addresses from specified address pools within therouter to DHCP clients.

    The steps to configure a router as a DHCP server are as follows:

  • 8/9/2019 Chapter 7 Cisco

    8/18

    Step 1. Define a range of addresses that DHCP is not to allocate. These are usually static addressesreserved for the router interface, switch management IP address, servers, and local network printers.

    Configuring DHCP Step 1: Excluding IP Addresses

    R1(config)#ip dhcp excluded-address low-address [high-address]R1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.9R1(config)#ip dhcp excluded-address 192.168.10.254

    Step 2. Create the DHCP pool using the ip dhcp poolcommand.Configuring DHCP Step 2: Configuring a DHCP Pool

    R1(config)#ip dhcp poolpool-name

    R1(config)#ip dhcp pool POOL-NAME-1R1(dhcp-config)#

    Step 3. Configure the specifics of the pool.

    Configuring DHCP Step 3: Specific Tasks

    You should specify the IP addresses that the DHCP server should not assign to clients. Typically, someIP addresses belong to static network devices, such as servers or printers. DHCP should not assign theseIP addresses to other devices. A best practice is to configure excluded addresses in global configurationmode before creating the DHCP pool. This ensures that DHCP does not assign reserved addressesaccidentally. To exclude specific addresses, use the ip dhcp excluded-address command.

    Configuring a DHCP server involves defining a pool of addresses to assign. The ip dhcp poolcommand creates a pool with the specified name and puts the router in DHCP configuration mode, whichis identified by the Router(dhcp-config)# prompt.

    Click the DHCP Tasks button in the figure.

    This figure lists the tasks to complete the DHCP pool configuration. Some of these are optional, whileothers must be configured.

    You must configure the available addresses and specify the subnet network number and mask of theDHCP address pool. Use the network statement to define the range of available addresses.

  • 8/9/2019 Chapter 7 Cisco

    9/18

    You should also define the default gateway or router for the clients to use with the default-routercommand. Typically, the gateway is the LAN interface of the router. One address is required, but you canlist up to eight addresses.

    The next DHCP pool commands are considered optional. For example, you can configure the IP addressof the DNS server that is available to a DHCP client using the dns-servercommand. When configured,one address is required, but up to eight addresses can be listed.

    Other parameters include configuring the duration of the DHCP lease. The default setting is one day, butyou can change this by using the lease command. You can also configure a NetBIOS WINS server that isavailable to a Microsoft DHCP client. Usually, this would be configured in an environment that supportspre-Windows 2000 clients. Because most installations now have clients with newer Windows operatingsystem, this parameter is usually not required.

    DHCP Example!

    R1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.9R1(config)#ip dhcp excluded-address 192.168.10.254R1(config)#ip dhcp pool LAN-POOL-1R1(dhcp-config)#network 192.168.10.0 255.255.255.0

    R1(dhcp-config)#default-router 192.168.10.1R1(dhcp-config)#domain-name span.comR1(dhcp-config)#end

    This figure displays a sample configuration with basic DHCP parameters configured on router R1.

    Disabling DHCP

    The DHCP service is enabled by default on versions of Cisco IOS software that support it. To disable theservice, use the no service dhcp command. Use the service dhcp global configuration commandto re-enable the DHCP server process. Enabling the service has no effect if the parameters are notconfigured.

    Verifying DHCP

    To illustrate how a Cisco router can be configured to provide DHCP services, refer to the figure. PC1 hasnot been powered up and therefore does not have an IP address.

    Router R1 has been configured with the following commands:

    ip dhcp excluded-address 192.168.10.1 192.168.10.9ip dhcp excluded-address 192.168.10.254ip dhcp pool LAN-POOL-1network 192.168.10.0 255.255.255.0default-router 192.168.10.1

    domain-name span.com

    To verify the operation of DHCP, use the show ip dhcp binding command. This command displays alist of all IP address to MAC address bindings that have been provided by the DHCP service.

    To verify that messages are being received or sent by the router, use the show ip dhcp serverstatistics command. This command displays count information regarding the number of DHCPmessages that have been sent and received.

    Click the DHCP-1

  • 8/9/2019 Chapter 7 Cisco

    10/18

    As you can see in the figure, currently there are no bindings or statistics being displayed.

    Now, assume that PC1 has been powered and completed its booting process.

    DHCP-2

  • 8/9/2019 Chapter 7 Cisco

    11/18

    Notice that the binding information now displays that the IP address of 192.168.10.10 has been bound toa MAC address. The statistics are also displaying DHCPDISCOVER, DHCPREQUEST, DHCPOFFER,and DHCPACK activity.DHCP Client

    The ipconfig /all command displays the TCP/IP configured parameters on PC1. Because PC1 wasconnected to the network segment 192.168.10.0 /24, it automatically received an IP address, DNS suffix,and default gateway from that pool. There is no DHCP interface configuration required. If a PC isconnected to a network segment that has a DHCP pool available, it can obtain an IP addressautomatically.

    So how does PC2 receive an IP address? Router R1 would have to be configured to provide a192.168.11.0 /24 DHCP pool as follows:

    ip dhcp excluded-address 192.168.11.1 192.168.11.9ip dhcp excluded-address 192.168.11.254ip dhcp pool LAN-POOL-2network 192.168.11.0 255.255.255.0default-router 192.168.11.1domain-name span.com

    When PC2 has completed its booting process, it is provided with an IP address for the network segmentto which it is connected.

    Verifying DHCP-3

  • 8/9/2019 Chapter 7 Cisco

    12/18

    Notice that the DHCP bindings now indicate that two hosts have been provided with IP addresses. TheDHCP statistics are also reflecting the exchange of DHCP messages.

    Another useful command to view multiple pools is the show ip dhcp pool command.

    This command summarizes the DHCP pool information.

    DHCP Sample Topology

  • 8/9/2019 Chapter 7 Cisco

    13/18

    Configuring a DHCP Client

    Typically, small broadband routers for home use, such as Linksys routers, can be configured to connectto an ISP using a DSL or cable modem. In most cases, small home routers are set to acquire an IPaddress automatically from their ISPs. For example, the figure shows the default WAN setup page for aLinksys WRVS4400N router. Notice that the Internet connection type is set to Automatic Configuration -DHCP. This means that when the router is connected to a cable modem, for example, it is a DHCP clientand requests an IP address from the ISP.

    Sometimes, Cisco routers in SOHO and branch sites have to be configured in a similar manner. Themethod used depends on the ISP. However, in its simplest configuration, the Ethernet interface is used toconnect to a cable modem. To configure an Ethernet interface as a DHCP client, the ip address dhcpcommand must be configured.

    In the figure, assume that an ISP has been configured to provide select customers with IP addresses fromthe 209.165.201.0 / 27 range. The output confirms the assigned address.

  • 8/9/2019 Chapter 7 Cisco

    14/18

    What is DHCP Relay?

    In a complex hierarchical network, enterprise servers are usually contained in a server farm. Theseservers may provide DHCP, DNS, TFTP, and FTP services for the clients. The problem is that thenetwork clients typically are not on the same subnet as those servers. Therefore, the clients must locatethe servers to receive services and often these services are located using broadcast messages.

    In the figure, PC1 is attempting to acquire an IP address from the DHCP server located at 192.168.11.5.In this scenario router R1 is not configured as a DHCP server.

    Click the Host Problem button in the figure.

    In the figure, PC1 is attempting to renew its IP address. To do so, the ipconfig /release command isissued. Notice that the IP address is released and the current address is now 0.0.0.0. Next, the ipconfig/renew command is issued. This initiates the host to broadcast a DHCPDISCOVER message. However,PC1 is unable to locate the DHCP server. What happens when the server and the client are separated bya router and therefore are not on the same network segment? Remember, routers do not forward

    broadcasts.

    Note: Certain Windows clients have a feature called Automatic Private IP Addressing (APIPA). With thisfeature, a Windows computer can automatically assign itself an IP address in the 169.254.x.x range in theevent that a DHCP server is not available or does not exist on the network.

    To make matters worse, DHCP is not the only critical service that uses broadcasts. For example, Ciscorouters and other devices may use broadcasts to locate TFTP servers or to locate an authenticationserver such as a TACACS server.

    As a solution to this problem, an administrator could add DHCP servers on all the subnets. However,running these services on several computers creates both cost and administrative overhead.

    A simpler solution is to configure the Cisco IOS helper address feature on intervening routers andswitches. This solution enables routers to forward DHCP broadcasts to the DHCP servers. When a routerforwards address assignment/parameter requests, it is acting as a DHCP relay agent.

    For example, PC1 would broadcast a request to locate a DHCP server. If router R1 were configured as aDHCP relay agent, it would intercept this request and forward it to the DHCP server located on subnet192.168.11.0.

    To configure router R1 as a DHCP relay agent, you need to configure the nearest interface to the clientwith the ip helper-address interface configuration command. This command relays broadcast requests forkey services to a configured address. Configure the IP helper address on the interface receiving thebroadcast.

    Click the Relay Config button in the figure.

    Router R1 is now configured as a DHCP relay agent. It accepts broadcast requests for the DHCP serviceand then forwards them as a unicast to the IP address 192.168.11.5.

    Click the Host Renew button in the figure.

    As you can see, PC1 is now able to acquire an IP address from the DHCP server.

  • 8/9/2019 Chapter 7 Cisco

    15/18

    DHCP is not the only service that the router can be configured to relay. By default, the ip helper-addresscommand forwards the following eight UDP services:

    Port 37: TimePort 49: TACACSPort 53: DNSPort 67: DHCP/BOOTP serverPort 68: DHCP/BOOTP clientPort 69: TFTPPort 137: NetBIOS name servicePort 138: NetBIOS datagram service

    To specify additional ports, use the ip forward-protocol command to specify exactly which types ofbroadcast packets to forward.

    7.1.7 Configuring a DHCP Server Using SDM

    Cisco routers can also be configured as a DHCP server using SDM. In this example, router R1 will be

    configured as the DHCP server on the Fa0/0 and Fa0/1interfaces.

    Click the DHCP Tasks button in the figure.

    The DHCP server function is enabled under Additional Tasks in the Configure tab. From the list of tasks,click on the DHCP folder and then select DHCP Pools to add a new pool. Click Add to create the newDHCP pool.

    Click the Add Pool button in the figure.

    The Add DHCP Pool window contains the options you need to configure the DHCP IP address pool. TheIP addresses that the DHCP server assigns are drawn from a common pool. To configure the pool,specify the starting and ending IP addresses of the range.

    Cisco SDM configures the router to automatically exclude the LAN interface IP address in the pool. Youmust not use the network or subnetwork IP address or broadcast address on the network in the range ofaddresses that you specify.

    If you need to exclude other IP addresses in the range, you can do so by adjusting the starting andending IP addresses. For instance, if you needed to exclude IP addresses 192.168.10.1 through192.168.10.9, you would set the Starting IP address to 192.168.10.10. This allows the router to beginaddress assignment with 192.168.10.10.

    The other options that are available are:

    DNS Server1 and DNS Server2 - The DNS server is typically a server that maps a known device name

    with its IP address. If you have a DNS server configured for your network, enter the IP address for theserver here. If there is an additional DNS server on the network, you can enter the IP address for thatserver in this field.WINS Server1 and WINS Server2 - Recall that WINS configuration is typically in environments thatsupport pre-Windows 2000 clients.Import All DHCP Options into the DHCP Server Database - Allows the DHCP options to be imported froma higher level server, and is typically used in conjunction with an Internet DHCP server. This option allowsyou to pull higher level information without having to configure it in for this pool.

  • 8/9/2019 Chapter 7 Cisco

    16/18

    Click the DHCP Pools button in the figure.

    This screen provides you with a summary of the pools configured on your router. In this example, therehave been two pools configured, one for each of the Fast Ethernet interfaces on the R1 router.7.1.8Troubleshooting DHCP Configuration

    DHCP problems can arise for a multitude of reasons, such as software defects in operating systems, NICdrivers, or DHCP/BOOTP relay agents, but the most common are configuration issues. Because of thenumber of potentially problematic areas, a systematic approach to troubleshooting is required.

    Troubleshooting Task 1: Resolve IP Address Conflicts

    An IP address lease can expire on a client still connected to a network. If the client does not renew thelease, the DHCP server can reassign that IP address to another client. When the client reboots, itrequests an IP address. If the DHCP server does not respond quickly, the client uses the last IP address.The situation then arises that two clients are using the same IP address, creating a conflict.

    The show ip dhcp conflict command displays all address conflicts recorded by the DHCP server. Theserver uses the ping command to detect conflicts. The client uses Address Resolution Protocol (ARP) todetect clients. If an address conflict is detected, the address is removed from the pool and not assigned

    until an administrator resolves the conflict.

    This example displays the detection method and detection time for all IP addresses that the DHCP serverhas offered that have conflicts with other devices.

    R2# show ip dhcp conflict

    IP address Detection Method Detection time

    192.168.1.32 Ping Feb 16 2007 12:28 PM

    192.168.1.64 Gratuitous ARP Feb 23 2007 08:12 AM

    Troubleshooting Task 2: Verify Physical Connectivity

    First, use the show interfaceinterface command to confirm that the router interface acting as the defaultgateway for the client is operational. If the state of the interface is anything other than up, the port doesnot pass traffic, including DHCP client requests.

    Troubleshooting Task 3: Test Network Connectivity by Configuring a Client Workstation with a Static IPAddress

    When troubleshooting any DHCP issue, verify network connectivity by configuring a static IP address on aclient workstation. If the workstation is unable to reach network resources with a statically configured IPaddress, the root cause of the problem is not DHCP. At this point, network connectivity troubleshooting isrequired.

    Troubleshooting Task 4: Verify Switch Port Configuration (STP Portfast and Other Commands)

    If the DHCP client is unable to obtain an IP address from the DHCP server on startup, attempt to obtainan IP address from the DHCP server by manually forcing the client to send a DHCP request.

    If there is a switch between the client and the DHCP server, verify that the port has STP PortFast enabledand trunking/channeling disabled. The default configuration is PortFast disabled and trunking/channelingauto, if applicable. These configuration changes resolve the most common DHCP client issues that occur

  • 8/9/2019 Chapter 7 Cisco

    17/18

    with an initial installation of a Catalyst switch. A review of CCNA Exploration: LAN Switching and Wirelessassists in solving this issue.

    Troubleshooting Task 5: Distinguishing Whether DHCP Clients Obtain IP Address on the Same Subnet orVLAN as DHCP Server

    It is important to distinguish whether DHCP is functioning correctly when the client is on the same subnetor VLAN as the DHCP server. If the DHCP is working correctly, the problem may be the DHCP/BOOTPrelay agent. If the problem persists even with testing DHCP on the same subnet or VLAN as the DHCPserver, the problem may actually be with the DHCP server.

    Verify Router DHCP/BOOTP Relay Configuration

    When the DHCP server is located on a separate LAN from the client, the router interface facing the clientmust be configured to relay DHCP requests. This is accomplished by configuring the IP helper address. Ifthe IP helper address is not configured properly, client DHCP requests are not forwarded to the DHCPserver.

    Follow these steps to verify the router configuration:

    Step 1. Verify that the ip helper-address command is configured on the correct interface. It must bepresent on the inbound interface of the LAN containing the DHCP client workstations and must bedirected to the correct DHCP server. In the figure, the output of the show running-config command verifiesthat the DHCP relay IP address is referencing the DHCP server address at 192.168.11.5.

    Step 2. Verify that the global configuration command no service dhcp has not been configured. Thiscommand disables all DHCP server and relay functionality on the router. The command service dhcpdoes not appear in the configuration, because it is the default configuration.

    Verify that the Router Is Receiving DHCP Requests Using debug Commands.

    On routers configured as DHCP servers, the DHCP process fails if the router is not receiving requestsfrom the client. As a troubleshooting task, verify that the router is receiving the DHCP request from the

    client. This troubleshooting step involves configuring an access control list for debugging output. Thedebug access control list is not intrusive to the router.

    In global configuration mode, create the following access control list:

    access-list 100 permit ip host 0.0.0.0 host 255.255.255.255

    Start debugging by using ACL 100 as the defining parameter. In exec mode, enter the following debugcommand:

    debug ip packet detail 100

    The output in the figure shows that the router is receiving the DHCP requests from the client. The source

    IP address is 0.0.0.0 because the client does not yet have an IP address. The destination is255.255.255.255 because the DHCP discovery message from the client is a broadcast. The UDP sourceand destination ports, 68 and 67, are the typical ports used for DHCP.

    This output only shows a summary of the packet and not the packet itself. Therefore, it is not possible todetermine if the packet is correct. Nevertheless, the router did receive a broadcast packet with the sourceand destination IP and UDP ports that are correct for DHCP.

    Verify that the Router Is Receiving and Forwarding DHCP Request Using debug ip dhcp server packetCommand

  • 8/9/2019 Chapter 7 Cisco

    18/18

    A useful command for troubleshooting DHCP operation is the debug ip dhcp server events command.This command reports server events, like address assignments and database updates. It is also used fordecoding DHCP receptions and transmissions.

    DHCP assigns IP addresses and other important network configuration information dynamically. Ciscorouters can use the Cisco IOS feature set, Easy IP, as an optional, full-featured DHCP server. Easy IPleases configurations for 24 hours by default. In this activity, you will configure DHCP services on tworouters and test your configuration.