cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12453
Views
5
Helpful
6
Replies

DHCP Pool - DNS Search list - Option 119

aravindhs
Level 1
Level 1

Hello Experts

I've configured a DHCP Pool for a customer who wants the router to also give out a couple of dns suffixes to the clients.

This is what I've done. Can you please advise how i can get it to work ?

ip dhcp pool LAN

   import all

   network 10.106.0.0 255.255.0.0

   default-router 10.106.20.10

   dns-server 10.101.10.14 10.102.10.14

   option 119 ascii "lotus-internal.co.uk,corp.local"

many thanks

aravind

6 Replies 6

Michael Solomonides
Cisco Employee
Cisco Employee

This may be a little late, but to help people in the future, I'm posting my working config

ip dhcp pool Solo
   option 119 hex 0563.6973.636f.0363.6f6d.0002.636f.0275.6b00

 

This has to two domains, cisco.com and co.uk.

05 length in hex

00 null route label per RFC 1035. This goes at the end of each domain name.

63 ascii hex value of character

05636973636f03636f6d0002636f02756b00

05 C I S C O  03 C O M 0002 CO 02U K00

 

Yours would be configured as

option 119 0e6c6f7475732d696e7465726e616c02636f02756b0004636f7270056c6f63616c00

                         lotus-internal                                    co        uk            corp                 local

 

 

 

On your working config for cisco.com co.uk I understand most of it. Not following the 02's & 03 unless it means 02=start of text and 03=break/end of text.

if I plug in cisco.com to a ascii to hex converter I get a slightly different result of 636973636f2e636f6d with 30 in your config where I get 2e representing the . between cisco & com

When I look at the one where you converter the other gentleman's I get most of the explanation.

I'm like also fully understanding but missing that 1 percent of the picture.

I know your reply was 7 months ago but hoping your still subscribed to the thread.

thanks in advance.

Brian

Hello Brian,

In the example 02 represents the length of character string that follows

05636973636f03636f6d0002636f02756b00
05 C I S C O  03 C O M 0002 CO 02U K00

1) the first 05 indicates that a five letters strings follows, in this case CISCO

2) then 03 specify a new string of three letters follows, which is COM

The dot is not necessary because the length is already delimited by values 05 and 03.

3) Now a double 0 is necessary to start a new domain statement, followed by 02 which again indicate a two character string comes meaning CO.

4) Finally 02 specify a new two letters strings follows, in this case UK.

 

Hope this help to clarify.

Regards,

Roberto.

Thank you so much!  This was perfect.

It won't work with ascii, you should use hex value.

Configuration should look like:

ip dhcp pool host.net.example.com
   domain-name net.example.com
   option 119 hex 0765.7861.6d70.6c65.0363.6f6d.00

For details, please see https://www.perkin.org.uk/posts/serving-multiple-dns-search-domains-in-ios-dhcp.html

crazycatman
Level 1
Level 1

Hi,

I use this very handy Python script which someone has kindly shared on GitHub.

https://gist.github.com/SmartFinn/be417c7a7e0b3d9bee9c29e74d08ff78

 

Works a treat (tried & tested)

 

HTH

 

 

Review Cisco Networking products for a $25 gift card