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

Simple VLAN Network Configuration

Dear All,

I am a newbie and have setup a small lab to practise vlans. I have not done any configuration on the switch or the router. Below are my queries:

1. Do I have to configure sub-internfaces on the router for the vlans? If not then how can I get the traffic from each vlan to the internet?

2. Are the respective vlans able to access each other? Eg Will I be able to access a host on vlan 102 from vlan 101?

3. How will all the hosts each on vlan get IP address from the DHCP server?

4. What is the basic working configuration for this setup?

Thanks for all your help.



Hall of Fame Super Blue

Re: Simple VLAN Network Configuration

1) Yes if you don't have an added switch module.

2) If you setup subinterfaces on the 2811 - yes.

3) By use of ip-helper address - see below



2960(config)# vlan 101

2960(config-vlan)# name vlan101

etc.. for each vlan

On the port connecting the 2960 to the 2811

int fa0/1

switchport mode trunk

Then you can allocate ports into vlans by using the following commands

int fa0/2

switchport mode access

switchport access vlan 101


On 2811

int gi0/1.101

encapsulation dot1q 101

ip address

int gi0/1.102

encapsulation dot1q 102

ip address



The interface numbers do not have to match the vlan numbers eg.

gi0/1.101 could just as easily be

gi0/1.1 it's up to you. BUT the encapsulation dot1q - this must use the correct vlan number.

Set your clients in vlan 101 to have a default-gateway of

vlan 102 - default-gateway of


Under each subinterface on your 2811 whatever the DHCP server is - lets say

int vlan 102

ip helper-address

Note you don't need this under the interface that the DHCP server is on.


New Member

Re: Simple VLAN Network Configuration

Hi Sarf,

1. Yes, you have to configure sub-interfaces on the router, each with a IP-Adress in the subnet of that vlan.

2. The Vlans are only accessible from each other if the router has the mentioned sub-interfaces.

3. The DHCP-Server has to have a pool for each subnet/vlan. When the dhcp-server gets an dhcp-request, he sees the packet with the source-address of the routers sub-interface. E.g. if a host from vlan 101 requests an IP-address, the packet arrives at the dhcp-server with the routers IP-Adress of VLAN 101. Because of that, the DHCP-Server knows what pool he has to choose.

BUT you have to configure IP-Helper-adresses on the routers sub-interfaces, otherwise the router wouldn't forward the dhcp-requests because they are broadcasts.

4. Do you want the exact commands?