Using switchport mode access vlan x and switchport mode trunk on the same interface

Discussion in 'Cisco' started by Ned, Jul 27, 2006.

  1. Ned

    Ned Guest

    I'm new to Cisco IOS and I'm trying to configure a 4507.
    I've been configuring trunks using the syntax below without the
    "switchport access vlan" command. I use the "switchport access vlan"
    command to make interfaces members of a vlan but never for trunks.
    Today I accidentally entered it on a trunk interface and the IOS did
    not complain. I was wondering if anyone could tell me what this command
    might do when used on a trunk interface.


    interface GigabitEthernet2/1
    switchport access vlan 800
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 50
    switchport trunk allowed vlan 50,60,800
    switchport mode trunk
    Ned, Jul 27, 2006
    1. Advertisements

  2. Ned

    Sam Wilson Guest

    It sets the port VLAN for when the port is in access mode. If you set
    the mode to access (switchport mode access) then the port VLAN would
    switch to 800 from 50; if you switch to one of the sensing modes
    (switchport mode dynamic ...) then the state the port negotiates into
    will determine the port VLAN.

    Sam Wilson, Jul 27, 2006
    1. Advertisements

  3. Ned

    Ned Guest

    Thanks, it all makes sense to me now.

    Ned, Jul 28, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.