Answers: Local DHCP Server 1

certskills
By certskills April 14, 2016 08:05

Today’s lab lets you configure a local DHCP on a router, and work through all the small settings. You know the drill – read the original lab post first, and then come back here.

Answers

 

Figure 1: ROAS with two VLAN’s (CL124.jpg)

Example 3: R1 Config

 

Commentary

The configuration of DHCP for locally attached devices is reasonably simple. You must know the interface that is connecting to the devices who need addressing and the IP address configured on that router interface. This information is all that is required to assign an IP address to a host and allow them to send traffic off of their local network.

For this lab, you were tasked with configuring R1 to act as a DHCP server for two connected LANs, the first which was connected off of VLAN 10 and the second which was connected off of VLAN 20. You were also asked to assign the appropriate gateway address to each device.

The DHCP server configuration requires two different DHCP pools because two different subnets will each use different default gateway settings. The requirements state that the pools should be called One and Two. The command to create a new or configure an existing DHCP pool is ip dhcp pool pool-name. To create the first DHCP pool use the ip dhcp pool One command, this will place you into DHCP pool configuration mode; it is in this mode where you configure the options to be issued to the client.

Both pools need a network command to define the range of addresses that the DHCP server could assign from the pool, along with defining the default gateway address with the default-router command. Pool One defines the first network (192.168.100.0/24), with default router 192.168.100.1. Pool 2 similarly defines network 192.168.200.0/24, with default router 192.168.200.1. Note that both default router IP addresses are then excluded from being assigned to clients with two global commands at the top of the example.

Both pools use the same settings for the domain name, DNS server, and lease time in this case.

Note that when configuring a DHCP server that only services devices that are directly connected, the ip helper-address command is not required.

Local DHCP Server 1
Answers: EIGRP for IPv6 1
certskills
By certskills April 14, 2016 08:05
Write a comment

13 Comments

  1. dobo September 17, 12:36

    Is the Lease correct? should it not be lease 7 0 0 or lease 7

    Reply to this comment
    • CCENTSkills September 19, 13:47

      Hi Dobo,
      Yep. The original posting of “lease 1” was incorrect. I edited it to be “lease 7” (which is allowed), meaning 7 days. Note that “lease 7 0 0” would be accepted and changed to “lease 7”. Thanks for letting me know!
      Wendell

      Reply to this comment
  2. Kevin Ladas March 28, 14:12

    Trying this out in Packet Tracer. With a 2911, it looks like the domain-name and lease options are not available. Do the DHCP server options vary on different router models?

    Reply to this comment
    • CCENTSkills March 30, 10:10

      Hi Kevin,
      I imagine it’s got more to do with PT than a router model. While there might be occasional diffs with command sets based on router models, due to hardware diffs, I wouldn’t expect them in something as software-centric as DHCP.
      Wendell

      Reply to this comment
    • Jeremy Dotynski May 23, 14:07

      Also using the 2911 in PT, the domain-name command is under the ip command in Global config mode, but cannot find the lease command at all

      Reply to this comment
      • CCENTSkills May 25, 12:48

        Jeremy,
        If you’re referring to the “domain” command in global mode, that’s a different command than the “domain-name” command defined in DHCP pool mode as shown in the example here. FYI.
        Wendell

        Reply to this comment
    • Bryon Adams September 4, 14:54

      For anyone else who stumbles across this, there are three commands in Packet Tracer that do not work for this lab. ‘dns-server’ only allows you to specify one DNS server, the ‘lease’ command doesn’t exist, and ‘domain-name’ command doesn’t exist.

      You will need hardware or another virtualization platform to complete every step.

      Reply to this comment
    • 4lban October 21, 19:34

      I have Packet Tracer v7.2.0
      1. lease command doesn’t exist
      2. domain-name command allows you to specify only one DNS server
      3. all other commands are working just fine

      Reply to this comment
  3. MarceloV December 13, 02:24

    Hi, Wendell how are you? Greetings.
    I wanted to know if I configured properly the aditional activity you proposed in the section “Answer on Paper, or Maybe Test in Lab”, about the management of switches that lease ip addresses (I made a simplier version of it, the same topology of the exercise and SW1 manageable only).

    I defined a interface vlan 1 in SW1:

    SW1(config)#interface vlan 1
    SW1(config-if)#ip address dhcp
    SW1(config-if)#no shutdown

    And in the router, another pool had to be added:

    R1(config)#ip dhcp excluded-address 192.168.99.1
    R1(config)#ip dhcp pool SW-Admin
    R1(dhcp-config)#network 192.168.99.0 255.255.255.0
    R1(dhcp-config)#default-router 192.168.99.1
    R1(dhcp-config)#exit

    Given that I defined vlan 1 for SW1’s administration and that’s the default native vlan, I configured the ip address for that subnet in the main g0/1 interface, and no in g0/1’s subinterfaces, that have tagged traffic of vlans 10 and 20:

    R1(config)#int g0/1
    R1(config-if)#ip address 192.168.99.1 255.255.255.0
    R1(config-if)#exit

    Is this part ok? Thanks in advance.

    Reply to this comment
    • CCENTSkills December 18, 10:33

      Marcelo,
      Perfect! And logically presented. (That’s always a big help on my end.) Looks good!
      Did the switch lease it’s address?
      Wendell

      Reply to this comment
  4. Abdelghani Attatfa September 28, 11:21

    We don’t need relay agent or the dhcp server resids on two subnet at the same time !!!

    Reply to this comment
    • certskills Author September 29, 20:15

      Abdelghani,
      Correct – no relay agent is required. The IOS DHCP server examines all incoming messages sent with UDP to DHCP well-known port 68, in this case supporting requests entering both LAN interfaces.

      Reply to this comment
  5. Jay Mahannah March 7, 08:06

    Don’t use a 4331 Router because it does not allow you to configure lease time (at least not in Packet Tracer 8.2)

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories