Not able to ping secondary NIC IP address with same VNET/SNET VM.

Daniyal Raza 91 Reputation points
2024-05-07T15:32:45.55+00:00

I have added another network interface card on an azure VM running with CentOS. a dynamic IP is assigned to the NIC, and I can see the IP after login the VM. when I try to ping NIC1 IP address from another VM of same VNET/SNET it went successful, but when I tried to ping the NIC2 IP address it doesn't work.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,873 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,427 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 37,081 Reputation points Microsoft Employee
    2024-05-07T16:22:30.8966667+00:00

    @Daniyal Raza

    You likely need to setup routing rules for your VM. When you add multiple network interfaces to a Linux VM, you have to create routing rules. These rules enable the VM to send and receive traffic that belongs to a specific network interface. Otherwise, traffic can't be processed correctly. For example, traffic that belongs to eth1 can't be processed correctly by the defined default route.

    Please follow Configure guest OS for multiple network interfaces which walks you through the steps to configure this. If you are still facing issues, please let me know and I will be happy to assist.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image


1 additional answer

Sort by: Most helpful
  1. Daniyal Raza 91 Reputation points
    2024-05-07T20:14:32.5633333+00:00

    Thanks @deherman-MSFT for your answer this guide worked 100% for me and my problem is solved now.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.