Configuration of a CISCO CATALYST 2940 SWITCH

Unanswered Question
Oct 8th, 2008

How to associate a port (fast ethernet) of the switch CISCO CATALYST 2940 with 2 different VLAN (2 and 3).

I tried by means of the enchainement of the commands(orders):

conf t

interface FastEthernet0/1

switchport mode access

switchport access vlan 2

switchport access vlan 3


show running-config

Only the VLAN 3 is associated with the port 1.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
glen.grant Wed, 10/08/2008 - 03:49

The only way to to do that is to have the device on the other end support trunking then you would make that port a trunk link.

Jon Marshall Wed, 10/08/2008 - 03:49

You can't do this. However what you can do is

1) make the port a trunk port and only allow vlan 2 & 3 on it ie.

switchport mode trunk

switchport trunk allowed vlan add 2 3

2) have a data vlan and a voice vlan ie.

switchport access vlan 2 ( vlan 2 = data )

switchport voice vlan 3

What is it you are trying to achieve ?


colletlaurent Wed, 10/08/2008 - 23:58


I try to connect 2 groups of PCs (the First one goupe on port 2 and 3, the second group on ports 4 and 5) which are not in the same network and who have to reach a common PC which is on the port 1of the switch.

The PCs connected on ports 2 and 3 must not be seen the PCs connected on ports 4 and 5 of the switch and conversely. These PC have to see and be seen by the PC connected on the port 1 of the switch.

I had thought that to create VLAN, with the port 1 of the switch declared in 2 VLAN was possible during the configuration of the switch.

If this solution is imposible, do you have an other one?

milan.kulik Thu, 10/09/2008 - 02:41


if all the PCs were in the same subnet, you could think about private VLANs.

But this feature is not supported on 2940s, I'm afraid.

You need some router or L3 switch to implement this task.



colletlaurent Thu, 10/09/2008 - 04:50

Thank you for the information, by looking at the documentation it is indeed of what I thought.

We have to take a switch of level 3.


This Discussion