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

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 set-up

Hi

I am a CCNA student and as part of CCNA3 we have been asked to set up VLANs. We are connecting 4 hosts, 2 switches and a router. hosts 1 and 3 will be on VLAN 10 and hosts 2 and 4 will be on VLAN 20.

I am having trouble with the IP addresses. I am using a class C IP address starting with 192.168.???.???. I am not sure what IP address i need to configure on the router to allow the VLANs to communicate. And what IP addresses do I need to give to the hosts, I think they need to be subnetted but im not sure. Please can anyone help.

Thanks in advance

Uzma

18 REPLIES
Bronze

Re: VLAN set-up

hi

first you have to know that each VLAN is a separate subnet if you have two vlans so you need two subnets.

the host that are in a vlan X that belong to the subnet S, must have ip addresses within this S subnet(if vlan 10 then choose 192.168.10.x/24) (for VLAN 20 use 192.168.20.x/24).

so PCs that are in a vlan the SVI switched vlan interface of that vlan plays the role of the gateway and you can create it using

interface vlan 10

ip address 192.168.10.1 /24

no shutdown

the same work do it for VLAN 20.

to make two vlan able to communicate you need a layer 3 device a router for example.

if your router has two fastethernet interfaces connect each to a different

switch and give it an address from the subnet of the vlan that is connected to.

enable routing on the router.(you dont need a routing protocol)

if you have one fastethernet interface in your router you are in a config called router in a stick. configure on that interface two subinterface , each represent a vlan, and configure the trunk encapsulation, enable routing .

go back to the switches connect them with a crossover,configure the link as trunk.

HTH.

do rate if does

Bronze

Re: VLAN set-up

Hi,

Yes, you have two create two subnets as follows:

- VLAN 10 - 192.168.10.0/24

- VLAN 20 - 192.168.20.0/24

If there is one link at the router, then you need to create a trunk link between the two switches, and also one link from one of the two switches to the router as dot1q trunk.

at the router dp the following:

interface fastethernet 0/1.10

encapsulation dot1Q 10

ip address 192.168.10.1 255.255.255.0

interface fastethernet 0/1.20

encapsulation dot1Q 20

ip address 192.168.20.1 255.255.255.0

Then you need to create the two vlans at the both switches and assign the ports to the VLANs.

For PCs

PC 1,3 IP addresses:

192.168.10.100 & 192.168.10.102

PC 1,3 IP addresses:

192.168.20.100 & 192.168.20.102

--------

If you have two fastethernet ports at the router, then you need to configure the ports as follows:

interface fastethernet 0/1

ip address 192.168.10.1 255.255.255.0

interface fastethernet 0/2

ip address 192.168.20.1 255.255.255.0

Interface 0/1 will be connected to Switch1 as access and the VLAN 10 will be configured at Switch1.

Interface 0/2 will be connected to Switch2 as access and the VLAN 20 will be configured at Switch2.

And no link between the two switches.

Please rate if it is helpful!

Thanks

Abd Alqader

Bronze

Re: VLAN set-up

hi

if your router dont support ISL , you have to go with dot1q, as a.hajhamad specified in his post but here in that case you need to add something to the config posted by a.hajhamad about a subinterface for the native VLAN 1 if both vlans are different from the native.

interface fastethernet 0/1.1111

encapsulation dot1q native 1

ip address ......

HTH

Bronze

Re: VLAN set-up

Hi Kamal,

Thanks for your input. But i don't thing that native VLAN is required at this case.

Regards

Abd Alqader

Bronze

Re: VLAN set-up

hi hamad

yes absolutly you are right but let s do the job well, if you take a pc and you plug it in a port that is kept to its default behavior which means membership in the VLAN 1 so if we dont add that on the router that PC can not communicate elsewehere.

thanks

New Member

Re: VLAN set-up

Thanks to both of you for you help. I will be doing the set-up and config next week. I will let you know how I went on or if I need anymore help.

Thanks again.

Uzma

Bronze

Re: VLAN set-up

Hi Kamal,

Yes, but i think the PCs will be assigned either to VLAN 10 or VLAN 20 only.

anyway, thanks ....

Abd Alqader

Re: VLAN set-up

Hi,

just like to add few things in this.

inter-connection between switches will always be trunk port regardless whether we are connecting both switches to router different interfaces or we have configured router on stick.

also, if you dont want VLAN 10 and VLAN 20, then also you dont need connect them through a trunk port, however if you want both VLANs in both switches, you would like to configure port as trunk port.

Now, if you want to make it as a trunk port, you would like to configure VTP on switches.

by default both switches are configured as VTP server. you can configure VTP domain and configure one switch in server mode and rest in client mode. Then you need to create VLAN 10 and VLAN 20 on the switch configured in server mode.

Unless both switches have VLAN 10 and VLAN 20 in it and ports are assigned to correct VLAN membership, communication between hosts will not happen.

hope it helps .... rate if it does ...

New Member

Re: VLAN set-up

Thank you very much,you help me a lot,specialy with the vlan 20.I will being watching for any othr posts.

(sorry for my english I am Greek)!!!!

New Member

Re: VLAN set-up

Hi,

Thanks for all your contribution.

Am just wondering if the vlans will need to be configured to be allowed on all the trunk lines i.e switch to switch and router to switch.What is the default behavior of this aspect of the configuration.

THANKS

New Member

Re: VLAN set-up

you need a subnet for each vlan.

you need one host address per subnet on the router

you need at least a 6 host network 256-8=248

so vlan 10 network

192.168.0.0 hosts .1-.6 mask 255.255.255.248

vlan 20 network

192.168.0.8 hosts .9-.14 mask 255.255.255.248

New Member

Re: VLAN set-up

I've been reading these contributions and have a question :

Is it possible to skip the router and just carry on with just switches? And the 2 vlans of course...

Kenneth

Re: VLAN set-up

Hi,

Yes it is possible to perform Inter-Vlan Routing (Have multiple Vlans) without having to have a router. To achieve this you must have a L3 Switch. L2 Switches cannot perform Inter-Vlan routing. So you will need Cisco 3550, 3560 0r 3750 model type switches, which will allow you to do this.

I am afraid 2900, 2950 or 2960 models cannot perform this function without the help of a Router.

HTH

Shaheen

New Member

Re: VLAN set-up

Thank you for your answer!

I have a small network with 2 cisco 2924. I would like to use those for 2 diferent networks because of line cost. Just private networks.

Could I have a 2900 in one end?

Kenneth

Bronze

Re: VLAN set-up

Hi Kenneth,

You need a layer 3 device for communication between the two VLANs.

2900 is alyer 2 device, you need a layer 3 switch or a router.

I hope this is helpful!

Regards

Abd Alqader

New Member

Re: VLAN set-up

OK, I have some 2600-routers that I think I can use.

But can you please look at the attached plan and tell me where I should put the router(s)?

And maybe you have a better plan?

The 10-net is up and running today. I want to create the new network without too much cost. In total I have about 50 End sites... Not much trafic in the networks.

Re: VLAN set-up

will you please tell me what are those ethernet modems are for?

and which switches are in your place three?

and the far end switch is of CO?

regards

Devang

New Member

Re: VLAN set-up

Hi!

Sorry for the late response. I've been out of office...

The equipments on the far end are stuff that sending hello-messages. Not much trafic. A PC maybe from time-to-time.

The far end are places outside the company office(CO). We use those modems for connections. Not dial-up, but leased lines.

The switches are all cisco2900.

Kenneth

1807
Views
48
Helpful
18
Replies
CreatePlease login to create content