DNS entry problem

Unfortunately IPAPPEND only adds ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask> and DNS entry is not there.


Solution - 1 : Using public DNS

Currently, I have embedded public DNS ip's into initramfs.

This solution is not versetile as not all places allow direct use of public DNS.
Following are the logs are the output of experiments warthog9 had requested in my lab where use of public DNS is not allowed.

Attempts to use external DNS server fails with following error

[15:38:13][9][~]$ dig www.google.com @

; <<>> DiG 9.5.1-P2 <<>> www.google.com @
;; global options:  printcmd
;; connection timed out; no servers could be reached

but Internal DNS server works fine as follows

[15:44:57][0][~]$ dig www.google.com

; <<>> DiG 9.5.1-P2 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14787
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 6, ADDITIONAL: 6

;www.google.com.			IN	A

www.google.com.		361471	IN	CNAME	www.l.google.com.
www.l.google.com.	256	IN	A
www.l.google.com.	256	IN	A
www.l.google.com.	256	IN	A
www.l.google.com.	256	IN	A
www.l.google.com.	256	IN	A
www.l.google.com.	256	IN	A

l.google.com.		1392	IN	NS	d.l.google.com.
l.google.com.		1392	IN	NS	e.l.google.com.
l.google.com.		1392	IN	NS	f.l.google.com.
l.google.com.		1392	IN	NS	g.l.google.com.
l.google.com.		1392	IN	NS	a.l.google.com.
l.google.com.		1392	IN	NS	b.l.google.com.

a.l.google.com.		16636	IN	A
b.l.google.com.		1313	IN	A
d.l.google.com.		16849	IN	A
e.l.google.com.		16849	IN	A
f.l.google.com.		16609	IN	A
g.l.google.com.		16849	IN	A

;; Query time: 1 msec
;; WHEN: Fri Aug  7 15:44:58 2009
;; MSG SIZE  rcvd: 340


Solution 2 : Modify pxelinux to support DNS

Modify the IPAPPEND option to add DNS entry
Also I plan to use IPAPPEND 1 instead of IPAPPEND 3 as we don't need it.
I used reference http://syslinux.zytor.com/wiki/index.php/SYSLINUX#IPAPPEND_flag_val_.5BPXELINUX_only.5D to decide this.

editing pxelinux

I have been warned that I will need assembly knowledge and I will need to modify C parser for this :-(
the pxeknife.asm contains 2700 lines of assembly code which does not look very promising for quick fix.
Here is the code of pxeknife.asm

Solution - 3 | dynamically generate config files with DNS entry

as andytim suggested

set 210:string http://boot.kernel.org/bko/boot?dnsip=${dns}&fetch=
echo would expand that, then option 210 would have the DNS in it.
COM32 menu.c32
APPEND somemenu.ini
echo Would fetch http://boot.kernel.org/bko/boot?dnsip=

rwrc's patch has been applied and it is working fine :-)

Solution - 4 | Use syslinux with -dhcpinfo option

QR Code
QR Code soc:2009:pravin:journal:dnsissue (generated for current page)