0

I have the following question: I have a raspberry pi with openmediavault running on my network, and I want to assign it a static ip address. However, Im running a DHCP, and here comes my confusion.

DHCP assigns ip's automatically, and my router allows to assing a static ip while using DHCP with the MAC address of the device. However, I noted that I can also assign the static IP address to the interface. So imagine the case where I assign a static IP to my interface, removing the DHCP in the computer, and I try to connect to my router that has DHCP enabled, would there be any problems? The router will know that the IP of the device is the one in the interface? Could the router assign that static IP to another device?

5
  • 1
    As long as the static IP address is outside of the assignable range for your DHCP server configuration and other things match (subnet mask, default route, etc) there will be no problem. It only becomes a problem when there are multiple devices on the network with the same address.
    – squillman
    Commented Nov 10, 2022 at 20:16
  • 1
    “The client SHOULD perform a final check on the parameters (e.g., ARP for allocated network address)”, “If the client detects that the address is already in use (e.g., through the use of ARP), the client MUST send a DHCPDECLINE message” (RFC 2131, DHCP)
    – Daniel B
    Commented Nov 10, 2022 at 20:17
  • And what @DanielB said, with the caveat of "being a well-behaved client".
    – squillman
    Commented Nov 10, 2022 at 20:19
  • @DanielB and this check should be performed by the user?
    – Norhther
    Commented Nov 10, 2022 at 21:28
  • all that said of course, most people recommend using DHCP reservations, so that IPs for the whole network can be managed centrally, all in one place, and you don't have to go around checking everywhere for unexpected/forgotten configuration. for instance changing your entire address space is pretty easy if you only need to adjust your DHCP server and reboot everything Commented Nov 11, 2022 at 0:52

0

You must log in to answer this question.

Browse other questions tagged .