DHCP in cisco router !

sniper_heresniper_here Posts: 48Member ■■□□□□□□□□
Hi guys,
I have a quastion , if I configure a cisco router with DHCP ,can I spacifice which interface most work in DHCP and Which doesn't?

Or>>
Which interface will work in DHCP if I have two fastethernet ports in my router when I use this commands icon_confused.gif:

ip dhcp pool router1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 192.168.1.5 192.168.1.6
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.5
ip dhcp excluded-address 192.168.1.6 192.168.1.255
^Z

Comments

  • kalebkspkalebksp Posts: 1,033Member
    Whichever interface is in the 192.168.1.0/24 subnet. Although since you've excluded all the addresses DHCP won't have any addresses to assign.
    Contradictions do not exist. Whenever you think you are facing a contradiction, check your premises. You will find that one of them is wrong.
    -Ayn Rand

    vCabbage
  • blackninjablackninja Posts: 385Member
    remove: ip dhcp excluded-address 192.168.1.6 192.168.1.255

    change: ip dhcp excluded-address 192.168.1.1 192.168.1.5 to ip dhcp excluded-address 192.168.1.1 192.168.1.6


    All good to go :)
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • chmorinchmorin Posts: 1,446Member ■■■■■□□□□□
    The interface you specify with the default-router command becomes the default gateway for the network. So which ever interface you want to have that DHCP work with, make sure it is put in as your default-router.

    Eg.

    Fa 0/0 what i want my peers to query for a IP address.
    int fa0/0
    ip address 192.168.1.1 255.255.255.0
    no shut
    
    ip dhcp pool 1
    network 192.168.1.0 255.255.255.0
    default-router 192.168.1.1
    
    ip dhcp excluded-address 192.168.1.1
    

    This would makes 192.168.1.1 not able to be handed out by the DHCP service, and gives the rest of the addresses in the 192.168.1.0/24 network available to be distributed to hosts attached to fa0/0.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • Megadeth4168Megadeth4168 Posts: 2,157Member
    chmorin wrote: »
    The interface you specify with the default-router command becomes the default gateway for the network. So which ever interface you want to have that DHCP work with, make sure it is put in as your default-router.

    Eg.

    Fa 0/0 what i want my peers to query for a IP address.
    int fa0/0
    ip address 192.168.1.1 255.255.255.0
    no shut
    
    ip dhcp pool 1
    network 192.168.1.0 255.255.255.0
    default-router 192.168.1.1
    
    ip dhcp excluded-address 192.168.1.1
    

    This would makes 192.168.1.1 not able to be handed out by the DHCP service, and gives the rest of the addresses in the 192.168.1.0/24 network available to be distributed to hosts attached to fa0/0.

    Maybe I'm misreading this, if so, I apologize....

    You can have your Default Gateway be the address of one interface and have your DHCP Network from a different interface.

    He could have the following and it should work (assuming the interfaces exist and are configured as such).

    ip dhcp pool test
    network 192.168.1.0 255.255.255.0
    default-router 10.10.0.1

    kalebksp is correct in sayingWhichever interface is in the 192.168.1.0/24 subnet.
Sign In or Register to comment.