# ISP Dhclient - Automating dual instances for ipv4 and ipv6 configuration



## Psylozoff (Mar 9, 2017)

Hello,
I would like my NIC to get both ip, automatically, on startup, using isp's dhclient!

In rc.conf, I set


```
dhclient_progam="/usr/local/sbin/dhclient"
dhclient_flags_bce0="-6"

ifconfig_bce0="DHCP"
ifconfig_bce0_ipv6="inet6 accept_rtadv"
```

This automates the ipv6 configuration for my NIC!

Then I manually type `/usr/local/sbin/dhclient -df /var/db/dhclient6.leases bce0` to get the ipv4... I would like to put that in a rc file but I need the ipv6 configuration to be done, before that to execute! And I can't find where dhclient_program is used to determine and execute the proper program! I could write a rc.d script but it seems isp's dhclient doesn't start any service so I can't set it as #REQUIRED... I really don't know where to put that simple line to get things to work on startup without having to type myself...

I would enjoy hints, advice or even solutions!
Thx


----------



## bhughes (Mar 13, 2017)

This is probably useful: http://www.daemonology.net/blog/2017-01-26-IPv6-on-FreeBSD-EC2.html

Even though the post is about EC2, the dual-dhclient port and configuration shown there will probably work for you.

Good luck


----------

