cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2209
Views
0
Helpful
8
Replies

Vlan access in single port

is-it-possible-to-configure-multiple-vlan-s-on-a-single-port-of-a-switch

switch model sg350 poe managable switch 

1 Accepted Solution

Accepted Solutions

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Yes it possible but only one VLAN will be native and all others must be tagged VLAN as 

 

interface fastetherent 1/5

switchport mode trunk

switchport trunk native vlan 5

switchport trunk allowed vlan 1-10,12-20

 

switchport mode trunk: Here you can see that I converted a switch port from access to trunk mode because trunk have only this capability to carry multiple  VLANs.

switchport trunk native vlan 5: As mentioned that Only one VLAN can be native and its traffic will not be tagged with VLAN ID and I decided to make native VLAN as 5.

switchport trunk allowed vlan 1-10,12-20: Here, You can see that I allowed multiple VLANs on a single port as VLAN 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20.

 

Keep in mind that your remote device must be capable to understand VLAN tagging and must be configured in the same way.

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

View solution in original post

8 Replies 8

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Yes it possible but only one VLAN will be native and all others must be tagged VLAN as 

 

interface fastetherent 1/5

switchport mode trunk

switchport trunk native vlan 5

switchport trunk allowed vlan 1-10,12-20

 

switchport mode trunk: Here you can see that I converted a switch port from access to trunk mode because trunk have only this capability to carry multiple  VLANs.

switchport trunk native vlan 5: As mentioned that Only one VLAN can be native and its traffic will not be tagged with VLAN ID and I decided to make native VLAN as 5.

switchport trunk allowed vlan 1-10,12-20: Here, You can see that I allowed multiple VLANs on a single port as VLAN 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20.

 

Keep in mind that your remote device must be capable to understand VLAN tagging and must be configured in the same way.

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Can i access as a single port  if any one port to access all vlan in my pc. Please check attachment and then please give configuration setup Because I am tray to ping other switch device then ping request time out error show.

 

 

Thanks&Regards

   Umesh.V

 

 

 

I have attach layout as per my Requirement

switch1 vlan id is 11

switch 2 vlan id is 10

switch 3 vlan id is 12(Main Switch to connect port 4 to access all switch vlan device)

please check attachment then you understood my requirement.

 

 

Thanks&Regards

   Umesh.V 

Hi,

I checked your configuration and found that You are using 2960 switches in your LAB and all are Layer 2 switches. So Inter-VLAN routing is not possible on your SERVER switch so you have some other options as:

1. Use InterVLAN routing on the Router.

2. Replace SERVER (Layer 2 Switch) with the Layer 3 Switch 3560 model in the PT.

 

Let, Talk on the First Option as Using the Router for InterVLAN Routing so try with below configuration:

Note: You are using the 1941 router, It may have some bug and Interface GIG0/0 was not coming UP. I didn't spend much time on the same so I added another router ISR4321. So My configuration is based on ISR4321.

 

interface GigabitEthernet0/0/0

no ip address

no shutdown

duplex auto

speed auto

!

interface GigabitEthernet0/0/0.10

encapsulation dot1Q 10

ip address 192.168.10.254 255.255.255.0

!

interface GigabitEthernet0/0/0.11

encapsulation dot1Q 11

ip address 192.168.11.254 255.255.255.0

!

interface GigabitEthernet0/0/0.12

encapsulation dot1Q 12

ip address 192.168.12.254 255.255.255.0

!

 

SERVER Switch Configuration: There is missing some configuration as:

 

interface FastEthernet0/4

Description: Connected to Laptop 2 VLAN 12

Switchport mode access

switchport access vlan 12

no switchport trunk allowed vlan 10-12

spanning-tree portfast

!

Note: Your laptop is not capable to understand the VLAN tagging and If you want to connect a device (Laptop, Desktop, Printer) that can't understand the VLAN Tragging then your switchport mode must be access mode.  Access switch is carrying untagged VLAN traffic for only one VLAN.

 

Other Missing Configuration as You missed to create VLAN on the switch and you only created SVI. Some switches will not create VLAN automatically so always make a habit to add VLAN and SVI both (if required).

 

VLAN 10

!

VLAN 11

!

VLAN 12

 

IP configuration on the LAPTOPs:

We configured Routing in the Router and given IP address as 192.168.10.254, 192.168.11.254, 192.168.12.254 so your end user's laptop/desktop/printer must have default gateway as

VLAN 11 Laptops:  192.168.11.254

VLAN 12 Laptops: 192.168.12.254

VLAN 10 Laptops: 192.168.10.254

 

Make those changes and it will work.

 

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hello Sir 

         As per your guide line i have change router and layer to to change layer 3 Switch. And Config the Switch and Router.Configuration is working but sir can i access all network vlan in single switch port(Example Server Switch Access port is 4 and i have connected laptop 2) then can access all vlan and all laptop ip in single server laptop PC if possible please explain me how to configuration.

 

 

Thanks&Regards

    Umesh.

Hello Sir

   Please update me If possible to access single pc to all vlan network.

 

 

 

Thanks&Regards

     Umesh.V

Hi,

As I mentioned that your Laptop can't understand VLAN tagging so it is not possible to assign multiple IP addresses from multiple VLANs on the laptop.

But in the real world, the virtual host server is giving the option to define VLAN Tagging with the virtual switch. If your server is supported to VLAN Tagging with a virtual switch as Hyper-V, VMware etc then it is possible.

Here, I am sharing some URL which will help you to understand the basic of a virtual switch with Hyper-V hypervisor.

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v-virtual-switch/hyper-v-virtual-switch

https://www.altaro.com/hyper-v/the-hyper-v-virtual-switch-explained-part-1/

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hi,
It is not possible with PT LAB.
Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!