11

After I created a new virtual interface like this:

ip link add link eth0 name eth0.100 type vlan id 100

How can I afterwards verify that a virtual interface is configured for that VLAN? Neither

ip link show eth0.100

nor

ip a s

seems to show any VLAN information.

2 Answers 2

17

Just spotted this question while looking for something else...

You're nearly there.... what you need to use is -d to reveal detailed information about a link that you can then grep out the VLAN info:

$ ip -d link show dev eth0.100 | grep 'vlan protocol'
vlan protocol 802.1Q id 5 <REORDER_HDR>
1
  • This should be marked as a solution :)
    – Orphans
    Dec 2, 2022 at 13:11
14

found the following solution:

cat /proc/net/vlan/eth0.2011 
eth0.2011 VID: 2011 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 1129 total bytes received 55318 Broadcast/Multicast Rcvd 0

total frames transmitted            8
total bytes transmitted          648

Device: eth0 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 
EGRESS priority mappings: 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .