How to check if dhcp server exists for this subnet before creating subnet

I'm stuck with the neutron problem.

I have two nodes, namely a controller and a compute neutron component set in the controller node. Reloaded DHCP services, L3 Agent.

  • we use namespaces for dhcp agent.
  • Created a private network, specifying the provider's network type as flat. After that, before creating the subnet, we want to check if a dhcp server exists for that subnet.

our subnet is 10.88.210.0/24

+3


source to share


1 answer


Try dhcp-discover

Sends a DHCPINFORM request to the host on UDP port 67 to obtain all local configuration parameters without allocating a new address.

DHCPINFORM is a DHCP request that returns useful information from a DHCP server without allocating an IP address. The request sends a list of fields it wants to know (by default, by default, each field if verbosity is enabled) and the server responds with the requested fields. It should be noted that the server does not need to return every field, and it does not need to return them in the same order or perform a query at all. Linksys WRT54g, for example, completely ignores the list of requested fields and returns a few standard ones. This script displays each field received.

Usage example

nmap -sU -p 67 --script=dhcp-discover <target>

      



Output

Interesting ports on 192.168.1.1:
PORT   STATE SERVICE
67/udp open  dhcps
| dhcp-discover:
|   DHCP Message Type: DHCPACK
|   Server Identifier: 192.168.1.1
|   IP Address Lease Time: 1 day, 0:00:00
|   Subnet Mask: 255.255.255.0
|   Router: 192.168.1.1
|_  Domain Name Server: 208.81.7.10, 208.81.7.14

      

Scroll through the hosts on your subnet until you find the dhcp server.

Link

+3


source







All Articles