我无法访问对等VNet中的资源

问题描述 投票:0回答:1

我有2个VNet(在同一地区-北欧)。在其中一个VNet中,我具有API管理服务,该服务具有专用IP。在第二个VNet中,我创建了一个VM。我希望能够从第二个VNet中存在的VM访问第一个VNet中驻留的API管理服务。

我在这些VNet之间创建了对等关系(从VNet1到VNet 2,从VNet 2到Vnet 1)。我使用默认设置。

我希望能够从我的VM中看到另一个VNet,并能够访问API管理服务。

这是来自VM的ifconfig的结果:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.0.4  netmask 255.255.255.0  broadcast 172.21.0.255
        inet6 fe80::20d:3aff:fed8:9895  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:3a:d8:98:95  txqueuelen 1000  (Ethernet)
        RX packets 24274  bytes 25832495 (25.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12101  bytes 2419540 (2.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1614  bytes 185968 (185.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1614  bytes 185968 (185.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0是我的VM所属的VNet。但是,我想我也会在这里看到与其他VNet的连接。也无法ping通我的API管理实例服务(及其专用IP)。

我错过了一些步骤吗?

azure azure-virtual-network
1个回答
0
投票

您将不会看到ifconfig与API管理服务的连接。如果要确保VNet对等正常工作,可以将Azure VM与API管理服务VNet添加到同一Vnet,然后彼此ping通Azure VM。该文档指出,您不能使用其私有IP来ping API管理服务:

API管理服务不侦听来自IP的请求地址。它仅响应对在上配置的主机名的请求它的服务端点。这些端点包括网关,Azure门户和开发者门户,直接管理端点和Git。

更多参考:

How to use Azure API Management with virtual networks

Using Azure API Management service with an internal virtual network

© www.soinside.com 2019 - 2024. All rights reserved.