# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity nomodeset"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
GRUB_GFXMODE=800x600
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
書き換えたらgrub.cfgを生成するため「sudo update-grub2」を実行します。
instadmin@ubuntu:~$ sudo update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-91-generic
Found initrd image: /boot/initrd.img-5.4.0-91-generic
done
instadmin@ubuntu:~$
[root@centos7 ~]# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2c896cb2eafd4db586ecfbd67535d5dc
Found initrd image: /boot/initramfs-0-rescue-2c896cb2eafd4db586ecfbd67535d5dc.img
done
[root@centos7 ~]#
root@ubuntu:~# udevadm test-builtin net_setup_link /sys/class/net/ens160
Load module index
Parsed configuration file /etc/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
ID_NET_DRIVER=e1000e
ens160: Failed to get ACTION= property: No such file or directory
Using default interface naming scheme 'v245'.
ID_NET_LINK_FILE=/etc/systemd/network/99-default.link
Unload module index
Unloaded link configuration context.
root@ubuntu:~#
リンク速度が変わったことが確認できます。
root@ubuntu:~# dmesg|grep ens160
[ 5510.551597] e1000e: ens160 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
[ 5510.551771] e1000e 0000:03:00.0 ens160: 10/100 speed: disabling TSO
root@ubuntu:~#
[Match]
# Set a match condition appropriate for your use case
Name=*
[Link]
TCPSegmentationOffload=false
GenericSegmentationOffload=false
と書かれていたのがもっとも正解に近かったという・・・
2021/12/24 追記
udevadmの詳細表示は下記の様に実行する
osakanataro@ubuntu:~$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/ens160
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 245
file size: 9953660 bytes
header size 80 bytes
strings 2163852 bytes
nodes 7789728 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/network' changed
timestamp of '/run/systemd/network' changed
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/98-ens34.link
Parsed configuration file /etc/systemd/network/98-ens224.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
ID_NET_DRIVER=vmxnet3
ens160: Config file /usr/lib/systemd/network/99-default.link is applied
ens160: Failed to get ACTION= property: No such file or directory
ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
ens160: Device has name_assign_type=4
Using default interface naming scheme 'v245'.
ens160: Policy *keep*: keeping existing userspace name
ens160: Device has addr_assign_type=0
ens160: MAC on the device already matches policy *persistent*
Could not set AlternativeName= or apply AlternativeNamesPolicy= on ens160, ignoring: Operation not supported
ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
Unload module index
Unloaded link configuration context.
osakanataro@ubuntu:~$
NICデバイス名の算出に関しては下記
osakanataro@ubuntu:~$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_id /sys/class/net/ens160
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 245
file size: 9953660 bytes
header size 80 bytes
strings 2163852 bytes
nodes 7789728 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/network' changed
timestamp of '/run/systemd/network' changed
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/98-ens34.link
Parsed configuration file /etc/systemd/network/98-ens224.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
Using default interface naming scheme 'v245'.
ID_NET_NAMING_SCHEME=v245
ID_NET_NAME_MAC=enx00505699e0a1
ID_OUI_FROM_DATABASE=VMware, Inc.
ID_NET_NAME_PATH=enp3s0
ID_NET_NAME_SLOT=ens160
Unload module index
Unloaded link configuration context.
osakanataro@ubuntu:~$
ちなみに ens34については100Mb固定設定を行っていて、下記の様な出力となる。
osakanataro@ubuntu:~$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link /sys/class/net/ens34
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 245
file size: 9953660 bytes
header size 80 bytes
strings 2163852 bytes
nodes 7789728 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/network' changed
timestamp of '/run/systemd/network' changed
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/98-ens34.link
Parsed configuration file /etc/systemd/network/98-ens224.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
ID_NET_DRIVER=e1000
ens34: Config file /etc/systemd/network/98-ens34.link is applied
ens34: Failed to get ACTION= property: No such file or directory
ens34: Device has name_assign_type=4
Using default interface naming scheme 'v245'.
ens34: Policies didn't yield a name and Name= is not given, not renaming.
ID_NET_LINK_FILE=/etc/systemd/network/98-ens34.link
Unload module index
Unloaded link configuration context.
osakanataro@ubuntu:~$ sudo SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_id /sys/class/net/ens34
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 245
file size: 9953660 bytes
header size 80 bytes
strings 2163852 bytes
nodes 7789728 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/network' changed
timestamp of '/run/systemd/network' changed
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/98-ens34.link
Parsed configuration file /etc/systemd/network/98-ens224.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
Using default interface naming scheme 'v245'.
ID_NET_NAMING_SCHEME=v245
ID_NET_NAME_MAC=enx000c2953f0df
ID_OUI_FROM_DATABASE=VMware, Inc.
ID_NET_NAME_PATH=enp2s2
ID_NET_NAME_SLOT=ens34
Unload module index
Unloaded link configuration context.
osakanataro@ubuntu:~$ cat /etc/systemd/network/98-ens34.link
[Match]
PermanentMACAddress=00:0c:29:53:f0:df
[Link]
AutoNegotiation=no
BitsPerSecond=100M
Duplex=full
osakanataro@ubuntu:~$
上記で「ens34: Policies didn’t yield a name and Name= is not given, not renaming.」というのが出ているが、これはLinkセクションでName=で定義していないための表示。
[-up-admin {true|false}] – Up Administrative (privilege: advanced) The administrative state of the port. If set to true, the port is used if it is operational. If set to false, the port is configured down.
標準の管理CLIではなく、advanced以上の権限であれば実行できる、とのこと。
fas8300::> set advanced
Warning: These advanced commands are potentially dangerous; use them only when directed to do so by NetApp
personnel.
Do you want to continue? {y|n}: y
fas8300::*>
advancedモードに切り替えてから、再度オプション一覧を確認
fas8300::*> network port modify -node fas8300-01 -port e0h -?
[ -mtu <integer> ] MTU
[ -autonegotiate-admin {true|false} ] Auto-Negotiation Administrative
[ -duplex-admin {auto|half|full} ] Duplex Mode Administrative
[ -speed-admin {auto|10|100|1000|10000|100000|40000|25000} ] Speed Administrative
[ -flowcontrol-admin {none|receive|send|full} ] Flow Control Administrative
[ -up-admin {true|false} ] *Up Administrative
[ -ipspace <IPspace> ] IPspace Name
[ -ignore-health-status {true|false} ] *Ignore Port Health Status
fas8300::*>