# Where to find a list of ifconfig_<interface> options?



## johnblue (Jan 11, 2019)

In reading rc.conf(5) man page I see where "AUTO" and "DHCP" are valid options:






(btw ... the word of the day is "possible")



.. but I have not been able to find where the options are listed in an obvious fashion.  ifconfig(8) does not even have the word "DHCP" anywhere and the Handbook is equally vague.

I am sure it is possible that I am over looking it somewhere ..


----------



## Phishfry (Jan 11, 2019)

/etc/defaults/rc.conf has the settings.


----------



## Bobi B. (Jan 11, 2019)

`DHCP` is a "magic" token. Or you can write anything that can would work if added after `ifconfig ed0`, for example `ifconfig_ed0="inet 192.168.1.10/24"` would become `ifconfig ed0 inet 192.168.1.10/24`. You can also simply use `ifconfig_ed0="up"` if you're going to use tagged VLANs only.

Imagine that startup scripts would start DHCP client if you enable DHCP for given interface. All the rest is in ifconfig(8) man page.

Edit: (too many edits). Pseudocode:

```
if ($interface_config = "DHCP") then
    start_dhcp_client $ifname
else
    ifconfig $ifname $interface_config
```
.


----------



## johnblue (Jan 11, 2019)

Phishfry said:
			
		

> /etc/defaults/rc.conf has the settings.


It has the defaults but no extensive list of options, correct?  I could not find either "DHCP" or "AUTO".


----------



## johnblue (Jan 11, 2019)

Bobi B. said:
			
		

> `DHCP` is a "magic" token.


I do not disagree.    How does /etc/rc.conf process it?  Looking for where under-the-hood magic is taking place.


----------



## _martin (Jan 11, 2019)

What about  the man page of rc.conf(5)? It's there.

EDIT: meh, I did want to erase my reply when I saw that you did look into that man page (reading with comprehension failure on my side ).
I guess I failed to understand the 'obvious fashion', as for me it seems ok.


----------



## Phishfry (Jan 11, 2019)

johnblue said:


> Looking for where under-the-hood magic is taking place.


/etc/network.subr


----------



## johnblue (Jan 11, 2019)

_martin said:
			
		

> What about  the man page of rc.conf(5)? It's there.


Correct, as indicated references to a couple different options are sprinkled throughout the text, but there is not a concise listing.  I guess what I am looking for is to see there are other options besides `DHCP` and `AUTO`.


----------



## johnblue (Jan 11, 2019)

Phishfry said:
			
		

> /etc/network.subr


Intersting that it calls `DHCP` a "pseudo argument".

So here is where it looks like it starts up DHCP:

```
if dhcpif $1; then
                if [ $_cfg -ne 0 ] ; then
                        ${IFCONFIG_CMD} $1 up
                fi
                if syncdhcpif $1; then
                        /etc/rc.d/dhclient start $1
                fi
                _cfg=0
        fi
```

Lots of arguments to review in there ..

Thanks for the help.


----------

