Modifier les paramètres des cartes réseaux
Project brussels from the OpenSolaris project revamped how link properties are managed, and their push to get rid of ndd and device-specific properties is now well underway!
2 Show properties
Link properties are actually pretty cool, and they can be displayed with the dladm utilities “show-linkprop” option:
As you can see in the above output, the typical speed, duplex, mtu and flowctrl properties are listed. In addition to those, the “maxbw” and “cpus” properties that were introduced with the recent crossbow putback are visible. The “maxbw” property is especially useful, since it allows you to limit how much bandwidth is available to an interface. Here is an example that caps bandwidth for an interface at 2Mb/s:
dladm set-linkprop -p maxbw=2m e1000g0
To see how this operates, you can use your favorite data transfer client:
$ scp techtalk1* 192.168.1.10: Password: techtalk1.mp3 5% 2128KB 147.0KB/s 04:08 ETA
3 Modify properties
The read/write link properties can be changed on the fly with dladm, so increasing the “maxbw” property will allow the interface to consume additional bandwidth:
$ dladm set-linkprop -p maxbw=10m e1000g0
Once the bandwidth is increased, you can immediately see this reflected in the data transfer progress:
techtalk1.mp3 45% 17MB 555.3KB/s 00:38 ETA
Clearview rocks, and it’s awesome to see that link properties are going to be managed in a standard uniform way going forward! Nice!