Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 1: Networking Fundamentals

AWS Cloud

1.5 IPv6

Friends, IPv4 addresses are running out, and that is why IPv6 came. Don't worry – the address looks long, but once you understand the two shortening rules it becomes very easy to read.

Why IPv6 is needed

  • IPv4 has only ~4.3 billion addresses, and the regional registries have run out of fresh IPv4 blocks.
  • IPv6 has 2^128 ≈ 3.4 × 10^38 addresses — a larger space for assigning distinct addresses. Native IPv6 connections can avoid the IPv4 sharing problem. Some networks still need translation when IPv6-only workloads reach IPv4-only services.
  • Built-in features: simpler header, auto-configuration (SLAAC), better multicast, and no broadcast.
  • On AWS, public IPv4 address pricing is separate from IPv6 addressing. Check the charges for the services, data transfers and other resources in the design.

Format

IPv6 is 128 bits, written as 8 groups of 4 hexadecimal digits (16 bits each), separated by colons:

2001:0db8:0000:0000:0000:ff00:0042:8329
|16b|                                    8 groups x 16 bits = 128 bits

Shortening rules

  1. Leading zeros in any group may be removed: 0db8 → db8, 0042 → 42, 0000 → 0.
  2. One continuous run of all-zero groups may be replaced by :: — only once per address (otherwise the length would be ambiguous).
Full form Short form
2001:​0db8:​0000:​0000:​0000:​ff00:​0042:​8329 2001:​db8::​ff00:​42:​8329
fe80:​0000:​0000:​0000:​0202:​b3ff:​fe1e:​8329 fe80::​202:​b3ff:​fe1e:​8329
0000:​0000:​0000:​0000:​0000:​0000:​0000:​0001 ::1 (loopback)
2001:​0db8:​0000:​0001:​0000:​0000:​0000:​0001 2001:db8:0:1::1

Important IPv6 address types

Prefix Type IPv4 equivalent
::1/128 Loopback 127.0.0.1
fe80::/10 Link-local on applicable IPv6 interfaces 169.254.x.x
fc00::/7 (fd00::/8 in practice) Unique local (private) RFC1918 ranges
2000::/3 Global unicast (public) Public IPv4
ff00::/8 Multicast 224.0.0.0/4
::/0 All IPv6 addresses 0.0.0.0/0

In AWS, a VPC can get an Amazon-provided /56 IPv6 block. A /64 is one supported subnet example. Check the IPv6 route, service listener and a rule scoped to the intended IPv6 callers. ::/0 represents all IPv6 addresses.

Ravindra Bagale's Tip

A common mistake is using :: twice in the same address (2001::1::5) – that is invalid. Use :: only once, and in the other groups remove only the leading zeros. On AWS, use an IPv6 rule for the source range the service needs. ::/0 matches every IPv6 source.

Practice task

Hya don addresses che short form liha: 2001:0db8:0000:0000:0000:ff00:0042:8329 aani fe80:0000:0000:0000:0202:b3ff:fe1e:8329. Mag varchya table ne tumche uttar match kara, aani 2001:db8::1::2 ka chuk aahe te ek line madhe liha.

Add a second address family with a specific reason and test

Mauli Dairy’s ordering site already serves customers over IPv4. A new partner’s kiosk is designed for an IPv6 connection. The first question is whether that kiosk can reach the same public service as the shop’s existing browser. The operator needs a design that lets the old IPv4 users continue to order and gives the kiosk an IPv6 path. Write down the two requirements before discussing the longer address. That makes IPv6 an understandable networking change instead of a list of unfamiliar digits.

IPv4 has a 32-bit address space. Reuse of private addresses and translation have helped networks work with the limited supply of globally routable IPv4 addresses. IPv6 uses a 128-bit address space with enough additional structure and room for very large allocations. It lets designers give networks and their interfaces distinct addresses at a much larger scale. IPv6 also specifies mechanisms for local discovery and configuration. Its appearance in the operating system does not replace routes, service listeners or access policies. Each of those still has a job.

For a gradual migration, dual stack allows IPv4 and IPv6 to serve the same application name through their respective network paths. Plan them as two checked paths. It is possible to announce a new IPv6 address while the existing application still accepts only IPv4. It is also possible for the kiosk’s operator to see a working IPv6 request while a customer device that uses IPv4 reports an unrelated problem. Test each path on its own and then test the normal customer URL from the intended networks.

All example global-looking addresses in this lesson use 2001:db8::/32, the IPv6 documentation block. These examples belong on paper and in the offline lab. Use the actual DNS name and address from your own authorized environment if you make a live request. The hands-on work later in the lesson can also use loopback, with no cloud resources and no public listeners.

Read one hexadecimal group before reading all eight

An IPv6 address normally appears as eight groups of up to four hexadecimal digits, separated by colons. A hexadecimal digit represents four bits. The digits 0 through 9 have their usual values, and a through f stand for ten through fifteen. A four-digit group holds 16 bits, so eight groups represent the full 128. You do not need to write all the bits to understand which group belongs to the network prefix.

Start with a single group, 0030. Reading from right to left, the rightmost digit is the ones position, the next is the sixteens position, and so on. The value 0030 is three times sixteen. The leading zeros contribute nothing to the value. You can write the group as 30. Compare it with 3000. Those zeros belong at the end and changing them changes the group. The shortening rule applies to zeros before the first nonzero digit, not to every zero you see.

Now write the full example 2001:0db8:0050:0010:0000:0000:0000:0018. Leave new learners enough room to put a small number under each group. Dropping the leading zeros produces 2001:db8:50:10:0:0:0:18. A blank group created by dropping all zeros is written as 0 under this first rule. Then apply the second rule to the string of whole zero groups. The three middle zero groups become the double colon, producing 2001:db8:50:10::18.

To expand that address again, count the explicit groups. Four appear to the left of the double colon and one appears to the right. Five are visible, so insert three zero groups to reach eight. Pad each group to four digits if you want the fully expanded form. Run this cycle in both directions with a pen. A correctly shortened address represents the same bits as the expanded address. Changes in capitalization or leading zeros can change the string you see in a ticket while the address value stays the same.

Some addresses contain two equally long runs of zeros. For consistent canonical text, the recommended form compresses the first longest run. It also uses lowercase hexadecimal and leaves a single zero group written as a single zero rather than using a double colon just to omit that one group. An input can be accepted as an address even when it is not written in that preferred form. When comparing addresses in code, parse them into addresses and compare the values. A character-by-character comparison can miss that the original text used two equivalent forms.

Find ambiguities and keep the port out of the address

Consider 2001:db8::18::42. There are two double colons. If you are trying to restore the omitted zero groups, you cannot tell how many belong at the first double colon and how many belong at the second. A normal IPv6 address literal can use this compression once. When your parser rejects a value, count explicit groups first and check for a second double colon, a group over four digits, or a character outside the hexadecimal set.

Try 2001:db8:50:10:0:0:0:18 and 2001:DB8:0050:0010::18. In the first, all eight groups are visible. In the second, the double colon replaces the same groups. The parser should identify them as the same address. Now read 2001:db8:50:10::180. That is a different value. The final zero is inside the meaningful final group. Removing it would describe another interface.

Port numbers add a separate colon in familiar IPv4 text such as 127.0.0.1:8000. For an IPv6 literal in a URL, put the address in square brackets so it is clear where the address ends. http://[::1]:8000/ requests the local IPv6 loopback endpoint on port 8000. The brackets are URL syntax. They do not get added around an IPv6 address every time you type it into a subnet calculator or assign it in a cloud console.

When the dairy site has an IPv6 service with its public TLS hostname, use the name for the actual browser test. A literal address test can be useful to inspect a bare network path, but a certificate for that name may not cover the literal number. The host component of a request determines how the client identifies the service. If a raw-address request behaves differently, check whether the test changed both address and hostname. It is possible to misdiagnose a successful IPv6 connection as a network failure because the wrong hostname was supplied.

A prefix has its own syntax, for example 2001:db8:50:10::/64. The slash is part of the written range, while a port belongs to a particular service endpoint. When documenting a firewall or route issue, write the prefix in the field where a range belongs and the port in the transport field. Good incident reports let the reader tell a route for all addresses in a subnet from one request aimed at one service socket.

Plan IPv6 ranges without counting devices the IPv4 way

Give the paper VPC the documentation prefix 2001:db8:50::/56. The first 56 bits are fixed. The first three full groups account for 48 of those bits, and the first two hexadecimal digits of the fourth group account for eight more. In this example those two fixed digits of the fourth group are 00. To create a /64 in that range, fix the remaining eight bits of the fourth group. Eight bits let you choose 256 different values. Those values are subnet selections before you consider the much larger address space available within each subnet.

For two areas, choose 2001:db8:50:10::/64 and 2001:db8:50:11::/64. The fourth groups are written with omitted leading zeros. In expanded form they are 0010 and 0011. Both fit the example parent because their first two hexadecimal digits are still 00. A proposal for 2001:db8:50:100::/64 has fourth group 0100, whose leading digits differ. It is outside that particular parent. The visible width of the fourth group can make this easy to miss unless you expand it or verify the membership mathematically.

Assign the first subnet to the store’s entry point and the second to the private app in the paper design. Think about allocation by purpose and AZ rather than trying to squeeze interface space. A /64 leaves 64 bits below the prefix. That is a range size, not a suggestion to deploy such a vast number of instances in one subnet. Cloud service limits, operational boundaries and network design determine what you actually place there. Plan growth using real interface, service and route requirements.

AWS can allocate an Amazon-provided IPv6 block to a VPC and the supported subnet prefix sizes are documented separately. A /56 VPC with /64 subnets is a useful example, but read the options of your VPC and assignment type when you build. As with IPv4, the platform reserves certain addresses for its own use even though the arithmetic describes them inside the range. A correct planning sheet distinguishes a child’s mathematical CIDR from a particular assigned interface address. Write which values you calculated and which you read from the actual AWS resource.

Recognize scope from the address and the interface together

A Linux terminal can show several IPv6 entries for one interface. Some are for that local link, others for a larger network. Start with the address and inspect the tool’s scope information when available. Use this table to decide which part of the dairy drawing could use each kind. Add the interface name beside any link-local example, because the same numeric link-local value can be used on different links without identifying the same neighbor.

ExampleIntended purposeWhat to check during a test
::1Loopback on the current machineUse it from the same host as your test service.
fe80::1Link-local addressFind the actual interface or zone that reaches this link.
fd12:3456:789a::15Example unique local addressCheck the intended routed private networks and their agreed address plan.
2001:db8:50:10::18Documentation addressUse it to practice notation and range calculation offline.
ff02::1Link-scope IPv6 multicast groupDistinguish a group destination from a single host’s address.

A link-local value is designed for communication on its link. A router can use a link-local address as a next hop for wider traffic. That does not make the link-local value a public address that should be written into a customer’s site URL. In Linux route output you might see a default route through a fe80:: address alongside an interface name. The pair tells the operating system how to reach the next router. The packet’s final destination can remain a global IPv6 address for the intended service.

IPv6 unique local addressing is useful inside private networks. Use a coordinated plan if networks will connect, and verify which routes and policies let them exchange traffic. A globally scoped unicast address can be part of a routed public design. It still takes a working route, scope-consistent addressing, allowed policies and a program listening there. In AWS check which kind of IPv6 allocation the subnet has and how the VPC advertises or routes it. The fact an address does not look like IPv4 private space is the wrong evidence for judging exposure.

IPv6 has multicast for sending to groups with a particular scope. It does not use IPv4-style broadcast. Over a local link, discovery can use IPv6 messages directed to appropriate neighbors or groups. Those exchanges matter even when your application sends only unicast HTTPS. If discovery, basic control traffic or routing is broken, a service can fail before the first application port is ever reached. A beginner should know these jobs exist even if day-to-day support commonly starts from the app’s own network symptoms.

Understand where the interface learns its network settings

IPv6 Neighbor Discovery helps a host learn about nearby routers and communicate on the local link. A router can advertise information such as a prefix and whether it offers a default path. With stateless address autoconfiguration, or SLAAC, a host can use the advertised information and its own configuration to form an address. Some networks also use DHCPv6 for addresses or other configuration. These are tools network operators combine according to their design. Do not infer the setup from a single screenshot of a host address.

Imagine a lab computer’s interface has a link-local address and an address from the training network’s global prefix. The link-local address helps take part in link-level communication. For an ordinary routed request the operating system can choose a source suitable for the destination and path. One host can also use temporary IPv6 addresses for some connections. Record the interface and selected address when writing rules or interpreting logs. A temporary source address makes one observed host address a fragile long-term identity.

IPv6 commonly uses ICMPv6 for control information, including messages that are more important than a simple ping. Neighbor Discovery and messages about a packet that is too large for the path are examples of why a deployment should review required control traffic deliberately. When a webpage opens but a larger application exchange repeatedly stalls, compare the intended IPv6 path and its documented MTU behavior along with application logs. A correct CIDR and the right service port do not by themselves establish that every packet size can travel along the path.

To make this concrete, label the laptop’s ip -6 addr output with local link only and intended routed address where the scopes are evident. Then look at ip -6 route. Decide whether there is a valid default path for a remote destination. If you see only link-local information, do not promise a public website will work over IPv6. Ask which configuration should provide the wider route, then test that specific step. These checks are read-only on a lab system.

Decide which IPv6 connections the VPC is intended to allow

In the dairy design, a public HTTPS entry point may receive connections from both IPv4 and IPv6 clients. Add an address-family plan for the entry point and its target. In AWS a VPC and subnet need the relevant IPv6 allocation. An interface or managed service needs the correct IPv6 configuration. The route for a public IPv6 path and the inbound rules must support the connection from the intended client. Check service support before assuming that adding an address to a subnet makes every resource dual stack.

For an intended public path, the IPv6 default prefix is ::/0. An IPv6 route to an ordinary internet gateway can provide internet connectivity when the deployment has an appropriate public IPv6 address and permits the traffic. The same written prefix in a security group source means any IPv6 source. Those meanings depend on the configuration field. It is reasonable for an intentionally public HTTPS entry to accept the expected IPv6 audience. An administrative or database service should have a narrower approved path.

A private app may instead need outbound-only internet access over native IPv6. AWS offers an egress-only internet gateway for IPv6 in this case. It can let the inside resource start a connection and receive its replies while avoiding externally initiated connections through that route. Compare that with the IPv4 example that uses a public NAT gateway for an instance with private IPv4. These are different network arrangements for different address families. The app’s IPv6 data path does not become an IPv4 path just because the policy intent is similar.

Another possible requirement is for an IPv6-only workload to talk to a destination that has only IPv4. That requires a designed translation path. In the AWS DNS64 and NAT64 pattern, DNS64 can supply an IPv6-format destination for an IPv4-only name, and NAT64 translates applicable traffic on the network path. This feature has specific routing requirements. It is not a reason to assume any IPv6 client can connect to every IPv4 service. Record whether each dependency supports native IPv6 or will need an approved transition mechanism.

Read a two-row plan aloud. The public browser reaches the allowed HTTPS entry over an IPv6 public path. The private worker starts a separate call to a chosen dependency through its permitted egress. Their routes, security groups, and DNS behavior can differ. If one works and one fails, record the two source and destination pairs first. The next check belongs to the path that failed rather than every IPv6 setting in the VPC.

Verify the same hostname from two address families

Publish an A record or suitable IPv4 answer when the site has a working IPv4 entry. Publish an AAAA record or suitable IPv6 answer when the IPv6 entry also works. DNS supplies the address for the service name. It does not verify the route, certificate or listener. For the kiosk rollout, first select a test name and confirm IPv6 works before relying on the new answer for the public audience. A later failed test should record which resolver and requested record type it used.

Some clients use a method often called Happy Eyeballs to try usable connection paths without leaving the viewer waiting unnecessarily for one broken path. Ordinary browser success can therefore be good news for the customer and still hide a broken address family. Do a deliberate IPv4 request and a deliberate IPv6 request from an authorized dual-stack test point. Keep the same hostname so you are checking the same expected web identity. Read the resolved address and expected response with each result.

curl -4 -sS -o /dev/null -w 'v4=%{remote_ip} status=%{http_code}\n' "$LAB_URL"
curl -6 -sS -o /dev/null -w 'v6=%{remote_ip} status=%{http_code}\n' "$LAB_URL"

Replace the quoted placeholder with the exact URL of an approved test site you operate. A good observation shows a destination for each family and the expected HTTP status and content when you check the body. If the IPv6 command cannot resolve an address, look at the AAAA response for the name and its DNS view. If it resolves and fails to connect, confirm the client has working IPv6 elsewhere in the lab, then inspect its route, the destination’s attached IPv6 rules, and its service listener. If TLS fails after the connection is established, check the hostname and certificate rather than revising the subnet prefix.

Write down what can legitimately vary. A different address or edge location can be expected. The same customer-facing hostname should still direct a permitted reader to the right service. If your DNS answers are cached during a rollout, some clients may continue to see earlier values. Test an agreed change during its expected TTL window and document what has already been proved. A short health check from a suitable test network does not replace later production verification from the places that matter to your users.

Expand and compare IPv6 notation without contacting a network

Use the standard Python 3 library on your own computer, or calculate the groups by hand. Start with one full address from the dairy plan. Predict its preferred shortened text. Next predict whether a child subnet numbered 11 in the fourth group falls inside the selected parent plan and whether a group numbered 100 does. Number those values as hexadecimal groups rather than ordinary decimal display.

from ipaddress import IPv6Address, IPv6Network

address = IPv6Address("2001:0db8:0050:0010:0000:0000:0000:0018")
same_address = IPv6Address("2001:db8:50:10::18")
parent = IPv6Network("2001:db8:50::/56")

print(address.compressed)
print(address.exploded)
print("same value:", address == same_address)
print("subnet 11 fits:", IPv6Network("2001:db8:50:11::/64").subnet_of(parent))
print("subnet 100 fits:", IPv6Network("2001:db8:50:100::/64").subnet_of(parent))

Expect 2001:db8:50:10::18 as the short form and eight four-digit groups as the expanded form. The two written interface values are equal. The subnet with fourth group 0011 fits and the subnet with fourth group 0100 does not. Use the result to explain which part of the fourth group belongs to the /56 prefix. You have tested the range and notation without connecting to any device.

For a second controlled input, ask Python to parse a text address with two double colons from the earlier section. It should reject the string. If your valid example fails, check the count of groups and the exact separators you copied. If a proposed network starts with nonzero host bits, parse the interface and inspect its associated network or supply a proper aligned beginning. The script does not create routes or interfaces. Close it when done and remove only any temporary test file you saved.

Make a local IPv6 request and compare the IPv4 result

Use a machine with IPv6 loopback enabled and Python 3. Work in an empty temporary directory you create for this lab. Put a harmless index.html there with the line Dairy IPv6 loopback test. Start this test server from that directory with the bind explicitly set to ::1. Keep it only as a local practice service. If the port is already used, choose another unused port and use it consistently in both requests.

python3 -m http.server 8000 --bind ::1

Expect Python to report the IPv6 local endpoint. In another terminal on the same host, use bracketed IPv6 URL syntax. The curl option -g prevents curl’s URL glob parser from treating the brackets as a range. The proxy option applies only to the local command and avoids sending this machine-local request to a configured proxy.

curl -g --noproxy '*' -i 'http://[::1]:8000/'
curl --noproxy '*' -i 'http://127.0.0.1:8000/'

The first request should return HTTP 200 and the local test line. The second uses IPv4 loopback and should fail to reach this IPv6-loopback listener if no separate IPv4 service is on that port. The two addresses name separate address families even though both refer to the current computer. The exercise proves a listening difference, not the availability of the public VPC path.

If the first command reports IPv6 is unavailable, record that the environment did not support the local bind. Use the offline lab for notation and inspect the approved OS configuration when you have an environment with IPv6. If the IPv4 request works too, check for another listener before interpreting the result. Stop the Python process with Ctrl+C when done. Remove only your disposable file and empty directory. Nothing in this lab requires opening an AWS inbound rule.

Stage a dual-stack release and write the result each step should produce

A safer rollout begins with a machine that can make an approved IPv6 request, the intended hostname, and a backup plan for the current IPv4 path. Record the working IPv4 status and one safe response value before making changes. Design the eventual IPv6 route and permissions. If the service has a load balancer, check its support and address type separately from the target interface and group. The public endpoint and target connection can have separate families and settings.

Next verify a dedicated test path or name. Look at its planned prefix and assigned address. Confirm the relevant route table and security group control the expected public or private connection. Make the actual HTTPS request to the name and check the response and certificate. When a cache or health endpoint can answer independently, also check a safe representative app request. Verify that your test exercised the intended new path.

Then write two normal visitor tests. One uses only the IPv4 path and one uses IPv6; both request the expected name and path. Confirm both work before changing the public rollout. If you maintain an authorization rule by IP range, compare the allowed IPv6 and IPv4 sources separately. An old IPv4 rule does not cover IPv6. Take care that an administrative route keeps its required access boundary when the public site gains another family.

Finally check how an authorized colleague would roll the change back. They need the known-good IPv4 endpoint, the name and address records being changed, and an understanding that caches can keep earlier answers for a while. Record the intended DNS state, relevant timestamps and which path users can still use. Clean up any temporary test hostname, listener or lab resources using the project’s ordinary process, and leave the existing IPv4 path working. The lesson ends when another student can explain which path changed, how you proved it, and where to look if one family later reports a problem.

Map both sides of an application load balancer

Mauli Dairy can approach IPv6 a step at a time. The public side of an Application Load Balancer can accept IPv6 from a customer while another leg reaches the backend using its configured target group address type. Prove the actual design you chose. For example, suppose the public listener supports dual stack and the private target group keeps IPv4 targets for the first phase. The kiosk can use an IPv6 connection to the front door even though the app still receives a separate IPv4 connection on the other leg. The load balancer handles requests at the application layer. The forwarded request does not have to remain one unchanged IP connection.

Draw the two endpoints and mark the exact listener and target ports. The public security rules permit the intended HTTPS clients. The target’s private rules permit the expected load balancer path on the application port. An existing app-to-database connection can keep the family supported by its private service. Add one IPv6 test that proves the customer-facing path and one target check that proves the backend path. In a training exercise, use a synthetic page with the same result through both client families so any discrepancy is easier to see.

Now imagine a team rolls out IPv6 target groups separately. The group address type and eligible targets have to match the intended design. Features can have separate prerequisites. Before moving a production application, record the backend’s listening addresses, health-check behavior, connected services and approved route associations. Test the change with a small lab target and compare the same read-only request through the load balancer. A misconfigured listener on an IPv6 target can break the app even while DNS continues to return a valid IPv6 address for the front door.

The idea generalizes to a CDN or API gateway in front of an app. A client can reach a managed front door using IPv6 while the back end has its own service path. Look up how the chosen service supports each leg instead of guessing from the public URL. For example, verifying an AAAA record and a good certificate proves something useful about the front door. It leaves separate work to test the path from that service to its origin. Record which side each test observed. This is how a gradual transition can keep a working older path while improving client support.

When drawing the design for a classmate, include an explicit before and after table. List the client DNS answer and transport, the managed entry type, the configured private target connection and the application’s own dependency path. Mark which rows switch to IPv6 in the first release. A narrower change is usually easier to verify. Decide which later phase genuinely needs new IPv6 target configuration. That choice comes from the service requirement and evidence, not a rule that every machine must migrate in one day.

Choose an IPv6 route using the same prefix rule you learned in IPv4

Suppose a training router knows the dairy’s own prefix 2001:db8:50:10::/64, a route towards a partner’s demonstration range 2001:db8:60::/48, and a default ::/0. A destination of 2001:db8:50:10::44 fits the dairy subnet. A destination of 2001:db8:60:25::7 fits the partner range. The default also matches both addresses, but the longer matching prefix decides the more specific path. You can read this correctly without converting every group to bits because the selected examples end at group boundaries.

Now put a link-local next hop in the example. A route to the partner might point through a gateway such as fe80::1 on the interface named in the exercise. The destination in the packet remains 2001:db8:60:25::7. A route table can name a locally reachable IPv6 next hop even when the packet is intended for a wide-scope service. Include the relevant interface so the OS can identify that particular neighbor. Two interfaces might see a link-local next hop with similar text and different physical or virtual links.

Imagine you fix that route in one direction and the partner cannot reply. Plan both directions with the right address families. The partner must know how to reach whichever source prefix your request actually used, and its own security settings must support the reply. In a lab with an IPv6-only client, a return path described using an IPv4 range does not supply that evidence. Make an address and route note for each side. Only then compare how permissions and listeners apply to the chosen port.

A useful read-only observation on a Linux IPv6 test host is ip -6 route get 2001:db8:60:25::7. This calculates a local route without connecting to that documentation destination. On a host with a suitable IPv6 configuration you can see the selected outgoing device and source. A host with no usable IPv6 default can report the destination is unreachable. This is valuable even in a private training environment: it shows whether the local plan would provide a next step. A separate real request to a destination you own would still be needed to show a working path.

Do three comparisons in your notebook. First, show the best matching route for a destination inside the dairy prefix. Next, show the matching default when the destination is outside all of the known ranges. Finally, inspect which path an actual test machine chooses for one approved destination. The first two are routing calculations; the third describes your configured system. This distinction lets you explain why a paper route and the real command output can disagree.

Practise address and path decisions

  1. Expand a notation example. Expand 2001:db8:50:11::9 to eight groups. There are five explicit groups and three omitted zero groups. Pad each group to four hexadecimal digits and check it refers to the same /64 you planned.
  2. Compare two packet destinations. Mark a link-local next hop fe80::1 and a global-format documentation destination 2001:db8:50:10::18. Explain which one the local router address supplies and which one identifies the destination in the packet.
  3. Find the part of a dual-stack design that failed. The site’s IPv4 request returns 200 and its IPv6 DNS answer exists, but the IPv6 connection times out. List checks for a client IPv6 route, the destination’s IPv6 route and rules, and the listener. Keep the problem separate from a successful IPv4 observation.
  4. Plan a private worker’s outbound access. Decide whether the dependency accepts native IPv6, only IPv4, or a private endpoint. Sketch the matching approved path and one test that could prove it. A good answer treats native IPv6 egress and a translation path as different network cases.

Interview questions and worked answers

Why can a double colon appear only once in one IPv6 literal?

It represents one omitted run of zero groups. With two runs marked the same way you cannot reconstruct how many groups belong to each. Count the explicit groups and fill one gap to reach eight.

What is the difference between a link-local address and IPv6 loopback?

A link-local address can communicate with neighbors on the link and can identify a local next hop. Loopback ::1 is the current host itself. An interface or zone is relevant when a link-local value could occur on more than one link.

How many /64 ranges fit in a /56, and where is the choice encoded?

Eight additional fixed bits give 256 possible child prefixes. In the example these are the last two hexadecimal digits of the fourth group. Confirm the parent is aligned and the chosen child has those bits within it.

How do you diagnose a website that works in an ordinary browser but fails with curl -6?

The browser may have used IPv4. Check the AAAA answer, the test client’s IPv6 connection, and the intended IPv6 route, group and listener. Preserve the same hostname so a certificate test is meaningful.

What is a typical AWS option for outbound native IPv6 without inbound initiation through that path?

An IPv6 route through an egress-only internet gateway can support connections initiated from inside and their replies. Verify the subnet route and approved network policies. If a destination is IPv4-only, plan a separate transition mechanism.

Why review IPv6 controls even on a server with strict IPv4 rules?

IPv4 and IPv6 have separate address ranges, routes and network rules. An IPv4 restriction does not automatically limit an IPv6 listener. Verify the intended reachability from both families before deployment.

Check your understanding of IPv6 scope and paths

  1. Which notation is valid: 2001:db8::18::42 or 2001:db8:50::18?

    Answer and reasoning

    The second. There is exactly one omitted run of zero groups in it. The first has two double colons.

  2. Which address is the current host on IPv6? Choose ::1, fe80::1, or 2001:db8::1.

    Answer and reasoning

    ::1 is loopback. The other examples belong to a local-link pattern and a documentation block.

  3. Which DNS records normally provide IPv6 host addresses? Choose A, AAAA, or MX.

    Answer and reasoning

    AAAA supplies IPv6 addresses. A supplies IPv4 addresses. An MX record describes a mail exchange rather than either address answer.

  4. Which count of /64 ranges can fit in a properly aligned /56, 16, 64, or 256?

    Answer and reasoning

    256. There are eight more prefix bits in a child /64, and eight bits can represent 256 combinations.

  5. If a site works over IPv4 only, does adding a separate AAAA record prove its IPv6 applications work?

    Answer and reasoning

    It supplies a new name answer. Test the IPv6 route, listener and HTTPS response separately from a suitable client before relying on that answer.

Revision cards

Address size
IPv6 has 128 bits. Four hexadecimal digits represent 16 bits, and eight full groups represent the whole address.
Shortening
Remove leading zeros in groups. Use a single double colon for one consecutive zero run. Fill back to eight groups when reading.
Scope and routing
Recognize loopback, link-local, private-use and globally scoped addresses. Verify the interface and route for the intended path.
Dual stack has two paths
Keep A and AAAA answers and actual IPv4 and IPv6 connection tests separate. Use the expected hostname for both.
IPv6 in a VPC
Choose the relevant prefix and service configuration. Check routing, IPv6 rules, and listeners. Scope administration to its approved callers.
Address and port
When an IPv6 literal appears before a port in a URL, put the address inside brackets. This preserves the difference between address colons and the port separator.

Technical references