Skip to main content

IPv6 - Key concepts

IPv6 Addressing

IPv6 addresses are 128-bit long and written in hexadecimal format. To simplify the address, leading zeros can be omitted, and consecutive groups of zeros can be replaced with "::" (only once in an address).

  • Technical Tip: Always remember that "::" can be used only once in an IPv6 address to avoid ambiguity.

Example:

Full: 2001:0db8:0000:0000:0000:ff00:0042:8329

Shortened: 2001:db8::ff00:42:8329

IPv6 Address Types

  • Unicast: Identifies a single interface (Global, Link-Local, Unique-Local).
  • Multicast: Packets sent to all interfaces in the group (e.g., FF00::/8).
  • Anycast: Address assigned to multiple interfaces, routing the packet to the nearest device.
  • Technical Tip: IPv6 doesn't support broadcast; multicast is used for similar purposes.

IPv6 Stateless Autoconfiguration (SLAAC)

With Stateless Address Autoconfiguration (SLAAC), hosts can configure their own IP addresses based on the router’s advertisements. This provides a simple mechanism for address assignment without DHCP.

  • Technical Tip: SLAAC uses Neighbor Discovery Protocol (NDP) to obtain the prefix from Router Advertisements (RA) and then auto-generates the host portion using EUI-64 format.

IPv6 Address Configuration

There are three ways to assign an IPv6 address to an interface:

  1. Manual Global Unicast:

Router(config-if)# ipv6 address 2001:db8::1/64

  1. EUI-64 Autoconfiguration:

Router(config-if)# ipv6 address 2001:db8::/64 eui-64

    • This auto-generates the host part of the address using the MAC address.
  1. Link-Local:

Router(config-if)# ipv6 address fe80::1 link-local

    • Technical Tip: IPv6 link-local addresses are mandatory for communication between devices on the same link and automatically assigned.

IPv6 Routing

To enable IPv6 routing, use the following command:

Router(config)# ipv6 unicast-routing

  • Technical Tip: Without enabling IPv6 routing, routers can still have IPv6 addresses but won’t forward IPv6 traffic.

IPv6 Neighbor Discovery (NDP)

NDP replaces ARP in IPv6 and uses ICMPv6 for tasks like address resolution and Router Discovery. It comprises five key messages:

  • Router Solicitation (RS)
  • Router Advertisement (RA)
  • Neighbor Solicitation (NS): Similar to ARP in IPv4.
  • Neighbor Advertisement (NA)
  • Redirect
  • Technical Tip: NDP supports Duplicate Address Detection (DAD) to prevent IP conflicts by ensuring no other device is using the same address.

IPv6 and EUI-64

IPv6 uses EUI-64 to create unique host addresses by extending the 48-bit MAC address into a 64-bit interface identifier.

  • Technical Tip: EUI-64 splits the MAC address into two halves and inserts FFFE in the middle. The 7th bit of the first byte is flipped to indicate uniqueness.

DHCPv6

In addition to SLAAC, DHCPv6 is used for stateful address assignment and additional configurations like DNS servers.

  • Technical Tip: When Router Advertisements set the Managed Flag (M), hosts are prompted to use DHCPv6 for full address assignment.

IPv6 Security Considerations

  • Security Tip: IPv6 mandates the use of IPsec for end-to-end encryption. Ensure proper ACLs and filters are in place for managing IPv6 traffic and avoid open exposure of services.

IPv6 Transition Mechanisms

To support the transition from IPv4 to IPv6, several methods are used:

  1. Dual-Stack: Running both IPv4 and IPv6 on devices.
  2. Tunneling: Encapsulating IPv6 traffic in IPv4 packets (e.g., 6to4, ISATAP, GRE).
  3. NAT64: Translates IPv6 addresses to IPv4.
  • Technical Tip: Dual-Stack provides the most seamless transition as it allows both protocols to coexist until full IPv6 adoption.

Carrier-Grade NAT (CGN)

Used by ISPs to extend the life of IPv4 addresses, CGN translates private IPv4 addresses to a shared pool of public IPv4 addresses.

  • Technical Tip: ISPs typically use RFC 6598 (100.64.0.0/10) for CGN. This is separate from RFC 1918 private space and is intended for use within the ISP’s network.

By understanding these IPv6 concepts and configurations, you'll be better equipped to answer interview questions about IPv6 deployment, troubleshooting, and optimization.

Comments

Popular posts from this blog

How to import Putty Saved Connections to mRemoteNG

Just started using mRemoteNG and its being very cool to connect to different remote connection with different protocols e.g Window Remote Desktop, VNC to Linux, SSH, HTTP connection etc. from a single application. As new user I configured some remote desktop connection which was quite easy to figure out. But when I wanted to add SSH connections, it came in my mind to import all of the saved connections in the putty. But I couldn't figure it out how can it be done, though it was quite easy and here are the steps. Open your mRemoteNG Create a folder if you want segregation of multiple networks Create a new connection Enter the IP address of remote server under connection in Config pane Under the config pane, select protocol " SSH version 2 ".  Once you select protocol to SSH version 2 you are given option to import putty sessions, as shown in the snap below. In the above snap, I have imported CSR-AWS session from my saved sessions in Putty.

BGP Local Preference Controlling Outbound Traffic in BGP

In BGP, Local Preference is used to control the outbound traffic path. It helps you decide which egress point (exit point) should be used when you have multiple connections to external networks, such as ISPs. Local Preference is an attribute that is local to your AS and is shared with all iBGP peers but not with eBGP neighbors. Higher Local Preference = More preferred outbound path. Example Scenario : You have two external links: ISP1 (via CE1) and ISP2 (via CE2). You want traffic to prefer ISP1 for all outbound traffic. Network Topology : CE1 (connected to ISP1): 10.0.1.1/30 CE2 (connected to ISP2): 10.0.2.1/30 iBGP Router (Internal) connected to both CE1 (10.0.1.2/30) and CE2 (10.0.2.2/30). Configuration on CE1 (Higher Local Preference) : Create a route map to set the local preference to 200 for routes learned from CE1: route-map SET_LOCAL_PREF permit 10 set local-preference 200 In the BGP configuration for CE1, apply this route map to the neighbor: router bgp 65001 ne...

BGP MED: Managing Inbound Traffic with Multi-Exit Discriminator

The Multi-Exit Discriminator (MED) is used in BGP to control inbound traffic into your AS. It tells a neighboring AS which entry point into your network it should prefer when there are multiple links between your AS and the neighboring AS. The lower the MED value , the more preferred the path. MED is only honored between the same neighboring AS . Example Scenario : You are connected to ISP1 via two routers, CE1 and CE2 , and want to control which router ISP1 uses to send traffic into your AS. Network Topology : CE1 (connected to ISP1): 10.0.1.1/30 CE2 (connected to ISP1): 10.0.2.1/30 iBGP Router (Internal) connected to both CE1 (10.0.1.2/30) and CE2 (10.0.2.2/30). Configuration on CE1 (Lower MED, More Preferred) : Create a route map to set the MED to 50 for CE1: route-map SET_MED permit 10 set metric 50 Apply this route map to the neighbor in the BGP configuration for CE1: router bgp 65001 neighbor 10.0.1.1 remote-as 65000 neighbor 10.0.1.1 route-map SET_MED out Configuratio...