Switch Access tow Data Vlan at same time

Answered Question
Jun 30th, 2010
User Badges:

how can i configure cisco 3560 switch port to be ember of 2 data vlan at the same time :


bellow is the switch port configuration:


interface GigabitEthernet0/1
switchport access vlan 19
switchport mode access
switchport voice vlan 18
switchport port-security maximum 3
switchport port-security
switchport port-security violation protect
switchport port-security aging type inactivity
storm-control broadcast level 1.00
spanning-tree portfast
spanning-tree bpduguard enable
end

if you noticed here the switch port is accessing VLAN 19 which is data VLAN , and its Voice VLAN is 18

how can i make access another Data vlan eg: 11


please help me with the same.

Correct Answer by Leo Laohoo about 6 years 10 months ago

If the port is set to a trunk port, it is a member to all the VLANs specified.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
shivlu jain Wed, 06/30/2010 - 03:42
User Badges:
  • Silver, 250 points or more

Hi


On single port could only be part of access vlan. If you want to pass multiple data vlans on that port then you need to configure that port as trunk port.


regards

Shivlu Jain

http://www.mplsvpn.info    

Leo Laohoo Wed, 06/30/2010 - 04:03
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

Make it a dot1q trunk port and allow VLANs 11, 18 and 19.

Muzzamil Hussain Wed, 06/30/2010 - 04:46
User Badges:

leolaohoo wrote:


Make it a dot1q trunk port and allow VLANs 11, 18 and 19.

Hi


thanks for your replay, Butwhen configured the same i was not able to make the switch port member of VLAN 19 and 11 as well

bellow is the configuration :


Switch(config)#int g0/1
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport trunk allowed vlan all ( i Just Allwed All VLAN )
Switch(config-if)#do sh run int g0/1
Building configuration...
Current configuration : 397 bytes
!interface GigabitEthernet0/1
switchport access vlan 19
switchport trunk encapsulation dot1q
switchport mode access
switchport voice vlan 18
switchport port-security maximum 3
switchport port-security
switchport port-security violation protect
switchport port-security aging type inactivity
storm-control broadcast level 1.00
spanning-tree portfast
spanning-tree bpduguard enable
!
Switch(config-if)#switchport access vlan ?
  <1-4094>  VLAN ID of the VLAN when this port is in access mode
  dynamic   When in access mode, this interfaces VLAN is controlled by VMPS

Switch(config-if)#switchport access vlan 19 11
                                               ^
% Invalid input detected at '^' marker.



Please advice

Correct Answer
Leo Laohoo Wed, 06/30/2010 - 04:57
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

If the port is set to a trunk port, it is a member to all the VLANs specified.

Muzzamil Hussain Wed, 06/30/2010 - 14:09
User Badges:

so i can connect an end host to the port ? but IP address it will get , if you noticed we can make the switch port access only one VLAn even if we configured it as a trunk port ?

Leo Laohoo Wed, 06/30/2010 - 15:12
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

Thanks for the rating.



so i can connect an end host to the port ?    

Yes.  It's possible.



if you noticed we can make the switch port access only one VLAn even if we configured it as a trunk port

If you  want the port to access only one (1) VLAN then Best Practice is to configure the ports as access.

Actions

This Discussion

Related Content