When connecting two networked devices together there is a chain of command that has to take place in order for everything to work as expected. We call this the OSI model. There are 7 layers to the OSI model consisting of, 1. Physical 2. Data Link 3. Network 4. Transport 5. Session 6. Presentation and 7. Application. The biggest mistake a lot of IT professionals make when troubleshooting an issue is they don’t resort back to this model to get to the root of the issue they are having. It is always a good rule of thumb to start with layer 1 when having issues with a network and work up to layer 7. If the physical layer cant be established none of the other layers will function.
Once you have established layer 1 and layer 2 you can configure the Network (layer 3). For instance if you have computer A that needs to communicate with computer B, both computers will need to be configured with an unique IP in the same IP segment in order to communicate with each other. Also if you are plugging a computer directly into another computer you will need a crossover cable. If you have a network switch between the two computers a crossover is not needed.
Lets say you have a computer with a 192.168.45.10 IP address and you need to communicate with a computer with a 192.168.44.10 IP address. Since these two computers are on different IP segments you will need to route the traffic between the two computers with a router, so the router can understand both IP segments and direct traffic accordingly.