1824913 Members
3922 Online
109677 Solutions
New Discussion юеВ

nslookup and arp

 
SOLVED
Go to solution
susee_sundar
Regular Advisor

nslookup and arp

Hi ,


Is there any difference in nslookup and arp command.as per my knowladge..

-->arp displays the mac address
-->nslookup ..?

help me..
9 REPLIES 9
Arunvijai_4
Honored Contributor
Solution

Re: nslookup and arp

Hi,

nslookup used to query name servers interactively, where as arp command displays and modifies the Internet-to-Ethernet and
Internet-to-Fibre Channel address translation tables used by the
Address Resolution Protocol (ARP)

You can find these information by doing a man.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
susee_sundar
Regular Advisor

Re: nslookup and arp

I got it any more information about nslookup with an example..

Tell me whether nslookup wil give the IP address to hardware address translation table.?

Arunvijai_4
Honored Contributor

Re: nslookup and arp

Hi,

Try this,
# nslookup mail.yahoo.com
Name Server: engmaho1.eng.emc.com
Address: 10.254.66.23

Trying DNS
Non-authoritative answer:
Name: login.yahoo.akadns.net
Address: 209.73.168.74
Aliases: mail.yahoo.com, login.yahoo.com

nslookup is a UNIX command that queries a DNS server for machine name and address information. To use nslookup on the unix machines, type "nslookup" followed by an IP address or a machine name. nslookup will return the name, all known IP addresses and all known aliases (which are just alternate names) for the identified machine.

It is debugging tool for DNS.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Delrish
Trusted Contributor

Re: nslookup and arp

nslookup never display IP address to hardware address translation table.
nslookup just can query the DNS.
for your purpose you should use "arp -a"
here are some examples:

# arp -a
192.168.5.108 (192.168.5.108) at 0:40:ca:85:d7:92 ether
192.168.5.125 (192.168.5.125) at 0:80:48:2e:3d:d0 ether
192.168.5.59 (192.168.5.59) at 0:30:48:54:1:f8 ether
192.168.5.58 (192.168.5.58) at 0:12:79:66:81:89 ether
192.168.5.54 (192.168.5.54) at 0:a0:c9:ee:fd:f8 ether
192.168.5.10 (192.168.5.10) at 0:e:7f:b1:5e:55 ether

spex
Honored Contributor

Re: nslookup and arp

# nslookup www.google.com
Name Server:
Address:

Trying DNS
Non-authoritative answer:
Name: www.l.google.com
Addresses: 64.233.161.104, 64.233.161.147, 64.233.161.99
Aliases: www.google.com

nslookup translates a hostname to an IP address. arp translates an IP address to a MAC address and vice versa via the address translation table. To answer your other question, nslookup will not output the contents of this table. Of course, both of these commands have additional functionality, but these are the are the most common uses.

PCS
Bill Hassell
Honored Contributor

Re: nslookup and arp

nslookup never displays hardware addresses.

And arp will display hardware addresses *ONLY* for machines that have some activity with the local system. However, it is a cache and entries will disappear after a period of inactivity.


Bill Hassell, sysadmin
spex
Honored Contributor

Re: nslookup and arp

It's important to mention that the address table does not contain information on every host that has activity on the server, independent of cache timeouts. For example, one of my servers currently has around 30+ distinct clients connected, but:

# arp -a |wc -l
4

In fact, my workstation isn't even listed in the address table.

PCS
Nguyen Anh Tien
Honored Contributor

Re: nslookup and arp

arp echo MAC from specific IP
nslookup tells you what DNS you use and echo IP of server when hostname is given and vice versa!
HP is simple
susee_sundar
Regular Advisor

Re: nslookup and arp

Thanks to all.

I got the solution for the Thread.