cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2425
Views
5
Helpful
6
Replies

VLAN

robbe0001
Level 1
Level 1

Hello,

First I'm new here ;) And I'm just started with learning for networks.

I have a problem with something I can't solve :s

I'm trying to make a little network for a small company ;)

With: a Dataserver, wifi router, a printer, a few computers and a few camera's.

Everything has to come throw 1 router, what sounds logic :D

Now I have made 1 router.

I have 2 camera servers. (yes 2 ;) It's because its from 2 different companys so we got 2 camera servers) I want them to connect to each other with a switch and then send them back to the router. On the other side of the router I have my dataserver and pc's, ....

I want that my camera server can talk to my dataserver. (and all the rest ofcourse ;) )

For my camera's I'm connected with: 192.168.2.0 and for all the rest 192.168.1.0

I tried to fix this with VLAN, but it won't work ;s

Someone who can push me in the right direction? :)

PS: sorry for bad english ;) It's not my best language :D

6 Replies 6

Joel
Level 1
Level 1

Hi,

Hopefully I've followed correctly. 

It sounds your trying to build a small network with a router on a stick. The switch port that connects to the router will need to be a trunk and tag the relevant VLANs. The router will have to be setup to for dot1q tags on the physical interface i.e.

Router example

inter gi0/0

inter gi0/0.10

encapsulation dot1q 10

ip address 192.168.1.1 255.255.255.0

Switch Example

interface gi1/1

switchport trunk encapsultation dot1q (only required if switch support ISL as well as dot1q)

switchport mode trunk

switchport trunk allowed vlan 10,20,30 etc

Set all the hosts default gateway to the IP address assigned to the local subnet/VLAN relevant router's interface example above 192.168.1.1.

Joel.

hi,

Thanks, I'm going to try to do what you say :)

EDIT:

Okay I tried, but still I have still failed :s

I have tried with 2 pc's connected to a switch. (I have for 1 pc VLAN20)

and the other pc is a maincomputer so I made a Trunk (VLAN 10-10, 20-20, 30-30)

I tried to ping this two pc's but I had a status: "Failed".

In packet tracer my links are green ;) So I don't know where I made a mistake :s

Did I do something wrong?

You should config your switch and router like this:

Switch configuration:

vlan 10

exit

vlan 20

exit

interface gigabitethernet 0/1

switchport

switchport mode trunk

switchport trunk allowed vlan 10,20

exit

interface fast 0/1

switchport host

switchport access vlan 10

exit

interface fast 0/2

switchport host

switchport access vlan 20

exit

Router configuration:

interface gigabitethernet 0/0

no shutdown

exit

interface gigabitethernet 0/0.10

encapsulation dot1q 10

ip address 192.168.10.1 255.255.255.0

exit

interface gigabitethernet 0/0.20

encapsulation dot1q 20

ip address 192.168.20.1 255.255.255.0

exit

In the above scenario the first pc is connected to the fast 0/1 of the switch and the other one is connected to the fast 0/2.

The router is connected to the switch via its the gig 0/0 port and the switch's port which is connected to the router is gig 0/1.

In addition to yunas instructions, please make sure you put the right gateway for each of your devices. Two different gateway IP addresses, one for each VLAN.

I will try this out! :)

But I noticed that I have one good VLAN connection between 2 pc's (with trunk & vlan ;) )

But If I have a connection between 2 other pc's on the same way it doesn't work anymore :s

So I'm going to try yunas_cisnix thing.

The first comment was a kick starter to create multiple VLANs on the router and the uplink (trunk port) for connect said router. You will need access ports on the switch for PCs/Printers etc. Each subnet should be mapped to VLAN 1:1 mapping. Depending on the number of VLANs/Subnets you require extend as necessary. So in terms of full configuration yunas_cisnix is correct for two subnets/VLANs.

Good work

Joel

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:

Review Cisco Networking products for a $25 gift card