I have connected to another laptop via the LAN cable, i am able to access the services running on the other laptop via Ip & Port. When i Ping that Ip, the machine is successfully responding. But when i run nmap on that Ip, nmap failed to detect the host. Any one knows why this can happen?
Looking at nmap documentation, you will find the following statements (emphasis added):
If none of these host discovery techniques are chosen, Nmap uses a default which is equivalent to the -PE -PS443 -PA80 -PP arguments for Windows or privileged (root) Unix users. Attentive readers know that this means an ICMP echo request, a TCP SYN packet, a TCP ACK packet, and an ICMP timestamp request are sent to each machine. An exception to this is that an ARP scan is used for any targets which are on a local ethernet network. For unprivileged Unix shell users, the default is equivalent to -PS80,443 (a TCP connect call against ports 80 and 443 of the target hosts).
However, your screenshot indicates you ran this in PowerShell on Windows. While the above does say that Windows will use ICMP and TCP for host discovery, I suspect something else is going on here.
Windows PowerShell is the replacement for the older Windows Command Prompt. One of the drawbacks for many years in Windows environments when compared to their *nix counterparts is that the Command Prompt was not nearly as functional or useful as the *nix CLI. Microsoft developed PowerShell to help counteract this advantage that was held by *nix competitors.
As such, Windows PowerShell acts much more like its *nix counterparts. I suspect (but can't confirm since I don't have a Windows machine with nmap installed to test) that Windows PowerShell without escalated privileges acts much like the unprivileged *nix shell.
I have confirmed via packet capture that using nmap with an unprivileged *nix shell behaves as indicated in the documentation. Further, I confirmed that in this case you will get the exact experience you describe, where ICMP ping works and nmap (no options specified) considers the host down if TCP/80 and/or TCP/443 are not open on the host in question.
This ip address call Link Local Ip address. This is not routable. This address valid only to communication within network segment or the broadcast domain that the host is connected.
This is a link local address like infra said. Address that starts with 169.X.X.X is assigned when your computer can't contact the DHCP. It is only available on your local network and is therefore not routable.