Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save naokazuterada/b970a642b8ca2a9b02fb to your computer and use it in GitHub Desktop.
Save naokazuterada/b970a642b8ca2a9b02fb to your computer and use it in GitHub Desktop.

https://www.udemy.com/introduction-to-networking-for-complete-beginners/learn/

使うコマンド

ifconfig ping traceroute

インターネットの接続に問題がある時の調べ方

自分のIPアドレスとGateway(一番手前にあるルーター)のアドレスを調べる

ifconfig
> ...
> en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>   ether 84:38:35:47:fd:64
>   inet6 ffff::ffff:35ff:ffff:ffff%en0 prefixlen 64 scopeid 0x4
>   inet 192.168.11.3 netmask 0xffffff00 broadcast 192.168.11.255
>   nd6 options=1<PERFORMNUD>
>   media: autoselect
>   status: active

192.168.11.3: 自分のアドレス 192.168.11.1: Gatewayのアドレス とわかる

Gatewayが応答しているか調べる

ping 192.168.11.1
# 1分間続ける1msくらいで応答帰ってるか確認(WiFiだと3msとか)

google.comまでの経路上の次のルーターを調べる

traceroute google.com
traceroute to google.com (216.58.220.206), 64 hops max, 52 byte packets
>  1  192.168.11.1 (192.168.11.1)  1.518 ms  1.142 ms  1.013 ms
>  2  153.153.228.227 (153.153.228.227)  4.461 ms  5.070 ms  3.918 ms
> ^C
ping 153.153.228.227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment