Day 15: Private and Public IPs in AWS Networking ๐ŸŒ๐Ÿ’ป

Day 15: Private and Public IPs in AWS Networking ๐ŸŒ๐Ÿ’ป

ยท

3 min read

IP Addresses: The Basics ๐Ÿค–๐Ÿ’ก

1. IPv4 vs. IPv6: A Quick Overview ๐ŸŒ๐Ÿ”ค

  • IPv4:

    • Format: [0-255].[0-255].[0-255].[0-255].

    • Capacity: 3.7 billion addresses in the public space.

  • IPv6:

    • Format: 3ffe:1900:4545:3:200:f8ff:fe21:67cf.

    • Addresses problems for the Internet of Things (IoT).

2. AWS Focus: IPv4 ๐ŸŽฏ๐Ÿ’ป

  • AWS primarily uses IPv4 in this course.

  • IPv4 remains the dominant format online.

Public vs. Private IPs: Drawing Boundaries ๐Ÿ ๐ŸŒ

1. Key Distinctions ๐ŸŒŸ๐Ÿ”’

  • Public IP:

    • Identifiable on the internet (WWW).

    • Must be unique globally.

    • Easily geo-located.

  • Private IP:

    • Identified only on a private network.

    • Must be unique within the private network.

    • Multiple private networks can share the same IPs.

2. Elastic IPs: Stability in Dynamism ๐ŸŒ๐Ÿ”„

  • Functionality:

    • Ensures a fixed public IP for EC2 instances.

    • Attached to one instance at a time.

  • Considerations:

    • Limit of 5 Elastic IPs per account.

    • Generally avoided for optimal architecture.

    • Suggested alternatives: random public IP with DNS or use a Load Balancer.

Private and Public IPs in AWS EC2: Hands-On ๐Ÿ–ฅ๏ธ๐Ÿ”ง

1. Default Configuration ๐Ÿš€๐ŸŒ

  • EC2 Defaults:

    • Private IP for internal AWS network.

    • Public IP for WWW.

  • SSH Considerations:

    • Use public IP for SSH connections.

    • Public IP may change when an instance is stopped and started.

Placement Groups: Strategic Instance Placement โš–๏ธ๐ŸŒ

1. Control Strategies ๐ŸŽฏ๐Ÿ’ผ

  • Placement Groups:

    • Define instance placement strategy.

    • Strategies: Cluster, Spread, Partition.

  • Use Cases:

    • Cluster: Low latency, high network throughput (e.g., Big Data jobs).

    • Spread: High availability, isolated instances (e.g., critical applications).

    • Partition: Scales to 100s of instances, for distributed systems (e.g., Hadoop, Cassandra).

Elastic Network Interfaces (ENI): Virtual Network Cards ๐Ÿƒ๐Ÿ”—

1. ENI Characteristics ๐ŸŒ๐Ÿ“‡

  • Attributes:

    • Primary and secondary IPv4 addresses.

    • Elastic IP (IPv4) per private IPv4.

    • Public IPv4.

    • Security groups.

    • MAC address.

  • Flexibility:

    • Can be created independently and attached on-the-fly.

    • Bound to a specific availability zone.

EC2 Hibernate: Navigating Instance States ๐Ÿ”„๐Ÿ›Œ

1. Hibernate Functionality ๐ŸŒ๐Ÿ”

  • Key Points:

    • Preserves in-memory (RAM) state.

    • Faster instance boot (RAM state not restarted).

    • RAM state stored in an encrypted file on the root EBS volume.

  • Use Cases:

    • Long-running processing.

    • Services with extended initialization times.

2. Considerations ๐Ÿค”๐Ÿ”

  • Supported Instances:

    • Families: C3, C4, C5, I3, M3, M4, R3, R4, T2, T3, ...

    • RAM Size: Must be less than 150 GB.

    • Size: Not supported for bare metal instances.

  • Limitations:

    • Hibernation not exceeding 60 days.

Conclusion: Navigating the Networking Realm in AWS ๐Ÿงญ๐Ÿ’ป

Understanding the nuances of private and public IPs, alongside advanced features like Elastic IPs and EC2 Hibernate, empowers you to architect robust and flexible solutions in AWS. Whether optimizing instance placements with placement groups or ensuring stability with Elastic IPs, these networking tools are your allies in creating scalable and efficient environments. Dive into the AWS networking ecosystem with confidence! ๐Ÿš€๐ŸŒ

Did you find this article valuable?

Support Prasad Suman Mohan by becoming a sponsor. Any amount is appreciated!

ย