2
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?

Azure VMにて…

image.png

Azure VM上でルートテーブルを確認した時のことです。

root@AZ-foo-pc27:/home/ncbpco127# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.10.100.1     0.0.0.0         UG    100    0        0 eth0
10.10.100.0     0.0.0.0         255.255.255.192 U     0      0        0 eth0
168.63.129.16   10.10.100.1     255.255.255.255 UGH   100    0        0 eth0
169.254.169.254 10.10.100.1     255.255.255.255 UGH   100    0        0 eth0

1行目

デフォルトルートはeth0を介してGatewayである10.10.100.1に送信されることを表す。

2行目

Gatewayが0.0.0.0なので、10.10.100.0/26はGatewayを介す必要がなく、ローカルのeth0を介してパケットが送信されることを表す。

3・4行目

???心当たりのないルートが定義されている…と思い、このルートについて調べてみました。

168.63.129.16とは

同じタイトルのMSLearnがあります。

この仮想パブリック IP アドレスによって、次のようなことが容易になります。

  • VM エージェントが Azure プラットフォームと通信して、それが "準備完了" 状態にあることを通知できるようにする。
  • カスタム DNS サーバーが存在しないリソース (VM など) にフィルター処理された名前解決を提供するために、DNS 仮想サーバーとの通信を有効にする。 このフィルター処理により、お客様が自分のリソースのホスト名だけを解決できるようになります。
  • Azure Load Balancer の正常性プローブが VM の正常性状態を特定できるようにする。
  • VM が、Azure の DHCP サービスから動的 IP アドレスを取得できるようにします。
  • PaaS ロールに対するゲスト エージェントのハートビート メッセージを有効にする。

Azure VMに対するLBの正常性プローブやDHCPサービスから動的IPを取得する際に使用されるルートのようです!

169.254.169.254とは

こちらもMSLearnに記載があります。

The Azure Instance Metadata Service (IMDS) provides information about currently running virtual machine instances. You can use it to manage and configure your virtual machines. This information includes the SKU, storage, network configurations, and upcoming maintenance events.
…(略)
IMDS is a REST API that's available at a well-known, non-routable IP address (169.254.169.254). You can only access it from within the VM. Communication between the VM and IMDS never leaves the host. Have your HTTP clients bypass web proxies within the VM when querying IMDS, and treat 169.254.169.254 the same as 168.63.129.16.

Azure VMのメタデータを収集する際に使用されるルートのようです!
Azure VMの内部構造を知れた感じがして楽しいです。

ちなみに

AWSやGCPにも同じように仮想マシンのメタデータを収集するためのIPアドレスがあります。

AWSの場合

AWSも同じ169.254.169.254ですね!

GCPの場合

GCPは”metadata.google.internal”というDNS名らしく、IPは10.0.0.1でプライベートIPアドレスです。

参考

2
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
2
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?