cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5399
Views
15
Helpful
9
Replies

DHCP VLAN Cisco Packet Tracer - Not Working. Any Suggestions?

Tom101
Level 1
Level 1

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. 

 

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

9 Replies 9

Hello
I would say its down to PT being anomolie and the dhcp server not working, See attached working file


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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? 

Tom101
Level 1
Level 1

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


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.

Great job. Thank you. 

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.

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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? 

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.

Hi Mr @Georg Pauwen 

Thank you very much for your suggestion it is an enormous help for my higher studies project.