sysfs-class-net 10 KB

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