Macでデフォルトゲートウェイの確認方法

Macでルートの確認方法

Terminalアプリケーションを開いて以下のコマンドを実施。

デフォルトゲートウェイ

$ route -n get 0.0.0.0
   route to: default
destination: default
       mask: default
    gateway: 10.117.113.253
  interface: en8
      flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

ルーティングテーブルの確認

$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            10.117.113.253     UGSc           62       52     en8
10.117.112/23      link#14            UCS            15        0     en8
10.117.112.8       58:ef:68:7e:8e:0   UHLWI           0        0     en8   1193
10.117.112.82      f8:ca:b8:30:9f:54  UHLWI           0        0     en8    679
10.117.112.155     ec:f4:bb:3a:e3:3c  UHLWI           0       34     en8   1181
10.117.112.199     58:ef:68:7e:8e:8   UHLWI           0        0     en8   1193
10.117.112.255     link#14            UHLWI           0        3     en8
10.117.113.114     ec:f4:bb:a:40:53   UHLWI           0        0     en8   1013
10.117.113.146     94:9a:a9:27:9:3d   UHLWI           0        0     en8    528
10.117.113.159     18:db:f2:3f:47:ee  UHLWI           0        0     en8   1175
10.117.113.168     94:9a:a9:26:9e:48  UHLWI           0        0     en8   1184
10.117.113.177     38:c9:86:37:a0:db  UHLWI           0        0     en8    256
10.117.113.218     f8:ca:b8:17:45:9b  UHLWI           0        0     en8    547
10.117.113.228     58:ef:68:7b:ba:52  UHLWIi          2    11035     en8   1005
10.117.113.229/32  link#14            UCS             0        0     en8
10.117.113.237     d4:81:d7:12:4d:f5  UHLWIi          2     6365     en8   1197
10.117.113.238     34:e6:d7:5a:be:58  UHLWI           0     7046     en8    303
10.117.113.253/32  link#14            UCS             1        0     en8
10.117.113.253     0:8:e3:ff:fc:c8    UHLWIir        63        0     en8   1032
10.117.113.255     ff:ff:ff:ff:ff:ff  UHLWbI          0        6     en8
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              4    95380     lo0
169.254            link#14            UCS             0        0     en8
224.0.0/4          link#14            UmCS            1        0     en8
239.255.255.250    1:0:5e:7f:ff:fa    UHmLWI          0      129     en8
255.255.255.255/32 link#14            UCS             1        0     en8
255.255.255.255    ff:ff:ff:ff:ff:ff  UHLWbI          0        5     en8

Internet6:
Destination                             Gateway                         Flags         Netif Expire
default                                 fe80::%utun0                    UGcI          utun0
default                                 fe80::%utun1                    UGcI          utun1
default                                 fe80::%utun2                    UGcI          utun2
::1                                     ::1                             UHL             lo0
fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
fe80::1%lo0                             link#1                          UHLI            lo0
fe80::%utun0/64                         fe80::362:5f3:4b15:4a5e%utun0   UcI           utun0
fe80::362:5f3:4b15:4a5e%utun0           link#10                         UHLI            lo0
fe80::%en8/64                           link#14                         UCI             en8
fe80::8ea:17a2:a6b3:a29b%en8            38:c9:86:f1:27:12               UHLWI           en8
fe80::1c8b:c97a:99a6:f03b%en8           40:3c:fc:1:42:48                UHLI            lo0
fe80::%utun1/64                         fe80::a631:3f4c:f17a:45c7%utun1 UcI           utun1
fe80::a631:3f4c:f17a:45c7%utun1         link#15                         UHLI            lo0
fe80::%utun2/64                         fe80::ccad:ba4b:f9ee:5225%utun2 UcI           utun2
fe80::ccad:ba4b:f9ee:5225%utun2         link#16                         UHLI            lo0
ff01::%lo0/32                           ::1                             UmCI            lo0
ff01::%en0/32                           link#4                          UmCI            en0
ff01::%utun0/32                         fe80::362:5f3:4b15:4a5e%utun0   UmCI          utun0
ff01::%en8/32                           link#14                         UmCI            en8
ff01::%utun1/32                         fe80::a631:3f4c:f17a:45c7%utun1 UmCI          utun1
ff01::%utun2/32                         fe80::ccad:ba4b:f9ee:5225%utun2 UmCI          utun2
ff02::%lo0/32                           ::1                             UmCI            lo0
ff02::%en0/32                           link#4                          UmCI            en0
ff02::%utun0/32                         fe80::362:5f3:4b15:4a5e%utun0   UmCI          utun0
ff02::%en8/32                           link#14                         UmCI            en8
ff02::%utun1/32                         fe80::a631:3f4c:f17a:45c7%utun1 UmCI          utun1
ff02::%utun2/32                         fe80::ccad:ba4b:f9ee:5225%utun2 UmCI          utun2

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください