Network troubleshooting - mikec964/chelmbigstock GitHub Wiki
Find out your IP address:
Robin:hadoop-2.6.0 mikec$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=2b<RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4>
ether 00:22:41:1e:fe:7d
inet6 fe80::222:41ff:fe1e:fe7d%en0 prefixlen 64 scopeid 0x4
inet6 2601:6:5e00:17c:222:41ff:fe1e:fe7d prefixlen 64 autoconf
inet6 2601:6:5e00:17c:d8ae:6f8c:fb12:3cc3 prefixlen 64 autoconf temporary
inet 10.0.0.17 netmask 0xffffff00 broadcast 10.0.0.255
media: autoselect (100baseTX <full-duplex,flow-control>)
status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:21:e9:d9:79:b4
inet 10.0.0.18 netmask 0xffffff00 broadcast 10.0.0.255
media: autoselect
status: active
fw0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 2030
lladdr 00:21:e9:ff:fe:ca:ff:10
media: autoselect <full-duplex>
status: inactive
en2: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
ether 0b:0b:0b:0b:0b:0b
Ping:
$ ping <ipaddr|hostname>
$ ping -c 5 robin # ping 5 times
Robin:hadoop-2.6.0 mikec$ ping -c 3 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.960 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.152 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.031 ms
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.960/1.048/1.152/0.079 ms
Show your hostname:
$ hostname
Show list of hosts:
$ cat /etc/hosts
Find hosts on network. Ping 10 seconds, then check addresses. If you know the mac address of your Pi, then you might be able to find it online with this.
$ ping -t 10 192.168.1.255
$ arp -a
Find all devices on the LAN (Linux, not Mac):
nmap -sP 192.168.2.*
See routing table:
Robin:hadoop-2.6.0 mikec$ netstat -nr -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.0.0.1 UGSc 7 48 en0
default 10.0.0.1 UGScI 0 0 en1
10/24 link#4 UCS 5 0 en0
10/24 link#5 UCSI 1 0 en1
10.0.0.1 e8:3e:fc:85:f8:41 UHLWIi 7 0 en0 692
10.0.0.17 127.0.0.1 UHS 2 1 lo0
10.0.0.18 127.0.0.1 UHS 0 6 lo0
10.0.0.26 0:16:cb:b0:4e:6 UHLWIi 0 190 en0 1066
10.0.0.36 20:c:c8:35:ad:28 UHLWIi 0 228 en0 1189
10.0.0.36 c:84:dc:7b:ff:2f UHLWIi 0 0 en1 1189
10.0.0.255 ff:ff:ff:ff:ff:ff UHLWbI 0 51 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 1 49369 lo0
169.254 link#4 UCS 0 0 en0