Inter Vlan Routing with DHCP

Answered Question
Nov 9th, 2008
User Badges:

Hi Guys and Girls, I am sitting here in the early hours of the night in Ireland trying to figure out if it possible to complete my simulator network. this is the low down


1 network lots of clients; but all in different VLANs. I have clients in VLAN 120 and clients in VLAN 30 both connected to the same switch and more clients in VLAN 120 and 30 connected to another switch and even more clients in VLAN 120 and 30 connected to another switch... the 3 switches are connected to a L3 switch and a dhcp server is connected to the L3 switch, how do i get intervlan routing working or am I over thinking this big time... I am up very late

Correct Answer by John Blakley about 8 years 8 months ago

You can do it both ways:


On the router:


ip dhcp pool VLAN1

network 10.20.0.0 255.255.255.0

default-gateway 10.20.0.1


ip dhcp pool VLAN2

network 10.20.1.0 255.255.255.0

default-gateway 10.20.1.1



int VLAN1

ip address 10.20.0.1 255.255.255.0


int vlan2

ip address 10.20.1.1 255.255.255.0



The router will automatically find the pool that belongs to the SVI.


On an external DHCP server, you would configure multiple pools that correlate with the SVI ip subnet:


Subnet 10.20.1.0

Subnet 10.20.2.0

Subnet 10.20.3.0


On the router:


int Vlan1

ip address 10.20.1.1 255.255.255.0

ip helper-address 10.20.5.50 <--your dhcp server address


int vlan2

ip address 10.20.2.1 255.255.255.0

ip helper-address 10.20.5.50


int vlan3

ip address 10.20.3.1 255.255.255.0

ip helper-address 10.20.5.50


The router will redirect your request with the appropriate subnet to the dhcp server.



Oh, and you don't need to do both router dhcp pools and server dhcp pools. You only need one or the other. :-)


HTH


John


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
ohassairi Sun, 11/09/2008 - 22:19
User Badges:
  • Silver, 250 points or more


of course this is possible. you just create interfaces VLAN 120 and VLAN30 in your layer3 switch. you give them IP addresses (these will be the gateway of your PCs).

of course cascades should be configured as trunk between your access switches and the L3 switch.

then create a new vlan (in L3 sw) for your dhcp server. let say vlan10. give it an ip address and add one port member of vlan10.

connect your server.

under interface vlan 120 add the command:ip helper-address IP1. where IP1 is the IP of your dhcp server.

do the same for vlan30.

hope this will help and you are not very tired. sleeping could be a solution some times as a reset for a router :-)

shane.kearney Mon, 11/10/2008 - 09:30
User Badges:

This is my update...


4 VLAN's 4 reg switches 1 L3 switch 1 router

Each VLAN in different subnets all 50.x.x.x range


Inter- VLAN routing works fine


I want a DHCP pool that will assign IP addresses to all subnets; I know I will need more than 1 pool for this.


I don't know where to configure this....on another router...on the L3 switch.... do I need to set up multiple DHCP servers if not; and I set up multiple DHCP pools on say 1 router then how do I bind that pool to a particular VLAN...


Please help me

Correct Answer
John Blakley Mon, 11/10/2008 - 09:40
User Badges:
  • Purple, 4500 points or more

You can do it both ways:


On the router:


ip dhcp pool VLAN1

network 10.20.0.0 255.255.255.0

default-gateway 10.20.0.1


ip dhcp pool VLAN2

network 10.20.1.0 255.255.255.0

default-gateway 10.20.1.1



int VLAN1

ip address 10.20.0.1 255.255.255.0


int vlan2

ip address 10.20.1.1 255.255.255.0



The router will automatically find the pool that belongs to the SVI.


On an external DHCP server, you would configure multiple pools that correlate with the SVI ip subnet:


Subnet 10.20.1.0

Subnet 10.20.2.0

Subnet 10.20.3.0


On the router:


int Vlan1

ip address 10.20.1.1 255.255.255.0

ip helper-address 10.20.5.50 <--your dhcp server address


int vlan2

ip address 10.20.2.1 255.255.255.0

ip helper-address 10.20.5.50


int vlan3

ip address 10.20.3.1 255.255.255.0

ip helper-address 10.20.5.50


The router will redirect your request with the appropriate subnet to the dhcp server.



Oh, and you don't need to do both router dhcp pools and server dhcp pools. You only need one or the other. :-)


HTH


John


Actions

This Discussion