The OpenWrt embedded DHCPv6-client odhcp6c is a minimal DHCPv6 and RA-client for use in embedded Linux systems.


root@ugwcpe:/# odhcp6c

Usage: odhcp6c [options] <interface>

Feature options:

-S <time> Wait at least <time> sec for a DHCP-server (0)

-N <mode> Mode for requesting addresses [try|force|none]

-P <length> Request IPv6-Prefix (0 = auto)

-F Force IPv6-Prefix

-V <class> Set vendor-class option (base-16 encoded)

-u <user-class> Set user-class option string

-c <clientid> Override client-ID (base-16 encoded 16-bit type + value)

-i <iface-id> Use a custom interface identifier for RA handling

-r <options> Options to be requested (comma-separated)

-R Do not request any options except those specified with -r

-s <script> Status update script (/usr/sbin/odhcp6c-update)

-a Don't send Accept Reconfigure option

-f Don't send Client FQDN option

-k Don't send a RELEASE when stopping

-t <seconds> Maximum timeout for DHCPv6-SOLICIT (120)

-m <seconds> Minimum time between accepting updates (30)

Invocation options:

-p <pidfile> Set pidfile (/var/run/

-d Daemonize

-e Write logmessages to stderr

-v Increase logging verbosity

-h Show this help


背景執行 , 預設會產生

odhcp6c -d eth1


產生 pid 在 /var/run/

odhcp6c -d -p /var/run/ eth1 , -p 後面要指定路徑



odhcp6c -v -e eth1


要 /56 的 PD

odhcp6c -P 56 eth1 


不要 IANA , 但會送 Information-request 封包

odhcp6c -N none eth1


要 /56 的 PD , 不要 IANA , 會送 Solicit 封包

odhcp6c -v -e -P 56 -N none eth1


-R : 不要 request 任何 option

odhcp6c -v -e -P 56 -N none -R eth1


-r : request option , 這邊 23 代表 DNS recursive name server

odhcp6c -v -e -N none -P 56 -R -r 23 eth1


-f : 不要送 fqdn option

odhcp6c -v -e -N none -P 56 -R -r 23 -f eth1


-a : 不要送 Reconfiguration Accept

odhcp6c -v -e -N none -P 56 -R -r 23 -f -a eth1


odhcp6c -s /usr/sbin/odhcp6c-update   // 沒有反應 ?





看完文章請按 讚 or 推 , 感謝啦 ~ 


Kai-Cho 的環遊世界

Kai-Cho 發表在 痞客邦 PIXNET 留言(0) 人氣()