Find IP Address

From openSUSE

Geeko The IP address is the way how computers are connecting on the Internet. Most of the time we don't need to know the IP address, as web browser is resolving that automatically from name like ftp.gwdg.de to IP address 134.76.12.3, but sometimes we want to know the IP of server that we are connecting to.


The most common way to find the IP address for a given website/server is to use command
nslookup

The name comes from name server lookup.

For instance to find the IP address for a ftp.gwdg.de open a command line and type in:

nslookup ftp.gwdg.de

Your computer will contact the name server (DNS) that is assigned by your Internet service provider and print on the screen information, like this:

Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   ftp.gwdg.de
Address: 134.76.12.3

In above example

Server:         192.168.1.1

is IP address of LAN router that is connecting to DNS server that is assigned by Internet service provider, but for computers in LAN that is the name server. If you connect directly to Internet the number can be different.

Address:        192.168.1.1#53

is almost the same, additional #53 is the port where DNS server is listening for incoming connections.

The next 3 lines are actual answer,

Non-authoritative answer:
Name:   ftp.gwdg.de
Address: 134.76.12.3 

Don't pay attention to

Non-authoritative answer:

as the only authoritative DNS server for ftp.gwdg.de is the one that serves gwdg.de domain, all others in the world can give you only non-authoritative answer, but as you can see Internet works fine anyway.

See Also

  • Command dig the newer DNS Information Gathering tool.
  • Command host is another DNS lookup utility.
  • For more information see manual with
    • man nslookup
    • man dig
    • man host