cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6655
Views
0
Helpful
7
Replies

Help! Can't get DHCP to assign ip addresses to 3 VLANs

ShaneJ
Level 1
Level 1

Hi, I'm relatively new to networking, I'm having trouble with the server configuring DHCP ip addresses for computers in three VLANS:10,20 and 30. I've configured the VLANs on one switch and configured the router's ip address as well as the ip address,subnet mask and gateway for the server which is the same for the router's fa0/0 ip address. However,I've not configured trunking as yet as I'm unsure if to configure an ip address for the switch. I've attached my network below, any feedback would be greatly appreciated 

1 Accepted Solution

Accepted Solutions

gs.skills
Level 1
Level 1

Hello,

I can only guess from your picture that you are using a ROAS (Router On A stick) and a switch set for layer 2 only, in this situation:

  • you definitively need a trunk link between the router and the switch
  • a subinterface on the router for each VLAN (10,20,30 and server VLAN) with an ip address that belong to each VLAN subnet
  • if the router is the dhcp server:
    • configure a dhcp pool on the router for each subnet
    • IP addresses used on router subinterfaces are excluded from the pool
  • if the server is the dhcp server:
    • configure a dhcp pool on the server for each subnet
    • add an ip helper-address option on each router subinterfaces for VLANs 10,20 and 30 indication the IP address of the dhcp server*

(Also, you need a different subnet for each VLAN)

 

*when i tried this configuration, it required more configuration to make the dhcp server send dhcp leases for subnets from which he has no IP addresses.

 

Regards, Guillaume

View solution in original post

7 Replies 7

Hello,

 

post the Packet Tracer project file (save as .pkt and rename it to .jpg, otherwise the system does not let you upload)...

gs.skills
Level 1
Level 1

Hello,

I can only guess from your picture that you are using a ROAS (Router On A stick) and a switch set for layer 2 only, in this situation:

  • you definitively need a trunk link between the router and the switch
  • a subinterface on the router for each VLAN (10,20,30 and server VLAN) with an ip address that belong to each VLAN subnet
  • if the router is the dhcp server:
    • configure a dhcp pool on the router for each subnet
    • IP addresses used on router subinterfaces are excluded from the pool
  • if the server is the dhcp server:
    • configure a dhcp pool on the server for each subnet
    • add an ip helper-address option on each router subinterfaces for VLANs 10,20 and 30 indication the IP address of the dhcp server*

(Also, you need a different subnet for each VLAN)

 

*when i tried this configuration, it required more configuration to make the dhcp server send dhcp leases for subnets from which he has no IP addresses.

 

Regards, Guillaume

Yes thank you, it's much appreciated but with the ip helper address, do you use the same address as the default-router?

The default router will be different for each dhcp pool, it will be the IP address of the subinterface of the router for each VLAN:

  • VLAN10 : default router is the IP address of the router subinterface for VLAN 10

The ip helper-address is used only if the dhcp server is the server at IP address 172.16.16.1 and should be configured the same on each subinterfaces:

Router(config-subif)#ip helper-address 172.16.16.1

Oh thank you, I think I understand now. One more thing tho, are there any more configurations on the switch besides configuring VLANs and switchport mode access, do I have to also configure an ip address?

If the switch has to be managed from the network (not console port) :

  • create another VLAN for the management of the switch
  • create a SVI (interface vlan ...) for the management VLAN with a static IP
  • a subinterface on the router for the management VLAN
  • set the default-gateway of the switch with a static IP (IP of the router subinterface)
  • disable telnet and enable SSH if the IOS version has this feature
  • configure an ACL on the vty lines to allow only connections from a trusted computer/subnet

There are many others possible configurations...

Okay I got it thank you

Review Cisco Networking for a $25 gift card