Created
March 1, 2022 19:34
-
-
Save netaviator/02d66ffc6294cb6cca52b3b2ef88be99 to your computer and use it in GitHub Desktop.
Revisions
-
netaviator created this gist
Mar 1, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash echo "Write special configurations onto Intel NICs." echo "Search for ensXfX devices and apply settings..." for iface in $(ip link list | cut -d ' ' -f2 | tr ':' '\n' | awk NF) do if [[ "$iface" =~ ^ens[0-9]f[0-9]$ ]]; then echo $iface echo "Disable LLDP..." /usr/sbin/ethtool --set-priv-flags $iface disable-fw-lldp on echo "Enable link down on close..." /usr/sbin/ethtool --set-priv-flags $iface link-down-on-close on fi done