02-27-2020 11:09 AM
Hi, I am currently learning about DHCP and would like to know more.
I have the set up shown in the image with Router0 being the DHCP in this case. I have got PC4 and 5 in the same VLAN and there is a trunk from Switch1 to Switch2, likewise from Switch1 to Switch3.
I am unable to get an IP from both PC4 and 5, thus I have tried the DHCP ip helper-address at Switch1 and now PC3,6 and 7 cannot get an IP form the DHCP.
I would like to know where I went wrong. Thanks in advance!
02-27-2020 11:45 AM
You have given us a description of a problem but no detail about it to help us identify the issue and suggest solution. A good starting point would be to post the config of the router.
02-27-2020 12:28 PM
Sorry bout that!
========
Building configuration...
Current configuration : 1145 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
ip dhcp pool round1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
ip dhcp pool round2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.254
ip dhcp pool vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524XTVU-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.1.254 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.2
encapsulation dot1Q 2
ip address 192.168.2.254 255.255.255.0
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
02-27-2020 02:15 PM
Hello,
if this is a Packet Tracer project, post the (zipped) .pkt file here...
If all links between the switches and the router are trunks, you don't need any ip helper-addresses. Just make sure that you exclude the default router IP addresses:
Current configuration : 1145 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
--> ip dhcp excluded-address 192.168.1.254
--> ip dhcp excluded-address 192.168.2.254
--> ip dhcp excluded-address 192.168.10.254
!
ip dhcp pool round1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
!
ip dhcp pool round2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.254
!
ip dhcp pool vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
!
ip cef
no ipv6 cef
!
license udi pid CISCO1941/K9 sn FTX1524XTVU-
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.1.254 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.2
encapsulation dot1Q 2
ip address 192.168.2.254 255.255.255.0
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
02-27-2020 11:57 PM - edited 02-27-2020 11:58 PM
02-28-2020 12:34 AM
02-27-2020 12:00 PM
Hi,
I understand that the DHCP server is the router, but the default gateway for the PC3 to PC7 will be switch1?
-Make sure you configure on switch1 "ip helper address", on the SVI's corresponding to the vlan number for PC3 to PC7.
-Make sure the DHCP router has a route back for all those subnets for which it's a DHCP server (the IP subnets of the PC's) towards SW1
- Make sure the DHCP router has a separate DHCP pool for each of the VLAN's of PC3 to PC7
Regards,
Cristian Matei.
02-28-2020 12:43 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide