1 / 77

DHCP Configuration Protocol: Dynamic Host Configuration for IP Addressing

Learn about DHCP, a scalable and easy-to-manage network server that automatically assigns dynamic IP addresses to client devices. Explore the 4-step process for dynamic allocation and how to configure a Cisco router as a DHCP server.

rgough
Download Presentation

DHCP Configuration Protocol: Dynamic Host Configuration for IP Addressing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 IP Addressing Services Part I

  2. IP Addressing Services Dynamic Host ConfigurationProtocol (DHCP)

  3. Dynamic Host Configuration Protocol (DHCP) • Every device that connects to a network needs an IP address. • Network administrators assign static IP addresses to routers, servers, and other network devices whose locations (physical and logical) are not likely to change. • User computers in an organization often change locations, physically and logically. • Desktop clients do not require a static address. • A workstation can use any address within a range of addresses. • This range is typically within an IP subnet.

  4. Dynamic Host Configuration Protocol (DHCP) • Administrators typically prefer a network server to offer DHCP services. • Scalable. • Relatively easy to manage. • In a small branch or SOHO location, a Cisco router can be configured to provide DHCP services without the need for an expensive dedicated server.

  5. DHCP Operation • Address Allocation Methods: • Manual: • The IP address for the client is pre-allocated by the administrator and DHCP conveys the address to the client. • Automatic: • DHCP automatically assigns a permanent IP address to a client with no lease period. • Dynamic: • DHCP assigns, or leases, an IP address to the client for a limited period of time.

  6. DHCP Operation • Dynamic Allocation: • DHCP works in a client/server mode. • When the client connects, the server assigns or leases an IP address to the device. • The device connects to the network with that leased IP address until the lease period expires. • The host must contact the DHCP server periodically to extend the lease. • The leasing of addresses assures that addresses that are no longer used are returned to the address pool for use by other devices.

  7. DHCP Operation • Dynamic Allocation: 4 Step Process. • DHCPDISCOVER: • The client broadcasts a DHCPDISCOVER message. • The DHCPDISCOVER message finds the DHCP server(s) on the network.

  8. DHCP Operation • Dynamic Allocation: 4 Step Process. • DHCPOFFER: • The server responds with a DHCPOFFER. • The DHCPOFFER message is sent as a unicast and contains an available IP address to lease.

  9. DHCP Operation • Dynamic Allocation: 4 Step Process. • DHCPREQUEST: • The client responds with a broadcast of a DHCPREQUEST message. • When used for obtaining a lease, it serves as an acceptance notice to the selected server and an implicit decline to any other servers. • Also used for lease renewal and verification.

  10. DHCP Operation • Dynamic Allocation: 4 Step Process. • DHCPACK: • The server verifies the lease information and responds with a DHCPACK message. • The client logs the information and sends an ARP request to verify that the address is unique.

  11. DHCP Operation • Dynamic Allocation: 4 Step Process.

  12. BOOTP and DHCP • Bootstrap Protocol (BOOTP): • Predecessor of DHCP. • A method to download address and boot configurations for diskless workstations. • Both DHCP and BOOTP are client/server based and use UDP ports 67 and 68. • The main difference is that BOOTP was designed for manual pre-configuration of the host information in a server database.

  13. DHCP Message Format • The developers of DHCP needed to maintain compatibility with BOOTP. Same as BOOTP Added to support functions of DHCP.

  14. Configuring a Cisco Router as a DHCP Server • 3 Basic Steps: • Step 1: • Define a range of addresses that DHCP is not to allocate. • Usually static addresses reserved for the router interface, switch management IP address, servers, and local network printers. • Step 2: • Create the DHCP pool of addresses using theip dhcp pool command. • Step 3: • Configure the specific DHCP tasks for the pool.

  15. Configuring a Cisco Router as a DHCP Server • The DHCP service is enabled by default on versions of Cisco IOS that support it. • To disable the service: Router(config)#no service dhcp • To enable the service: Router(config)#service dhcp

  16. Configuring a Cisco Router as a DHCP Server • Step 1: • Exclude an address or addresses from the pool: Router(config)#ip dhcp excluded-addresslow-address [high-address] • Exclude an individual address or range of addresses when assigning addresses to clients. • Used to reserve addresses that are statically assigned to key hosts, for instance, the interface address on the router.

  17. Configuring a Cisco Router as a DHCP Server • Step 2: • Create the DHCP pool and place the router in DHCP configuration mode. Router(config)#ip dhcp pool [pool-name] Router(config-dhcp)#

  18. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Define the pool of addresses:Router(config-dhcp)#network network-number [mask | /prefix] • The network statement enables DHCP on any router interfaces belonging to that network. • The router will act as a DHCP server on that interface. • It is also the pool of addresses that the DHCP server will use.

  19. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Assign the default gateway for the DHCP clients: Router(config-dhcp)#default-router ip-address [ip-address2……] • Only one is required but up to 8 addresses may be assigned in one command line.

  20. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Assign the DNS Server(s) for the DHCP clients: Router(config-dhcp)#dns-server ip-address [ip-address2……] • Only one is required but up to 8 addresses may be assigned in one command line.

  21. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Assign the WINS Server(s) for the DHCP clients: Router(config-dhcp)#netbios-name-server ip-address [ip-address2……] • Only one is required but up to 8 addresses may be assigned in one command line.

  22. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Assign the Domain Name for the DHCP clients: Router(config-dhcp)#domain-name [domain]

  23. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • Assign the duration of the lease for the DHCP clients: Router(config-dhcp)#lease {days [hours] [minutes] | infinite} • The default lease time is 1 day.

  24. Configuring a Cisco Router as a DHCP Server • Step 3: • Configure the specific DHCP tasks. • FYI - Other available parameters: Router(config-dhcp)# netbios-node-type [type] hostaddress [mask | /prefix] hardware-addresshardware-address-type orclient-identifierunique-identifier client-namename bootfile filename

  25. Configuring a Cisco Router as a DHCP Server • FYI • By default, the DHCP server pings a pool address twice before assigning the address to a requesting client. • If the ping is unanswered within 500 ms (i.e. times out), the DHCP server assumes that the address is not in use and assigns the address to the requesting client. • To change the number of ping packets sent and/or the timeout wait value: Router(config)#ip dhcp ping packets number Router(config)#ip dhcp ping timeout milliseconds

  26. Configuring a Cisco Router as a DHCP Server Step 1 Step 2 Step 3

  27. Configuring a Cisco Router as a DHCP Server • Verifying DHCP: Router# show ip dhcp binding show ip dhcp server statistics show ip dhcp pool debug ip dhcp server events Much more detail in the lab….

  28. DHCP Relay • In a complex hierarchical network, enterprise servers are usually contained in a server farm. • These servers may provide DHCP, DNS, TFTP, and FTP services for the clients.

  29. DHCP Relay Broadcast • PC1 either tries to obtain an IP configuration or attempts to renew its address. • In addition, other network services use broadcasts to find a TFTP server or an authentication server. Broadcast

  30. DHCP Relay Broadcast • The solution is DHCP Relay. • By configuring a helper address feature on intervening routers and switches the device will forward DHCP broadcasts, and others, to the appropriate server. Broadcast

  31. DHCP Relay Broadcast • To configure RTA Fa0/0(the interface that receives the Host A broadcasts) to relay DHCP broadcasts to the DHCP server, use the following commands: RTA(config)#interface fa0/0 RTA(config-if)#ip helper-address 172.24.1.9

  32. DHCP Relay • DHCP is not the only service that the router can be configured to relay. • By default, theip helper-addresscommand forwardsbroadcasts for eightUDP services.

  33. DHCP Relay • Default Forwarded UDP Services • If you wish to stop the forwarding of a service or add another service for forwarding, it can be done using theip forward-protocol command. Add SNMP

  34. Configuring a DHCP Server Using SDM • DHCP can also be configured using the Cisco Router and Security Device manager (SDM).

  35. Troubleshooting DHCP Configuration • Resolve any IP Address conflicts. show ip address conflicts • Verify physical connectivity. • Test connectivity by configuring a workstation with a static IP address. • Verify switch port configuration. • Do DHCP clients obtain an IP address on the same subnet or VLAN where the DHCP server resides? • Verify any DHCP Relay configuration. • Verify that the router is receiving DHCP requests.debug ip dhcp events debug ip dhcp server debug ip packet detail

  36. IP Addressing Services Scaling Networks With Network Address Translation (NAT)

  37. Scaling Networks With NAT • All public Internet addresses must be registered with a Regional Internet Registry (RIR). • Organizations can lease public addresses from an ISP. • Only the registered holder of a public Internet address can assign that address to a network device.

  38. Scaling Networks With NAT • Private Internet Addresses: • These are reserved private Internet addresses drawn from three blocks. • These addresses are for private, internal network use only. • RFC 1918 specifies that private addresses are not to be routed over the Internet.

  39. Scaling Networks With NAT • Private Internet Addresses: • Two Issues: • You cannot routeprivate addresses over the Internet. • There are not enough public addresses to allow organizations to provide one to every one of their hosts. • Networks need a mechanism to translate private addresses to public addresses at the edge of their network that works in both directions. • Solution – NAT.

  40. What is NAT? • The DHCP server assigns IP dynamic addresses to devices inside the network. • NAT-enabled routers retain one or many valid Internet IP addresses outside of the network. • When the client sends packets out of the network, NAT translates the internal IP address of the client to an external address. • To outside users, all traffic coming to and going from the network has the same IP address or is from the same pool of addresses. NAT Private Address Public Address

  41. What is NAT? • A NAT enabled device typically operates at the border of a stub network. • A stub network is a network that has a single connection to its neighbor network.

  42. What is NAT? • When a host on the inside network wants to access a host on the outside network, the packet is sent to the border gateway router. • The border gateway router performs the NAT process, translating the inside private address to an outside public address. Inside Private Outside Public

  43. What is NAT? • The translation process uses an internal translation table. • The contents of the table will vary depending on the type of network translation being implemented. • We will be looking at the use of static NAT, dynamic NAT and Port Address Translation (PAT). Inside Private Outside Public

  44. NAT Terminology Inside Network: Usually an organization’s LAN. Outside Network: Usually the Internet but it can be any network.

  45. NAT Terminology Local Addresses:How a node on a network is seen by another node onthe same network. 128.23.2.2 10.0.0.2 10.0.0.3 128.23.3.3

  46. NAT Terminology Global Addresses:How a node on one networkis seen by a node on another network. 128.23.2.2 10.0.0.2 10.0.0.3 128.23.3.3

  47. NAT Terminology • Inside Local Address: • An RFC 1918 address assigned to a host on an inside network. • Inside Global Address: • A valid public address that the host on the inside network is assigned as it exits the router. • Outside Global Address: • A reachable IP address assigned to a host on the Internet. • Outside Local Address: • A local address assigned to a host on an outside network. • (Use beyond the scope of this course).

  48. How Does NAT Work? Send R2: I have a packet for the outside network.I must translate the IP address. 209.165.200.226

  49. How Does NAT Work? Receive R2: I have a packet for the inside network.I must translate the IP address. 209.165.200.226

  50. Dynamic Mapping and Static Mapping • Dynamic Mapping: • Mapping of local addressesdynamically to a pool ofglobal addresses. • The hosts able to use NAT islimited by the number ofaddresses in the range. • If you have allocated 6 publicaddresses for NAT, any6users can use NAT simultaneously. • The NAT device dynamically assigns an address when a request is received. When a session ends, the address is returned to the pool for another user.

More Related