03-11-2022 08:52 PM
Hello,
For the last couple of days i have been trying to configure a network with a DHCP server that has three separate VLANs. I have tried following tutorials online, but cannot seem to get it to work.
Each time I request an IP on the client pcs it says 'DHCP Failed. APIPA is being used'. I'm starting to think there's a bug with my version of Cisco Packet Tracer, but highly likely i have configured it wrong.
The steps i have taken:
1. Configured the DHCP Server with three VLANS.
DHCP server ip: 192.168.1.2/24
DHCP default gateway: 192.168.1.1
VLAN 10: 192.168.10.1/24
VLAN 20: 192.168.20.1/24
VLAN 30: 192.168.30.1/24
2. Enabled switchport trunk encapsulation dot1q to each of the interfaces connecting to a Layer 3 switch.
3. Added the VLANs and VLANs default gateway IPs to the layer 3 switch with an ip helper-address pointing to the DHCP server.
4. Added the VLANs to the layer 2 switches and enabled switchport mode trunk to the appropriate interfaces.
5. Added switchport mode access and switchport access vlan [vlan number] to the interfaces connecting to the IP Phones and PC devices.
6. Enabled IP Routing on the layer 3 switch
I have attached an image of the current network diagram as well as the Cisco packet tracer 8.0.1 file. If anybody has any suggestions on what I'm doing wrong, i would greatly appreciate the feedback. It is likely i have missed a step. Thank you.
Solved! Go to Solution.
03-11-2022
11:29 PM
- last edited on
03-22-2022
02:01 PM
by
Translator
Hello,
the problem is simply that the Vlan1 interface of the multilayer switch, which is supposed to be the default gateway for the DHCP server, is not configured. Put an IP address on the Vlan 1 interface, that makes the DHCP server reachable. Also, do a
no shut
on the Vlan 1 interface.
interface Vlan1
ip address 192.168.1.1 255.255.255.0
You also might want to configure
spanning-tree portfast
on the FastEthernet 0/2 ports of the access switches, in order to prevent DHCP requests from timing out:
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
switchport voice vlan 10
spanning-tree portfast
Attached the revised file.
03-11-2022 10:04 PM
Hello
I would say its down to PT being anomolie and the dhcp server not working, See attached working file
03-11-2022 11:00 PM
Thank you for your response Paul. Very much appreciate your help.
I see that you are using the L3 switch for the DHCP pool - is this correct? Is it possible to use a dedicated DHCP server instead?
03-11-2022
11:28 PM
- last edited on
03-22-2022
12:37 PM
by
Translator
Figure out why it wasn't working. VLAN 1 on the layer 3 switch needed to have an ip address that was on the same network as the DHCP server.
Switch(config)#int vlan 1
Switch(config-if)#ip address 192.168.1.3 255.255.255.0
03-11-2022
11:29 PM
- last edited on
03-22-2022
02:01 PM
by
Translator
Hello,
the problem is simply that the Vlan1 interface of the multilayer switch, which is supposed to be the default gateway for the DHCP server, is not configured. Put an IP address on the Vlan 1 interface, that makes the DHCP server reachable. Also, do a
no shut
on the Vlan 1 interface.
interface Vlan1
ip address 192.168.1.1 255.255.255.0
You also might want to configure
spanning-tree portfast
on the FastEthernet 0/2 ports of the access switches, in order to prevent DHCP requests from timing out:
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
switchport voice vlan 10
spanning-tree portfast
Attached the revised file.
03-11-2022 11:44 PM
Great job. Thank you.
03-12-2022 04:17 AM - edited 03-12-2022 04:19 AM
Hello
Just like to point out - do not take completed results as gospel with these PT simulations because they are very buggy as such they can produce false positives, quite featureless.
For example:
The PT file topology you provided and the working PT I provided
The reason why the dhcp server didn’t work was i removed the helper addressing which you shouldn’t really require when the dhcp server resides locally on the L3 switch adding the helper did indeed work but it wouldn’t really be the correct solution to apply in a real production environment hence the reason why i removed the dhcp server off the device and onto the L3 switch.
Another thing you missed apart from the dhcp server subnet was a definitive voice vlan and its related L3 subnet as voip phone vlans and any data vlans need to be different.
03-13-2022 06:02 AM - edited 03-13-2022 06:02 AM
Hi George, I've been thinking about this configuration. Instead of giving VLAN 1 the default gateway, is it possible to use ip routes instead or would that not work between a L2 and L3 switch?
03-13-2022 07:16 AM
Hello,
it won't work, as a layer 2 switch knows nothing about routing. The problem was not so much routing, but rather the fact that the default gateway of the DHCP server did not exist, so none of the other networks could reach the DHCP server.
11-02-2022 10:32 AM
Thank you very much for your suggestion it is an enormous help for my higher studies project.
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