iPXE discussion forum

Full Version: nslookup - hostname
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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)
(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
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.
(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
Reference URL's