7
Mobile IPv6: Protocols and Implementation Qing Li Blue Coat Systems, Inc. Tatuya Jinmei Toshiba Corporation Keiichi Sbima Internet Initiative Japan, Inc. JugL ELSEVIER M AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO MORGAN Morgan Kaufmann Publishers is an imprint of Elsevier KAUFMANN

Mobile IPv6: Protocols and Implementation

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Mobile IPv6: Protocols and Implementation

Qing Li Blue Coat Systems, Inc.

Tatuya Jinmei Toshiba Corporation

Keiichi Sbima Internet Initiative Japan, Inc.

JugL ELSEVIER

M AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO

SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO M O R G A N Morgan Kaufmann Publishers is an imprint of Elsevier K A U F M A N N

Contents

About the Authors xi

1 Introduction 1 1.1 History of IP Mobility 2

1.2 Benefit of IP Mobility 3

1.3 Supplemental Technologies of Mobile IPv6 5 1.4 Coverage of this Book 16

2 Mobile IPv6 Overview 17 2.1 Types of Nodes 18 2.2 Basic Operation of Mobile IPv6 19

3 Header Extension 25 3.1 Alignment Requirements 26 3.2 Home Address Option 26 3.3 Type 2 Routing Header 27 3.4 Mobility Header 28

3.5 Mobility Options 36 3.6 Neighbor Discovery Messages 39 3.7 ICMPv6 Messages 42

v

VI Contents

4 Procedure o f Mobile IPv6 47 4.1 Protocol Constants and Variables 47 4.2 Home Registration 47 4.3 Bidirectional Tunneling 51 4.4 Intercepting Packets for a Mobile Node 54 4.5 Returning Home 54

5 Route Optimization 57 5.1 Return Routability 58 5.2 Sending Initial Messages 58 5.3 Responding to Initial Messages 59 5.4 Computing a Shared Secret 6l 5.5 Verifying Message 62 5.6 Security Considerations 64 5.7 Deregister Binding for Correspondent Nodes 64 5.8 Backward Compatibility 64 5.9 Movement Detection 66

Dynamic H o m e Agent Address Discovery 67

/ Mobile Prefix Solicitation/Advertisement 71

8 Relat ionship w i t h IPsec 75

У Code Introduction 79 9.1 Statistics 79

I I I Mobile IPv6-related Structures 83 10.1 Files 83 10.2 Mobility Header Message: ip6_mh{} Structure 84 10.3 Binding Refresh Request Message: i p 6 _ m h _ b i n d i n g _ r e q u e s t {}

Structure 85 10.4 Home Test Init Message: i p 6 _ m h _ h o m e _ t e s t _ i n i t {}

Structure 86 10.5 Care-of Test Init Message: i p 6 _ m h _ c a r e o f _ t e s t _ i n i t {}

Structure 87 10.6 Home Test Message: ip6_mh_home_tes t{} Structure 87

Contents

10.7 Care-of Test Message: i p 6 _ m h _ c a r e o f _ t e s t { } Structure 88

10.8 Binding Update Message: i p6_mh_b ind ing_upda t e{} Structure 89

10.9 Binding Acknowledgment Message: ip6_mh_bind ing_ack{} Structure 90

10.10 Binding Error Message: i p 6 _ m h _ b i n d i n g _ e r r o r { } Structure 92

10.11 Mobility Option Message Structures 92 10.12 Mobility Option Message: ip6_mh_opt{} Structure 93 10.13 Binding Refresh Advice Option: ip6_mh_opt_ re f r e s h _ a d v i c e { }

Structure 93 10.14 Alternate Care-of Address Option: i p 6 _ m h _ o p t _ a l t c o a { }

Structure 94 10.15 Nonce Index Option: ip6_mh_opt_nonce_ index{}

Structure 94 10.16 Authentication Data Option: i p 6 _ m h _ o p t _ a u t h _ d a t a { }

Structure 95 10.17 The Internal Mobility Option: m i p 6 _ m o b i l i t y _ o p t i o n s { }

Structure 95 10.18 Home Address Option: i p 6 _ o p t _ h o m e _ a d d r e s s { }

Structure 96 10.19 Type 2 Routing Header: i p 6 _ r t h d r 2 {} Structure 96 10.20 The Modified Router Advertisement Message: n d _ r o u t e r _ a d v e r t { }

Structure 97 10.21 The Modified Prefix Information Option: nd_opt__pref i x _ i n f о {}

Structure 98 10.22 Advertisement Interval Option: n d _ o p t _ a d v _ i n t e r v a l { }

Structure 99 10.23 Home Agent Information Option: nd_op t_homeagen t_ in f о {}

Structure 99 10.24 Dynamic Home Agent Address Discovery Request

Message: mip6_dhaad_req{} Structure 99 10.25 Dynamic Home Agent Address Discovery Reply

Message: mip6_dhaad_rep{} Structure 100 10.26 Mobile Prefix Solicitation Message: mip6_pref i x _ s o l i c i t { }

Structure 101 10.27 Mobile Prefix Advertisement Message: m i p 6 _ p r e f i x _ a d v e r t { }

Structure 101 10.28 Binding Cache Entry: mip6_bc{} Structure 102

Vlll Contents

10.29 Binding Update List Entry: mip6_bu{} Structure 104 10.30 Home Agent Entry: mip6_ha{} Structure 106 10.31 Prefix Entry: m i p 6 _ p r e f i x { } Structure 107 10.32 Home Virtual Interface: h i f _ s o f t c { } Structure 108

I, JL Macro and Type Def init ions 113

1 2 Utility Functions 117 12.1 Global Variables 117 12.2 Files 117

12.3 Creation of IPv6 Header 117 12.4 Checksum Computation 120

1 3 C o m m o n Mobility Header Process ing 123 13.1 Files 123 13.2 Mobility Header Input 123 13.3 Generating Binding Error Messages 129 13.4 Rate Limitation of Binding Error Messages 130 13.5 Creation of Binding Error Message 131 13.6 Mobility Header Message Delivery to Raw Sockets 133

1 4 H o m e Agent and Correspondent Node 137 14.1 Files 137 14.2 Binding Update Message Input 138

14.3 Binding Cache Entry Management 146 14.4 Mobility Options Processing 156 14.5 Validation of Binding Update Message for Correspondent

Node 157 14.6 Kbm and Authorization Data Computation 159 14.7 Managing Binding Cache Entry as Correspondent Node 163 14.8 Sending Binding Refresh Request Message 167 14.9 Home Registration Processing 170 14.10 The DAD Procedure 176 14.11 Proxy Neighbor Discovery Control 183 14.12 Home Deregistration Procedure 188 14.13 Sending a Binding Acknowledgment Message 190 14.14 Nonce and Nodekey Management 197 14.15 Receiving a Home Address Option 201

Contents

14.16 Sending Packets to Mobile Nodes via Tunnel 208 14.17 Recovery of Temporarily Disabled Proxy Entry 212

14.18 Receiving ICMPv6 Error Messages 214

14.19 Home Agent List Management 218 14.20 Prefix List Management 231 14.21 Sending a Mobile Prefix Advertisement Message 232 14.22 Constructing the Payload 234

Mobüe Node 237 15.1 Files 237 15.2 Binding Update List Entry Management 237 15.3 Movement Detection 247 15.4 Configuring Home Addresses 259 15-5 Sending a Binding Update Message 268 15.6 Receiving a Binding Acknowledgment Message 283 15.7 Receiving a Type 2 Routing Header 296 15.8 Receiving a Binding Refresh Request Message 300 15-9 Receiving a Binding Error Message 301

15.10 Source Address Selection 304

15.11 Home Agent List Management 309 15.12 Prefix Information Management 318 15.13 Receiving Prefix Information by Router Advertisement

Messages 330 15.14 Sending a Mobile Prefix Solicitation Message 338 15.15 Receiving a Mobile Prefix Advertisement Message 341 15.16 Sending a Dynamic Home Agent Address Discovery

Request Message 349 15.17 Receiving a Dynamic Home Agent Address Discovery

Reply Message 353 15.18 Receiving ICMPv6 Error Messages 357 15.19 State Machine 360 15.20 Primary State Machine 362 15.21 Secondary State Machine 381 15.22 Virtual Home Interface 387 15.23 Return Routability and Route Optimization 400 15.24 Route-Optimized Communication 417 15.25 Tunnel Control 426 15.26 Receiving Packets from a Tunnel 430 15.27 I/O Control 431

x Contents

1 б Mobile IPv6 Operation 435 16.1 Rebuilding a Kernel with Mobile IPv6 Extension 435 16.2 Rebuilding User Space Programs 436 16.3 IPsec Signal Protection 437 16.4 Configuring Node 440 16.5 Viewing Status Information 442 16.6 Viewing Statistics 443

Appendix: The Manual Page of m i p 6 c o n t r o l 445 A.l Name 445 A. 2 Synopsis 445 A.3 Description 445 A.4 Examples 446 A. 5 History 447 A. 6 Bugs 447

References 449 Index 451