Elastic IP from a local zone attached to instance being detected as IP from regional zone

0

I have an instance with an elastic ip from a local zone (PH). But when I try to check the location of its IP it is getting detected as its regional zone parent (SG). What could be causing this?

vjhil
已提問 7 個月前檢視次數 1833 次
1 個回答
0

From Elastic IP address basics and Allocate an Elastic IP address

When you allocate the Elastic IP addresses, you can associate the Elastic IP addresses with a network border group. This is the location from which we advertise the CIDR block. Setting the network border group limits the CIDR block to this group. If you do not specify the network border group, we set the border group containing all of the Availability Zones in the Region (for example, us-west-2).

As such, explicitly specify local zone network border group when you create Elastic IP. This will be ap-southeast-1-mnl-1 instead of ap-southeast-1.

Manila PH IP prefixes are

96.0.144.0/21
142.4.161.104/29
142.4.161.216/29

The above values are from ip-ranges.json. Note that geo-location tools may indicate them as Singapore IP even though these IPs are in PH

I am in Singapore, and here are my ping times to Singapore (8 ms) and PH LZ (44 ms) EC2 respectively

% ping 18.139.83.2
PING 18.139.83.2 (18.139.83.2): 56 data bytes
64 bytes from 18.139.83.2: icmp_seq=0 ttl=110 time=9.147 ms
64 bytes from 18.139.83.2: icmp_seq=1 ttl=110 time=8.832 ms

% ping 96.0.146.140
PING 96.0.146.140 (96.0.146.140): 56 data bytes
64 bytes from 96.0.146.140: icmp_seq=0 ttl=111 time=45.053 ms
64 bytes from 96.0.146.140: icmp_seq=1 ttl=111 time=44.441 ms

You may want to verify that your EC2 instance is in LZ subnet, and the local zone subnet's Enable auto-assign public IPv4 address setting is checked. As per Internet gateway connection to the internet, below is the architecture where top right EC2 in LZ is in public subnet (i.e. auto-assign public IPv4 is enabled) and has LZ network border group EIP associated with it.

Enter image description here

To summarize, you may probably have to do the following

  • Create EIP in ap-southeast-1-mnl-1 (verify that associated IP is in the list above).
  • Check Enable auto-assign public IPv4 address for LZ subnet.**
  • Stop your EC2
  • Disassociate EIP from your EC2 (you can then release it)
  • Associate the created PH LZ EIP with EC2
  • Start the EC2

**If for some reason you do not wish to modify subnet setting, launch a new EC2 and Assign a public IPv4 address during instance launch. After which, associate your PH LZ EIP with the launched EC2

AWS
專家
Mike_L
已回答 7 個月前
  • Hi Mike! Unfortunately, the EIP I made is already associated to the LZ. Also, EC2 is in LZ subnet, while the enable auto-assign public IPv4 address is off due to us using the IP as static.

  • You mention "EIP associated with LZ". Is the IP in the PH LZ prefixes? i.e. 96.0.144.0/21, 142.4.161.104/29, 142.4.161.216/29 ? auto-assign public IPv4' works with EIP. I have updated my post with two solutions

  • Yes Mike, the IP is in the PH LZ 96.0.144.0/21

  • Hi vj, thanks for the clarification. 96.0.144.0/21 IPs are for Manila local zones, so you are good. See above my ping timings from Singapore to SIN and PH LZ EC2 respectively. Note that external geo-location tools that check country may not be accurate and may report 96.0.144.0/21 as Singapore.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南