Unable to Communicate from one azure VM in same virtual net to the secondary NIC of another azure VM

2019-06-28T15:48:25

I have an azure Linux VM say VM1 having only one network interface with private IP 10.3.0.5, I have another azure Linux VM say VM2 with two network interfaces, the private IP on primary network interface is 10.3.5.4, the private IP on the secondary network interface is 10.3.4.4. Now I am able to ping VM2 from VM1 on primary network interface of VM2 as ping 10.3.5.4 but I am not able to ping it in on secondary network interface as ping 10.3.4.4.

After reading azure docs - https://learn.microsoft.com/en-gb/azure/virtual-machines/linux/multiple-nics#configure-guest-os-for-multiple-nics, they say that you would have to manually add required routes to achieve this.

Similar problem in windows VM - https://support.microsoft.com/en-in/help/4048050/troubleshooter-for-azure-vm-connectivity-problems

here is the result of command route -n on VM2

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.3.5.1        0.0.0.0         UG    0      0        0 eth0
10.3.4.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.3.5.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
168.63.129.16   10.3.5.1        255.255.255.255 UGH   0      0        0 eth0
169.254.169.254 10.3.5.1        255.255.255.255 UGH   0      0        0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker_gwbridge

Now as per the above azure docs, it is missing an entry something like this

0.0.0.0        10.3.4.1         0.0.0.0        UG     0      0        0  eth1

I tried adding this route to my VM2 but after running the following command, my vm just stopped responding route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.3.4.1 dev eth1

How do I add the correct route for my problem ? Please help !

Copyright License:
Author:「Aak」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/56802924/unable-to-communicate-from-one-azure-vm-in-same-virtual-net-to-the-secondary-nic

About “Unable to Communicate from one azure VM in same virtual net to the secondary NIC of another azure VM” questions

I have an azure Linux VM say VM1 having only one network interface with private IP 10.3.0.5, I have another azure Linux VM say VM2 with two network interfaces, the private IP on primary network int...
Is it possible to associate a secondary Static IP address to an existing Azure VM on the same nic? How could this be done? (Windows Server 2016 VM)
I'm implementing a site-to-site VPN using Site-to-Site VPN in Azure Virtual Network using Windows Server 2012 Routing and Remote Access Service (RRAS). To configure it, i need One Windows Server 2...
I have written a terraform script to deploy a VM in Azure. I want to Attach/detach multiple NIC to that VM at different times. Since the VM starts running after deployment I get error when I try to...
I'm working on a NodeJS project that using Azure VM to deploy. want to connect and communicate between 2 virtual machines which are in a group. so i can use the one vm for data and 2nd for web I've
Currently I have two Azure VM's, one for the ASP.NET application (VM1) and another with SQL Server 2017 (VM2). At the moment, the application on VM1 connects to VM2's SQL Server using SQL Server
I'm working on a NodeJS project that using Azure VM to deploy. Currently, the database and server are in one single VM. With this implementation, I can easily access to the database by this mongoose.
I just installed Openstack on Windows azure virtual machine. But basicly Openstack need fixed ip(ip address which used to communicate between vm and openstack) and float ip(which used to communicat...
I am receiving a backup failed error since 6/20/2020 within my Azure backup policy. I also noticed within the Properties section under Settings of the Virtual Machine instance the "Agent statu...
I'm looking to deploy a test network on Azure with 10 VMs, a private IP per VM, in the following network stack: 1 virtual network -> 1 subnet -> 1 network interface card (nic) -> 10 VMs ...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.