amazon web services - Private IP remains same everytime but public IP changes everytime we restart EC2 instance -


why private ip of ec2 instance remains same after stop whereas public ip of instance changes everytime stopped , restarted?

there pool of public ip addresses assigned ec2 instance every time start (or restart) instance.

the ip addresses reused , returned pool once instance stopped (this helps use addresses efficiently).

take amazon docs:

a public ip address assigned instance amazon's pool of public ip addresses, , not associated aws account. when public ip address disassociated instance, released public ip address pool, , cannot reuse it.

it makes sense keep private ip address same because may used communication between instances (which in same subnet).

there might solution enabling keep same public address:

if require persistent public ip address can associated , instances require, use elastic ip address instead. can allocate own elastic ip address, , associate instance. more information, see elastic ip addresses (eip).

take here.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -