Help Center/ Virtual Private Cloud/ FAQs/ Connectivity/ Why Do ECSs Using Private IP Addresses in the Same Subnet Only Support One-Way Communication?
Updated on 2022-12-09 GMT+08:00

Why Do ECSs Using Private IP Addresses in the Same Subnet Only Support One-Way Communication?

Symptom

Two ECSs (ecs01 and ecs02) are in the same subnet in a VPC. Their IP addresses are 192.168.1.141 and 192.168.1.40.

The ecs01 can ping ecs02 through a private IP address successfully, but ecs02 cannot ping ecs01 through a private IP address.

Troubleshooting

  1. Ping ecs01 from ecs02 through the EIP. If ecs01 can be pinged, the NIC of ecs01 is working properly.
  2. Run the arp -n command on ecs02 to check whether the command output contains the MAC address of ecs01. If the command output does not contain the MAC address of ecs01, ecs02 fails to learn the MAC address of ecs01 when using the private IP address to ping ecs01.
  3. Run the ip a command on ecs01 to check the NIC configuration of ecs01. The following figure shows an example.
    Figure 1 Viewing ecs01 NIC configuration

    The IP address 192.168.1.40/32 should not be configured based on the command output. As a result, ecs01 fails to send packets to ecs02.

Procedure

Modify the NIC configuration of ecs01. Run the following command to delete the redundant IP address, for example, 192.168.1.40/32, configured on the NIC eth0:

ip a del 192.168.1.40/32 dev eth0