Monday, December 8, 2008

Two vlans, One Port, No trunk

I recall a task somewhere I don't remember where we needed two vlans on one port but no this case you can use a voice vlan for your second vlan. It is very easy to test:



R1's interface:

interface Ethernet0/0

interface Ethernet0/0.2
encapsulation dot1Q 2
ip address


interface FastEthernet0/1
switchport access vlan 11
switchport voice vlan 2


SW2#show cdp ne | in R2
R2 Fas 0/2 135 R S I 3640 Eth 0/0

Rack1SW2#show run int f0/2
Building configuration...

Current configuration : 83 bytes
interface FastEthernet0/2
switchport access vlan 2
switchport mode access

So let's ping from R1 to R2 (


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms


  1. This does not works as i have tested it ?
    voice vlan 2 is not communicating with access vlan.
    Configurations are below:

    interface FastEthernet0/11
    switchport access vlan 3
    switchport mode access

    interface FastEthernet0/7
    switchport access vlan 2
    switchport voice vlan 3
    spanning-tree portfast

  2. If you notice my example above, router R1 has a trunked interface sending packets with a Dot1q tag of 2. The switchport that this router is connected to uses voice vlan 2. This allows packets coming in with tag of 2 to communicate with ports on access vlan 2.

    Are you using subinterfaces with dot1q encapsulation on your router?

  3. Thats good
    but i need to do in such a way that my PC's are connected to switches and dont have any relation or connection with router.
    Is this possible to have in this way that my pc connected to switch port should be in 2 vlans ? it should be trunk or access ,, and communcate on LAN on both vlans ????
    i hope you got my point.
    Waiting ...

    thanks for prompt response.

    Ishtiaq Ahmed

  4. my topology is simple
    PC1(vlan 1)---switch---PC2(vlan 2)
    PC3(Vlan 1)

    now PC1 should communicate with PC2 and PC3
    Is this possible ???

  5. Hosts on different vlans cannot communicate. What are you trying to accomplish?

  6. its simple

    one host should be in 2 vlans(vlan 1 and vlan 2) and communicate with other hosts in different vlans (vlan 1 (host1) , vlan 2(host 2)

  7. Notice in my example by router is using a trunked port. If you wish to have one port in two vlans, than the device connected to the port with a voice vlan and an access vlan must be able to tag. I don't know of another way.

  8. sir , i have checked in this way . but not running
    coz in cisco , when it is done tag means they are trunk and trunk is made when it is connected with trunk port.
    if one port of switch is trunk and other is access por(untagg) will not worked.

    which means as an access port , a port cannot become a part of 2 vlans even one is voice vlan.
    Thanks and Regards,


Note: Only a member of this blog may post a comment.