05-15-2019 11:03 AM
Hello,
I'm a newbie to Cisco switches, on previous ones my config would be simple:
port 1 -> router (tagged traffic for vlan 2,3, maybe untagged for mgmt vlan to access the switch)
ports 10-20 -> untagged traffic for vlan 2
ports 21-24 -> untagged traffic for vlan 3
and that's it.
Here, to make a tagged port on my 3560 as far as I understood I need to:
conf t
interface gi0/x
switchport mode trunk
switchport access vlan x ??
when I do:
show interface gi0/x switchport I see:
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
...
Access Mode VLAN: x (xxxx)
Trunking Native Mode VLAN: 1 (default)
On untagged I do:
switchport mode access
switchport access vlan x
and I think that the untagged one should be correct :)
To tag a vlan I need to add it to a trunking native mode vlan or access mode vlan?
Thank you in advance for any responses!
Solved! Go to Solution.
05-15-2019 11:43 AM - edited 05-15-2019 11:45 AM
Hi,
Are you using one vlan for all these devices?
for trunk all you need is this:
conf t
interface gi0/x
switchport mode trunk
If you want to be specific you can add the vlans to your trunk port
switchport trunk allowed vlan x,x,x
For access port your config is correct
On untagged I do:
switchport mode access
switchport access vlan x
HTH
05-15-2019 11:43 AM - edited 05-15-2019 11:45 AM
Hi,
Are you using one vlan for all these devices?
for trunk all you need is this:
conf t
interface gi0/x
switchport mode trunk
If you want to be specific you can add the vlans to your trunk port
switchport trunk allowed vlan x,x,x
For access port your config is correct
On untagged I do:
switchport mode access
switchport access vlan x
HTH
05-15-2019 12:20 PM
Hi,
Thanks for the response, I didn't notice "trunk allowed VLANs" :). In this particular case, I'm using only two VLANs which are tagged to separate routers as there are two WAN connections which had to be separated this way, that's why I wanted to specify which VLAN should be tagged to a specific port.
05-15-2019 05:21 PM
There should be command under the interface that is trunked. Here is an example.
Also if you are using older software you may have to set the encapsulation. See link:
switchport trunk allowed vlan 2, 10
or
switchport trunk allowed vlan add 2, 10
HTH
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide