Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNA) > Discussions

_Communities

1815 Views 9 Replies Latest reply: Jul 22, 2011 2:23 PM by Philip Esi RSS

Currently Being Moderated

router interface as a DHCP client

Jul 20, 2011 7:04 AM

Harry 163 posts since
Jun 15, 2011

Hallo everybody

 

i've tried to assign a dynamic IP to a router interface so it would work as a dhcp client  gotten from a dhcp server.

i made a video for that. but the server did not consider the router as thier gateway.

how to solve it ?

 

Attachments:
  • Sey 1,388 posts since
    May 4, 2010
    Currently Being Moderated
    1. Jul 20, 2011 4:20 AM (in response to Harry)
    Re: router interface as a DHCP client

    First of all, you didn't get an IP address by DHCP on the video, as there was no syslog message about that. Yes you have an IP address assigned to a router interface by DHCP, but that must have been before you started recording.

     

    You entered "ip add dhcp" for the second time. That command did not do anything as it did not differ from the one which is already in the running config. If you want to send a new DHCP query from the router, shut and the no shut the interface on the router.

     

    Now to your questions.

     

    1) Gateway not set. Why?

    You did not actually check if the gateway is set or not. You cannot see it in the "show ip int brief". Try "show ip route" instead.

     

    2) How can I successfully ping server at 12.0.0.2?

    You should have a valid IP address, subnet mask, and default gateway on the PC that you tried to ping from. The IP parameters should correspond to those on the router interface (either 10.x.x.x or 11.x.x.x, I don't know which is which).

  • simplyccna 754 posts since
    May 4, 2010
    Currently Being Moderated
    3. Jul 20, 2011 6:26 AM (in response to Harry)
    Re: router interface as a DHCP client

    you can also zip yours pt file an attach here to get it checked by other members

  • Sey 1,388 posts since
    May 4, 2010
    Currently Being Moderated
    5. Jul 20, 2011 7:44 AM (in response to Harry)
    Re: router interface as a DHCP client

    Are you saying that you want to get a default gateway automatically not from the server but to the server? This is impossible as your server has a static IP address (and it's a DHCP server itself!)

     

    You've got to configure default gateway for server manually. DHCP is supposed to give an address to the router and, possibly, to other hosts behind the router.

  • Philip Esi 77 posts since
    Feb 14, 2011
    Currently Being Moderated
    7. Jul 22, 2011 4:22 AM (in response to Harry)
    Re: router interface as a DHCP client

    Hi Hydir,

    A dhcp server gives out ip addresses, specifies a default gateway, dns server to clients etc but is not itself affected by the configured scope. Thats why if for instance you configured a network range of 20.0.0.0 with a mask of 255.0.0.0 and you manually configured the servers's ip to be 20.0.0.1 but didnt declare that ip address as excluded, the server would give out 20.0.0.1 as a valid address. Why? because a dhcp server is a server ONLY TO OTHER NODES and not to itself. So, if you assign an ip address to a router via dhcp and you want that router to be the gateway for the network and the server, you would specify that ip address as the default gateway in your dhcp config, and you would manually configure the server to have that address as the default gateway also.

     

    Now the thing is, how do we make sure the same router gets the gateway address everytime? You simply manually configure the ip address of that router to be the same as what you specified in the dhcp config on the server. You never want to assign the ip address of your gateway in production dynamically anyway.

     

    Note that implementing dhcp does not mean you dont have to manually set ip addresses. In live networks, the mission critical equipment, have their ip addresses manually set. In a lab environment, you can use dhcp to assign ip addresses to a router but in production, I'll strongly advise against it.

     

    HTH

    Philip

  • Philip Esi 77 posts since
    Feb 14, 2011
    Currently Being Moderated
    9. Jul 22, 2011 2:23 PM (in response to Harry)
    Re: router interface as a DHCP client

    No problem.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)