1*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/name_assign_type 2*4882a593SmuzhiyunDate: July 2014 3*4882a593SmuzhiyunKernelVersion: 3.17 4*4882a593SmuzhiyunContact: netdev@vger.kernel.org 5*4882a593SmuzhiyunDescription: 6*4882a593Smuzhiyun Indicates the name assignment type. Possible values are: 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun == ========================================================== 9*4882a593Smuzhiyun 1 enumerated by the kernel, possibly in an unpredictable way 10*4882a593Smuzhiyun 2 predictably named by the kernel 11*4882a593Smuzhiyun 3 named by userspace 12*4882a593Smuzhiyun 4 renamed 13*4882a593Smuzhiyun == ========================================================== 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/addr_assign_type 16*4882a593SmuzhiyunDate: July 2010 17*4882a593SmuzhiyunKernelVersion: 3.2 18*4882a593SmuzhiyunContact: netdev@vger.kernel.org 19*4882a593SmuzhiyunDescription: 20*4882a593Smuzhiyun Indicates the address assignment type. Possible values are: 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun == ============================= 23*4882a593Smuzhiyun 0 permanent address 24*4882a593Smuzhiyun 1 randomly generated 25*4882a593Smuzhiyun 2 stolen from another device 26*4882a593Smuzhiyun 3 set using dev_set_mac_address 27*4882a593Smuzhiyun == ============================= 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/addr_len 30*4882a593SmuzhiyunDate: April 2005 31*4882a593SmuzhiyunKernelVersion: 2.6.12 32*4882a593SmuzhiyunContact: netdev@vger.kernel.org 33*4882a593SmuzhiyunDescription: 34*4882a593Smuzhiyun Indicates the hardware address size in bytes. 35*4882a593Smuzhiyun Values vary based on the lower-level protocol used by the 36*4882a593Smuzhiyun interface (Ethernet, FDDI, ATM, IEEE 802.15.4...). See 37*4882a593Smuzhiyun include/uapi/linux/if_*.h for actual values. 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/address 40*4882a593SmuzhiyunDate: April 2005 41*4882a593SmuzhiyunKernelVersion: 2.6.12 42*4882a593SmuzhiyunContact: netdev@vger.kernel.org 43*4882a593SmuzhiyunDescription: 44*4882a593Smuzhiyun Hardware address currently assigned to this interface. 45*4882a593Smuzhiyun Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC 46*4882a593Smuzhiyun address. 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunWhat: /sys/class/net/<bridge iface>/bridge/group_fwd_mask 49*4882a593SmuzhiyunDate: January 2012 50*4882a593SmuzhiyunKernelVersion: 3.2 51*4882a593SmuzhiyunContact: netdev@vger.kernel.org 52*4882a593SmuzhiyunDescription: 53*4882a593Smuzhiyun Bitmask to allow forwarding of link local frames with address 54*4882a593Smuzhiyun 01-80-C2-00-00-0X on a bridge device. Only values that set bits 55*4882a593Smuzhiyun not matching BR_GROUPFWD_RESTRICTED in net/bridge/br_private.h 56*4882a593Smuzhiyun allowed. 57*4882a593Smuzhiyun Default value 0 does not forward any link local frames. 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun Restricted bits: 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun == ======================================================== 62*4882a593Smuzhiyun 0 01-80-C2-00-00-00 Bridge Group Address used for STP 63*4882a593Smuzhiyun 1 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE 64*4882a593Smuzhiyun 2 01-80-C2-00-00-02 (Link Aggregation) 802.3ad 65*4882a593Smuzhiyun == ======================================================== 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun Any values not setting these bits can be used. Take special 68*4882a593Smuzhiyun care when forwarding control frames e.g. 802.1X-PAE or LLDP. 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/broadcast 71*4882a593SmuzhiyunDate: April 2005 72*4882a593SmuzhiyunKernelVersion: 2.6.12 73*4882a593SmuzhiyunContact: netdev@vger.kernel.org 74*4882a593SmuzhiyunDescription: 75*4882a593Smuzhiyun Hardware broadcast address for this interface. Format is a 76*4882a593Smuzhiyun string, e.g: ff:ff:ff:ff:ff:ff for an Ethernet broadcast MAC 77*4882a593Smuzhiyun address. 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/carrier 80*4882a593SmuzhiyunDate: April 2005 81*4882a593SmuzhiyunKernelVersion: 2.6.12 82*4882a593SmuzhiyunContact: netdev@vger.kernel.org 83*4882a593SmuzhiyunDescription: 84*4882a593Smuzhiyun Indicates the current physical link state of the interface. 85*4882a593Smuzhiyun Posssible values are: 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun == ===================== 88*4882a593Smuzhiyun 0 physical link is down 89*4882a593Smuzhiyun 1 physical link is up 90*4882a593Smuzhiyun == ===================== 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun Note: some special devices, e.g: bonding and team drivers will 93*4882a593Smuzhiyun allow this attribute to be written to force a link state for 94*4882a593Smuzhiyun operating correctly and designating another fallback interface. 95*4882a593Smuzhiyun 96*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/dev_id 97*4882a593SmuzhiyunDate: April 2008 98*4882a593SmuzhiyunKernelVersion: 2.6.26 99*4882a593SmuzhiyunContact: netdev@vger.kernel.org 100*4882a593SmuzhiyunDescription: 101*4882a593Smuzhiyun Indicates the device unique identifier. Format is an hexadecimal 102*4882a593Smuzhiyun value. This is used to disambiguate interfaces which might be 103*4882a593Smuzhiyun stacked (e.g: VLAN interfaces) but still have the same MAC 104*4882a593Smuzhiyun address as their parent device. 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/dev_port 107*4882a593SmuzhiyunDate: February 2014 108*4882a593SmuzhiyunKernelVersion: 3.15 109*4882a593SmuzhiyunContact: netdev@vger.kernel.org 110*4882a593SmuzhiyunDescription: 111*4882a593Smuzhiyun Indicates the port number of this network device, formatted 112*4882a593Smuzhiyun as a decimal value. Some NICs have multiple independent ports 113*4882a593Smuzhiyun on the same PCI bus, device and function. This attribute allows 114*4882a593Smuzhiyun userspace to distinguish the respective interfaces. 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun Note: some device drivers started to use 'dev_id' for this 117*4882a593Smuzhiyun purpose since long before 3.15 and have not adopted the new 118*4882a593Smuzhiyun attribute ever since. To query the port number, some tools look 119*4882a593Smuzhiyun exclusively at 'dev_port', while others only consult 'dev_id'. 120*4882a593Smuzhiyun If a network device has multiple client adapter ports as 121*4882a593Smuzhiyun described in the previous paragraph and does not set this 122*4882a593Smuzhiyun attribute to its port number, it's a kernel bug. 123*4882a593Smuzhiyun 124*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/dormant 125*4882a593SmuzhiyunDate: March 2006 126*4882a593SmuzhiyunKernelVersion: 2.6.17 127*4882a593SmuzhiyunContact: netdev@vger.kernel.org 128*4882a593SmuzhiyunDescription: 129*4882a593Smuzhiyun Indicates whether the interface is in dormant state. Possible 130*4882a593Smuzhiyun values are: 131*4882a593Smuzhiyun 0: interface is not dormant 132*4882a593Smuzhiyun 1: interface is dormant 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun This attribute can be used by supplicant software to signal that 135*4882a593Smuzhiyun the device is not usable unless some supplicant-based 136*4882a593Smuzhiyun authentication is performed (e.g: 802.1x). 'link_mode' attribute 137*4882a593Smuzhiyun will also reflect the dormant state. 138*4882a593Smuzhiyun 139*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/testing 140*4882a593SmuzhiyunDate: April 2002 141*4882a593SmuzhiyunKernelVersion: 5.8 142*4882a593SmuzhiyunContact: netdev@vger.kernel.org 143*4882a593SmuzhiyunDescription: 144*4882a593Smuzhiyun Indicates whether the interface is under test. Possible 145*4882a593Smuzhiyun values are: 146*4882a593Smuzhiyun 147*4882a593Smuzhiyun == ============================= 148*4882a593Smuzhiyun 0 interface is not being tested 149*4882a593Smuzhiyun 1 interface is being tested 150*4882a593Smuzhiyun == ============================= 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun When an interface is under test, it cannot be expected 153*4882a593Smuzhiyun to pass packets as normal. 154*4882a593Smuzhiyun 155*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/duplex 156*4882a593SmuzhiyunDate: October 2009 157*4882a593SmuzhiyunKernelVersion: 2.6.33 158*4882a593SmuzhiyunContact: netdev@vger.kernel.org 159*4882a593SmuzhiyunDescription: 160*4882a593Smuzhiyun Indicates the interface latest or current duplex value. Possible 161*4882a593Smuzhiyun values are: 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun ==== =========== 164*4882a593Smuzhiyun half half duplex 165*4882a593Smuzhiyun full full duplex 166*4882a593Smuzhiyun ==== =========== 167*4882a593Smuzhiyun 168*4882a593Smuzhiyun Note: This attribute is only valid for interfaces that implement 169*4882a593Smuzhiyun the ethtool get_link_ksettings method (mostly Ethernet). 170*4882a593Smuzhiyun 171*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/flags 172*4882a593SmuzhiyunDate: April 2005 173*4882a593SmuzhiyunKernelVersion: 2.6.12 174*4882a593SmuzhiyunContact: netdev@vger.kernel.org 175*4882a593SmuzhiyunDescription: 176*4882a593Smuzhiyun Indicates the interface flags as a bitmask in hexadecimal. See 177*4882a593Smuzhiyun include/uapi/linux/if.h for a list of all possible values and 178*4882a593Smuzhiyun the flags semantics. 179*4882a593Smuzhiyun 180*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/ifalias 181*4882a593SmuzhiyunDate: September 2008 182*4882a593SmuzhiyunKernelVersion: 2.6.28 183*4882a593SmuzhiyunContact: netdev@vger.kernel.org 184*4882a593SmuzhiyunDescription: 185*4882a593Smuzhiyun Indicates/stores an interface alias name as a string. This can 186*4882a593Smuzhiyun be used for system management purposes. 187*4882a593Smuzhiyun 188*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/ifindex 189*4882a593SmuzhiyunDate: April 2005 190*4882a593SmuzhiyunKernelVersion: 2.6.12 191*4882a593SmuzhiyunContact: netdev@vger.kernel.org 192*4882a593SmuzhiyunDescription: 193*4882a593Smuzhiyun Indicates the system-wide interface unique index identifier as a 194*4882a593Smuzhiyun decimal number. This attribute is used for mapping an interface 195*4882a593Smuzhiyun identifier to an interface name. It is used throughout the 196*4882a593Smuzhiyun networking stack for specifying the interface specific 197*4882a593Smuzhiyun requests/events. 198*4882a593Smuzhiyun 199*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/iflink 200*4882a593SmuzhiyunDate: April 2005 201*4882a593SmuzhiyunKernelVersion: 2.6.12 202*4882a593SmuzhiyunContact: netdev@vger.kernel.org 203*4882a593SmuzhiyunDescription: 204*4882a593Smuzhiyun Indicates the system-wide interface unique index identifier a 205*4882a593Smuzhiyun the interface is linked to. Format is decimal. This attribute is 206*4882a593Smuzhiyun used to resolve interfaces chaining, linking and stacking. 207*4882a593Smuzhiyun Physical interfaces have the same 'ifindex' and 'iflink' values. 208*4882a593Smuzhiyun 209*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/link_mode 210*4882a593SmuzhiyunDate: March 2006 211*4882a593SmuzhiyunKernelVersion: 2.6.17 212*4882a593SmuzhiyunContact: netdev@vger.kernel.org 213*4882a593SmuzhiyunDescription: 214*4882a593Smuzhiyun Indicates the interface link mode, as a decimal number. This 215*4882a593Smuzhiyun attribute should be used in conjunction with 'dormant' attribute 216*4882a593Smuzhiyun to determine the interface usability. Possible values: 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun == ================= 219*4882a593Smuzhiyun 0 default link mode 220*4882a593Smuzhiyun 1 dormant link mode 221*4882a593Smuzhiyun == ================= 222*4882a593Smuzhiyun 223*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/mtu 224*4882a593SmuzhiyunDate: April 2005 225*4882a593SmuzhiyunKernelVersion: 2.6.12 226*4882a593SmuzhiyunContact: netdev@vger.kernel.org 227*4882a593SmuzhiyunDescription: 228*4882a593Smuzhiyun Indicates the interface currently configured MTU value, in 229*4882a593Smuzhiyun bytes, and in decimal format. Specific values depends on the 230*4882a593Smuzhiyun lower-level interface protocol used. Ethernet devices will show 231*4882a593Smuzhiyun a 'mtu' attribute value of 1500 unless changed. 232*4882a593Smuzhiyun 233*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/netdev_group 234*4882a593SmuzhiyunDate: January 2011 235*4882a593SmuzhiyunKernelVersion: 2.6.39 236*4882a593SmuzhiyunContact: netdev@vger.kernel.org 237*4882a593SmuzhiyunDescription: 238*4882a593Smuzhiyun Indicates the interface network device group, as a decimal 239*4882a593Smuzhiyun integer. Default value is 0 which corresponds to the initial 240*4882a593Smuzhiyun network devices group. The group can be changed to affect 241*4882a593Smuzhiyun routing decisions (see: net/ipv4/fib_rules and 242*4882a593Smuzhiyun net/ipv6/fib6_rules.c). 243*4882a593Smuzhiyun 244*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/operstate 245*4882a593SmuzhiyunDate: March 2006 246*4882a593SmuzhiyunKernelVersion: 2.6.17 247*4882a593SmuzhiyunContact: netdev@vger.kernel.org 248*4882a593SmuzhiyunDescription: 249*4882a593Smuzhiyun Indicates the interface RFC2863 operational state as a string. 250*4882a593Smuzhiyun 251*4882a593Smuzhiyun Possible values are: 252*4882a593Smuzhiyun 253*4882a593Smuzhiyun "unknown", "notpresent", "down", "lowerlayerdown", "testing", 254*4882a593Smuzhiyun "dormant", "up". 255*4882a593Smuzhiyun 256*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/phys_port_id 257*4882a593SmuzhiyunDate: July 2013 258*4882a593SmuzhiyunKernelVersion: 3.12 259*4882a593SmuzhiyunContact: netdev@vger.kernel.org 260*4882a593SmuzhiyunDescription: 261*4882a593Smuzhiyun Indicates the interface unique physical port identifier within 262*4882a593Smuzhiyun the NIC, as a string. 263*4882a593Smuzhiyun 264*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/phys_port_name 265*4882a593SmuzhiyunDate: March 2015 266*4882a593SmuzhiyunKernelVersion: 4.0 267*4882a593SmuzhiyunContact: netdev@vger.kernel.org 268*4882a593SmuzhiyunDescription: 269*4882a593Smuzhiyun Indicates the interface physical port name within the NIC, 270*4882a593Smuzhiyun as a string. 271*4882a593Smuzhiyun 272*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/speed 273*4882a593SmuzhiyunDate: October 2009 274*4882a593SmuzhiyunKernelVersion: 2.6.33 275*4882a593SmuzhiyunContact: netdev@vger.kernel.org 276*4882a593SmuzhiyunDescription: 277*4882a593Smuzhiyun Indicates the interface latest or current speed value. Value is 278*4882a593Smuzhiyun an integer representing the link speed in Mbits/sec. 279*4882a593Smuzhiyun 280*4882a593Smuzhiyun Note: this attribute is only valid for interfaces that implement 281*4882a593Smuzhiyun the ethtool get_link_ksettings method (mostly Ethernet). 282*4882a593Smuzhiyun 283*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/tx_queue_len 284*4882a593SmuzhiyunDate: April 2005 285*4882a593SmuzhiyunKernelVersion: 2.6.12 286*4882a593SmuzhiyunContact: netdev@vger.kernel.org 287*4882a593SmuzhiyunDescription: 288*4882a593Smuzhiyun Indicates the interface transmit queue len in number of packets, 289*4882a593Smuzhiyun as an integer value. Value depend on the type of interface, 290*4882a593Smuzhiyun Ethernet network adapters have a default value of 1000 unless 291*4882a593Smuzhiyun configured otherwise 292*4882a593Smuzhiyun 293*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/type 294*4882a593SmuzhiyunDate: April 2005 295*4882a593SmuzhiyunKernelVersion: 2.6.12 296*4882a593SmuzhiyunContact: netdev@vger.kernel.org 297*4882a593SmuzhiyunDescription: 298*4882a593Smuzhiyun Indicates the interface protocol type as a decimal value. See 299*4882a593Smuzhiyun include/uapi/linux/if_arp.h for all possible values. 300*4882a593Smuzhiyun 301*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/phys_switch_id 302*4882a593SmuzhiyunDate: November 2014 303*4882a593SmuzhiyunKernelVersion: 3.19 304*4882a593SmuzhiyunContact: netdev@vger.kernel.org 305*4882a593SmuzhiyunDescription: 306*4882a593Smuzhiyun Indicates the unique physical switch identifier of a switch this 307*4882a593Smuzhiyun port belongs to, as a string. 308*4882a593Smuzhiyun 309*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/phydev 310*4882a593SmuzhiyunDate: May 2017 311*4882a593SmuzhiyunKernelVersion: 4.13 312*4882a593SmuzhiyunContact: netdev@vger.kernel.org 313*4882a593SmuzhiyunDescription: 314*4882a593Smuzhiyun Symbolic link to the PHY device this network device is attached 315*4882a593Smuzhiyun to. 316*4882a593Smuzhiyun 317*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/carrier_changes 318*4882a593SmuzhiyunDate: Mar 2014 319*4882a593SmuzhiyunKernelVersion: 3.15 320*4882a593SmuzhiyunContact: netdev@vger.kernel.org 321*4882a593SmuzhiyunDescription: 322*4882a593Smuzhiyun 32-bit unsigned integer counting the number of times the link has 323*4882a593Smuzhiyun seen a change from UP to DOWN and vice versa 324*4882a593Smuzhiyun 325*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/carrier_up_count 326*4882a593SmuzhiyunDate: Jan 2018 327*4882a593SmuzhiyunKernelVersion: 4.16 328*4882a593SmuzhiyunContact: netdev@vger.kernel.org 329*4882a593SmuzhiyunDescription: 330*4882a593Smuzhiyun 32-bit unsigned integer counting the number of times the link has 331*4882a593Smuzhiyun been up 332*4882a593Smuzhiyun 333*4882a593SmuzhiyunWhat: /sys/class/net/<iface>/carrier_down_count 334*4882a593SmuzhiyunDate: Jan 2018 335*4882a593SmuzhiyunKernelVersion: 4.16 336*4882a593SmuzhiyunContact: netdev@vger.kernel.org 337*4882a593SmuzhiyunDescription: 338*4882a593Smuzhiyun 32-bit unsigned integer counting the number of times the link has 339*4882a593Smuzhiyun been down 340