cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1092
Views
0
Helpful
4
Replies

Vlan and DHCP relay

mlecourieux
Level 1
Level 1

Hi,

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

My cisco catalyst is 192.168.0.252

I build a VLAN 2 192.168.1.252 255.255.255.0

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 ?

4 Replies 4

graemeporter
Level 1
Level 1

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

Graeme

glen.grant
VIP Alumni
VIP Alumni

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.

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 ?

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: