cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3082
Views
0
Helpful
40
Replies

How to Configuring Catalyst Switch for 3 Vlans with one DHCP Server?

reagentom
Level 1
Level 1

> Dear Sir’s

I’m new System Engineer in a College, I have Cisco Catalyst Switch 4006 with Supervisor II OS witch configured for 3 Vlans, I have DHCP Server witch is connected to Vlan 1 but it’s working as DHCP server for all computers connected to Vlan 2 and 3 each Vlan has a different IP scope (VLAN2 -172.16.20/24 and VLAN3 – 172.16.3.0/24) ..

Now I want to create new Vlan (Vlan 4) and make it obtain the IP from same DHCP server with scope (172.16.4.0/24) but the problem I don’t know how the current situation is going on and witch technology is applied for make the DHCP server serve 3 Vlans and also I don’t know how I can check if there is DHCP BOOTP Relay agent configured or not..

The attached file is a copy of show config all command.

Please Help ASAP

Best Regards

1 Accepted Solution

Accepted Solutions

Hi,

Sorry for my late reply as I was busy with some work.

Yes if you configure any vlan in your switch all the trunks by default will become the member of that vlan. As port 2/1 is been configured for trunk port and you are creating a new vlan same time that port 2/1 will also become a member of that vlan.

What I will say again is configure your ISA server with one more subnet of vlan 4 network and then assign that ip as your gateway on vlan 4 machines and that will be a straight and simplest way to achive what you want.

HTH

Ankur

View solution in original post

40 Replies 40

ankurbhasin
Level 9
Level 9

Hi,

What I underatand with your question is you have 3 vlans and you have DHCP server in one vlan from where all your computers pick an ip address.

You must be having some layer 3 device which routes between all 3 device. Now if you are using layer 3 switch to route between all your vlans then just need to perform 2 simple steps:

Create new logical vlan interface :

(config)#Interface vlan 4

(config-int)#ip address

(config-int)#ip helper-addres

ip helper-address will make your interface as a DHCP server relay agent and will convert BOOTP broadcast into unicast request and send its request to DHCP server

Incase you are using router as a device for routing between different vlans then you might have craeted sub-interface for all your vlans on your router physical interface so create one more subinterface for vlan 4 on your router and just put a command ip helper-address with ip address of DHCP server.

This should solve your problem.

HTH

Ankur

Mr Ankur

Thanks for speedly reply, I have layer 3 switch (cisco catalyst 4006) witch routing between 3 vlans,

the first problem is I don't know how I can check for the current configuration witch already running on the switch to make the interface as DHCP server

the secound problem is this switch not using IOS but using WS-C4006 Software, Version NmpSW: 6.3(5) and I can't handle the command with it. and also I can't find any record related to ip helper address in the attached file for show config all

Please help

Thanks

Hi,

You cannot do intervlan routing between vlans on your CATOS by which I mean the switch you are having is a layer 2 switch and its is not a layer 3 switch unless and untill it is having 4232-L3 blade in its chassis .Your 4006 switch "set base" commands. Your config does not show me any config for intervlan routing.

In your config I see trunk config and I am sure you must be having some layer 3 switch or router connected to thr trunk port.

Just find out which is the layer 3 device you are having in your network which is taking care of routing between all the vlans.

HTH

Ankur

Dear Ankur

I don't have any routing device in my network.. only 1 switch (cisco cat 4006) + 1 cisco pix 515E as a firewall

Please Advice cuz I need to slve this problem urgent

Hi,

As you say you do not have any routing device in your network then how can your 3 vlans talk together and how can your 3 vlans pick an ip address from DHCP server which is in vlan 1 only.

Can you please check your "sh mod" and see if you have 4232-L3 module in your chassis and if you have can you please send me "sh run" from that blade. Without routing device in your network it is not at all possible to let 3 vlans talk together and pick an ip address from DHCP server which is in vlan 1. If you are sure that you have no routing device in your network then picking an ip address in a different vlans from different vlan is not possible other then following a workaround which is vlan leakage which sometimes work and some times does not.

Please check your "sh mod" on your switch.

Regards,

Ankur

Hi,

yes I have 4232-L3 module as you seen in sh mod result (module 2) and attached for you both sh mod and sh run command result

Thanks

Hi,

Cool now when you are clear that you have 4232-L3 blade I am sure it must be taking care of your routing.

You send me the "sh run" output from the switch you have to send it to me from the 4232-L3 blade.

Run a command "session 2" from your switch and you will loging to your 4232-L3 blade and then take the output of "sh run" from there.

Regards,

Ankur

Thank you very much Ankur; attached is a copy of show run result from routing blade..

Please explain for me what I have to do step by step

Best Regards

Hi,

I am sure 172.16.3.6 is your DHCP server address am I right?

If yes please check in your router config which you send me

interface GigabitEthernet3.2

encapsulation dot1Q 2

ip address 172.16.2.1 255.255.255.0

ip helper-address 172.16.3.6

interface GigabitEthernet3.3

encapsulation dot1Q 3

ip address 172.16.3.1 255.255.255.0

this config is taking care of your intervlan routing betwee vlans. But after checking your config I see no ip helper-adress is configured for int gig3.3 which is for vlan 3 so as per config workstations in vlan 3 should not pick an ip address from DHCP server? Is it picking or not?

To configure for your vlan 4 just create one more subinterface

interface GigabitEthernet3.4

encapsulation dot1Q 4

ip address ip helper-address 172.16.3.6

HTH

Ankur

Hi Ankur

Thank you very much,

1- yes my DHCP is 172.16.3.6 and it's connected to VLAN3 and it's connected to port number 2/6 and it's serving both Vlans 2,3 that's meaning I have 2 DHCP scops on DHCP server (172.16.2.10 - 172.16.2.254) and (172.16.3.10 -172.16.3.254) and computer witch connected to Vlan 2 picking IP from DHCP server in the range of 172.16.2.10-254 and computers witch connected to VLAN3 piking ips from same DHCP server but in range 172.16.3.10-254

now I have some free ports I want to put some of them in new vlan (Vlan4) and creat new scoop in the same DHCP server starting from (172.16.4.10 - 172.16.4.254) /24 so any computer will connect to this Vlan 4 piking ip from the same DHCP but in the range of 172.16.4.10-254..

PLease Explain for me what I have to do but step by step because any mistake will be a big problem for the all network

Thanks and best regards

ankurbhasin
Level 9
Level 9

Hi,

I thaught you have a DHCP server in vlan 1 as you updated in your first post. Anyways cool!!

You just need to do these steps

1) Configure your DHCP server with the scope as you said 172.16.4.10-254

2) On your 4232-L3 blade perform 3 command

router(config)#interface GigabitEthernet3.4

router(config-subif)#encapsulation dot1Q 4

router(config-subif)#ip address <172.16.4.x x.x.x.x> router(config-subif)#ip helper-address 172.16.3.6

This will take care of router config

3) Now if you assign any workstation to vlan 4 on your switch it will surely pick an ip address from your new pool which is been configured by you for vlan 4

HTH

Ankur

Thanks ankur

I'll try it and let you know for the result

but last question I have to creat vlan 4 first before doing routing command is it right ?? if yes what about command ??

is it

Switch>(enable) set vlan 4 vlan_name ??

and to asign a port is I have to use command

set vlan 4 port No.

Thank you again and I'll back for you soon with result

Thanks

Hi Regentom,

Yes you got it now!!

Running this single command "set vlan 4 port No" will also create the vlan and assign it to that particular port.

I will surely wait for the results.

Best of Luck

Regards,

Ankur

Dear Ankur

Thank you very much I had tryed today and it's working fine for piking ip from our DHCP (172.16.3.9) and it was in range of VLAN 4

but the main problem now computer witch connected to VLAN 4 can access computers witch connected to VLAN 2 and 3 !!! this should be not happend because Vlan 3 for staff computers and both Vlan2,3 will be for students then for me no problem for connecting between both vlans 2 , 4 but I don't want any connection between V4 and V3 unless for piking IP from DHCP server witch connected already to VLAN3

Please Advice as soon as so I can fix this problem

Best Regards

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: