DHCP Configuration¶
This section covers Dynamic Host Configuration Protocol (DHCP) configuration in FloofOS, including DHCP client, DHCPv6, and DHCP proxy/relay functionality.
Overview¶
FloofOS supports comprehensive DHCP functionality for both IPv4 and IPv6:
| Feature | Description |
|---|---|
| DHCP Client | Obtain IP address dynamically on an interface |
| DHCPv6 Client | Obtain IPv6 address via DHCPv6 |
| DHCPv6 PD | Prefix Delegation for IPv6 |
| DHCP Proxy | Relay DHCP requests to a remote server |
| DHCPv6 Proxy | Relay DHCPv6 requests to a remote server |
DHCP Client¶
Enable DHCP Client¶
Configure an interface to obtain its IP address via DHCP.
Syntax:
Parameters:
| Parameter | Description |
|---|---|
intfc <interface> | Interface to enable DHCP client |
hostname <name> | Optional hostname to send in DHCP request |
Example:
Disable DHCP Client¶
Example:
Show DHCP Client Status¶
Display DHCP client information and lease details.
Syntax:
DHCPv6 Client¶
Enable DHCPv6 Client¶
Configure an interface to obtain IPv6 address via DHCPv6.
Syntax:
Parameters:
| Parameter | Description |
|---|---|
<interface> | Interface to enable DHCPv6 client |
disable | Disable DHCPv6 client on interface |
Example - Enable:
Example - Disable:
Show DHCPv6 Client Status¶
Show DHCPv6 Addresses¶
DHCPv6 Prefix Delegation (PD)¶
DHCPv6 Prefix Delegation allows obtaining an IPv6 prefix from an upstream provider for distribution to downstream networks.
Enable DHCPv6 PD Client¶
Syntax:
Parameters:
| Parameter | Description |
|---|---|
<interface> | Upstream interface to request prefix |
prefix group <group-name> | Name of the prefix group |
Example:
Disable DHCPv6 PD Client¶
Assign Address from Prefix Group¶
Assign an IPv6 address to an interface using an obtained prefix.
Syntax:
Example:
This assigns the address <delegated-prefix>::1/64 to GE2/0/0.
Show IPv6 Prefix Delegation Status¶
DHCP Proxy/Relay¶
DHCP Proxy (Relay) forwards DHCP requests from clients to a remote DHCP server, enabling centralized IP address management.
Configure DHCP Proxy¶
Syntax:
Parameters:
| Parameter | Description |
|---|---|
server <server-ip> | DHCP server IP address |
src-address <source-ip> | Source IP for relayed packets |
server-fib-id <n> | VRF/FIB ID where server resides (default: 0) |
rx-fib-id <n> | VRF/FIB ID where clients reside (default: 0) |
Example:
Remove DHCP Proxy¶
Show DHCP Proxy Configuration¶
DHCPv6 Proxy/Relay¶
Configure DHCPv6 Proxy¶
Syntax:
Example:
Remove DHCPv6 Proxy¶
Show DHCPv6 Proxy Configuration¶
DHCP Option 82 (Relay Agent Information)¶
Option 82 allows the relay agent to insert additional information about the client's location.
Configure Option 82 VSS¶
Syntax:
Parameters:
| Parameter | Description |
|---|---|
table <table-id> | VRF/Table ID |
oui <n> | Organizationally Unique Identifier |
vpn-id <n> | VPN Identifier |
vpn-ascii-id <text> | ASCII VPN Identifier |
Example:
Remove Option 82 VSS¶
Show Option 82 Configuration¶
DHCPv6 VSS Configuration¶
Configure DHCPv6 VSS¶
Syntax:
Example:
Show DHCPv6 VSS¶
Configuration Examples¶
Example 1: WAN Interface with DHCP Client¶
# Configure WAN interface to obtain IP via DHCP
set dhcp client intfc GE1/0/0 hostname edge-router-01
commit
# Verify DHCP lease
show dhcp client
Example 2: Dual-Stack with DHCPv6¶
# Enable both DHCP and DHCPv6 on WAN interface
set dhcp client intfc GE1/0/0 hostname edge-router-01
dhcp6 client GE1/0/0
commit
# Verify
show dhcp client
show dhcp6 clients
Example 3: DHCP Relay for Multiple VLANs¶
# Configure DHCP relay for branch office
# DHCP server at 10.0.0.100 in data center
# VLAN 100 - Employee Network
set dhcp proxy server 10.0.0.100 src-address 192.168.100.1 rx-fib-id 0
commit
# Verify relay is working
show dhcp proxy
Example 4: IPv6 Prefix Delegation for Home Gateway¶
# Request prefix from ISP
dhcp6 pd client GE1/0/0 prefix group isp-prefix
commit
# Assign addresses to LAN interfaces using delegated prefix
set ip6 address GE2/0/0 prefix group isp-prefix ::1/64
set ip6 address GE3/0/0 prefix group isp-prefix :1:0:0:0:1/64
commit
# Verify prefix delegation
show ip6 pd clients
show ip6 prefixes
Troubleshooting¶
Common Issues¶
| Issue | Possible Cause | Solution |
|---|---|---|
| No DHCP lease obtained | Server unreachable | Check network connectivity to DHCP server |
| Relay not forwarding | Incorrect source address | Verify source address is reachable from server |
| DHCPv6 PD not working | ISP doesn't support PD | Contact ISP to enable prefix delegation |
Debug Commands¶
# Check interface has DHCP enabled
show dhcp client intfc GE1/0/0 verbose
# Verify relay configuration
show dhcp proxy
# Check DHCPv6 state
show dhcp6 clients