Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The setup I currently have is two computers connected through a crossover cable. I am trying to use the command line or Python to find the ip address of the other computer. Is there any way I could get one of the computers to find the ip address of the other computer if they are on a different network number?

share|improve this question
You need to have different numbers, but they have to be in the same subnet, which can be of different size, depending on the number. For example, in the reserved area of 192.168.x.y, the subnets are 256 IPs big, afaik, while in 10.0.x.y it is (afaik) 256*256 IPs big. Since I know nothing of python, this is just a comment. I only know how to search with nmap or ping. – user unknown Jan 27 '12 at 15:10
Could you comment on the IPs currently assigned ? – Karolos Jan 27 '12 at 15:16
up vote 1 down vote accepted

This depends on the network mask. Depending on the network mask used, the same IP address can end up in different networks. To communicate directly (without routers involved), two devices need to be on the same network.

Have a look at this post:

share|improve this answer
Thanks. This is what I suspected but I was hoping to avoid having to bring a router/switch. – Adam Jan 27 '12 at 15:29
@Adam: I don't mean that it will work with just a switch. Someone should still assign the IPs (a switch doesn't assign ip's, and if the computers have a static address, they won't listen to DHCP assignments). Since you have direct access to both computers, the simplest is to set their IPs, or have one act as a DHCP server, or just take the other computer's IP +1, so it's on the same network with whichever reasonable mask you're using. So you can avoid the need for a router. Give more details and we might help you more. – Karolos Jan 27 '12 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .