11-13-2025 11:24 AM
Hi everyone,
I have a question about an issue I faced during my university lab practice. Our professor gave us a topology with two switches connected to each other: two PCs are connected to the first switch using normal Ethernet connections, and another PC is connected to the second switch using a VLAN tag.
The task was to ping from the VLAN-tagged PC to one of the PCs connected with a normal Ethernet connection.
On my Linux system, I configured the VLAN interface using the following commands:
sudo ip link add link enp3s0 name enp3s0.10 type vlan id 10
sudo ip link set enp3s0.10 up
sudo ip addr add 192.168.x.x/24 dev enp3s0.10
However, the ping didn’t work, and I couldn’t figure out why.
Could you please help me understand what the problem might be?
btw In general I have creat a subinterface.
Note: I use port trunk and access port and both of them it doesnt work.
Solved! Go to Solution.
11-13-2025 04:10 PM
Hi @ha000049 ,
The port to PC3 is currently configured as an access port. It needs to be configured as a trunk port. Also make sure you configure vlan 10 on Switch2.
11-13-2025 01:13 PM
Hi @ha000049 ,
On the switch facing the workstation using a vlan tag, you need to configure the port as a trunk. You also need to configure vlan 10 manually.
11-13-2025 03:15 PM
Hello @Harold Ritter
Thank you for your reply. I tried that, but it still doesn’t work. I will share the simple topology and the commands I used, because I think I may have made a mistake when typing the commands. I had very little time in the lab and no access to hardware equipment, so I couldn’t properly identify where the mistake occurred.
Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name VLAN10
Switch(config-vlan)# exit
! Access port for PC1 (VLAN10)
Switch1(config)# interface fastethernet0/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# no shutdown
Switch1(config-if)# exit
! Trunk link to Switch2
Switch1(config)# interface fastethernet0/3
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# switchport trunk allowed vlan 10
Switch1(config-if)# no shutdown
Switch1(config-if)# exit
and for SWITCH2:
Switch2(config)# interface fastethernet0/1
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 10
Switch2(config-if)# no shutdown
! Trunk link to Switch1
Switch2(config)# interface fastethernet0/3
Switch2(config-if)# switchport mode trunk
Switch2(config-if)# switchport trunk allowed vlan 10,20
Switch2(config-if)# no shutdown
Switch2(config-if)# exit
and I changed to trunk mode for pc with vlan tag but it doesn t work, I used the same command as port trunk to switch 1 but identify the port that work toward pc! but nothing is working
11-13-2025 04:10 PM
Hi @ha000049 ,
The port to PC3 is currently configured as an access port. It needs to be configured as a trunk port. Also make sure you configure vlan 10 on Switch2.
11-14-2025 07:00 AM - edited 11-14-2025 09:50 AM
@Harold Ritter wrote:
The port to PC3 is currently configured as an access port. It needs to be configured as a trunk port. Also make sure you configure vlan 10 on Switch2.
BTW, you could still use an access port to connect to PC3, but the access port would need to support the voice VLAN option, and the voice VLAN would need to be defined, in this case, as VLAN 10.
The reason the above should work is because an access port with a voice VLAN is actually a "special" trunk port. I.e. the "voice" VLAN is just a second VLAN on the access port using tagged frames. There's nothing special about it being called a "voice" VLAN beyond that it's the most common usage. Conversely, before this option was provided on access ports, we used to use trunk ports to support VLAN tagged VoIP phones on a port in addition to a data non-tagged host.
I mention the above to aid understanding a switch port is a switch port but what it's actually allowed to do depends on what's set by the port configuration.
Another example, an "untagged" access port may still support (send/receive) tagged frames used solely for L2 CoS setting. It's the same physical tag but with VLAN ID set to zero.
11-14-2025 01:32 AM
Ok I will try next time in the lab and I will feedback, Thank you again for your reply
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