Network cost information element
To communicate the cost of the Wi-Fi network to clients, Microsoft has defined a vendor extension to the 802.11 protocol. This extension is the Network Cost IE.
Note The 802.11 protocol allows vendor-defined information elements (IEs), and requires clients that do not understand a particular IE to ignore it and continue processing the remaining IEs. This minimizes the compatibility risk of adding a new IE to products that interact with existing clients of other operating system types.
The following table shows the Network Cost IE format:
Field name | Size (octets) | Value | Description |
---|---|---|---|
Attribute ID |
1 |
0xDD |
Type (vendor extension) |
Length |
1 |
0x08 |
Length of the following fields |
Organizationally Unique Identifier (OUI) |
3 |
0x00, 0x50, 0xF2 |
Vendor (Microsoft) |
OUI Type |
1 |
0x11 |
OUI type (network cost) |
Cost Level |
1 |
Exactly one of Cost Level values. See below. |
Cost Level. One of exact values. |
RESERVED |
1 |
0x00 |
Reserved. Should be 0x00 |
Cost Flags |
1 |
OR'ed Cost Flags. See below. |
Cost Flags. Can be OR'ed |
RESERVED |
1 |
0x00 |
Reserved. Should be 0x00 |
The following table shows the possible Cost Level bits (exactly one is required):
Value | Name | Description |
---|---|---|
0x00 |
Unknown |
The usage is unknown or unrestricted. |
0x01 |
Unrestricted |
No incremental cost applies for transferring data on this connection. |
0x02 |
Fixed |
Data transfer is metered and counts against a data limit. No difference in cost applies within this limit. |
0x04 |
Variable |
Incremental cost applies for all usage on this link. When this value is set, Windows clients automatically treat connection as metered. |
The following tables shows the possible Cost flag bits. Those values MAY be or'ed
Value | Name | Description |
---|---|---|
0x00 |
The connection cost is unknown. |
|
0x01 |
Over Data Limit |
Usage has exceeded the data limit of the metered network; different network costs or conditions might apply. |
0x02 |
Congested |
The network operator is experiencing or expecting heavy load. |
0x04 |
Roaming |
The tethering connection is roaming outside the provider's home network or affiliates. |
0x08 |
Approaching Data Limit |
Usage is near the data limit of the metered network; different network costs or conditions might apply once the limit is reached. |
The following table shows some sample cost attribute values (last four bytes of IE):
Value | Name | Description |
---|---|---|
Default WLAN |
0x01, 0x00, 0x00, 0x00 |
Unrestricted connection; standard WLAN backed by fixed broadband. |
Portable Hotspot Default |
0x02, 0x00, 0x00, 0x00 |
Metered network; limit unknown or not yet reached; matches Windows default for mobile broadband connections. |
Over Limit / Throttled |
0x01, 0x00, 0x01, 0x00 |
User has exceeded data limit; speed is reduced, but no further usage limitation applies. |
Over Limit / Charges |
0x04, 0x00, 0x01, 0x00 |
User has exceeded data limit; additional usage incurs incremental charges. |
Portable Hotspot / Roaming |
0x04, 0x00, 0x04, 0x00 |
Connection is roaming; incremental charges apply due to network state. |
Add network cost support to your device
Add the IE to your device’s WLAN beacon and probe response, which is fixed to the Portable Hotspot Default value shown in the table with the sample cost attribute values. Verify that a Windows 8, Windows 8.1, or Windows 10 computer that connects to this network automatically selects the Reduce network usage option for this network.
When roaming, replace the default value with the Portable Hotspot / Roaming value that is listed in the table with the sample cost attribute values.
Optionally, work with your partner carriers to determine cases where other values may be appropriate, such as the following:
Unrestricted while on certain bearers (LTE, HSPA+, etc.),
Defined channel to detect over-limit states.
Operator-defined behavior when past data limit.
Optionally, if your device can use Wi-Fi as a second-hop network, check for this IE on the network to which you connect and relay its value (or its absence) to your own SSID. If none is present, use the Default WLAN value that is listed in the table with the sample cost attribute values.
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for