Port speed optimization for a network connection
Techniques for port speed optimization for a network connection are described. In an example, a computer system sends, to a network node communicatively coupled with a device, first information indicating first network connection speeds supported by a port of the device and selects a first network connection speed of the first network connection speeds to use as a setting of the port. The computer system determines an actual network connection speed of the port based on traffic from the device or received from the network node and selects a second network connection speed of the first network connection speeds based on the actual network connection speed. The second network connection speed is faster or equal to the actual network connection speed and is slower than the first network connection speed. The computer system changes the setting of the port to the second network connection speed.
1 . A computer-implemented method comprising:
sending, to a first device communicatively coupled with a second device, first information indicating first network connection speeds supported by the second device;
configuring the second device to use a first network connection speed of the first network connection speeds;
determining a second network connection speed that represents an actual network connection speed of a data exchange between the first and second devices;
determining, based at least in part on a first mode of the second device, a third network connection speed of the first network connection speeds, the third network connection speed being faster than or equal to the second network connection speed and being slower than the first network connection speed, the first mode being associated with reducing power consumption of the second device and triggering a determination of the third network connection speed based at least in part on the second network connection speed being lower than the first network connection speed;
sending, to the first device, second information indicating that the third network connection speed is to be used; and
configuring the second device to use the third network connection speed.
2 . The computer-implemented method of claim 1 , further comprising:
receiving, via a user interface of the second device, an input activating the first mode of the second device, the first mode causing use of the third network connection speed.
3 . The computer-implemented method of claim 1 , further comprising:
performing, by the second device at a first time, an auto-negotiation procedure with the first device according to the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard, wherein the first network connection speed corresponds to a fastest network connection speed that both the second device and the first device indicate as being supported; and
performing, by the second device at a second time after the first time, the auto-negotiation procedure with the first device, wherein the second information is sent during the auto-negotiation procedure and indicates that the third network connection speed is the fastest supported network connection speed.
4 . The computer-implemented method of claim 1 , further comprising:
performing, by the second device at a first time, an auto-negotiation procedure with the first device according to the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard, wherein performing the auto-negotiation procedure at the first time comprises advertising all the first network connection speeds; and
performing, by the second device at a second time after the first time, the auto-negotiation procedure with the first device, wherein performing the auto-negotiation procedure at the second time comprises advertising only the third network connection speed or advertising only the third network connection speed and one or more network connection speeds slower than the third network connection speed.
5 . The computer-implemented method of claim 1 , further comprising:
receiving, by the second device via a user interface associated with the second device, an input indicating a time window associated with an auto-negotiation procedure; and
performing, by the second device during the time window, the auto-negotiation procedure by at least sending the second information to the first device.
6 . The computer-implemented method of claim 1 , wherein the data exchange is via a port of the second device, and further comprising:
determining, by the second device, that a status of the port indicates that the port is idle; and
performing, by the second device based at least in part on the status, an auto-negotiation procedure by at least sending the second information to the first device.
7 . The computer-implemented method of claim 1 , further comprising:
performing, by the second device, after the first network connection speed is selected, a first network connection speed test, wherein the first network connection speed test indicates the second network connection speed;
performing, by the second device, a second network connection speed test, the second network connection speed test indicating a fourth network connection speed;
determining, by the second device, that a predefined number of network connection speed tests has been performed; and
determining, by the second device, that the third network connection speed is a slowest network connection speed that is supported by the first device and the second device and that is faster than the second network connection speed and the fourth network connection speed.
8 . The computer-implemented method of claim 1 , wherein configuring the second device to use the third network connection speed comprises changing a setting of a port to the third network connection speed, and wherein the computer-implemented method further comprises:
determining, by the second device prior to changing the setting, that the setting has not been changed since the first network connection speed was selected; and
determining, by the second device, that the third network connection speed is supported by the first device.
9 . A first device comprising:
one or more processors; and
one or more memories storing instructions that, upon execution by the one or more processors, configure the first device to:
send, to a second device communicatively coupled with the first device via a port of the first device, first information indicating first network connection speeds supported by the first device;
use a first network connection speed of the first network connection speeds as a setting of the port, the first network connection speeds associated with a first power consumption level of the first device;
determine a second network connection speed that represents an actual network connection speed of a data exchange with the second device;
determine, based at least in part on a first mode, a third network connection speed of the first network connection speeds, the third network connection speed being faster than or equal to the second network connection speed and being slower than the first network connection speed, the third network connection speeds associated with a second power consumption level of the first device, the second power consumption level being smaller than the first power consumption level, the first mode being associated with reducing power consumption of the first device and triggering a determination of the third network connection speed based at least in part on the second network connection speed being lower than the first network connection speed;
send, to the second device, second information indicating that the third network connection speed is to be used; and
configure the port to use the third network connection speed.
10 . The first device of claim 9 , wherein the one or more memories store further instructions that, upon execution by the one or more processors, configure the first device to:
perform, after the first network connection speed is selected, a first network connection speed test, wherein the first network connection speed test indicates the second network connection speed;
store the actual network connection speed as one of a plurality of network connection speed test results; and
determine that a first mode of the first device is activated, wherein the first mode is associated with reducing a power consumption of the first device, wherein the second network connection speed is selected based at least in part on the plurality of network connection speed test results and the first mode.
11 . The first device of claim 10 , wherein the one or more memories store additional instructions that, upon execution by the one or more processors, configure the first device to:
determine third network connection speeds from the plurality of network connection speed test results;
determine a fastest network connection speed from the third network connection speeds; and
determine that the third network connection speed is supported by the port and has the closest value among the first network connection speeds to the fastest network connection speed from the third network connection speeds.
12 . The first device of claim 10 , wherein the one or more memories store additional instructions that, upon execution by the one or more processors, configure the first device to:
determine whether the third network connection speed is supported by the second device, wherein the third network connection speed is selected based at least in part on a determination that the second device supports the second network connection speed.
13 . The first device of claim 9 , wherein the one or more memories store further instructions that, upon execution by the one or more processors, configure the first device to:
determine, after the third network connection speed is selected, a trigger event, wherein the trigger event includes at least one of: a device reboot, a device firmware update, a re-plugging of a network cable into the port, or a disablement of an operational mode of the first device; and
perform, based at least in part on the trigger event, an auto-negotiation procedure according to the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard by at least re-sending the first information to the second device.
14 . The first device of claim 9 , wherein the one or more memories store further instructions that, upon execution by the one or more processors, configure the first device to:
determine that that a status of the port indicates that the port is idle, wherein the port is a first local area network (LAN) port communicatively coupled with a second LAN port of the second device; and
perform, based at least in part on the status, an auto-negotiation procedure according to the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard by at least sending the second information to the second device.
15 . The first device of claim 9 , wherein the first device comprises a plurality of ports, wherein the third network connection speed is selected based at least in part on an auto-negotiation procedure performed for the port only.
16 . The first device of claim 9 , wherein the one or more memories store further instructions that, upon execution by the one or more processors, configure the first device to:
cause the first device to operate in a first state after the first network connection speed is selected and while the second network connection speed is determined and while the third network connection speed is selected;
cause the first device to operate in a second state while the setting of the port is changed; and
cause the first device to operate in a third state after the setting of the port is changed.
17 . The first device of claim 16 , wherein an auto-negotiation procedure according to the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard is performed while the first device is operated in the second state, and wherein no network connection speed tests are performed while the first device is operated in the third state.