October 18, 2018

IP addr add trick

Suppose your machine has an IP address like 119.17.33.52 and you have some gadget that was shipped to your with an address like 192.168.1.10. How will you talk to it.
su
ip addr add 192.168.1.52/24 brd + dev eno1 label eno1:gadget
The above adds an alias entry for your machine and allows you to ping and ssh to the gadget.

Note the absurd "eno1" network name invented by Fedora. Most systems will use the sensible "eth0" instead.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org