Brief:
Is there an accepted way to request two IP addresses and reserve them for use by one machine?
I don't believe that I am allowed to get two IPs from a DHCP server with one interface and one MAC address (correct me if I am wrong).
If I choose a static IP, I can't stop the IP being allocated to someone else (correct me if I am wrong).
Details:
I would like multiple IP addresses. Is there some polite way I can request them without risking their being allocated to other people? I could forge a DHCP DORA handshake, but that doesn't seem like the right thing to do. Aside from the issue generating a MAC address, it doesn't seem like there should be a need to provide a MAC address; I only need the DHCP sever to NOT lease out an IP, it doesn't need to manage the IP and manage any associated MAC addresses. I'm happy to manage renewals, NACK and any other nuances.
I could randomly pick static IPs and potentially interfere with some other network user. Static virtual interfaces like this or this or this will work for the purposes of attaining multiple IPs, but DHCP won't be in control of issuing them. I cannot guarantee that they will be free.
I don't believe that virtual DHCP interfaces will work, as DHCP allocations require unique MAC addresses.
You may assume that I am on a work network. I am allowed to connect an arbitrary number of different devices to the network (and hence get any number of IPs allocated with the full consent of the company). However, I only require two, but I only have one network interface (a Raspberry Pi). I understand that I have phrased this as a general networking problem; I only seek to find a solution relevant to the latest Rasberry Pi build (buster).
ip add
command was a bit different - my textbook is using google :p – Jaromanda X Feb 05 '21 at 10:03/etc/network
!! :p – Jaromanda X Feb 05 '21 at 10:06networking
tosystemd-networkd
- but if you know how to do that, then you wouldn't need to ask your question @Insertnamehere – Jaromanda X Feb 05 '21 at 10:24I'm surprised "the usual crew" haven't blasted me for daring to suggest you mess around in the Forbidden Zone of /etc/network
... it was put to a vote, and we decided to cut you some slack. :-0 You know we only do it to help you - right? LOL – Seamus Feb 05 '21 at 21:14/etc/network
or switching tosystemd-networkd
– Jaromanda X Feb 06 '21 at 00:51systemd-networkd
guru-extraordinaire :) He may have already posted something. Personally, I try to do everything in/etc/dhcpcd.conf
as it's currently the default - but then networking is not really my thing. – Seamus Feb 06 '21 at 01:06systemd-networkd
would be the better/proper way to configure such exotic networking - as far as I can tellifupdown
+dhcpcd5
is fine for let's just get a network happening and be done with it type setups - i.e. the majority of raspberry pi uses – Jaromanda X Feb 06 '21 at 02:03