Er zijn verschillende manieren om te checken of een andere pc in een netwerk beschikbaar is via het ip-address met ping, arp-scan of nmap:
peer@debian:~$ ping 192.168.178.5 -c1
PING 192.168.178.5 (192.168.178.5) 56(84) bytes of data.
64 bytes from 192.168.178.5: icmp_seq=1 ttl=64 time=5.50 ms
--- 192.168.178.5 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 5.502/5.502/5.502/0.000 ms
peer@debian:~$ sudo arp-scan 192.168.178.5
[sudo] password for peer:
Interface: wlp2s0, type: EN10MB, MAC: 14:cc:20:10:c3:ec, IPv4: 192.168.178.10
Starting arp-scan 1.9.7 with 1 hosts (https://github.com/royhills/arp-scan)
192.168.178.5 00:11:32:fd:04:a5 Synology Incorporated
1 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 1 hosts scanned in 0.207 seconds (4.83 hosts/sec). 1 responded
peer@debian:~$ sudo nmap 12.168.178.5
Starting Nmap 7.80 ( https://nmap.org ) at 2021-10-23 11:30 CEST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.11 seconds
peer@debian:~$
AL deze methoden werken goed als de andere pc daadwerkelijk aan staat en bereikbaar is. Als de andere pc uitstaat dan duurt het checken langer:
peer@debian:~$ ping 192.168.178.100 -c1
PING 192.168.178.100 (192.168.178.100) 56(84) bytes of data.
From 192.168.178.10 icmp_seq=1 Destination Host Unreachable
--- 192.168.178.100 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
peer@debian:~$ sudo arp-scan 192.168.178.100
Interface: wlp2s0, type: EN10MB, MAC: 14:cc:20:10:c3:ec, IPv4: 192.168.178.10
Starting arp-scan 1.9.7 with 1 hosts (https://github.com/royhills/arp-scan)
0 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 1 hosts scanned in 1.474 seconds (0.68 hosts/sec). 0 responded
peer@debian:~$ sudo nmap 12.168.178.100
Starting Nmap 7.80 ( https://nmap.org ) at 2021-10-23 11:34 CEST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.11 seconds
peer@debian:~$
Een tijdje terug ben ik een ander commando tegengekomen waarmee ik het ip van de andere pc sneller kon checken maar helaas ben ik commando vergeten. Ik vermoed dat het met het 'ip' commando gedaan werd.
Ik kan het ook niet meer terug vinden met google. Iemand een idee??