IP Technology Basics · Topic 5 of 5
IPv6 Basics and Configuration
Learn IPv6 address format and types, the IPv6 header, ICMPv6 and NDP, SLAAC, DAD and DHCPv6 flags, and IPv6 interface setup on Huawei VRP for HCIA-Datacom.
- 6 min
- 128 bits, eight hex groups, drop leading zeros, use
::only once. - GUA 2000::/3, ULA FC00::/7, LLA FE80::/10, multicast FF00::/8, no broadcast.
- Fixed 40 byte header, Hop Limit replaces TTL, no header checksum, routers do not fragment.
What it is
IPv6 is the successor to IPv4, created because the 32 bit IPv4 space ran out. An IPv6 address is 128 bits, which removes the address shortage that drove NAT and allows a simple fixed header and automatic address configuration.
ICMPv6 does much more than ICMP for IPv4. Through NDP (Neighbor Discovery Protocol) it replaces ARP, finds routers, hands out prefixes and detects duplicate addresses.
How it works
Address format
An address is eight groups of four hex digits separated by colons, such as 2001:0DB8:0000:0000:0008:0800:200C:417A. Two rules shorten it:
- Leading zeros in a group can be dropped: 2001:DB8:0:0:8:800:200C:417A.
- One run of all zero groups can be replaced by
::, only once: 2001:DB8::8:800:200C:417A.
Addresses are usually split into a 64 bit network prefix and a 64 bit interface ID.
Address types
IPv6 has unicast, multicast and anycast addresses. There is no broadcast; multicast does that job.
| Type | Prefix | Use |
|---|---|---|
| Global unicast (GUA) | 2000::/3 | Routed on the internet |
| Unique local (ULA) | FC00::/7 (FD00::/8 in practice) | Private, like IPv4 private ranges |
| Link local (LLA) | FE80::/10 | One link only; every IPv6 interface has one, generated automatically or set by hand |
| Loopback | ::1/128 | Local host |
| Unspecified | ::/128 | No address yet, used as source during DAD |
| Multicast | FF00::/8 | FF02::1 all nodes, FF02::2 all routers |
| Solicited node multicast | FF02::1:FF00:0/104 plus the last 24 bits of the unicast address | Target of NS messages |
An anycast address is a unicast address given to several devices. Packets go to the nearest one.
EUI-64 interface ID
An interface ID can be built from the 48 bit MAC address. Split the MAC in half, insert FFFE in the middle, and invert the seventh bit of the first byte.
For MAC 00E0-FC12-3456, the interface ID is 02E0:FCFF:FE12:3456.
The IPv6 header
The basic header is a fixed 40 bytes. Fields: Version (6), Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit (the TTL equivalent), and the source and destination addresses. There is no header checksum, and only the source host fragments, using an extension header. Optional functions sit in extension headers chained by Next Header.
ICMPv6 messages
ICMPv6 is identified by Next Header value 58.
| Type | Message | Purpose |
|---|---|---|
| 1 | Destination Unreachable | Same role as in IPv4 |
| 2 | Packet Too Big | Path MTU discovery, because routers do not fragment |
| 3 | Time Exceeded | Hop Limit reached 0 |
| 128 / 129 | Echo Request / Echo Reply | ping |
| 133 | Router Solicitation (RS) | Host asks routers to send an RA now |
| 134 | Router Advertisement (RA) | Router announces prefix, flags and gateway |
| 135 | Neighbor Solicitation (NS) | Address resolution and DAD |
| 136 | Neighbor Advertisement (NA) | Answer to NS, gives the link layer address |
| 137 | Redirect | Better next hop |
Duplicate Address Detection (DAD) runs before any address is used. The node sends an NS for its new address from source :: to the solicited node multicast group. If an NA comes back, the address is a duplicate and is not used.
Autoconfiguration
| Method | How it works |
|---|---|
| SLAAC (stateless) | Host takes the prefix from an RA and builds its own interface ID |
| Stateful DHCPv6 | A DHCPv6 server assigns the address and options |
| Stateless DHCPv6 | Address from SLAAC, other options such as DNS from DHCPv6 |
The RA flags tell hosts which to use. M flag set to 1 means get the address from DHCPv6. O flag set to 1 means get other settings from DHCPv6. Both 0 means SLAAC only.
Configuration example
IPv6 must be enabled globally and on each interface. Huawei routers do not send RAs by default.
[R1] ipv6
[R1] interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1] ipv6 enable
[R1-GigabitEthernet0/0/1] ipv6 address 2001:DB8:1::1 64
[R1-GigabitEthernet0/0/1] ipv6 address auto link-local
[R1-GigabitEthernet0/0/1] undo ipv6 nd ra halt
A second VRP device can act as a host on that link:
[R2] ipv6
[R2] interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1] ipv6 enable
[R2-GigabitEthernet0/0/1] ipv6 address auto global
ipv6 address auto link-local makes the interface generate its link-local address. ipv6 address 2001:DB8:1:: 64 eui-64 builds the address from the MAC instead. Static IPv6 routes use ipv6 route-static. Verify with display ipv6 interface brief and display ipv6 interface GigabitEthernet0/0/1.
A worked example
R2 is set to ipv6 address auto global but gets only a link local address. R1 has an IPv6 address on the link, but its interface still has RA suppressed by default.
After undo ipv6 nd ra halt on R1, R1 sends RAs carrying 2001:DB8:1::/64. R2 builds 2001:DB8:1:: plus its interface ID, runs DAD, and the global address appears.
How the exam asks about this
- "Which ICMPv6 message does a host send to ask routers for an RA?" → Router Solicitation, type 133.
- "Which address range is link local in IPv6?" → FE80::/10.
- "A host must get its address by SLAAC but its DNS server from DHCPv6. How are the RA flags set?" → M = 0 and O = 1.
What to remember for the exam
- 128 bits, eight hex groups, drop leading zeros, use
::only once. - GUA 2000::/3, ULA FC00::/7, LLA FE80::/10, multicast FF00::/8, no broadcast.
- Fixed 40 byte header, Hop Limit replaces TTL, no header checksum, routers do not fragment.
- ICMPv6 types: 133 RS, 134 RA, 135 NS, 136 NA, 128 and 129 echo.
- M flag means stateful DHCPv6 address, O flag means other options from DHCPv6.
Configuring an IPv6 address on a Huawei interface does not make it send RAs. RA sending must be turned on with undo ipv6 nd ra halt.
Common mistakes
Using :: twice. 2001::1::5 is invalid, because the receiver cannot know how many zero groups each :: stands for.
Thinking NDP uses broadcast. NS for address resolution goes to the solicited node multicast address. IPv6 has no broadcast at all.
Forgetting the global ipv6 command. Interface IPv6 commands do nothing useful until IPv6 is enabled in the system view and ipv6 enable is set on the interface.
Check yourself
What replaces ARP in IPv6?
NDP, using Neighbor Solicitation (135) and Neighbor Advertisement (136) messages.
What source address does a node use in a DAD Neighbor Solicitation?
The unspecified address
::, because the address being tested is not yet valid.What is the EUI-64 interface ID for MAC 00E0-FC12-3456?
02E0:FCFF:FE12:3456, made by inserting FFFE and inverting the seventh bit.
Topic 5 of 5 in IP Technology Basics
Test yourself on IP Technology Basics
The full Huawei HCIA-Datacom H12-811 question bank has 600 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Huawei. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.