VNet-to-VNet VPNを理解するための前提
VNet-to-VNetは各VNetのVPN GatewayをIPsec/IKEで接続し、Azure backbone上でも暗号化tunnelを提供する。 VNet peeringよりgateway resource/cost/throughput/crypto overheadがあるため、暗号化要件等で選ぶ。
route-based VPN Gatewayを使用し、cross-subscriptionではportal以外の手段が必要な場合がある。 active-active構成ではgateway instance/public IPごとのtunnel設計とpeer capabilityを確認する。
BGPを使う場合はstatic prefixとdynamic route advertisement/ASNを明確にする。 VNet-to-VNet connectionはforward/reverse connection objectとshared key/BGP statusを確認する。
Control plane と data plane
仕組みと設計上の意味
peeringとVPNを同じprefix間に重ねるとroute preference/意図が不明瞭になるため、migration時はeffective routeを確認する。
GatewaySubnetへNSG/UDRを安易に適用しない。service requirementsを優先する。
BGP session establishedでも必要prefixがlearned/advertisedされているかを別確認する。
active-activeでは片tunnel failure drillでremaining pathのthroughput/route convergenceを測る。
Packet / decision path
source→destinationを1本のflowとして固定し、名前解決・routing・security・NAT/service processing・return pathを必要な範囲で順に確認する。
- 両VNet address overlapがないことを確認。
- gateway SKU/active-active/BGPを確認。
- connection status/shared keyを確認。
- learned/advertised/effective routesを確認。
- 片系停止/再接続を含むruntime testを実施。
設計判断
| 判断点 | 推奨 | 理由 |
|---|---|---|
| Peering vs VPN | 暗号化/gateway要件がある時VPN | 通常のAzure VNet接続はpeeringが簡素 |
| BGP | prefix変動/scaleで利用 | static route管理を削減 |
| HA | active-active + AZ SKUを検討 | gateway/tunnel failure耐性 |
| Monitoring | Tunnel/BGP logs + metrics | control/data plane両方を観測 |
確認手順
Azure Portal
- Virtual network gateway → ConnectionsでConnected statusを確認。
- BGP peers/learned routesを確認。
- Network Watcher/VMからremote private IPへtest。
Evidence contract
az network vpn-connection show -g <rg> -n <connection> -o jsonc
az network vnet-gateway show -g <rg> -n <gateway> -o jsonc
az network vnet-gateway list-learned-routes -g <rg> -n <gateway> -o tableGet-AzVirtualNetworkGateway -ResourceGroupName <rg> -Name <gateway>
Get-AzVirtualNetworkGatewayConnection -ResourceGroupName <rg> -Name <connection>
障害切り分け
| 症状 | 疑う点 | 証拠 | 次の確認 |
|---|---|---|---|
| connection Disconnected | IKE/shared key/gateway issue | connection/tunnel logs | IKE/IPsec layer確認 |
| Connectedだが到達不可 | route/NSG/return path | learned/effective route | prefix propagation確認 |
| BGP flap | ASN/timer/firewall/path | RouteDiagnosticLog | BGP原因確認 |
| 片系停止で断 | active-active peer不足 | tunnel state | both instances/tunnels確認 |
変更・rollback
- gateway/connection/BGP configをexport。
- shared key changeは両端coordinated。
- route migration時はpeering/VPN path overlapを監視。
- rollback後にnew IPsec sessionとremote applicationを確認。