# DHCP with Multiple Domains

## annunaki2k2

Hi all,

I am currently working at a customers site that has more than one domain on thier network. My Linux lappy doesn't seem to dhcp them properly at the moment. (Must be something I need to setup)

To explain: In windows, when I DHCP for my IP address I get these DNS domains (ipconfig):

```
DNS Suffix Search List. . . . . . : enterprises.tate.org.uk

                                    gallery.tate.org.uk

                                    tate.org.uk

                                    org.uk
```

but in linux I only get (resolv.conf):

```
domain gallery.tate.org.uk
```

What do I have to do to enable capturing of more than one DNS domain in Linux? I currently use the default dhcpcd client for this. Is dhcpcd capable of multiple domain names or should I switch to something like pump? Does it need a switch/parameter in conf.d/net? (I have tried looking through man dhcpcd but didn't see anything obvious).

I need to work with machines on the domain enterprises.tate.org.uk so every time I dhcp, I have to add "domain enterprises.tate.org.uk" to resolv.conf. I can then work on the machines I need to fine.

Thanks

p.s. I have tried searching google and the forums for a solution, but so far haven't found one.

----------

## steveb

You are mixing domains and domain names used when searching a domain.

"domain domain1.tld" is to set up the default domain.

"search domain1.tld domain2.tld subdomain1.domain3.tld" is used when searching a domain.

If I remember right, then domain and search are mutually exclusive. If you use both, then the last entry will be used for setting the default domain. If you use search, then the first entry is used as the default domain. And you could use more then one entry in search, but not more then one entry in domain.

If you would like your system to be in the domain enterprises.tate.org.uk and search for the domains enterprises.tate.org.uk, gallery.tate.org.uk, tate.org.uk and org.uk then you would need the following entries in resolv.conf:

```
search enterprises.tate.org.uk gallery.tate.org.uk tate.org.uk org.uk
```

To get more info, just type the following command in a shell and read:

```
man resolv.conf
```

cheers

SteveB

----------

## annunaki2k2

Thanks Steveb. I am indeed getting confused with 'search' and 'domain'. Another quick look at windows, it adds gallery.tate.org.uk as the default 'domain' as well.

Adding the search statement into the resolve conf does indeed work, but how do I get the DHCP process to do this automatically like it appears to be doing in windows? (or is this not done by DHCP and is part of active directory?)

Thanks

----------

## annunaki2k2

Anyone?

----------

## UberLord

dhcpcd-2.0.0 should suport that (depending on how dhcp server serves)

dhcpcd-2.0.2 (out next week) will definitely support it

----------

## annunaki2k2

 *UberLord wrote:*   

> dhcpcd-2.0.0 should suport that (depending on how dhcp server serves)
> 
> dhcpcd-2.0.2 (out next week) will definitely support it

 

Thanks, I look forward to trying that one...

At present I have:

```
[ebuild   R   ] net-misc/dhcpcd-2.0.1  USE="-build -debug -static"
```

and it definitely doesn't work at the moment sadly....

Cheers

----------

## UberLord

dhcpcd-2.0.2 is now in portage

----------

