1685343fcSTom GundersenWhat: /sys/class/net/<iface>/name_assign_type 2685343fcSTom GundersenDate: July 2014 3685343fcSTom GundersenKernelVersion: 3.17 4685343fcSTom GundersenContact: netdev@vger.kernel.org 5685343fcSTom GundersenDescription: 6685343fcSTom Gundersen Indicates the name assignment type. Possible values are: 7685343fcSTom Gundersen 1: enumerated by the kernel, possibly in an unpredictable way 8685343fcSTom Gundersen 2: predictably named by the kernel 9685343fcSTom Gundersen 3: named by userspace 10685343fcSTom Gundersen 4: renamed 11685343fcSTom Gundersen 1239f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/addr_assign_type 1339f1a2f0SFlorian FainelliDate: July 2010 1439f1a2f0SFlorian FainelliKernelVersion: 3.2 1539f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 1639f1a2f0SFlorian FainelliDescription: 1739f1a2f0SFlorian Fainelli Indicates the address assignment type. Possible values are: 1839f1a2f0SFlorian Fainelli 0: permanent address 1939f1a2f0SFlorian Fainelli 1: randomly generated 2039f1a2f0SFlorian Fainelli 2: stolen from another device 2139f1a2f0SFlorian Fainelli 3: set using dev_set_mac_address 2239f1a2f0SFlorian Fainelli 2339f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/addr_len 2439f1a2f0SFlorian FainelliDate: April 2005 2539f1a2f0SFlorian FainelliKernelVersion: 2.6.12 2639f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 2739f1a2f0SFlorian FainelliDescription: 2839f1a2f0SFlorian Fainelli Indicates the hardware address size in bytes. 2939f1a2f0SFlorian Fainelli Values vary based on the lower-level protocol used by the 3039f1a2f0SFlorian Fainelli interface (Ethernet, FDDI, ATM, IEEE 802.15.4...). See 3139f1a2f0SFlorian Fainelli include/uapi/linux/if_*.h for actual values. 3239f1a2f0SFlorian Fainelli 3339f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/address 3439f1a2f0SFlorian FainelliDate: April 2005 3539f1a2f0SFlorian FainelliKernelVersion: 2.6.12 3639f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 3739f1a2f0SFlorian FainelliDescription: 3839f1a2f0SFlorian Fainelli Hardware address currently assigned to this interface. 3939f1a2f0SFlorian Fainelli Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC 4039f1a2f0SFlorian Fainelli address. 4139f1a2f0SFlorian Fainelli 42784b58a3SBernhard ThalerWhat: /sys/class/net/<bridge iface>/bridge/group_fwd_mask 43784b58a3SBernhard ThalerDate: January 2012 44784b58a3SBernhard ThalerKernelVersion: 3.2 45784b58a3SBernhard ThalerContact: netdev@vger.kernel.org 46784b58a3SBernhard ThalerDescription: 47784b58a3SBernhard Thaler Bitmask to allow forwarding of link local frames with address 48784b58a3SBernhard Thaler 01-80-C2-00-00-0X on a bridge device. Only values that set bits 49784b58a3SBernhard Thaler not matching BR_GROUPFWD_RESTRICTED in net/bridge/br_private.h 50784b58a3SBernhard Thaler allowed. 51784b58a3SBernhard Thaler Default value 0 does not forward any link local frames. 52784b58a3SBernhard Thaler 53784b58a3SBernhard Thaler Restricted bits: 54784b58a3SBernhard Thaler 0: 01-80-C2-00-00-00 Bridge Group Address used for STP 55784b58a3SBernhard Thaler 1: 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE 56784b58a3SBernhard Thaler 2: 01-80-C2-00-00-02 (Link Aggregation) 802.3ad 57784b58a3SBernhard Thaler 58784b58a3SBernhard Thaler Any values not setting these bits can be used. Take special 59784b58a3SBernhard Thaler care when forwarding control frames e.g. 802.1X-PAE or LLDP. 60784b58a3SBernhard Thaler 6139f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/broadcast 6239f1a2f0SFlorian FainelliDate: April 2005 6339f1a2f0SFlorian FainelliKernelVersion: 2.6.12 6439f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 6539f1a2f0SFlorian FainelliDescription: 6639f1a2f0SFlorian Fainelli Hardware broadcast address for this interface. Format is a 6739f1a2f0SFlorian Fainelli string, e.g: ff:ff:ff:ff:ff:ff for an Ethernet broadcast MAC 6839f1a2f0SFlorian Fainelli address. 6939f1a2f0SFlorian Fainelli 7039f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/carrier 7139f1a2f0SFlorian FainelliDate: April 2005 7239f1a2f0SFlorian FainelliKernelVersion: 2.6.12 7339f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 7439f1a2f0SFlorian FainelliDescription: 7539f1a2f0SFlorian Fainelli Indicates the current physical link state of the interface. 7639f1a2f0SFlorian Fainelli Posssible values are: 7739f1a2f0SFlorian Fainelli 0: physical link is down 7839f1a2f0SFlorian Fainelli 1: physical link is up 7939f1a2f0SFlorian Fainelli 8039f1a2f0SFlorian Fainelli Note: some special devices, e.g: bonding and team drivers will 8139f1a2f0SFlorian Fainelli allow this attribute to be written to force a link state for 8239f1a2f0SFlorian Fainelli operating correctly and designating another fallback interface. 8339f1a2f0SFlorian Fainelli 8439f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/dev_id 8539f1a2f0SFlorian FainelliDate: April 2008 8639f1a2f0SFlorian FainelliKernelVersion: 2.6.26 8739f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 8839f1a2f0SFlorian FainelliDescription: 8939f1a2f0SFlorian Fainelli Indicates the device unique identifier. Format is an hexadecimal 9039f1a2f0SFlorian Fainelli value. This is used to disambiguate interfaces which might be 9139f1a2f0SFlorian Fainelli stacked (e.g: VLAN interfaces) but still have the same MAC 9239f1a2f0SFlorian Fainelli address as their parent device. 9339f1a2f0SFlorian Fainelli 94*4c0b6534SArseny MaslennikovWhat: /sys/class/net/<iface>/dev_port 95*4c0b6534SArseny MaslennikovDate: February 2014 96*4c0b6534SArseny MaslennikovKernelVersion: 3.15 97*4c0b6534SArseny MaslennikovContact: netdev@vger.kernel.org 98*4c0b6534SArseny MaslennikovDescription: 99*4c0b6534SArseny Maslennikov Indicates the port number of this network device, formatted 100*4c0b6534SArseny Maslennikov as a decimal value. Some NICs have multiple independent ports 101*4c0b6534SArseny Maslennikov on the same PCI bus, device and function. This attribute allows 102*4c0b6534SArseny Maslennikov userspace to distinguish the respective interfaces. 103*4c0b6534SArseny Maslennikov 104*4c0b6534SArseny Maslennikov Note: some device drivers started to use 'dev_id' for this 105*4c0b6534SArseny Maslennikov purpose since long before 3.15 and have not adopted the new 106*4c0b6534SArseny Maslennikov attribute ever since. To query the port number, some tools look 107*4c0b6534SArseny Maslennikov exclusively at 'dev_port', while others only consult 'dev_id'. 108*4c0b6534SArseny Maslennikov If a network device has multiple client adapter ports as 109*4c0b6534SArseny Maslennikov described in the previous paragraph and does not set this 110*4c0b6534SArseny Maslennikov attribute to its port number, it's a kernel bug. 111*4c0b6534SArseny Maslennikov 11239f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/dormant 11339f1a2f0SFlorian FainelliDate: March 2006 11439f1a2f0SFlorian FainelliKernelVersion: 2.6.17 11539f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 11639f1a2f0SFlorian FainelliDescription: 11739f1a2f0SFlorian Fainelli Indicates whether the interface is in dormant state. Possible 11839f1a2f0SFlorian Fainelli values are: 11939f1a2f0SFlorian Fainelli 0: interface is not dormant 12039f1a2f0SFlorian Fainelli 1: interface is dormant 12139f1a2f0SFlorian Fainelli 12239f1a2f0SFlorian Fainelli This attribute can be used by supplicant software to signal that 12339f1a2f0SFlorian Fainelli the device is not usable unless some supplicant-based 12439f1a2f0SFlorian Fainelli authentication is performed (e.g: 802.1x). 'link_mode' attribute 12539f1a2f0SFlorian Fainelli will also reflect the dormant state. 12639f1a2f0SFlorian Fainelli 12739f1a2f0SFlorian FainelliWhat: /sys/clas/net/<iface>/duplex 12839f1a2f0SFlorian FainelliDate: October 2009 12939f1a2f0SFlorian FainelliKernelVersion: 2.6.33 13039f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 13139f1a2f0SFlorian FainelliDescription: 13239f1a2f0SFlorian Fainelli Indicates the interface latest or current duplex value. Possible 13339f1a2f0SFlorian Fainelli values are: 13439f1a2f0SFlorian Fainelli half: half duplex 13539f1a2f0SFlorian Fainelli full: full duplex 13639f1a2f0SFlorian Fainelli 13739f1a2f0SFlorian Fainelli Note: This attribute is only valid for interfaces that implement 13839f1a2f0SFlorian Fainelli the ethtool get_settings method (mostly Ethernet). 13939f1a2f0SFlorian Fainelli 14039f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/flags 14139f1a2f0SFlorian FainelliDate: April 2005 14239f1a2f0SFlorian FainelliKernelVersion: 2.6.12 14339f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 14439f1a2f0SFlorian FainelliDescription: 14539f1a2f0SFlorian Fainelli Indicates the interface flags as a bitmask in hexadecimal. See 14639f1a2f0SFlorian Fainelli include/uapi/linux/if.h for a list of all possible values and 14739f1a2f0SFlorian Fainelli the flags semantics. 14839f1a2f0SFlorian Fainelli 14939f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/ifalias 15039f1a2f0SFlorian FainelliDate: September 2008 15139f1a2f0SFlorian FainelliKernelVersion: 2.6.28 15239f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 15339f1a2f0SFlorian FainelliDescription: 15439f1a2f0SFlorian Fainelli Indicates/stores an interface alias name as a string. This can 15539f1a2f0SFlorian Fainelli be used for system management purposes. 15639f1a2f0SFlorian Fainelli 15739f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/ifindex 15839f1a2f0SFlorian FainelliDate: April 2005 15939f1a2f0SFlorian FainelliKernelVersion: 2.6.12 16039f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 16139f1a2f0SFlorian FainelliDescription: 16239f1a2f0SFlorian Fainelli Indicates the system-wide interface unique index identifier as a 16339f1a2f0SFlorian Fainelli decimal number. This attribute is used for mapping an interface 16439f1a2f0SFlorian Fainelli identifier to an interface name. It is used throughout the 16539f1a2f0SFlorian Fainelli networking stack for specifying the interface specific 16639f1a2f0SFlorian Fainelli requests/events. 16739f1a2f0SFlorian Fainelli 16839f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/iflink 16939f1a2f0SFlorian FainelliDate: April 2005 17039f1a2f0SFlorian FainelliKernelVersion: 2.6.12 17139f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 17239f1a2f0SFlorian FainelliDescription: 17339f1a2f0SFlorian Fainelli Indicates the system-wide interface unique index identifier a 17439f1a2f0SFlorian Fainelli the interface is linked to. Format is decimal. This attribute is 17539f1a2f0SFlorian Fainelli used to resolve interfaces chaining, linking and stacking. 17639f1a2f0SFlorian Fainelli Physical interfaces have the same 'ifindex' and 'iflink' values. 17739f1a2f0SFlorian Fainelli 17839f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/link_mode 17939f1a2f0SFlorian FainelliDate: March 2006 18039f1a2f0SFlorian FainelliKernelVersion: 2.6.17 18139f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 18239f1a2f0SFlorian FainelliDescription: 18339f1a2f0SFlorian Fainelli Indicates the interface link mode, as a decimal number. This 18439f1a2f0SFlorian Fainelli attribute should be used in conjunction with 'dormant' attribute 18539f1a2f0SFlorian Fainelli to determine the interface usability. Possible values: 18639f1a2f0SFlorian Fainelli 0: default link mode 18739f1a2f0SFlorian Fainelli 1: dormant link mode 18839f1a2f0SFlorian Fainelli 18939f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/mtu 19039f1a2f0SFlorian FainelliDate: April 2005 19139f1a2f0SFlorian FainelliKernelVersion: 2.6.12 19239f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 19339f1a2f0SFlorian FainelliDescription: 19439f1a2f0SFlorian Fainelli Indicates the interface currently configured MTU value, in 19539f1a2f0SFlorian Fainelli bytes, and in decimal format. Specific values depends on the 19639f1a2f0SFlorian Fainelli lower-level interface protocol used. Ethernet devices will show 19739f1a2f0SFlorian Fainelli a 'mtu' attribute value of 1500 unless changed. 19839f1a2f0SFlorian Fainelli 1991578ea3aSJunien FridrickWhat: /sys/class/net/<iface>/netdev_group 20039f1a2f0SFlorian FainelliDate: January 2011 20139f1a2f0SFlorian FainelliKernelVersion: 2.6.39 20239f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 20339f1a2f0SFlorian FainelliDescription: 20439f1a2f0SFlorian Fainelli Indicates the interface network device group, as a decimal 20539f1a2f0SFlorian Fainelli integer. Default value is 0 which corresponds to the initial 20639f1a2f0SFlorian Fainelli network devices group. The group can be changed to affect 20739f1a2f0SFlorian Fainelli routing decisions (see: net/ipv4/fib_rules and 20839f1a2f0SFlorian Fainelli net/ipv6/fib6_rules.c). 20939f1a2f0SFlorian Fainelli 21039f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/operstate 21139f1a2f0SFlorian FainelliDate: March 2006 21239f1a2f0SFlorian FainelliKernelVersion: 2.6.17 21339f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 21439f1a2f0SFlorian FainelliDescription: 21539f1a2f0SFlorian Fainelli Indicates the interface RFC2863 operational state as a string. 21639f1a2f0SFlorian Fainelli Possible values are: 21739f1a2f0SFlorian Fainelli "unknown", "notpresent", "down", "lowerlayerdown", "testing", 21839f1a2f0SFlorian Fainelli "dormant", "up". 21939f1a2f0SFlorian Fainelli 22079499bcaSFlorian FainelliWhat: /sys/class/net/<iface>/phys_port_id 22179499bcaSFlorian FainelliDate: July 2013 22279499bcaSFlorian FainelliKernelVersion: 3.12 22379499bcaSFlorian FainelliContact: netdev@vger.kernel.org 22479499bcaSFlorian FainelliDescription: 22579499bcaSFlorian Fainelli Indicates the interface unique physical port identifier within 22679499bcaSFlorian Fainelli the NIC, as a string. 22779499bcaSFlorian Fainelli 228db24a904SDavid AhernWhat: /sys/class/net/<iface>/phys_port_name 229db24a904SDavid AhernDate: March 2015 230db24a904SDavid AhernKernelVersion: 4.0 231db24a904SDavid AhernContact: netdev@vger.kernel.org 232db24a904SDavid AhernDescription: 233db24a904SDavid Ahern Indicates the interface physical port name within the NIC, 234db24a904SDavid Ahern as a string. 235db24a904SDavid Ahern 23639f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/speed 23739f1a2f0SFlorian FainelliDate: October 2009 23839f1a2f0SFlorian FainelliKernelVersion: 2.6.33 23939f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 24039f1a2f0SFlorian FainelliDescription: 24139f1a2f0SFlorian Fainelli Indicates the interface latest or current speed value. Value is 24239f1a2f0SFlorian Fainelli an integer representing the link speed in Mbits/sec. 24339f1a2f0SFlorian Fainelli 24439f1a2f0SFlorian Fainelli Note: this attribute is only valid for interfaces that implement 24539f1a2f0SFlorian Fainelli the ethtool get_settings method (mostly Ethernet ). 24639f1a2f0SFlorian Fainelli 24739f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/tx_queue_len 24839f1a2f0SFlorian FainelliDate: April 2005 24939f1a2f0SFlorian FainelliKernelVersion: 2.6.12 25039f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 25139f1a2f0SFlorian FainelliDescription: 25239f1a2f0SFlorian Fainelli Indicates the interface transmit queue len in number of packets, 25339f1a2f0SFlorian Fainelli as an integer value. Value depend on the type of interface, 25439f1a2f0SFlorian Fainelli Ethernet network adapters have a default value of 1000 unless 25539f1a2f0SFlorian Fainelli configured otherwise 25639f1a2f0SFlorian Fainelli 25739f1a2f0SFlorian FainelliWhat: /sys/class/net/<iface>/type 25839f1a2f0SFlorian FainelliDate: April 2005 25939f1a2f0SFlorian FainelliKernelVersion: 2.6.12 26039f1a2f0SFlorian FainelliContact: netdev@vger.kernel.org 26139f1a2f0SFlorian FainelliDescription: 26239f1a2f0SFlorian Fainelli Indicates the interface protocol type as a decimal value. See 26339f1a2f0SFlorian Fainelli include/uapi/linux/if_arp.h for all possible values. 264aecbe01eSJiri Pirko 265aecbe01eSJiri PirkoWhat: /sys/class/net/<iface>/phys_switch_id 266aecbe01eSJiri PirkoDate: November 2014 267aecbe01eSJiri PirkoKernelVersion: 3.19 268aecbe01eSJiri PirkoContact: netdev@vger.kernel.org 269aecbe01eSJiri PirkoDescription: 270aecbe01eSJiri Pirko Indicates the unique physical switch identifier of a switch this 271aecbe01eSJiri Pirko port belongs to, as a string. 2728f602198SFlorian Fainelli 2738f602198SFlorian FainelliWhat: /sys/class/net/<iface>/phydev 2748f602198SFlorian FainelliDate: May 2017 2758f602198SFlorian FainelliKernelVersion: 4.13 2768f602198SFlorian FainelliContact: netdev@vger.kernel.org 2778f602198SFlorian FainelliDescription: 2788f602198SFlorian Fainelli Symbolic link to the PHY device this network device is attached 2798f602198SFlorian Fainelli to. 280b2d3bcfaSDavid Decotigny 281b2d3bcfaSDavid DecotignyWhat: /sys/class/net/<iface>/carrier_changes 282b2d3bcfaSDavid DecotignyDate: Mar 2014 283b2d3bcfaSDavid DecotignyKernelVersion: 3.15 284b2d3bcfaSDavid DecotignyContact: netdev@vger.kernel.org 285b2d3bcfaSDavid DecotignyDescription: 286b2d3bcfaSDavid Decotigny 32-bit unsigned integer counting the number of times the link has 287b2d3bcfaSDavid Decotigny seen a change from UP to DOWN and vice versa 288b2d3bcfaSDavid Decotigny 289b2d3bcfaSDavid DecotignyWhat: /sys/class/net/<iface>/carrier_up_count 290b2d3bcfaSDavid DecotignyDate: Jan 2018 291b2d3bcfaSDavid DecotignyKernelVersion: 4.16 292b2d3bcfaSDavid DecotignyContact: netdev@vger.kernel.org 293b2d3bcfaSDavid DecotignyDescription: 294b2d3bcfaSDavid Decotigny 32-bit unsigned integer counting the number of times the link has 295b2d3bcfaSDavid Decotigny been up 296b2d3bcfaSDavid Decotigny 297b2d3bcfaSDavid DecotignyWhat: /sys/class/net/<iface>/carrier_down_count 298b2d3bcfaSDavid DecotignyDate: Jan 2018 299b2d3bcfaSDavid DecotignyKernelVersion: 4.16 300b2d3bcfaSDavid DecotignyContact: netdev@vger.kernel.org 301b2d3bcfaSDavid DecotignyDescription: 302b2d3bcfaSDavid Decotigny 32-bit unsigned integer counting the number of times the link has 303b2d3bcfaSDavid Decotigny been down 304