How do I configure a port to access two vlans?

nice343nice343 Posts: 391Member
I know
switchport access vlan "number"
is used to assign a port to a vlan. But what if I want a port to belong to two vlans, how do I do it?
My daily blog about IT and tech stuff
http://techintuition.com/

Comments

  • iowatechiowatech Posts: 120Member
    If I remember correctly that would mean you would need 802.1q compliant hardware that allows port tagging to be enabled.

    If you do then your answer is: Setup port tagging.
  • malcyboodmalcybood Posts: 900Member ■■■□□□□□□□
    A single switch port can only be assigned to one VLAN.

    In order to communicate between 2 different VLANs you would need to introduce a layer 3 device, (layer 3 switch or a router) with an IP Plus IOS on it and configure the lab for "router on a stick" inter-VLAN routing.
  • iowatechiowatech Posts: 120Member
    A single switch port can only be assigned to one VLAN.

    Are you (above poster) talking about access ports by chance?

    An access port belongs to and carries the traffic of only one VLAN (unless it is configured as a voice VLAN port). Traffic is received and sent in basic formats with no VLAN tagging.
  • mikej412mikej412 Posts: 10,090Member
    nice343 wrote:
    But what if I want a port to belong to two vlans, how do I do it?
    Why do you want do it?

    You can setup an auxiliary vlan on CatOS or a voice vlan on IOS if you want to support both a data vlan and voice vlan on a port.

    Otherwise you setup the port as a trunk port and configure it only allow the VLANs you want.
    :mike: Cisco Certifications -- Collect the Entire Set!
Sign In or Register to comment.