Public IP of 2nd network adapter do not ping on VM

BOYER Thomas 21 Reputation points
2021-03-24T11:46:49.49+00:00

Hello,

i have 2 network adapters attached on a VM on RED HAT ENTREPRISE LINUX 8 :

1st adapter : 10.0.1.9 on subnet 10.0.1.0/24 with a public ip : 40.xxx.xxx.xxx
2nd adapter : 10.0.2.9 on subnet 10.0.2.0/24 with a public ip : 20.xxx.xxx.xxx

State :
10.0.1.9 : ping ok
40.xxx.xxx.xxx : ping ok
10.0.2.9 : ping ok
20.xxx.xxx.xxx : ping NOK

The public ip of 2nd card do not ping

My route table :

ip route show :
default via 10.0.1.1 dev eth0 proto dhcp metric 100
10.0.1.0/24 dev eth0 proto kernel scope link src 10.0.1.9 metric 100
10.0.2.0/24 dev eth1 proto kernel scope link src 10.0.2.9 metric 101
168.63.129.16 via 10.0.1.1 dev eth0 proto dhcp metric 100
169.254.169.254 via 10.0.1.1 dev eth0 proto dhcp metric 100

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.1.1 0.0.0.0 UG 100 0 0 eth0
10.0.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
10.0.2.0 0.0.0.0 255.255.255.0 U 101 0 0 eth1
168.63.129.16 10.0.1.1 255.255.255.255 UGH 100 0 0 eth0
169.254.169.254 10.0.1.1 255.255.255.255 UGH 100 0 0 eth0

How to make the public ip of 2nd network adapter works ?

Thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,105 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,135 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. suvasara-MSFT 10,001 Reputation points
    2021-03-25T08:50:58.67+00:00

    @BOYER Thomas , By default ping is blocked by Azure Infra. To enable please configure the inbound rules on the second adapter to allow ICMP protocol as shown below,

    81477-image.png

    Rule:
    81420-image.png

    Once after enabling ICMP protocol, you will be able to ping the PIP of your VM,

    81369-image.png

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.