VLAN tag

Uja

New Member
Nov 12, 2025
2
0
1
Hi everyone,

I have a question about an issue I encountered 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.15.124/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.
 
That probably was a trick question.

If by "connected to the second switch using a VLAN tag", you mean that the connecting switch port has a VLAN assigned to it, the the switch removes that egress VLAN tag and on igress, adds the same VLAN. That way the connecting device still uses untagged packets, but is connected to that VLAN, unable to directly ping any devices that are connected to "untagged" ports.

Any port that has only one VLAN (including the untagged VLAN) assigned to it is usually called an "access" port.

You would need a router that is connected to a so-called "trunk" port and thus can access any VLAN, including the untagged VLAN. This router, when acting as a gateway, routes packets between the untagged VLAN (often mistakenly called VLAN 1) and other VLANs.

By separating your network into VLANs, you effectively create disjoint networks.

All of this assumes the switches can handle VLANs (i.e. they are "managed" switches) and connected by trunk ports with one another.
 
  • Like
Reactions: UdoB