cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
909
Views
0
Helpful
2
Replies

Need help setting up 2 VLANs

baku1001s
Level 1
Level 1

Hello everybody, I'm a computer science student and today at school we were given a starting ip of 196.100.0.0 and  had to set up 2 VLAN using a total of: 1 Router connected to 3 Switches that were connected to 6 PCs (2 for each Switch), so ever PC was connected to a Switch and my teacher wanted us to create two VLANs where each VLAN had inside of it one of the two computers connected to each switch.

 2vlans.PNG

What we did was: we assigned an IP to each PC belonging VLAN1(blue) starting from PC1 196.100.1.1 to PC5 196.100.1.3 and VLAN2 (red) starting from PC2 196.100.2.1 to PC6 196.100.2.3.

After that we set all the Default Gateway to 196.100.0.10 and Subnet Mask to 255.255.255.0, then we went ahead and created two VLANs in every switch and in the config window we assigned every port to a VLAN eg(Switch1 Fa1/1 to VLAN1, Fa2/1 to Vlan2 and then we set 0/0 to trunk).

It doesn't work when we try to ping since the package arrives to the Router but it doesn't know which port to send it to.

I think it's becouse we didn't set up properly the router/switches, I may have made some mistakes while typing but English isn't my first language, any help is greatly appreciated.

2 Replies 2

Hi @baku1001s

 

All you need is put switch and router in trunk mode. Then configure subinterface on router and use those IP address as default gateway of PCs.

 

-If I helped you somehow, please, rate it as useful.-

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi 

Your config should be:

 It can be adjusted to your IP addressing.

 

ROUTER

interface g1

no shutdown

 

interface g1.10

encapsulation dot1q 10

ip address 192.168.10.1 255.255.255.0

 

interface g1.20

encapsulation dot1q 20

ip address 192.168.20.1 255.255.255.0

 

interface g2

no shutdown

 

interface g2.30

encapsulation dot1q 30

ip address 192.168.30.1 255.255.255.0

 

interface g2.40

encapsulation dot1q 40

ip address 192.168.40.1 255.255.255.0

 

interface g3

no shutdown

 

interface g3.50

encapsulation dot1q 50

ip address 192.168.50.1 255.255.255.0

 

interface g1.60

encapsulation dot1q 60

ip address 192.168.60.1 255.255.255.0

 

 

SWITCH 1

vlan 10

name PC1

vlan 20

name PC2

interface fa0/24  (or your interface to connect to the router)

switchport mode trunk

no shutdown

 

<<<<connect your PC's>>>>

interface fa0/1

description PC1

switchport mode access

switchport access vlan 10

no shutdown

 

interface fa0/2

description PC2

switchport mode access

switchport access vlan 20

no shutdown

 

 

SWITCH 2

vlan 30

name PC3

vlan 40

name PC4

interface fa0/24  (or your interface to connect to the router)

switchport mode trunk

no shutdown

 

<<<<connect your PC's>>>>

interface fa0/1

description PC3

switchport mode access

switchport access vlan 30

no shutdown

 

interface fa0/2

description PC4

switchport mode access

switchport access vlan 40

no shutdown

 

 

SWITCH3

vlan 50

name PC5

vlan 60

name PC6

interface fa0/24  (or your interface to connect to the router)

switchport mode trunk

no shutdown

 

<<<<connect your PC's>>>>

interface fa0/1

description PC5

switchport mode access

switchport access vlan 50

no shutdown

 

interface fa0/2

description PC6

switchport mode access

switchport access vlan 60

no shutdown

 

 

Please dont forget to rate the comments if they were useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<