[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DM6BVKC23D7BB6H4JN9Z9X":3,"skill-same:01M7DM6BVKC23D7BB6H4JN9Z9X":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7DM6BVKC23D7BB6H4JN9Z9X","dhcpt",null,"Test and troubleshoot DHCP servers, pools, and Option 82 relays — run DHCP discovers, simulate Cisco\u002FJuniper IP-helpers, detect rogue servers, inspect offered IPs, leases, and Option 121 classless static routes.","epicade\u002Fdhcpt","epicade","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F298771351?v=4","01M7DM69BNKQX5DF36D990EA4Z","01M7DM69CDFVH6ZWNBQ3T9P3FG",0,"GPL-2.0","https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt\u002Fblob\u002Fmain\u002Fskills\u002Fdhcpt\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dhcpt\ndescription: Test and troubleshoot DHCP servers, pools, and Option 82 relays — run DHCP discovers, simulate Cisco\u002FJuniper IP-helpers, detect rogue servers, inspect offered IPs, leases, and Option 121 classless static routes.\n---\n\n# dhcpt - DHCP Testing & Troubleshooting Guide\n\n`dhcpt` is a Layer 2\u002F3 DHCP testing, troubleshooting, and diagnostic CLI utility written in Python. It crafts RFC-compliant DHCP Discover packets, listens for DHCP Offers, and analyzes network parameters, lease times, Option 82 relay information, and RFC 3442 routing options.\n\n---\n\n## When to Use `dhcpt`\n\nTrigger this skill whenever you need to:\n1. **Verify if a DHCP server is responding** on a network segment or VLAN without configuring an interface or consuming an IP lease.\n2. **Simulate a DHCP Relay Agent (e.g. Cisco `ip helper-address`, Juniper `dhcp-relay`)** to test whether central DHCP servers (e.g. Anycast servers) have an active pool for a specific subnet.\n3. **Detect Rogue DHCP Servers** on a local broadcast domain.\n4. **Debug Option 82 \u002F Circuit-ID routing** to check if DHCP servers apply the expected policies.\n5. **Inspect pushed DHCP options** (Subnet Mask, Default Gateway, DNS, NTP, Domain Search List, RFC 3442 Classless Static Routes).\n\n---\n\n## Privileges & Prerequisites\n\n* **Root Privileges:** Layer 2 raw packet crafting (`AF_PACKET`) requires `sudo`.\n* **Path:** `\u002Fusr\u002Flocal\u002Fbin\u002Fdhcpt` (system-wide) or user symlink from `~\u002F.local\u002Fbin\u002Fdhcpt`.\n\n### Installation (If `dhcpt` is not installed)\nIf `command -v dhcpt` fails on the target system, install it:\n```bash\n# 1. Install Scapy prerequisite:\n# Debian \u002F Ubuntu:\nsudo apt update && sudo apt install -y python3-scapy\n# RHEL \u002F Rocky \u002F AlmaLinux \u002F Oracle Linux:\nsudo dnf install -y python3-scapy\n\n# 2. Install latest release tag globally via pipx (places binary into \u002Fusr\u002Flocal\u002Fbin):\nLATEST_TAG=$(git ls-remote --tags --refs https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git | tail -n1 | cut -d\u002F -f3)\nsudo pipx install --global \"git+https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git@${LATEST_TAG}\"\n# Or install a specific version tag (e.g. @v0.1.1):\n# sudo pipx install --global git+https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git@\u003Ctag>\n\n# 3. Direct execution without binary installation (from git checkout):\nsudo env PYTHONPATH=src python3 -m dhcpt -i eth0\n```\n\n### Passwordless Execution for AI Agents \u002F Automation\nIf running non-interactively from AI CLI agents (Gemini CLI, Claude Code), a scoped rule in `\u002Fetc\u002Fsudoers.d\u002Fdhcpt` prevents password prompt blocks:\n```bash\necho \"$USER ALL=(ALL) NOPASSWD: \u002Fusr\u002Flocal\u002Fbin\u002Fdhcpt\" | sudo tee \u002Fetc\u002Fsudoers.d\u002Fdhcpt\nsudo chmod 0440 \u002Fetc\u002Fsudoers.d\u002Fdhcpt\n```\n\n---\n\n## Common Workflows & Command Recipes\n\n### 1. Standard Local Broadcast Check\nSends a DHCP Discover broadcast on a specific interface (flag or positional):\n```bash\nsudo dhcpt -i eth0\n# or positional:\nsudo dhcpt eth0\n```\n\n### 2. Layer 3 Tunnel \u002F VPN Testing (WireGuard \u002F OpenVPN TUN)\nOn Layer 3 interfaces without hardware MAC addresses, `dhcpt` automatically uses IP-level I\u002FO (`AF_INET` raw sockets). Superuser privileges (`sudo`) are still required because raw socket creation requires the Linux `CAP_NET_RAW` capability. Always specify target server IPs (`-s`) and ensure your routing table directs traffic to the tunnel:\n```bash\n# 1. Verify routing table sends traffic to tunnel interface:\nip route get 10.1.1.1\n\n# 2. Run test over the tunnel:\nsudo dhcpt -i wg0 --dhcp-servers 10.1.1.1 --target-gateway 10.50.1.1\n```\n\n### 3. Rogue DHCP Server Detection (`--all`)\nListens for the full timeout duration to capture all answering DHCP servers on the segment:\n```bash\nsudo dhcpt -i eth0 --all --timeout 5\n```\n*If multiple distinct servers answer, `dhcpt` outputs a `[WARN]` and lists every server ID, MAC, and offered IP.*\n\n### 4. DHCP Relay Agent & IP-Helper Simulation\nWhen testing whether dedicated DHCP servers respond for a remote VLAN or subnet:\n```bash\n# Test target server (IP or FQDN) with RFC 3527 Link Selection for the target subnet:\nsudo dhcpt -i eth0 --dhcp-servers 192.0.2.1 --target-gateway 10.50.1.1 --circuit-id Vlan100\nsudo dhcpt -i eth0 --dhcp-servers dhcp1.example.com --target-gateway 10.50.1.1 --circuit-id Vlan100\n\n# Test multiple dedicated DHCP servers simultaneously:\nsudo dhcpt -i eth0 --dhcp-servers 10.1.1.1,10.1.1.2,10.1.1.3,10.1.1.4 --target-gateway 10.50.1.1 --circuit-id Vlan100 --remote-id sw-core01\n```\n\n* **Why `--target-gateway` (RFC 3527 Link Selection)?**\n  RFC 2131 dictates that DHCP servers reply to `giaddr`. Setting `--target-gateway \u003Cgateway_ip>` (legacy alias `--relay-subnet` is deprecated and will be removed in v1.0.0) tells the DHCP server which address pool to allocate from — specifically, the gateway IP configured as the identifier for that VLAN in the DHCP server's subnet declaration. Meanwhile, `dhcpt` sets `giaddr` to your local machine IP so the DHCP server routes the reply directly back to you across routed networks.\n\n### 5. Fast-Path: Constructing Remote Relay Queries\nWhen testing a remote subnet or VLAN without manually looking up the network device name:\n1. **Identify the DHCP Server IP & Target Subnet Gateway:**\n   Determine the DHCP server IP (e.g. `192.0.2.1` or enterprise Anycast IP) and the default gateway of the target subnet (e.g. `10.50.1.1`).\n2. **Resolve the Outgoing Interface Automatically:**\n   ```bash\n   IFACE=$(ip route get \u003CSERVER_IP> | grep -oP 'dev \\K\\S+')\n   ```\n3. **Execute the Relay Query Immediately:**\n   ```bash\n   sudo dhcpt -i \"$IFACE\" --dhcp-servers \u003CSERVER_IP> --target-gateway \u003CGATEWAY_IP> [-m \u003CMAC>]\n   ```\n\n### 6. Request Custom DHCP Options (`-o`)\nStandard options (Subnet Mask, Router, DNS, NTP, Domain, Classless Routes, WPAD) are included by default. To request additional options (e.g. for PXE netboot or VoIP):\n```bash\nsudo dhcpt -i eth0 -o 12,26,66,67\n# or by name:\nsudo dhcpt -i eth0 -o hostname,tftp_server_name,interface_mtu\n\n# Request ONLY specific options without standard network defaults (e.g. for IoT\u002FPXE):\nsudo dhcpt -i eth0 --clear-default-options -o 26\n```\n*Tip: Run `dhcpt --list-options` to inspect all supported options and codes, or consult the [IANA BOOTP\u002FDHCP Parameters Registry](https:\u002F\u002Fwww.iana.org\u002Fassignments\u002Fbootp-dhcp-parameters).*\n\n### 7. Unicast Offer Delivery (`--no-broadcast`)\nTest if the DHCP server correctly delivers offers via unicast to clients that reject broadcast packets:\n```bash\nsudo dhcpt -i eth0 --no-broadcast\n```\n\n### 8. Machine-Readable JSON Output\n```bash\nsudo dhcpt -i eth0 --json\n```\n*The JSON structure includes link diagnostics and vendor-neutral relay parameters under the `relay_simulation` block (with `cisco_relay_simulation` mirrored for backward compatibility until v1.0.0).*\n\n### 9. Deploy AI Agent Skills (`--install-skill`)\nInstall or update the `dhcpt` diagnostic skill for terminal coding assistants:\n```bash\n# Auto-detect installed assistants (Gemini CLI, Claude Code, Mistral Vibe):\ndhcpt --install-skill\n\n# Or install for a specific assistant:\ndhcpt --install-skill gemini\ndhcpt --install-skill claude\n\n# Force overwrite of existing skill files:\ndhcpt --install-skill --force\n```\n\n### 10. Zero-Risk Local Sandbox Testing (Network Namespaces)\nWhen you want to experiment or verify functionality safely without sending traffic onto production networks (requires cloned repository, installed `dhcpt`, and testbed packages):\n```bash\n# 1. Clone repository, install dhcpt, and set up testbed packages:\ngit clone https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git\ncd dhcpt\nsudo make install-dev       # Installs dhcpt into \u002Fusr\u002Flocal\u002Fbin (required by sudo in namespaces)\nsudo make install-testbed   # Installs Kea DHCP server, jq, and Scapy packages\n\n# 2. Start local Kea testbed (isolated namespaces + virtual bridge):\nmake testbed-start\n\n# 3. Run tests safely inside the workstation namespace:\nsudo ip netns exec workstation dhcpt -i veth-client\nsudo ip netns exec workstation dhcpt -i veth-client --all\nsudo ip netns exec workstation dhcpt -i veth-client -s 10.99.0.1 --target-gateway 10.50.1.1\n\n# 4. Stop and clean up namespaces:\nmake testbed-stop\n```\n\n---\n\n## Exit Codes\n\n* **`0` (Success):** All queried DHCP servers replied, or at least one Offer was captured on broadcast.\n* **`1` (No Offer \u002F Failure):** Timed out with 0 DHCP Offers received, or raw socket permission failure.\n* **`2` (Usage \u002F Syntax Error):** Missing required interface, invalid IP\u002FMAC, unknown DHCP option, or `--force` used outside of `--install-skill`.\n* **`3` (Partial Response):** Multi-server query (`-s`) where some servers replied but at least one timed out.\n\n---\n\n## Interpreting Output & Troubleshooting\n\n### If No Offer is Received:\n1. **Link State:** Check whether `operstate` is `up` and `carrier` is `1`. If down, run `sudo ip link set \u003Ciface> up`.\n2. **UDP Port 67 Reachability (Netcat):** When testing remote servers (e.g. over VPN or routed networks), verify if UDP port 67 is accessible:\n   ```bash\n   # -u: UDP mode, -z: zero-I\u002FO scanning, -v: verbose, -w 2: 2-second timeout\n   nc -z -v -u -w 2 \u003Cserver_ip> 67\n   ```\n   *(Note: Netcat on Linux\u002FOpenBSD uses single-letter options; long options like `--udp` are not supported).*\n3. **Pool Exhaustion & Server Rejection:** If Netcat succeeds (`Connection to \u003Cserver_ip> 67 port [udp\u002Fbootps] succeeded!`) but `dhcpt` times out:\n   * Is the address pool exhausted? Check server logs.\n   * Does a pool exist for `--target-gateway \u003CGW>` on the server?\n   * Does the server require specific Option 82 attributes (`--circuit-id` or `--remote-id`)?\n4. **VLAN Tagging:** Verify if the client port is on the correct access VLAN or trunk PVID.\n5. **DHCP Relay Configuration:** On the upstream switch, check if `ip helper-address \u003Cserver>` is configured on the SVI.\n6. **Firewall:** Verify host and network firewalls permit incoming UDP port 67 and 68.\n\n### If an Offer is Received:\n* **`yiaddr` (Offered IP):** The IP address offered by the server.\n* **`server_id` \u002F Server IP:** Identifies which server answered.\n* **`Option 82`:** Confirms if the relay agent forwarded Circuit-ID and Remote-ID.\n* **`Option 121 \u002F 249` (Classless Static Routes):** Shows static routes pushed for VPN or enterprise subnets (e.g. `10.0.0.0\u002F8 via 192.168.1.1`).\n","# dhcpt - DHCP Testing & Troubleshooting Guide\n\n`dhcpt` is a Layer 2\u002F3 DHCP testing, troubleshooting, and diagnostic CLI utility written in Python. It crafts RFC-compliant DHCP Discover packets, listens for DHCP Offers, and analyzes network parameters, lease times, Option 82 relay information, and RFC 3442 routing options.\n\n---\n\n## When to Use `dhcpt`\n\nTrigger this skill whenever you need to:\n1. **Verify if a DHCP server is responding** on a network segment or VLAN without configuring an interface or consuming an IP lease.\n2. **Simulate a DHCP Relay Agent (e.g. Cisco `ip helper-address`, Juniper `dhcp-relay`)** to test whether central DHCP servers (e.g. Anycast servers) have an active pool for a specific subnet.\n3. **Detect Rogue DHCP Servers** on a local broadcast domain.\n4. **Debug Option 82 \u002F Circuit-ID routing** to check if DHCP servers apply the expected policies.\n5. **Inspect pushed DHCP options** (Subnet Mask, Default Gateway, DNS, NTP, Domain Search List, RFC 3442 Classless Static Routes).\n\n---\n\n## Privileges & Prerequisites\n\n* **Root Privileges:** Layer 2 raw packet crafting (`AF_PACKET`) requires `sudo`.\n* **Path:** `\u002Fusr\u002Flocal\u002Fbin\u002Fdhcpt` (system-wide) or user symlink from `~\u002F.local\u002Fbin\u002Fdhcpt`.\n\n### Installation (If `dhcpt` is not installed)\nIf `command -v dhcpt` fails on the target system, install it:\n```bash\n# 1. Install Scapy prerequisite:\n# Debian \u002F Ubuntu:\nsudo apt update && sudo apt install -y python3-scapy\n# RHEL \u002F Rocky \u002F AlmaLinux \u002F Oracle Linux:\nsudo dnf install -y python3-scapy\n\n# 2. Install latest release tag globally via pipx (places binary into \u002Fusr\u002Flocal\u002Fbin):\nLATEST_TAG=$(git ls-remote --tags --refs https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git | tail -n1 | cut -d\u002F -f3)\nsudo pipx install --global \"git+https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git@${LATEST_TAG}\"\n# Or install a specific version tag (e.g. @v0.1.1):\n# sudo pipx install --global git+https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git@\u003Ctag>\n\n# 3. Direct execution without binary installation (from git checkout):\nsudo env PYTHONPATH=src python3 -m dhcpt -i eth0\n```\n\n### Passwordless Execution for AI Agents \u002F Automation\nIf running non-interactively from AI CLI agents (Gemini CLI, Claude Code), a scoped rule in `\u002Fetc\u002Fsudoers.d\u002Fdhcpt` prevents password prompt blocks:\n```bash\necho \"$USER ALL=(ALL) NOPASSWD: \u002Fusr\u002Flocal\u002Fbin\u002Fdhcpt\" | sudo tee \u002Fetc\u002Fsudoers.d\u002Fdhcpt\nsudo chmod 0440 \u002Fetc\u002Fsudoers.d\u002Fdhcpt\n```\n\n---\n\n## Common Workflows & Command Recipes\n\n### 1. Standard Local Broadcast Check\nSends a DHCP Discover broadcast on a specific interface (flag or positional):\n```bash\nsudo dhcpt -i eth0\n# or positional:\nsudo dhcpt eth0\n```\n\n### 2. Layer 3 Tunnel \u002F VPN Testing (WireGuard \u002F OpenVPN TUN)\nOn Layer 3 interfaces without hardware MAC addresses, `dhcpt` automatically uses IP-level I\u002FO (`AF_INET` raw sockets). Superuser privileges (`sudo`) are still required because raw socket creation requires the Linux `CAP_NET_RAW` capability. Always specify target server IPs (`-s`) and ensure your routing table directs traffic to the tunnel:\n```bash\n# 1. Verify routing table sends traffic to tunnel interface:\nip route get 10.1.1.1\n\n# 2. Run test over the tunnel:\nsudo dhcpt -i wg0 --dhcp-servers 10.1.1.1 --target-gateway 10.50.1.1\n```\n\n### 3. Rogue DHCP Server Detection (`--all`)\nListens for the full timeout duration to capture all answering DHCP servers on the segment:\n```bash\nsudo dhcpt -i eth0 --all --timeout 5\n```\n*If multiple distinct servers answer, `dhcpt` outputs a `[WARN]` and lists every server ID, MAC, and offered IP.*\n\n### 4. DHCP Relay Agent & IP-Helper Simulation\nWhen testing whether dedicated DHCP servers respond for a remote VLAN or subnet:\n```bash\n# Test target server (IP or FQDN) with RFC 3527 Link Selection for the target subnet:\nsudo dhcpt -i eth0 --dhcp-servers 192.0.2.1 --target-gateway 10.50.1.1 --circuit-id Vlan100\nsudo dhcpt -i eth0 --dhcp-servers dhcp1.example.com --target-gateway 10.50.1.1 --circuit-id Vlan100\n\n# Test multiple dedicated DHCP servers simultaneously:\nsudo dhcpt -i eth0 --dhcp-servers 10.1.1.1,10.1.1.2,10.1.1.3,10.1.1.4 --target-gateway 10.50.1.1 --circuit-id Vlan100 --remote-id sw-core01\n```\n\n* **Why `--target-gateway` (RFC 3527 Link Selection)?**\n  RFC 2131 dictates that DHCP servers reply to `giaddr`. Setting `--target-gateway \u003Cgateway_ip>` (legacy alias `--relay-subnet` is deprecated and will be removed in v1.0.0) tells the DHCP server which address pool to allocate from — specifically, the gateway IP configured as the identifier for that VLAN in the DHCP server's subnet declaration. Meanwhile, `dhcpt` sets `giaddr` to your local machine IP so the DHCP server routes the reply directly back to you across routed networks.\n\n### 5. Fast-Path: Constructing Remote Relay Queries\nWhen testing a remote subnet or VLAN without manually looking up the network device name:\n1. **Identify the DHCP Server IP & Target Subnet Gateway:**\n   Determine the DHCP server IP (e.g. `192.0.2.1` or enterprise Anycast IP) and the default gateway of the target subnet (e.g. `10.50.1.1`).\n2. **Resolve the Outgoing Interface Automatically:**\n   ```bash\n   IFACE=$(ip route get \u003CSERVER_IP> | grep -oP 'dev \\K\\S+')\n   ```\n3. **Execute the Relay Query Immediately:**\n   ```bash\n   sudo dhcpt -i \"$IFACE\" --dhcp-servers \u003CSERVER_IP> --target-gateway \u003CGATEWAY_IP> [-m \u003CMAC>]\n   ```\n\n### 6. Request Custom DHCP Options (`-o`)\nStandard options (Subnet Mask, Router, DNS, NTP, Domain, Classless Routes, WPAD) are included by default. To request additional options (e.g. for PXE netboot or VoIP):\n```bash\nsudo dhcpt -i eth0 -o 12,26,66,67\n# or by name:\nsudo dhcpt -i eth0 -o hostname,tftp_server_name,interface_mtu\n\n# Request ONLY specific options without standard network defaults (e.g. for IoT\u002FPXE):\nsudo dhcpt -i eth0 --clear-default-options -o 26\n```\n*Tip: Run `dhcpt --list-options` to inspect all supported options and codes, or consult the [IANA BOOTP\u002FDHCP Parameters Registry](https:\u002F\u002Fwww.iana.org\u002Fassignments\u002Fbootp-dhcp-parameters).*\n\n### 7. Unicast Offer Delivery (`--no-broadcast`)\nTest if the DHCP server correctly delivers offers via unicast to clients that reject broadcast packets:\n```bash\nsudo dhcpt -i eth0 --no-broadcast\n```\n\n### 8. Machine-Readable JSON Output\n```bash\nsudo dhcpt -i eth0 --json\n```\n*The JSON structure includes link diagnostics and vendor-neutral relay parameters under the `relay_simulation` block (with `cisco_relay_simulation` mirrored for backward compatibility until v1.0.0).*\n\n### 9. Deploy AI Agent Skills (`--install-skill`)\nInstall or update the `dhcpt` diagnostic skill for terminal coding assistants:\n```bash\n# Auto-detect installed assistants (Gemini CLI, Claude Code, Mistral Vibe):\ndhcpt --install-skill\n\n# Or install for a specific assistant:\ndhcpt --install-skill gemini\ndhcpt --install-skill claude\n\n# Force overwrite of existing skill files:\ndhcpt --install-skill --force\n```\n\n### 10. Zero-Risk Local Sandbox Testing (Network Namespaces)\nWhen you want to experiment or verify functionality safely without sending traffic onto production networks (requires cloned repository, installed `dhcpt`, and testbed packages):\n```bash\n# 1. Clone repository, install dhcpt, and set up testbed packages:\ngit clone https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt.git\ncd dhcpt\nsudo make install-dev       # Installs dhcpt into \u002Fusr\u002Flocal\u002Fbin (required by sudo in namespaces)\nsudo make install-testbed   # Installs Kea DHCP server, jq, and Scapy packages\n\n# 2. Start local Kea testbed (isolated namespaces + virtual bridge):\nmake testbed-start\n\n# 3. Run tests safely inside the workstation namespace:\nsudo ip netns exec workstation dhcpt -i veth-client\nsudo ip netns exec workstation dhcpt -i veth-client --all\nsudo ip netns exec workstation dhcpt -i veth-client -s 10.99.0.1 --target-gateway 10.50.1.1\n\n# 4. Stop and clean up namespaces:\nmake testbed-stop\n```\n\n---\n\n## Exit Codes\n\n* **`0` (Success):** All queried DHCP servers replied, or at least one Offer was captured on broadcast.\n* **`1` (No Offer \u002F Failure):** Timed out with 0 DHCP Offers received, or raw socket permission failure.\n* **`2` (Usage \u002F Syntax Error):** Missing required interface, invalid IP\u002FMAC, unknown DHCP option, or `--force` used outside of `--install-skill`.\n* **`3` (Partial Response):** Multi-server query (`-s`) where some servers replied but at least one timed out.\n\n---\n\n## Interpreting Output & Troubleshooting\n\n### If No Offer is Received:\n1. **Link State:** Check whether `operstate` is `up` and `carrier` is `1`. If down, run `sudo ip link set \u003Ciface> up`.\n2. **UDP Port 67 Reachability (Netcat):** When testing remote servers (e.g. over VPN or routed networks), verify if UDP port 67 is accessible:\n   ```bash\n   # -u: UDP mode, -z: zero-I\u002FO scanning, -v: verbose, -w 2: 2-second timeout\n   nc -z -v -u -w 2 \u003Cserver_ip> 67\n   ```\n   *(Note: Netcat on Linux\u002FOpenBSD uses single-letter options; long options like `--udp` are not supported).*\n3. **Pool Exhaustion & Server Rejection:** If Netcat succeeds (`Connection to \u003Cserver_ip> 67 port [udp\u002Fbootps] succeeded!`) but `dhcpt` times out:\n   * Is the address pool exhausted? Check server logs.\n   * Does a pool exist for `--target-gateway \u003CGW>` on the server?\n   * Does the server require specific Option 82 attributes (`--circuit-id` or `--remote-id`)?\n4. **VLAN Tagging:** Verify if the client port is on the correct access VLAN or trunk PVID.\n5. **DHCP Relay Configuration:** On the upstream switch, check if `ip helper-address \u003Cserver>` is configured on the SVI.\n6. **Firewall:** Verify host and network firewalls permit incoming UDP port 67 and 68.\n\n### If an Offer is Received:\n* **`yiaddr` (Offered IP):** The IP address offered by the server.\n* **`server_id` \u002F Server IP:** Identifies which server answered.\n* **`Option 82`:** Confirms if the relay agent forwarded Circuit-ID and Remote-ID.\n* **`Option 121 \u002F 249` (Classless Static Routes):** Shows static routes pushed for VPN or enterprise subnets (e.g. `10.0.0.0\u002F8 via 192.168.1.1`).\n",{"name":5,"description":7},"main","221f17c9f997ccb53d44d1894bb7c866f63325b3","skills\u002Fdhcpt","https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt","https:\u002F\u002Fgithub.com\u002Fepicade","2026-10-14 22:10:18",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add epicade\u002Fdhcpt --skill dhcpt",{"tool":35,"command":36},"bunx","bunx skills add epicade\u002Fdhcpt --skill dhcpt",{"tool":38,"command":39},"pnpm","pnpm dlx skills add epicade\u002Fdhcpt --skill dhcpt","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt\u002Fblob\u002Fmain\u002Fskills\u002Fdhcpt\u002FSKILL.md",true,[],[44],{"skillNo":45,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":46,"categories":47,"keywords":48,"publishedAt":18},"01M7DM6AQ9A7C5HRFDB02D760T","https:\u002F\u002Fgithub.com\u002Fepicade\u002Fdhcpt\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdhcpt\u002FSKILL.md",[],[]]