0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ip route コマンドの見方

Posted at
ip route show
# default via 10.194.185.1 dev ens3 proto dhcp src 10.194.185.50 metric 100
# 10.194.185.0/24 dev ens3 proto kernel scope link src 10.194.185.50
# 10.194.185.1 dev ens3 proto dhcp scope link src 10.194.185.50 metric 100
  • 宛先IP
    宛先IPに該当するルートが選択される。
    default はどの宛先にも該当しない場合に使われる宛先。(デフォルトルート)
  • via xxx.xxx.xxx.xxx
    ネクストホップ(ネクストホップとはパケットを次に渡す相手(ルーター)のこと)
    宛先が同一セグメントではない場合、直接通信できないので、次にパケットを渡すルーターを指定しなければなりません。
    ※ 逆に宛先がホストのIPと同一セグメントであればネクストホップの指定は必要ありません。
  • dev xxxxx
    パケットを送信するデバイス
  • proto
    • proto kernel: カーネルが自動生成した経路
    • proto dhcp: DHCPが自動生成した経路
  • scope
    • scope link: 直接 unicast/broadcastにて送信する経路。(自身が所属するネットワークなどが該当)
    • scope host: 自分自身への経路
    • scope global: ルーターを経由した他のネットワークへの経路。 (scopeオプションがない場合もこれに該当)
  • src xxx.xxx.xxx.xxx
    送信元
  • metric xxx
    ルーティングの優先順位を決定するために使用される値で、小さい値ほど優先されるルートになります
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?