title: Python DHCP enabled disabled check
body: <p>I'm using Python 3.8.5 currently on windows, but the script should run also on linux and on macOS.</p>
  <p>I'm creating UDP server and a client and have establish communication between them via multicast.
  The client does not know from advanced the IP of the server so it is a &quot;discovery tool&quot; that will let me know information about the server ones it has received the data. -This is working-</p>
  <p>On the server I'm using netifaces to get information about the interfaces.</p>
  <p>The server sends information to the client such as IP address, mask, gateway. -information that I get from netifaces and is working-.
  Example of data I get:</p>
  <p><a href="https://i.stack.imgur.com/E41tE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E41tE.jpg" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/p0BRc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p0BRc.jpg" alt="enter image description here" /></a></p>
  <p><strong>Now to the issue:</strong>
  The python server can have a static IP or can be connected to a DHCP server -in case that is connected to a DHCP server I will not have access to the DHCP server-.</p>
  <p>I wish to know when the DHCP is enabled or disable on the python server so I can send this as a flag to the client together with the rest of the information.</p>
  <p>The idea is for the client to know that the IP that he's connecting to can change and he may lose connection and will need to start the discovery tool once more.</p>
  <p>Because the user will not know in advanced if the python server is connected to a DHCP server or wil know the IP address of the python server or have access to the python server command line or configuration, using ip addr show, ipconfig, ifconfig and other commands before connecting is not an option.</p>
  <p>I have seen that people use scrapy for DHCP communications but it seems that it does not solves what I wish to accomplish.
  I do no need to configure the DHCP, just detect if my python server IP is static or dynamic.</p>
  <p>I have search for over 4 days and have not found a possible solution.
  I'm not asking to have the solution in silver spoon just to be pointed on the right direction.</p>
  <p>**EDIT: I forgot to mention that the python server will be running on Ubuntu 16.04 and 20.04.</p>