cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2159
Views
0
Helpful
8
Replies

DHCP Server on a 2600 with multiple Vlans

pixie79UK
Level 1
Level 1

Hi,

I am trying to setup a 2600 series router so that is has multiple vlans, (office network, wifi, voip). That part i can do easly however, i would like the 2600 to be the dhcp server for each of these networks as well. I can see i need to set each vlan interface up to be a dhcp-relay and then i can assign the routers main address as the dhcp server. What i am unsure of is a) how to tell the dhcp server that pool VOIP should only be assigned to VLAN VOIP and the pool WIFI should only go to VLAN WIFI. I see something in the config about using dhcp class and matching on that but am not sure how to work that out.

I then also need to be able to assign some static ip's to each of the vlans as well via dhcp for regular users.

Any help of config snipets would be great.


If it helps my ranges will be:

10.208.2.0/32 VOIP - router .1

10.208.3.0/32 WIFI - router .1

10.208.1.0/32 LAN - router .1

Router's external ip routing to firewall 10.208.1.253/30

DNS Server 4.2.2.4

Thanks

Mark

8 Replies 8

Leo Laohoo
Hall of Fame
Hall of Fame

Your IP address ranges are "/32"????

doh typo that was supposed to have been /29's for the VLANs and a /30 for the router's gateway to the firewall

Hi,

Yes i did read the whole of that guide first and understood most of it. I figured i have to create multiple pools one for each vlan and setup the ranges there, which i can do and understand. The but i do not understand is the following two commands 'relay agent information' and 'relay-information hex' as to what i should set them to be given for example the dhcp-helpers address on vlan2 for voip would be 10.208.2.1?

Is the hex addess the hex of that ip or something else? and what information do i need for the other command?

Thanks

If it helps, this is what i have so far which i beleive is correct,

!
service dhcp
!
ip dhcp excluded-address 10.208.1.1
ip dhcp excluded-address 10.208.2.1
ip dhcp excluded-address 10.208.3.1
ip dhcp excluded-address 10.208.3.30
!
ip dhcp pool Network-LAN
network 10.208.1.0 255.255.255.248
default-router 10.208.1.1
dns-server 4.2.2.4 4.2.2.2
domain-name test.com
!
ip dhcp pool Network-VOIP
network 10.208.2.0 255.255.255.248
default-router 10.208.1.2
dns-server 4.2.2.4 4.2.2.2
domain-name voip.test.com
!
ip dhcp pool Network-WIFI
network 10.208.3.0 255.255.255.248
default-router 10.208.3.30
dns-server 4.2.2.4 4.2.2.2
domain-name wifi.test.com
!
interface fastethernet 0/0.1
encapsulation dot1q 1
ip address 10.208.1.1 255.255.255.248
ip dhcp relay information option vpn-id
ip dhcp relay information option subscriber-id LAN
!
interface fastethernet 0/0.2
encapsulation dot1q 2
ip address 10.208.2.1 255.255.255.248
ip dhcp relay information option vpn-id
ip dhcp relay information option subscriber-id VOIP
!
interface fastethernet 0/0.3
encapsulation dot1q 3
ip address 10.208.3.1 255.255.255.248
ip dhcp relay information option vpn-id
ip dhcp relay information option subscriber-id WIFI
!

So i think i just need to add,

ip dhcp class VOIP

relay agent information

relay-information hex ??

I have a lab setup that has several Vlans each with its own DHCP address space configured. My Gigethernet interface has Q tags configured for each corresponding Vlan. When a host from Vlan Red sends DHCP discovery messages the router will see the messages on Vlan Reds corresponding subinterface. The router will then provide a client lease IP address for that Vlan because the default router option in a DHCP configuration is usually the same as the subinterface.

ip dhcp excluded-address 192.168.20.1

ip dhcp excluded-address 192.168.20.2

ip dhcp excluded-address 192.168.20.3

ip dhcp excluded-address 192.168.20.4

ip dhcp excluded-address 192.168.20.5

ip dhcp excluded-address 192.168.10.1

ip dhcp excluded-address 192.168.10.2

ip dhcp excluded-address 192.168.10.3

ip dhcp excluded-address 192.168.10.4

ip dhcp excluded-address 192.168.10.5

ip dhcp excluded-address 172.16.10.1

ip dhcp excluded-address 172.16.10.2

ip dhcp excluded-address 172.16.10.3

ip dhcp excluded-address 172.16.10.4

ip dhcp excluded-address 172.16.10.5

!

ip dhcp pool CME

  network 192.168.20.0 255.255.255.0

  option 150 ip 192.168.20.1

!

ip dhcp pool Users

   network 192.168.10.0 255.255.255.0

   default-router 192.168.10.1

!

ip dhcp pool CUCM

   network 172.16.10.0 255.255.255.0

   default-router 172.16.10.1

   option 150 ip 10.101.17.80

!

GigabitEthernet0/0.10      192.168.10.1    YES NVRAM  up                    up     

GigabitEthernet0/0.20      192.168.20.1    YES NVRAM  up                    up   

I hope that helps

ok, i think that does, so you are saying for dhcp pools where the sub interfaces ip matches the default gw of the pool then they will assign an ip from that pool automatically. What about if i were for example to set the default gw for the vlan 3 to 10.208.3.30 so that traffic goes via the firewall to ensure that only certian traffic can access the network segments?

pixie79UK wrote:

ok, i think that does, so you are saying for dhcp pools where the sub interfaces ip matches the default gw of the pool then they will assign an ip from that pool automatically. What about if i were for example to set the default gw for the vlan 3 to 10.208.3.30 so that traffic goes via the firewall to ensure that only certian traffic can access the network segments?

Mark

It's not so much that the subinterfaces match the default-gateway it'e because the DHCP request is received on the specific subinterface. The router knows the address of the subinterface and so knows which pool to allocate an address out of. So absolutely you can tell the router for a specific pool to hand out a default-gateway of the firewall and it should work fine.

Jon

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card