Ipv6: Difference between revisions

From Lucca's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Tag: Manual revert
Line 1: Line 1:
In order for ipv6 to work on a cisco router, you may need to enable ipv6 by typing <code>ipv6 unicast routing</code> [[Cisco_Commands:#ipv6]]
In order for ipv6 to work on a cisco router, you may need to enable ipv6 by typing <code>ipv6 unicast routing</code> [[Cisco_Commands#ipv6]]


Preferred Format
Preferred Format

Revision as of 22:59, 28 October 2025

In order for ipv6 to work on a cisco router, you may need to enable ipv6 by typing ipv6 unicast routing Cisco_Commands#ipv6

Preferred Format

The previous figure also shows that the preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, with each x consisting of four hexadecimal values. The term octet refers to the eight bits of an IPv4 address. In IPv6, a hextet is the unofficial term used to refer to a segment of 16 bits, or four hexadecimal values. Each x is a single hextet which is 16 bits or four hexadecimal digits.

Preferred format means that you write IPv6 address using all 32 hexadecimal digits. It does not necessarily mean that it is the ideal method for representing the IPv6 address. In this module, you will see two rules that help to reduce the number of digits needed to represent an IPv6 address.

These are examples of IPv6 addresses in the preferred format.

 2001 : 0db8 : 0000 : 1111 : 0000 : 0000 : 0000: 0200  
 2001 : 0db8 : 0000 : 00a3 : abcd : 0000 : 0000: 1234  
 2001 : 0db8 : 000a : 0001 : c012 : 9aff : fe9a: 19ac  
 2001 : 0db8 : aaaa : 0001 : 0000 : 0000 : 0000: 0000  
 fe80 : 0000 : 0000 : 0000 : 0123 : 4567 : 89ab: cdef  
 fe80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000: 0001  
 fe80 : 0000 : 0000 : 0000 : c012 : 9aff : fe9a: 19ac  
 fe80 : 0000 : 0000 : 0000 : 0123 : 4567 : 89ab: cdef  
 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000: 0001  
 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000: 0000  

The first rule to help reduce the notation of IPv6 addresses is to omit any leading 0s (zeros) in any hextet. Here are four examples of ways to omit leading zeros:

   01ab can be represented as 1ab
   09f0 can be represented as 9f0
   0a00 can be represented as a00
   00ab can be represented as ab

This rule only applies to leading 0s, NOT to trailing 0s, otherwise the address would be ambiguous. For example, the hextet abc could be either 0abc or abc0, but these do not represent the same value.


The second rule to help reduce the notation of IPv6 addresses is that a double colon (::) can replace any single, contiguous string of one or more 16-bit hextets consisting of all zeros. For example, 2001:db8:cafe:1:0:0:0:1 (leading 0s omitted) could be represented as 2001:db8:cafe:1::1. The double colon (::) is used in place of the three all-0 hextets (0:0:0).

The double colon (::) can only be used once within an address, otherwise there would be more than one possible resulting address. When used with the omitting leading 0s technique, the notation of IPv6 address can often be greatly reduced. This is commonly known as the compressed format.

Here is an example of the incorrect use of the double colon: 2001:db8::abcd::1234.

The double colon is used twice in the example above. Here are the possible expansions of this incorrect compressed format address:

   2001:db8::abcd:0000:0000:1234
   2001:db8::abcd:0000:0000:0000:1234
   2001:db8:0000:abcd::1234
   2001:db8:0000:0000:abcd::1234

If an address has more than one contiguous string of all-0 hextets, best practice is to use the double colon (::) on the longest string. If the strings are equal, the first string should use the double colon (::). Omitting Leading 0s and All 0 Segments



Sources


Cisco Netacad CCNA 1 module 12: Ipv6 Addressing