- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: difference nslookup between Linux and HP-UX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 03:32 AM
04-06-2011 03:32 AM
difference nslookup between Linux and HP-UX
i have following issue :
- HP-UX 11.31 dns-server BIND 9.3.2
- Linux SLES 10 dns-server BIND 9.3.4
i want the same output of command "nslookup"
what option's i have to use for Linux with command "nslookup" ?
following command i made:
1. login at dns-server
2. nslookup
3. server localhost
4.
detail out in the attachment,
first part "HP-UX"
second part "Linux"
regards,tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 03:49 AM
04-06-2011 03:49 AM
Re: difference nslookup between Linux and HP-UX
do you want these to be the same to the letter? the output looks semantically equivalent to me:
HP-UX:
Trying DNS
Name: server.example.com
Address: 192.164.170.32
Linux:
Non-authoritative answer:
32.170.164.192.in-addr.arpa name = server.example.com
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 04:13 AM
04-06-2011 04:13 AM
Re: difference nslookup between Linux and HP-UX
@the output looks semantically equivalent to me:
your are right, semantically is it the same , but the output is different :
for me , it is easier to parse the output of HP-UX with following shell script below.
HP-UX:
Trying DNS
Name: server.example.com
Address: 192.164.170.32
nslookup_localhost="server localhost"
ip_address="192.164.170.32"
dns_hostentry=`nslookup <<-EOF | grep '^Name:' |tail -1 | awk '{print $NF}'
${nslookup_localhost}
${ip_address}
exit
EOF `
i idea of me is , to make two different shell commands :
ux_version="uname -s"
and nslookup parse should be different for $ux_version
regards,tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 04:18 AM
04-06-2011 04:18 AM
Re: difference nslookup between Linux and HP-UX
ok, clear. so you can handle the HP-UX part. For linux, I would suggest to use the dig command, which has a +short option, it is easy to parse:
# dig +short example.com
192.0.32.10
#
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 09:02 AM
04-06-2011 09:02 AM
Re: difference nslookup between Linux and HP-UX
hmm , when i type
dig +short example.com
the command doesn't ask me for an input (ip)
do you have another unix version?
i tried for HP-UX and Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 09:18 AM
04-06-2011 09:18 AM
Re: difference nslookup between Linux and HP-UX
i tried some options, now it is ok:
with hostname:
dig server.example.com +short @localhost
with ip-address
dig -x 192.164.170.32 +short @localhost
@ dig +short example.com
do you forget the "server-name" to "dig"?
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 11:14 AM
04-06-2011 11:14 AM
Re: difference nslookup between Linux and HP-UX
no, I just didn't declared the DNS server IP, it is not a must. I think if you leave the "@localhost" part in your command, it will use the dns server which was specified in /etc/resolv.conf. But not sure if every linux distro works this way, I tried it on OpenSUSE.
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 12:09 PM
04-06-2011 12:09 PM
Re: difference nslookup between Linux and HP-UX
One way to do that is to use the same
"nslookup" program everywhere. If you find
some source, and build it on all your
systems, then you should get similar results
everywhere.