[Linux][IPv6] IPv6でのルーティングテーブルの確認コマンド。

2013-04-15 10:05:24AIX、UNIX、Linuxip, ipv6, linux, netstat, route, コマンド

IPv6でのルーティングテーブルの確認方法が分からなかったのでメモ。

以下の3つのコマンドで同様の結果が得られる。

  • netstat -A inet6 -rn
  • netstat –inet -rn
  • route -n6
% route -n6カーネルIPv6 経路テーブル
Destination                    Next Hop                   Flag Met Ref Use If
2001:470:fe13::/64             ::                         UAe  256 0     0 wlan0
2001:df0:232:eea0::fff3/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
2001:df0:232:eea0::fff4/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
fd8a:c649:aa80::/64            ::                         UAe  256 0     0 wlan0
fe80::/64                      ::                         U    256 0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UG   1   0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UGDAe 1024 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo
::1/128                        ::                         Un   0   1    10 lo
2001:470:fe13:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 lo
2001:470:fe13:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     8 lo
fd8a:c649:aa80:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 l
fd8a:c649:aa80:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     0 lo
fe80::2677:3ff:fe40:7c48/128   ::                         Un   0   1     6 lo
ff00::/8                       ::                         U    256 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo
% netstat --inet6 -rn
カーネルIPv6 経路テーブル
Destination                    Next Hop                   Flag Met Ref Use If
2001:470:fe13::/64             ::                         UAe  256 0     0 wlan0
2001:df0:232:eea0::fff3/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
2001:df0:232:eea0::fff4/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
fd8a:c649:aa80::/64            ::                         UAe  256 0     0 wlan0
fe80::/64                      ::                         U    256 0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UG   1   0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UGDAe 1024 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo
::1/128                        ::                         Un   0   1    10 lo
2001:470:fe13:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 lo
2001:470:fe13:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     8 lo
fd8a:c649:aa80:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 lo
fd8a:c649:aa80:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     0 lo
fe80::2677:3ff:fe40:7c48/128   ::                         Un   0   1     6 lo
ff00::/8                       ::                         U    256 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo
% netstat -A inet6 -rn
カーネルIPv6 経路テーブル
Destination                    Next Hop                   Flag Met Ref Use If
2001:470:fe13::/64             ::                         UAe  256 0     0 wlan0
2001:df0:232:eea0::fff3/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
2001:df0:232:eea0::fff4/128    fe80::209:fff:fe83:4656    UG   1024 0     3 wlan0
fd8a:c649:aa80::/64            ::                         UAe  256 0     0 wlan0
fe80::/64                      ::                         U    256 0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UG   1   0     0 wlan0
::/0                           fe80::209:fff:fe83:4656    UGDAe 1024 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo
::1/128                        ::                         Un   0   1    10 lo
2001:470:fe13:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 lo
2001:470:fe13:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     8 lo
fd8a:c649:aa80:0:2677:3ff:fe40:7c48/128 ::                         Un   0   1     0 lo
fd8a:c649:aa80:0:2958:3df3:a68d:6fe0/128 ::                         Un   0   1     0 lo
fe80::2677:3ff:fe40:7c48/128   ::                         Un   0   1     6 lo
ff00::/8                       ::                         U    256 0     0 wlan0
::/0                           ::                         !n   -1  1    41 lo

参考:

2013-04-15 10:05:24AIX、UNIX、Linuxip, ipv6, linux, netstat, route, コマンド