Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Amador Pahim <amador@pahim.org>
Cc: netdev@vger.kernel.org
Subject: Re: Find vlanid with non-root user
Date: Tue, 13 Aug 2013 14:46:57 -0700	[thread overview]
Message-ID: <20130813144657.361b31b5@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAEFY+qzCQqEpLjjM1iBjtHmDh70ktpx+GCHgTuCceu1A53-1Tw@mail.gmail.com>

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,

  reply	other threads:[~2013-08-13 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 20:46 Find vlanid with non-root user Amador Pahim
2013-08-13 21:46 ` Stephen Hemminger [this message]
2013-08-14 11:43   ` Amador Pahim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130813144657.361b31b5@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=amador@pahim.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox