Identifying physical network devices using /sys/class/net/<iface>
I wanted to know if there is a way to differentiate physical and virtual network devices. ip a doesn't have an option. So I am trying /sys/class/net/.
There are 2 attributes addr_assign_type and type, but type only tells Ethernet or loopback there is not way to tell if its virtual.
I wanted to know does addr_assign_type tell us the different?
As per my observation /sys/class/net//{eth|loopback} gives 0 and /sys/class/net//{virtualdevice} gives 1 or 3.
Is there something I can infer from this?
评论
?
参与讨论