DHCP in cisco router !
sniper_here
Member Posts: 48 ■■□□□□□□□□
in CCNA & CCENT
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 :
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
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 :
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
-
kalebksp Member Posts: 1,033 ■■■■■□□□□□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.
-
blackninja Member Posts: 385remove: 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 goCurrently studying:
CCIE R&S - using INE workbooks & videos
Currently reading:
Everything. Twice -
chmorin Member Posts: 1,446 ■■■■■□□□□□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 PursuingWGU (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. -
Megadeth4168 Member Posts: 2,157The 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.