Introduction To Ipv6: (Chapter 4 in Huitema)
Introduction To Ipv6: (Chapter 4 in Huitema)
Introduction To Ipv6: (Chapter 4 in Huitema)
(Chapter 4 in Huitema)
IPv6 addresses
• 128 bits long
• Written as eight 16-bit integers separated with colons
– E.g. 1080:0000:0000:0000:0000:0008:200C:417A
= 1080::8:800:200C:417A
• Types
– Unicast
• Defines one interface within their scope of validity
– Multicast
• Delivers packets to all members of a group
– Anycast
• Delivers packets to the nearest member of a group
IPv6 header
Version=6
Version=6(4)
(4) Traffic
Trafficclass
class(8)
(8) Flow
Flowlabel
label(24)
(24)
Payload
Payloadlength
length(16)
(16) Next
Nextheader
headertype
type(8)
(8) Hop
Hoplimit
limit(8)
(8)
Source
Sourceaddress
address(128)
(128)
Destination
Destinationaddress
address(128)
(128)
solicitated advertisement
update
updatecache
cache
solicitation
solicitation
solicitation
destination unreachable
remove
removefrom
fromcache
cache
calculate
calculatenew
newnext-hops
next-hops
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-12
Autoconfiguration can be stateful or stateless
new host router
router solicitation [link-local-addressÿall-routers]
Type
Type==133
133 Code
Code==00 Checksum
Checksum
Reserved
Reserved
Options....
Options....(link
(linklayer
layeraddress)
address)
router advertisement [ÿall-hosts / ÿlink-local-address]
Type
Type==134
134 Code
Code==00 Checksum
Checksum
Hop.limit
Hop.limit M
MOO Res.
Res. Router
Routerlifetime
lifetime
Reachable
Reachabletime
time
Retransmission
Retransmissiontimer
timer
Options....
Options....(prefix
(prefixinformation
informationoption)
option)
Stateful auto-
M=1 stateful
M=1 yes statefulconf.
conf.with
withconf.server
conf.server configuration
O=1
O=1 obtain
obtainother
otherparameters
parametersfrom
fromconf.server
conf.server similar to DHCP in
yes
IPv4
stateless
statelessconfiguration
configuration
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-13
Stateless autoconfiguration
Type
Type==134
134 Code
Code==00 Checksum
Checksum
Hop.limit
Hop.limit M
MOO Res.
Res. Router
Routerlifetime
lifetime
Reachable
Reachabletime
time
Retransmission
Retransmissiontimer
timer
Options....
Options....(prefix
(prefixinformation
informationoption)
option)
solicitation
1s
address
addressisisunique
unique
• Lost messages ÿ retry several times
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-15
Mobile IP
(Chapter 13 in Huitema)
HA
FA tunneling home address
care-of-address
MN
Home agents and foreign agents may be routers
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-18
Discovery and registration
MN ICMP agent advertisement FA HA
(COA address)
new
new location?
location?
Yes
register (COA address)
register (COA address)
grant?
grant?
reply Yes
reply
65635
0 256
Registration reply
• Registration reply message contains
– Message type = 3
– Reply code (granted or denied)
• Who denied (FA or HA)
• Why denied
– Accepted lifetime
• Same or smaller than requested lifetime
– Home address of MN
– HA address
– Request identification
• Same as in request
– Extensions
• E.g. authentication
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-24
Security issues (1)
• Attack types
– Attacker pretends to be a FA to capture traffic
– Attacker replays old registration messages
Compressed header:
• Minimal encapsulation, RFC-2004 Protocol type of encaps. packet
Source=HA,
Source=HA,Dest=COA,
Dest=COA, TCP
TCPheader
header (e.g. TCP), Destination address of
Compressed
Compressedheader
header
Protocol=Min.encaps=55
Protocol=Min.encaps=55 ++data
data encaps. packet, Optional source
address of encaps. packet, Header
New IP header Original IP packet checksum
Source=HA,
Source=HA,Dest=COA,
Dest=COA, Source=HA,
Source=HA,Dest=MN,
Dest=MN, Source=CN,
Source=CN,Dest=bc,
Dest=bc, UDP
UDPheader
header
Protocol=encaps
Protocol=encaps Protocol=encaps
Protocol=encaps Protocol=UDP
Protocol=UDP ++data
data
FA
HA
MN CN
MN FA FA HA
ICMP router advertisement
. . .
Mobile IPv6
(Chapter 13 in Huitema)
Discovery
• The MN and FA are usually colocated ÿ No separate FA
• Hosts listen to router advertisements to the learn prefixes
of the link
– Hosts can detect that they are visiting a foreign network
• COA obtained with address configuration procedures
• Routers willing to act as home agents indicate it in the
router advertisement
MN HA
packets packets
Note: if the COA
changes a new binding Binding update
update must be sent to ack
Binding ack ack requested
requested
all CNs that are Yes
sending directly
packets
no
no update
update and
and
Binding request timer
timer expires
expires
Yes
want
want to
to update
update
Yes Binding update
ack
ack requested
requested
Binding ack Yes
S-38.121 / Fall-04 / N Beijar IPv6,Mobility-39
IPv6 uses the routing header
instead of encapsulation
MN HA CN