31
37

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macで自分のゲートウェイを確認する方法

Posted at
  • 環境
    • OS : macOS Sierra Virsion 10.12.5

:crayon:route -n コマンド

$ route <-------------- 使えない
usage: route [-dnqtv] command [[modifiers] args]
$ route -n <-------------- 使えない
usage: route [-dnqtv] command [[modifiers] args]
$ route -n get 0.0.0.0
   route to: default
destination: default
       mask: default
    gateway: 192.168.0.1
<省略>

Thank u >> Macでデフォルトゲートウェイの確認方法 | 日々修行

:crayon:ip route コマンド

$ ip route
default via 192.168.0.1 dev en0
<省略>

:crayon:netstat -rn コマンド

$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.1        UGSc           44        0     en0
<省略>

:computer:Macの設定画面

[System Preferences] > [Network] > [Advanced]

Screen Shot 2017-07-15 at 18.16.31.pngScreen Shot 2017-07-15 at 18.15.23.pngScreen Shot 2017-07-15 at 18.16.06.png

31
37
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
37

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?