Reputation: 3453
I have 2 VNets (both in the same region - North Europe). In one of the VNets I have API Management service, which has a private IP. In second VNet I created a VM. I'd like to be able to access API Management service residing in the first VNet from the VM that exists in second VNet.
I created a peering between those VNets (from VNet1 to VNet 2 and from VNet 2 to Vnet 1). I used default settings.
I'd expect to be able to see the other VNet from my VM and to be able to access the API Management Service.
Here's the result of ifconfig
from VM:
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
is the VNet that my VM belongs to. However, I thought I'd also see here the connection with the other VNet.
Pinging my API Management Instance Service (with its private IP) also fails.
Did I miss some step?
Upvotes: 0
Views: 784
Reputation: 28284
You would not see a connection for the API Management service with ifconfig
. If you want to ensure VNet peering is working, you can add an Azure VM as the same Vnet as the API Management service VNet then ping Azure VMs each other. You can not ping API management service with its private IP as the document states:
API Management service does not listen to requests coming from IP addresses. It only responds to requests to the host name configured on its service endpoints. These endpoints include gateway, the Azure portal and the Developer portal, direct management endpoint, and Git.
For more reference:
How to use Azure API Management with virtual networks
Using Azure API Management service with an internal virtual network
Upvotes: 1