# 67 - DHCP

### Discovering DHCP Server

```
root@kali:~# nmap --script broadcast-dhcp-discover 
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-10 15:19 BST 
Pre-scan script results: 
| broadcast-dhcp-discover:  
| Response 1 of 1:  
| IP Offered: 192.168.0.16 
| DHCP Message Type: DHCPOFFER 
| Server Identifier: 192.168.0.1 
| IP Address Lease Time: 1d00h00m00s 
| Subnet Mask: 255.255.255.0 
| Router: 192.168.0.1 
| Domain Name Server: 192.168.0.1 
|_ Domain Name: Home 
WARNING: No targets were specified, so 0 hosts scanned. 
Nmap done: 0 IP addresses (0 hosts up) scanned in 2.59 seconds 
```

**From command Line:**

`cat /var/lib/dhcp/dhclient.leases`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/enumeration/services-ports/dhcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
