Chapter 5. IPv6
Chapter 5. IPv6
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
COURSE
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1993
COMPUTER NETWORKS 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Chapter
IP VERSION 6
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
05
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
Allocated
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
Reference: Peter L Dordal, “An Introduction to Computer Networks,” Jul 26, 2019 Unavailable 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
Available
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
16,777,216 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
addresses
Lecturer: Nguyen Viet Ha, Ph.D. Email: nvha@[Link] Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 2
IPv6 – Why We Need More Address Space IPv6 – Why We Need More Address Space
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2000 2007
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
Allocated Allocated
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
Unavailable 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 Unavailable 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
Available Available
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
16,777,216 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 16,777,216 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
addresses addresses
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 3 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 4
IPv6 – Why We Need More Address Space IPv6 – Why We Need More Address Space
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
2009
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2010 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
Allocated Allocated
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
Unavailable 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 Unavailable 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
Available Available
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
16,777,216 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 16,777,216 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
addresses addresses
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 5 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 6
IPv6 – Why We Need More Address Space IPv6 – Why We Need More Address Space
128-bit
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 10
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 11 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 12
1. The IPv6 Header
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 13
Example: 1843:f01::22::fa
1843:0f01:0000:0000:0022:0000:0000:00fa ?
1843:0f01:0000:0000:0000:0022:0000:00fa ?
1843:0f01:0000:0022:0000:0000:0000:00fa ?
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 17 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 18
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 19 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 20
2. IPv6 Addresses 2. IPv6 Addresses
❖EUI-64 ❖EUI-64
➢Review MAC ➢A major privacy concern:
Address: o No matter where a host connects to the Internet –
home or work or airport or Internet cafe
o "c" is the bits of the assigned company_id, ▪ Such an interface identifier always remains the
o "m" is the bits of the manufacturer selected extension same, and thus serves as a permanent host
identifier. fingerprint.
o “U" is the value of the Universal/Local bit.
▪ 0: Universal, i.e., MAC address is the burned-in-address
➢Now discouraged for personal workstations and mobile
(BIA)
devices. (Only for some fixed-location hosts)
▪ 1: Local, i.e., MAC address that has been changed locally
o “G" is individual/group bit
▪ 0: individual (i.e., unicast)
▪ 1: group (i.e., multicast/broadcast)
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 21 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 22
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 23 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 24
2. IPv6 Addresses
❖Anycast addresses:
➢Assigned to each of a set of routers/servers.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 25
❖Routers still uses CIDR (10.1 Classless Internet Domain ➢The former allows 64–48 = 16 bits for local “subnet”
Routing: CIDR) and still bases forwarding decisions on specification within a 64-bit network prefix
prefixes shorter than /64.
➢The latter (“/56”) allows 8 subnet bits.
❖64-bit network prefixes are supplied by a provider, and
which represent the first half of globally routable IPv6
addresses.
➢These are the prefixes that will be visible to the outside
world.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 27 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 28
2. IPv6 Addresses
❖Unique Local Unicast Address:
➢Corresponding to IPv4 private address blocks like
[Link]/16, [Link]/12, and [Link]/8.
➢The first 8 bits of a unique-local prefix are 1111 1101
(fd00::/8).
➢The related prefix 1111 1100 (fc00::/8) is reserved for
future use.
4 IPv6 Multicast
➢The last 16 bits of a 64-bit unique-local prefix represent
the subnet ID, and are assigned either administratively
or via autoconfiguration.
➢The 40 bits in between, from bit 8 up to bit 48,
represent the Global ID.
o A site is to set the Global ID to a pseudorandom
value.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 29
❖ff02::2
➢All-routers.
➢Ethernet multicast address: 33:33:00:00:00:02.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 31 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 32
4. IPv6 Multicast
❖IPv6 nodes on Ethernets send LAN-layer Multicast Listener
Discovery (MLD) messages to multicast groups they wish to
start using.
➢These messages allow multicast-aware Ethernet switches
to optimize forwarding so that only those hosts that have
subscribed to the multicast group in question will receive
the messages.
5 IPv6 Extension Headers
➢Otherwise, switches are supposed to treat multicast like
broadcast;
➢Worse case, some switches may simply fail to forward
multicast packets to destinations that have not explicitly
opted to join the group.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 33
❖Routing header
❖Fragment header
❖Authentication header
❖Mobility header
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 41 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 42
6
➢Generally speaking, fragmentation should be avoided at
the application layer when possible. Neighbor Discovery
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 43
6. Neighbor Discovery 6. Neighbor Discovery
❖A set of related protocols that replaces several IPv4 tools, ❖Router Discovery
most notably ARP, ICMP redirects and most non-address- ➢IPv6 routers periodically send Router Advertisement (RA)
assignment parts of DHCP. packets to the all-nodes multicast group.
o Hosts can request an RA packet immediately by
❖Provides the following services: sending a Router Solicitation (RS) request to the all-
routers multicast group.
➢Finding the local router(s)
➢Finding the set of network address prefixes that can be
reached via local delivery. ➢RA packets contain:
➢Finding a local host’s LAN address, given its IPv6 address. o Identification of the routers,
➢Detecting duplicate IPv6 addresses. o A list of all network address prefixes in use on the
LAN.
➢Determining that some neighbors are now unreachable
o An agreed-on MTU.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 45 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 46
➢DHCPv6.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 50
➢The host sends one or more Neighbor Solicitation o If the DAD process fails for an address based on an
messages, asking if any other host has this address. EUI-64 identifier, then some other node has the same
o If anyone answers, then the address is a duplicate. Ethernet address and you have bigger problems than
just finding a working IPv6 address.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 51 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 52
7. IPv6 Host Address Assignment 7. IPv6 Host Address Assignment
❖Stateless Autoconfiguration (SLAAC) ❖Stateless Autoconfiguration (SLAAC)
➢Host generates its link-local address, appending the ➢If there is a router available.
standard 64-bit link-local prefix fe80::/64 to its interface o The host send a RS message.
identifier. o A router answers with a RA message that contains a
➢Derived from the host’s LAN address using either EUI-64 Prefix Information option.
or the RFC 7217 mechanism. ▪ RA message will mark with a flag those prefixes
eligible for use with SLAAC.
▪ All prefixes will also be marked with a lifetime.
o The host chooses an appropriate prefix, stores the
prefix-lifetime information, and appends the prefix to
the front of its interface identifier
▪ This is a routable address.
➢Do DAD.
o Do DAD.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 53 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 54
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 55 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 56
7. IPv6 Host Address Assignment 7. IPv6 Host Address Assignment
❖DHCPv6
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 57 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 58
8. ICMPv6
❖As part of the Neighbor Discovery Protocol.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 60
8. ICMPv6 8. ICMPv6
❖Destination Unreachable ❖Destination Unreachable
➢In this case, one of the following numeric codes is returned: ➢In this case, one of the following numeric codes is returned:
0: No route to destination, returned when a router has 3: Address unreachable, a catchall category for routing
no next_hop entry. failure not covered by any other message. An example is if
the packet was successfully routed to the last_hop router,
1: Communication with destination administratively but Neighbor Discovery failed to find a LAN address
prohibited, returned when a router has a next_hop entry, corresponding to the IPv6 address.
but declines to use it for policy reasons. Codes 5 and 6,
below, are special cases of this situation; these more- 4: Port unreachable, returned when, as in ICMPv4, the
specific codes are returned when appropriate. destination host does not have the requested UDP port
2: Beyond scope of source address, returned when a open.
router is, for example, asked to route a packet to a global
address, but the return address is not, e.g., is unique-local. 5: Source address failed ingress/egress policy, see
In IPv4, when a host with a private address attempts to code 1
connect to a global address, NAT is almost always involved.
6: Reject route to destination, see code 1.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 61 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 62
8. ICMPv6
❖Packet Too Big
➢This is like ICMPv4’s “Fragmentation Required but Don’t
Fragment flag set”; IPv6 however has no router-based
fragmentation.
❖Time Exceeded
➢This is used for cases where the Hop Limit was exceeded,
and also where source-based fragmentation was 9 IPv6 Subnets
used and the fragment-reassembly timer expired.
❖Parameter Problem
➢This is used when there is a malformed entry in the IPv6
header, an unrecognized Next Header type, or an
unrecognized IPv6 option.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 63
9. IPv6 Subnets 9. IPv6 Subnets
❖In IPv6, this is much simpler: all subnets are of size /64. ❖If users are given only “/64” blocks, and they want to use
➢There is one common exception: RFC 6164 permits the subnets.
use of 127-bit prefixes at each end of a point-to-point ➢They have to break the 64/64 rule locally.
link. The 128th bit is then 0 at one end and 1 at the other. o Perhaps they can create four subnets each with a
prefix of length 66 bits, and each with only 62 bits for
❖A site receiving from its provider an address prefix of size the host identifier.
/56 can assign up to 256 “/64 subnets”. o Wanting to do that in a standard way would dictate
more flexibility in the prefix/host division.
Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 65 Lecturer: Nguyen Viet Ha, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 66
QA