Re­mem­brance of IPs pa ssed

Linux Format - - ANSWERS -

Q In is­sue 238 of Lin­uxFor­mat (Au­gust 2018) Mar­cel Foust asks about ways of find­ing his Pi on the net­work.

You left out an easy way. As­sign it through DHCP. All you need is the MAC ad­dress of the net­work in­ter­face de­vice on the Pi. Most routers use a very sim­ple DHCP server, which usu­ally has some­thing called “DHCP Reser­va­tion” or the like. Us­ing this you can re­serve an ad­dress for your Pi.

I pre­fer to run my own DHCP server – on a Pi run­ning ISC DHCP as it hap­pens (as op­posed to dns­masq). In /etc/dhcp/dhcpd.conf you use the host to as­sign a spe­cific IP to the MAC: host pi1c { hard­ware eth­er­net 01:23:45:67:89:ab; fixed-ad­dress 192.168.42.44; } This has the ad­van­tage of pre­dictabil­ity, but ob­vi­ously some ini­tial setup time is re­quired. I al­ways make a note of all my de­vice’s MAC ad­dresses as they, in par­tic­u­lar the Pis, are be­com­ing un­ac­count­ably many. RobertGi­u­liano,vi­ae­mail A Thanks Robert, this is good, and it re­minds me that we should cover run­ning your own in­ter­nal DNS soon. It seems like LXF170 was the last time. The so­lu­tion I gave still use­ful where you don’t have ac­cess to router con­fig­u­ra­tions, and are not or­gan­ised enough to set up static IPs a pri­ori.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.