Remote IP setup via MAC

Hi there,-
i am currently looking for information how to setup a RPi remote with a
known MAC address.
The first idea was to broadcast MAC & NewIP while the RPi is listening
for those packets and uses this static IP address afterwards.
Any ideas?
Thanx -Udo
Reply to
Newdo
Loading thread data ...
This has recently been exhaustively covered here, so start by reading the "Wrong IP address on Pi Zero" thread.
Short form:
- Use the DHCP on your router or run a DHCP server somewhere else on your LAN and use it to associate an IP with the RPi's adapter MAC
- Configure the RPi to use a static IP address.
--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie
Am 01.07.2018 um 14:37 schrieb Martin Gregorie:
No DHCP, no router, only a service laptop connected to a couple of measurement devices. The MAC address ist known, laptop configured somehow. The technician shall be provided with a configuration tool to submit an IP to each device that will be used to download recorded measurement files via FTP. The usable IP range is sometimes retricted by sys admins so i would prefer the ability to submit a prereserved IP.
Automatically after receiving the IP to be used. Headless RPi, no user configurable options, only LAN.
Thanks - Udo
Reply to
Newdo
On Sun, 1 Jul 2018 13:07:06 +0200, Newdo declaimed the following:
Depends upon how your network is configured...
Presuming you have a router somewhere that responds to DHCP requests, you would configure the router to always provide the static IP address when it sees a request from the RPi's MAC address (that should be fixed on the RPi and unique on the network).
The RPi already broadcasts its MAC address on boot, asking for an IP from a DHCP server. Most routers already perform as DHCP servers; if you don't have such, you'll need to add some node to the network that runs a DHCP server... OR you end up having to manually set up IPs on the RPi, along with maybe hosts files on all the other network nodes and possibly even entries to the routing tables.
{I'd try to show examples but I've moved recently, and haven't yet put my dual-band router between the U-verse modem and the rest of my network -- I don't have the U-verse modem configured for static IPs to RPi and BBBs... The U-verse router is only single Wi-Fi band, and I want to turn that off in favor of the dual-band; it also adds another layer of firewall, as the U-verse will be issuing an IP to the dual-band router, and the dual-band will issue IPs to the rest of the network, using a different sub-net [192.168.1.x for U-verse, 192.168.2.x for dual-band]}.
--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber
In an instrument family I built, I solved the problem by including a BOOTP/TFTP bootup client into the instrument. The service laptop has a BOOTP/TFTP server which is able to provide the IP address and maybe a download file containing service code.
DCHP is an extension of BOOTP, so it should not be too difficult to recode the server in the laptop to respond to it.
To prevent messup of possible DHCP servers in the customer network, there is the option of using non-standard UDP port for the bootup (50067/50068 instead of 67/68).
--

-TV
Reply to
Tauno Voipio
Run DHCP on the laptop if the only things on the network are the RPi and the laptop.
Sounds like you need to talk to the sysadmins.
--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
 Click to see the full signature
Reply to
Ahem A Rivet's Shot
On Sun, 1 Jul 2018 15:12:09 +0200, Newdo declaimed the following:
Through what? Direct (cross-over) cable from laptop to RPi... One at a time? Or is there a hub/switch in the system from which multiple RPis are dangling?
Install and configure a DHCP server on the laptop so it assigns the IPs when connected to the RPis... I'm presuming Windows laptop so...
formatting link

If the laptop is running some form of Linux/Unix -- check the distribution repositories for DHCP (dnsmasq, for example, or isc-dhcp -- both available in Debian).
If you have a slew of RPis always connected to a switch, and only connect the laptop to download logs, it might be worth configuring one of the RPi units as a DHCP server issuing (static) IPs to the rest, along with issuing an IP when the laptop is connected.
That's basically a DHCP server running on the laptop...
--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.