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.
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
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