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