As long as NIC driver supports the EEPROM can be updated via ethtool.
It's convenient on production line if the EEPROM is not well pre-burnt.
Ethtool write a byte:
ethtool -E $eth magic $mgc offset $off value $bye
mgc = magic composed by devID and venID, "lspci -n" to discover it
bye = byte to write
eth = ether device name, "ifconfig" to discover it
off = writing offset in EEPROM
A for loop can easily update the MAC address.
Example of updating Intel i210 MAC under CentOS
mgc=0x15338086
mac=00:11:22:33:44:55
eth=enP6p1s0
off=0
for i in {0..5}; do ethtool -E $eth magic $mgc offset $((off+i)) value 0x${mac:$((i*3)):2}; done
Checking the result by reading EEPROM.
ethtool -e $eth offset $off length 6
2019年9月20日 星期五
2019年9月17日 星期二
[ SSH ] remote unattended
sshpass -p <password> ssh -q -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" <user id>@<remote IP> "<command(s)>"
Cygwin works as well.
Cygwin works as well.
訂閱:
文章 (Atom)
[SSH & SCP] ignore known hosts
Host's key could be changed in many cases. It's a good idea to ignore host's key if no security issues. Add following options ...
-
ps p $$ o comm=
-
As long as NIC driver supports the EEPROM can be updated via ethtool. It's convenient on production line if the EEPROM is not well pre-...