Ipv6 Cheat Sheet
Ipv6 Cheat Sheet
Ipv6 Cheat Sheet
ROUTER
# ip addr add 2001:db8::1/64 dev eth0 Option 1 (source link-layer) 00:03:ba:24:a9:6c (only when source IP is not ::)
NODE
fe80::21e:79ff:fe1e:f000 → ff02::1, ICMPv6 type 134 (RA), lifetime 1800s
To check the configuration use ifconfig eth0 or ip -6 addr show eth0. To make this config boot Option 2, Option 3 (prefix information) 2001:db8::/64, pltime = 7d, vltime = 30d
proof you have to add the IP to the network configuration files specific for your distribution. For Debian based
systems use /etc/network/interfaces, for Red Hat based systems use the corresponding ifcfg file After receiving the RS message a router sends a RA message to the all-nodes multicast address. The RA
in /etc/sysconfig/network-scripts/. Restart the network or reboot after editing the files to test the message contains, amongst others, information about the router lifetime (time in seconds the router expects
configuration. to be a default router), all available prefixes and their preferred (pltime) and valid (vltime) lifetimes. When
To use stateless address autoconfiguration (SAC) you normally just have to make sure, that IPv6 is enabled pltime reaches zero the address becomes deprecated and should not be used for new connections. When
along with the interfaces which should be configured automatically at boot time. the vltime reaches zero the address becomes invalid.
Solaris: As usual plumb and then configure the interface with ifconfig: Stateless Autoconfiguration SAC (RFC 4862)and Stateful Autoconfiguration DHCPv6 (RFC 3315)
SAC comes in handy when it's not important which exact address a node uses as long as it's properly
# ifconfig bge0 inet6 plumb up routable. SAC uses mechanisms of Neighbor Discovery.
# ifconfig bge0 inet6 addif 2001:db8::2/64 Steps taken during SAC presuming there were no DAD errors along the way: forming a link-local address →
Created new logical interface bge0:1 DAD for the link-local address → activating the link-local address and sending RS message(s) to ff02::2 →
forming a global address for each received prefix within an RA message with set "autonomous address-
Check the configuration with ifconfig -a6. configuration flag" → DAD for each tentative global address → addresses become valid and preferred (for
To make this permanent and being restored after booting add the line pltime > 0)
DHCPv6 can assign IPs and additional information like DNS/NTP Servers. A client sends a SOLICIT
addif 2001:db8::2/64 up message (type 1) to the All_DHCP_Relay_Agents_and_Servers multicast IP FF02::1:2. Servers answer with
a ADVERTISE message (2). The client chooses a server, sends a REQUEST message (3) and receives a
into the file /etc/hostname6.bge0. If you want to use SAC, simply leave /etc/hostname6.bge0 empty REPLY message (7) with configuration options. DAD has to be performed for every address received!
and have the package SUNWroute installed. Alternatively, and in coexistence with SAC, DHCPv6 can only provide clients with additional information like
DNS and NTP servers. The client sends a INFORMATION-REQUEST message (11) and receives the
Neighbor Discovery (ND): Neighbor Solicitation (NS) and Neighbor Advertisement (NA) options in a REPLY message (7). See RFC 3315 for detailed description of DHCPv6 messages and options.
Neighbor Solicitation (ICMPv6 type 135) messages are send to determine the link-layer address of a
IPv6 and DNS (RFC 3596)
neighbor (multicasts) or the verify that a neighbor is still reachable (unicasts).
The IPv6 equivalent to the IPv4 A Resource Record is the AAAA RR. No big difference there. The A6 RR with
2001:db8::1 → ff02::1:ff00:2 (destination is the solicited-node multicast address) additional fields for prefix length and prefix name defined in RFC 2874 was declared experimental in favour
INITIATOR
TARGET
ICMPv6 type 135, target 2001:db8::2, Option 1 (source link-layer addr) 00:03:ba:24:a9:6c
of AAAA RRs. See RFC 3363 and 3364 for more information and discussion.
2001:db8::2 → 2001:db8::1, ICMPv6 type 136, Flags: S
target 2001:db8::2, Option 2 (target link-layer) 00:03:ba:2e:02:c1 Reverse delegation is written in nibble format with the new domain IP6.ARPA. So 2001:db8::2 becomes
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.. The
In the example above node 2001:db8::1 wants to reach 2001:db8::2 but doesn't know the link-layer shorter bitstring/bitlabel format (RFC 2672 and 2673) was later discarded but may be still used by older
address of 2001:db8::2. So it sends a NS packet to the solicited-node multicast address of 2001:db8::2 resolvers (BIND > 8.3 and < 9.2.3). ipv6calc helps with the conversion!
(ff02::1:ff00:0/104 followed by the last 24 bits of the interface ID) along with its own link-layer
address and receives a NA (ICMPv6 type 136) packet with the targets link-layer address. The host command will look for both A and AAAA records, using dig you have to explicit ask for AAAA
records (dig host.example.com aaaa). Reverse lookups can as usual be done with host without
ND is also used for Duplicate Address Detection (DAD). To perform DAD the NS message is send with the further switches (host 2001:db8::1) or with dig using the -x switch (dig -x 2001:db8::1).
unspecified source IP :: and to the solicited-node multicast address of the IP which should be configured. If
there is already a node using this desired IP it will answer with a NA packet send to the all-node multicast Connect to IPv6 IPs on the Command Line or in a Browser
address ff02::1.
ping 6 IPv6 version of ping. Solaris ping supports IPv6 out of the box.
Connect to IPv6 IPs on the Command Line or in a Browser traceroute6 IPv6 versions of traceroute and tracepath. Also try mtr -6.
tracepath6
CLI # ssh '2001:db8:dead:f00d:203:baff:fe24:a9c6'
ip -6 Configure interfaces, routes, ND, list neighbors, multicasts....
# lynx http://[2001:db8:dead:f00d:203:baff:fe24:a9c6]
ipv6calc Powerful tool for all sorts of conversions and information gathering. See
# wget ftp://[2001:db8:dead:f00d:203:baff:fe24:a9c6] http://www.deepspace6.net/projects/ipv6calc.html
Browser http://[2001:db8:dead:f00d:203:baff:fe24:a9c6] tcpdump ip6 Packet sniffing tools with IPv6 options. Also works with options like icmp6.
snoop inet6