> For the complete documentation index, see [llms.txt](https://www.netexec.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.netexec.wiki/ldap-protocol/extract-subnet.md).

# Extract Subnet

```bash
nxc ldap <ip> -u <user> -p <pass> -M get-network
nxc ldap <ip> -u <user> -p <pass> -M get-network -o ONLY_HOSTS=true
nxc ldap <ip> -u <user> -p <pass> -M get-network -o ALL=true
```
