iPXE discussion forum
nslookup - hostname - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: nslookup - hostname (/showthread.php?tid=7917)



nslookup - hostname - bshogeman - 2016-01-21 12:00

How can I do a reverse dns lookup in ipxe?
Normaly I use nslookup ipadress for this but iPXE doesn't give the right result.

nslookup hostname ${ip}
Return the ip in the variable named hostname and not the hostname of the machine.

Is there a work-a-round for this? How do I fill the hostname value with the correct name? (DNS PTR records / reverse lookup)


RE: nslookup - hostname - mcb30 - 2016-01-21 15:50

(2016-01-21 12:00)bshogeman Wrote:  How can I do a reverse dns lookup in ipxe?
Normaly I use nslookup ipadress for this but iPXE doesn't give the right result.

nslookup hostname ${ip}
Return the ip in the variable named hostname and not the hostname of the machine.

Is there a work-a-round for this? How do I fill the hostname value with the correct name? (DNS PTR records / reverse lookup)

There is no support for PTR record lookup in iPXE. What is the use case for which you need to do this?

Michael


RE: nslookup - hostname - bshogeman - 2016-01-25 12:34

Booting a very basic linux distro but want to keep the hostname so I can remotely access it and also log the boot in a database with the same hostname. But if there is no support for reverse dns I have to solve this in the web server part (php).
The variable hostname pre-exists in iPXE so I thought there must me an option to pre-populate this value.


RE: nslookup - hostname - mcb30 - 2016-01-27 13:27

(2016-01-25 12:34)bshogeman Wrote:  The variable hostname pre-exists in iPXE so I thought there must me an option to pre-populate this value.

The ${hostname} variable is the hostname as provided by your DHCP server. Configure your DHCP server to hand out the hostname corresponding to the IP address, and your problem is solved!

Michael