1 回答
- 最新
- 投票最多
- 评论最多
3
This is expected behavior in EC2. Public IPs are released when an instance is stopped and a new one is assigned when you start it again. The IP is assigned at random from a pool and you can't specify the public IP you want. Because of this, unfortunately it's not possible to reuse the same public IP you had before. If you want to keep the same IP, assign an Elastic IP to your instance.
The private IP of the instance on the other hand will stay the same until you terminate the instance. You can also assign a private secondary IP address to your instance, which you can reuse but limited to within the CIDR block of your VPC.
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 10 个月前
- AWS 官方已更新 10 个月前