How can I get the IP address of a remote Unix/Linux machine whose name I know?

3

1

I have a Unix/Linux machine aster-star-98 in our company but it's on a different network.

How can I get the IP address of that machine?

If I could enter the complete address of the machine and ping it I might get the IP address, but I don't know the complete address, only the simple name aster-star-98. I'm sure that it's running.

rahul

Posted 2011-05-10T13:18:41.797

Reputation: 31

Answers

7

Query the local name-service. For example:

nslookup aster-star-98.example.com
host aster-star-98.example.com
dig aster-star-98.example.com

telnet or ssh to aster-star-98.example.com then

ifconfig -a

If you don't know the fully qualified domain name and have no way to open a session then you'll have to visit the computer or enlist the help of someone near the computer.

RedGrittyBrick

Posted 2011-05-10T13:18:41.797

Reputation: 70 632

2

If you run ping aster-star-98, you should see the real IP.

Bryan Drewery

Posted 2011-05-10T13:18:41.797

Reputation: 195

1

Check the mac address of the network adapter then ping the broadcast address of the subnet (from within said subnet). broadcast address on /24 is .255, then run arp -a from the windows machine and find the mac address.

Supercereal

Posted 2011-05-10T13:18:41.797

Reputation: 8 643

1

   $ ip address

Sample Output:

  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
         link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
         inet 127.0.0.1/8 scope host lo
         inet6 ::1/128 scope host 
         valid_lft forever preferred_lft forever
  2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
         link/ether b8:88:e3:95:eb:c0 brd ff:ff:ff:ff:ff:ff
 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
         link/ether 20:68:9d:f1:66:88 brd ff:ff:ff:ff:ff:ff
          inet ***192.168.12.182***/24 brd 192.168.12.255 scope global wlan0
          inet6 fe80::2268:9dff:fef1:6688/64 scope link 
          valid_lft forever preferred_lft forever

Kalanidhi

Posted 2011-05-10T13:18:41.797

Reputation: 11

1This command will only be valid if the person has physical access and an account on the machine. – Mogget – 2013-11-06T08:48:19.990

0

Also try host aster-star-98 which might give that ip.

wlk

Posted 2011-05-10T13:18:41.797

Reputation: 530

0

as root, run ifconfig, or sudo ifconfig as a simple user.

The second line should display the private network address of the network interface (usually eth0 or eth1). If you're looking for the public address, check http://checkip.dyndns.com/

nodiscc

Posted 2011-05-10T13:18:41.797

Reputation: 274