Can a Cisco switch port be configured to communicate with another switch when the ports on each switch are on different vlans?

EDIT to add more details: The data center that we use has internal vlan numbers for their clients. This would provide internet connectivity as well as a point to point Metro E connection that connects our office to our rack in the data center.

We don't want to use the data centers vlan numbers since they are in the extended range and would require us to disable vtp on our switches.

I'm trying to find a way that would allow me to assign a few ports to, lets say, vlan 2, even though on the far end of the cable going to this port, on the data center side, they might have this in vlan 1700.

  • Is there a router in between these switches anywhere, or is this a lot of switches connected to one another? – sclarson Jul 27 '09 at 14:31
  • These are Cisco 3560 and 2950 switches. We are preforming some routing on the 3560's but no "real" router exists right now. – Richard West Jul 27 '09 at 14:36

If there is only one vlan involved, then just set your switchport as 'Access' and to the desired vlan. It will ignore any vlan tags.

If you want to have multiple vlans, then things get more complicated as Evan Anderson alluded to, but even then you might be able to do it (though you might not want to -- sometimes being overly clever has its downsides...).


So here is the requested (not) pretty picture. Option #1 is the simple situation where they hand you a connection as a access port, in which case vlan tags don't matter. Just assign your port to the desired vlan.

Option #2 is the more complicated situation where they are handing you a trunk port with several vlans. In this case you can use another switch to "re-map" the vlan tags to your desired numbers. Be careful with this as it a little unusual...

alt text

  • Same thing I said, but with pictures. +1. But you may have do disable CDP and spanning tree on the remapper switch, or it will block the access ports. – Thomas Jul 28 '09 at 8:52
  • There's a frog in your picture.... – serial engine Mar 27 '11 at 12:18



Without a lot more information about your network, telling you how to do what you want to do is going to be very difficult.

It sounds like you want to cause a port on "switch A" to be a member of a different VLAN than the other ports on that switch (let's call those "VLAN 1" and "VLAN 2", respectively). Further, then, you want to connect "switch A" to "switch B" where there are already ports assigned to VLAN 2.

You could accomplish what you're looking for in one of two (2) different ways:

  • Define VLAN 2 on switch A and create a VLAN trunk between switch A and switch B carrying tagged Ethernet frames. Assign the needed port on switch A as an "access" port into VLAN 2.

  • Define VLAN 2 on switch A and define an "Access" port into VLAN 2 that's plugged into an "access" port of VLAN 2 on switch B. Assign the needed port on switch A as an "access" port of VLAN 2.

I would recommend hunkering down with the Cisco web site and finding good third-party articles about how Ethernet VLANs work. Somebody can tell you how to do this, no doubt, but you'll be in a lot better shape if you understand what's going on.

  • Evan, my original question was poorly written. Perhaps I can better explain. What I'm trying to do is be abelt to setup Vlan 2 on my switch, however the vlan on the far switch might be Vlan 3. I want my switch to ignore any vlan tags that might be coming from the far end, as well as striping off any vlan tags that are egressing from my switch going to the far end. This would allow me to communicate with the network on the far end within the vlan that they have defined (since they allow untagged traffic to come in), and me to the ability to number my vlans independent of the far end. – Richard West Jul 27 '09 at 14:26
  • Here's the big question: What kind of port does your point-to-point link to the datacenter plug into? Is it an "access" port into a single VLAN, or is it a "trunk" port carrying multiple VLANs? – Evan Anderson Jul 27 '09 at 15:04
  • That's a good question that's going to be difficult for me to get an answer to since AT&T is providing the Metro E circuit. I know at the data center AT&T is delivering multiple clients Metro E circuit over a single fiber connection, so it sound like a trunk port. having said that the data center might be that trunk into a single access port that is delivering the copper to our cabinet. – Richard West Jul 27 '09 at 15:22

You are being unclear. A nice diagram usually helps.

Are you saying you get a VLAN tagged with 1700, and you want you switches to handle it as VLAN 2?

If you receive the VLAN tagged then no, not on a simple switch as far as I know.

You can put a switch in between, disable VTP, CDP and spanning tree (otherwise it will notice you're remapping and complain) and have one side be a trunkport that gets vlan 1700, and the other side an access port for that vlan. Then receive that access port as if it were vlan 2.


I'm not sure to have well understand. Here is what I understand : Your provider give you a connectivity (uplink) over vlan X while you would like to use vlan Y on your internal network.

There is something that change everything, is the uplink a trunk or not.

  1. If it's not a trunk you don't have any problem at all, just do a switchport access vlan Y on the port where the uplink is connected. Incomming trafic will enter your network with vlan Y and outcomming trafic will leave without any vlan tag and your opertor will add vlan X itself. But if they give you a vlan id this case is probably not the good one.

  2. If it's a trunk you will have problem, depending of the switch you use you may can do some trick to change the tag number but in any case you will have vlan X in you vlan database so that you will not be able to use VTP as you would like. You may take a look to switchport trunk native vlan command. It could save you if your provider is able to send you untagged data over the trunk and can easily retag (on their side) vlan of data you send.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.