Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Vlan and DHCP relay


I'm trying to build VLAN on my network using Catalyst 2940. My principal network is

My cisco catalyst is

I build a VLAN 2

How may I do to allow a PC connected on a VLAN 2 port to get an IP address by DHCP situated on my principal network ?


Re: Vlan and DHCP relay

Hi there,

You will need a Cisco router as well, in order to do the inter-VLAN routing.

You need to set up the Ethernet interface on the router with a sub-interface for each VLAN you have. You need to enable trunking on the switchport the router is connected to, trunking each VLAN to the router. You can then set an "ip dhcp helper x.x.x.x" address on each sub-interface.

This is sometimes known as "Router on a stick" - you can find some example configs by searching for this.

Hope this helps!

Kind regards



Re: Vlan and DHCP relay

The 2940 is a layer2 switch only , the only reason to have an address on this switch is to manage the switch itself . It has no routing functionality so you need to only define 1 SVI to manage the switch so if you have a "interface vlan 1 then that is all you need , get rid of any other ip addresses on the switch. If you need to have devices from both networks on this switch then you need to have either a router or a l2/3 switch and make the connecting link between the 2940 and the routing device a trunk link . If your dhcp server is not on the same subnet your vlan 2 addresses then on the routing device you will need to add "ip helper addresses pointing to the dhcp server address.

New Member

Re: Vlan and DHCP relay

thank you for your reply.

I saw that there is a "dhcp relay" configuration section onto the catalyst 2940... what this function is supposed to do ?

Hall of Fame Super Bronze
CreatePlease login to create content