* Find vlanid with non-root user
@ 2013-08-13 20:46 Amador Pahim
2013-08-13 21:46 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Amador Pahim @ 2013-08-13 20:46 UTC (permalink / raw)
To: netdev
Hello,
Is there a way to get vlanid from a vlan interface as a regular user?
Default permissions to /proc/net/vlan/ is 600.
-rw-------. 1 root root 0 Aug 13 17:23 /proc/net/vlan/eth1.10-fcoe
Not sure if deducting vlanid from vlan name is a reasonable way to do so.
Thank you in advance,.
Best Regards,
--
Pahim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Find vlanid with non-root user
2013-08-13 20:46 Find vlanid with non-root user Amador Pahim
@ 2013-08-13 21:46 ` Stephen Hemminger
2013-08-14 11:43 ` Amador Pahim
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2013-08-13 21:46 UTC (permalink / raw)
To: Amador Pahim; +Cc: netdev
On Tue, 13 Aug 2013 17:46:45 -0300
Amador Pahim <amador@pahim.org> wrote:
> Hello,
>
> Is there a way to get vlanid from a vlan interface as a regular user?
> Default permissions to /proc/net/vlan/ is 600.
> -rw-------. 1 root root 0 Aug 13 17:23 /proc/net/vlan/eth1.10-fcoe
ip command will work as non-root user and show vlan (with -d)
$ ip -d li show dev eth0vlan
13: eth0vlan@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT
link/ether 10:bf:48:84:6f:5a brd ff:ff:ff:ff:ff:ff
vlan id 10 <REORDER_HDR>
> Not sure if deducting vlanid from vlan name is a reasonable way to do so.
No. Vlan can be made with any name.
# ip li add link eth0 name eth0vlan type vlan id 10
> Thank you in advance,.
>
> Best Regards,
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Find vlanid with non-root user
2013-08-13 21:46 ` Stephen Hemminger
@ 2013-08-14 11:43 ` Amador Pahim
0 siblings, 0 replies; 3+ messages in thread
From: Amador Pahim @ 2013-08-14 11:43 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
Thank you Stephen.
And about to find vlans? Is the same "ip -d link show" the best way?
If yes, any concern in finding interfaces with "@":
# ip -d link show | egrep ":.*@.*:" | cut -d ":" -f 2
eth1.10-fcoe@eth1
new_vlan@eth1
eth1.new_vlan@eth1
new_vlan2@eth1
For now I am using /sys/class/net/*.*, but as you said before, vlan
can be made with any name.
Best.
On Tue, Aug 13, 2013 at 6:46 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Tue, 13 Aug 2013 17:46:45 -0300
> Amador Pahim <amador@pahim.org> wrote:
>
>> Hello,
>>
>> Is there a way to get vlanid from a vlan interface as a regular user?
>> Default permissions to /proc/net/vlan/ is 600.
>> -rw-------. 1 root root 0 Aug 13 17:23 /proc/net/vlan/eth1.10-fcoe
>
> ip command will work as non-root user and show vlan (with -d)
>
> $ ip -d li show dev eth0vlan
> 13: eth0vlan@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT
> link/ether 10:bf:48:84:6f:5a brd ff:ff:ff:ff:ff:ff
> vlan id 10 <REORDER_HDR>
>
>
>
>> Not sure if deducting vlanid from vlan name is a reasonable way to do so.
>
> No. Vlan can be made with any name.
>
> # ip li add link eth0 name eth0vlan type vlan id 10
>
>> Thank you in advance,.
>>
>> Best Regards,
>
--
Pahim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-14 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 20:46 Find vlanid with non-root user Amador Pahim
2013-08-13 21:46 ` Stephen Hemminger
2013-08-14 11:43 ` Amador Pahim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox