Proxy Mobile IPv6(PMIPv6) 을 위한 ns-2 코드 및 예제 한국기술교육대학교 한연희 교수 고려대학교 컴퓨터학과 최현영 2010 년 2 월 2 일 ns-2 기초 및 무선 / 이동 네트워크.

Slides:



Advertisements
Similar presentations
IPv6 Mobility Support Henrik Petander
Advertisements

1 Introduction to Mobile IPv6 IIS5711: Mobile Computing Mobile Computing and Broadband Networking Laboratory CIS, NCTU.
MIP Extensions: FMIP & HMIP
1Nokia Siemens Networks Presentation / Author / Date University of Twente On the Security of the Mobile IP Protocol Family Ulrike Meyer and Hannes Tschofenig.
1 Mobility Management for All-IP Mobile Networks: Mobile IPv6 vs. Proxy Mobile IPv6 Ki-Sik Kong; Wonjun Lee; Korea University Youn-Hee Han; Korea university.
Distributed mobility management in the context of the MEDIEVAL project MEVICO Final Seminar, part 2 23 rd November 2012 Carlos J. Bernardos, UC3M
Adaptive Context Transfer Scheme for Fast Handoff in Proxy Mobile IPv6 Sept. 19, 2008 Jaejong Baek, Jooseok Song {jjb27, Department.
Dynamic Tunnel Management Protocol for IPv4 Traversal of IPv6 Mobile Network Jaehoon Jeong Protocol Engineering Center, ETRI
Network Localized Mobility Management using DHCP
資 管 Lee Lesson 12 IPv6 Mobility. 資 管 Lee Lesson Objectives Components of IPv6 mobility IPv6 mobility messages and options IPv6 mobility data structures.
Simulation of GPRS MS-BS Interface Using ns-Network Simulator Dual Degree Presentation by Richa Jain (96D07007) Department of Electrical Engineering, Indian.
Network-Based Mobility Management in the Evolved 3GPP Core Network
Mobile IP Polytechnic University Anthony Scalera Heine Nzumafo Duminda Wickramasinghe Edited by: Malathi Veeraraghavan 12/05/01.
Performance Validation of Mobile IP Wireless Networks Syed Shahzad Ali Muhammad Saqib Ilyas Advisor: Dr. Ravi Pendse.
Wireless Networking and Systems CSE 590 ns2 tutorial.
NS-3를 이용한 Proxy Mobile IPv6 시뮬레이션 구현 및 예제
1 Handover for PMIPv6 Using MIH KANG Joon-Suk 姜 俊錫.
Mobile IP, PMIP, FMC, and a little bit more
미래인터넷의 이동 네트워크 구조 연구 동향 한국기술교육대학교 한연희 (Youn-Hee Han)
Proxy MIPv6 구현기술 및 전망 Youn-Hee Han Korea University of Technology and Education Internet Computing Laboratory
NS-3를 이용한 Proxy Mobile IPv6 Simulation
1 / 10 Mobile Networking in ns Speaker : Mark Yang
1 /160 © NOKIA 2001 MobileIPv6_Workshop2001.PPT / / Tutorial Mobile IPv6 Kan Zhigang Nokia Research Center Beijing, P.R.China
NS2 - Wireless Network Ming-Feng Yang. 2 2 Outline Basic wireless model Extensions wireless model Example - Ad hoc network Example – WLAN Example – Mobile.
I-D: draft-rahman-mipshop-mih-transport-01.txt Transport of Media Independent Handover Messages Over IP 67 th IETF Annual Meeting MIPSHOP Working Group.
1 Sideseadmed (IRT0040) loeng 5/2010 Avo
Seamless Handover Scheme for Proxy Mobile IPv6 Ju-Eun Kang, LGDACOM CORPORATION/Research Institute of Technology, Korea Dong-Won Kum, Yang Li, and You-Ze.
Future Internet Presentation Kyung Hee University, Seok Hyun Hwang( 황석현 ) Seamless Handover in Proxy MIPv6 with AAA Server ( 이종망간 빠른 이동성 제공을.
IPv6 이동성기술 표준화 동향 - 네트워크 기반 이동성 관리 기술 중심 - Youn-Hee Han Korea University of Technology and Education Laboratory of Intelligent Networks.
네트워크 기반 지역 이동성 지원 프로토콜 적용 기술 Internet Computing KUT ( Youn-Hee Han.
1 Motorola PMIPv4 Call Flows: Bearer Setup with Dual Anchoring Parviz YeganiVojislav VuceticAlmon Tang (408) (732) (847)
Convergence & Handoff Issues in Next-Generation Wireless Networks Jaydip Sen.
IETF에서의 이동성 관련 표준화 상황 -Proxy Mobile IPv6 (PMIPv6) 중심으로-
IPv6 and Mobility in WiBro Youn-Hee Han Korea University of Technology and Education Internet Computing Laboratory
1 IETF 78: NETEXT Working Group IPSec/IKEv2 Access Link Support in Proxy Mobile IPv6 IPSec/IKEv2-based Access Link Support in Proxy Mobile IPv6 Sri Gundavelli.
Mobile IP Outline Intro to mobile IP Operation Problems with mobility.
Shall we apply paging technologies to proxy mobile IPv6? J.-H. Lee, T.-M. Chung, S. Pack, and S. Gundavelli 1 in Proceedings of the 3rd international workshop.
Transient BCE for Proxy Mobile IPv6 draft-ietf-mipshop-transient-bce-pmipv6-00.txt Oliver Marco
1 NetLMM Vidya Narayanan Jonne Soininen
Proxy Mobile IPv6 (PMIPv6) Youn-Hee Han Korea University of Technology and Education Internet Computing Laboratory
Advanced Roaming & Mobility Scenarios in IPv6 Rafal Lukawiecki Strategic Consultant & Director Project Botticelli Ltd in.
Understanding IPv6 Slide: 1 Lesson 12 IPv6 Mobility.
Introduction to Mobile IPv6
Performance Validation of Mobile IP Wireless Networks Presented by Syed Shahzad Ali Advisor Dr. Ravi Pendse.
Santhosh Rajathayalan ( ) Senthil Kumar Sevugan ( )
Service Flow Identifier in Proxy Mobile IPv6 draft-hui-netext-service-flow- identifier-03.
IP Mobility Management 핵심 기술 및 최신 표준 동향
Mobile IP Definition: Mobile IP is a standard communication protocol, defined to allow mobile device users to move from one IP network to another while.
Network Mobility (NEMO) Advanced Internet 2004 Fall
21-07-xxxx IEEE MEDIA INDEPENDENT HANDOVER DCN: Title: Network based Distributed Mobility Approach Date Submitted: July,
네트워크 인지적 Dual-Stack IP 이동성 및 멀티호밍 기술 Youn-Hee Han Korea University of Technology and Education Internet Computing Laboratory
IP Mobility Management - 핵심 기술 및 최신 표준 동향 -
Logical Interface and Flow Mobility Technology Laboratory of Intelligent Networks KUT Youn-Hee Han November 26, 2010 Global.
Network Mobility Support using Mobile MAG in Proxy Mobile IPv6 Domain draft-sijeon-netext-mmag-pmip-00.txt Seil Jeon (Presenter), Behcet Sarikaya, Rui.
IEEE MEDIA INDEPENDENT HANDOVER DCN: Title: IETF Liaison Report Date Submitted: May 14, 2009 Presented at IEEE session.
Software-Defined Networking in Heterogeneous Radio Access Networks TNC 2014 Conference, Dublin Hao Yu, DTU/NORDUnet May 21, 2014.
ROUTING MOBILE IP  Motivation  Data transfer  Encapsulation.
Network-based Localized Mobility Management
MN Status Option for Proxy Mobile IPv6
Booting up on the Home Link
with distributed anchor routers
draft-jeyatharan-netext-pmip-partial-handoff-02
2002 IPv6 技術巡迴研討會 IPv6 Mobility
© Model Engineering College
Unit 3 Mobile IP Network Layer
IEEE MEDIA INDEPENDENT HANDOVER
IPv4/v6 Mobility & Proxy Mobile IPv6
NETLMM 및 IETF 이동성기술 표준화 동향
Mobility Support in Wireless LAN
Presentation transcript:

Proxy Mobile IPv6(PMIPv6) 을 위한 ns-2 코드 및 예제 한국기술교육대학교 한연희 교수 고려대학교 컴퓨터학과 최현영 2010 년 2 월 2 일 ns-2 기초 및 무선 / 이동 네트워크 시뮬레이션 단기강좌

Table of Contents PMIPv6 Overview ▫PMIPv6 Feature & Operation ▫Next Research Items Code Overview ▫Major Objects & Block Diagram Code Details ▫Initialization ▫Binding Update Process ▫Data Process Simulation Example 2

3

Recent Trend of IP Mobility Network-based! ▫No change to host ▫Mobility handled by the network, often transparent to the host ▫2006~2009 IETF’s much activities  Working Groups  NetLMM (Network-based Localized Mobility Management)  NetExt, Mext, Mipshop, Mif, Mip4 ▫3GPP/PP2 and WiMAX operators are now showing their STRONG interests for network-based IP mobility solution 4

Why Network-based? Host-based IP Mobility (CMIPv4/v6) has not been widely deployed due to several factors ▫Implementation issues  IPsec and IKEv1 ▫Deployment issues  Negligible deployment of IPv6  no cohesive mobility architecture ▫Operational issues  Layer 3 signalling via radio link ▫Layer 8 issues (Financial/Human/Political/FUD/…)  Many operators elected to create their own protocols (e.g., GTP), or  They picked other IETF mobility protocols (Proxy MIP etc.)  Money! [CMIPv6’s Problems] 1) Too heavy specification to be implemented at a small terminal - RFC 3344 (MIPv4): 99 pages - RFC 3775 (MIPv6): 165 pages 2) Battery problem 3) Waste of air resource 4) No Stable MIPv4/v6 stack executed in Microsoft Windows (Mobile) OS [CMIPv6’s Problems] 1) Too heavy specification to be implemented at a small terminal - RFC 3344 (MIPv4): 99 pages - RFC 3775 (MIPv6): 165 pages 2) Battery problem 3) Waste of air resource 4) No Stable MIPv4/v6 stack executed in Microsoft Windows (Mobile) OS 5

Proxy Mobile IPv6 [IETF RFC 5213, August 2008] LMM (Localized Mobility Management) Domain MAG LMA Proxy Binding Update/Ack. (PBU/PBA) Control messages exchanged by MAG to LMA to establish a binding between MN-HoA and Proxy-CoA Home Network Proxy Care of Address (Proxy-CoA) The address of MAG That will be the tunnel end-point IP Tunnel IP-in-IP tunnel between LMA and MAG MAG LMA: Localized Mobility Agent MAG: Mobile Access Gateway LMA Address (LMAA) MN’ Home Address (MN-HoA) MN continues to use it as long as it roams within a same domain That will be the tunnel entry-point MN’s Home Network (Topological Anchor Point) MN’s Home Network Prefix (MN-HNP) CAFE:2:/64 movement 6

No Change to Host Stack IP Mobility handled by the network, and transparent to the host Any MN is just a IPv6 host with its protocol operation consistent with the base IPv6 specification. Home in Any Place MAG sends the RA (Router Advertisement) messages advertising MN’s home network prefix and other parameters MAG will emulate the home link on its access link. RA Unicast RA should be UNICASTed to an MN It will contain MN’s Home Network Prefix  Per-MN Prefix M:1 Tunnel LMA-MAG tunnel is a shared tunnel among many MNs. One tunnel is associated to multiple MNs’ Binding Caches. IPv4 Support draft-ietf-netlmm-pmip6-ipv4-support-17.txt (Sept. 2009) PMIPv6 Features 7

RA*: MN 의 Prefix 를 Policy Store 에서 수신한 경우의 Router Advertisement RA**: MN 의 Prefix 를 LMA 에서 수신한 경우의 Router Advertisement MNMAGAAA&Policy StoreLMACN MN Attachment AAA Query with MN-ID AAA Reply with Profile RA* PBU with MN-ID, Home Network Prefix option, Timestamp option PBA with MN-ID, Home Network Prefix option RA** [MN-HoA:CN](data) [Proxy-CoA:LMAA][MN-HoA:CN](data) [MN-HoA:CN](data) Tunnel Setup PBU: Proxy Binding Update PBA: Proxy Binding Ack. DHCP Server DHCP Request DHCP Response DHCP Request DHCP Response Optional PMIPv6 Operation Flow 8

PMIPv6 over WiBro/ WiMAX Previous MAG TTA 단체표준, “ 와이브로에서의 프록시 모바일 IPv6 적용,” TTAK.KO , Dec "WiMAX Forum Network Architecture (Stage 3: Detailed Protocols and Procedures) Release 1 Version 1.2.3“, Jul IP Network Internet E R ACR/MAG L2 Switch BS/RAS PSS HA or LMA AAA/Policy Store ACRACR ACRACR DNS NMS 9

LMA PMIPv6 over 3GPP LTE/EPC 10

Dual-Stack Support in Proxy MIPv6 ▫draft-ietf-netlmm-pmip6-ipv4-support-17.txt (Sept. 2009) ▫PMIPv6 기반 IPv4 Transport 지원 + IPv4 Home Address Mobility 지원 ▫DS-MIPv6 와 같은 설계 목표와 원칙 DS-PMIPv6 가 고려하는 시나리오 Dual Stack Support in PMIPv6 Cellular IP network WLAN IP Network WiBro IP Network RAS LTE BS WLAN AP IPv4 IPv6 Private IPv4 NAT AAA DS-PMIPv6 LMA IPv4 IPv6 IPv4 Application (VoD, IP-Phone…) IPv6 Application (VoD, IP-Phone…) MN DS-PMIPv6 MAG 11

DS(Dual Stack)-PMIPv6 PMIPv6’s Dual-Stack Support Dual Stack LMA Only-IPv6 enabled (LMMAv6) Dual Stack MN or IPv4 MN PBU (HoAv6, Proxy CoAv6, HoAv4) HoAv4 and HoAv6 Proxy CoAv6 [Mobility Binding] IPv6 Tunnel (LMAAv6  Proxy CoAv6) IPv4 traffic CNv4  HoAv4 IPv6 traffic CNv6->HoAv6 Dual Stack MAG Only-IPv6 enabled (Proxy CoAv6) Dual Stack LMA Only-IPv4 enabled (LMAAv4) Dual Stack MN or IPv4 MN PBU (HoAv6, Proxy CoAv4, HoAv4) HoAv4 and HoAv6 Proxy CoAv4 [Mobility Binding] IPv4 Tunnel (LMAAv4  Proxy CoAv4) IPv4 traffic CNv4  HoAv4 IPv6 traffic CNv6->HoAv6 Dual Stack MAG Only-IPv4 enabled (Proxy CoAv4) 12

DS-PMIPv6 Testbed MN has Dual Stack and both addresses are always enabled SSID: PMIP1 SSID: PMIP2 SSID: PMIP3 MAG1 ra0) ffe:1:1::1/64 fe80::1 eth0) 3ffe:1::2/64 MAG2 ra0) ffe:1:2::1/64 fe80::1 eth0) ra0) ffe:1:3::1/64 fe80::1 eth0) V6 network V4 network 초기 실행 : v6 VoD Client 초기 실행 : v4 VoD Client LMA CN NAT eth0) ffe:1::1/64 eth1) ffe:2::1/64 eth0) ffe:2::2/64 V4/V6 network Private V4 network MAG3 LMA 가 MN 에게 할당할 Prefix Pool 3ffe:1:3:1::/64 ~ 3ffe:1:3:ffff::/64 v4/v6 VoD Server 13

Test Results with Heavy Traffic (presented at MobiWorld 2008 conference)  Encoding Rate: 2Mbps UDP Throughput of MIPv6UDP Throughput of PMIPv6 Test: MIPv6 vs. PMIPv6 14

New Issues in PMIPv6 (1/3) What Issues in IETF NetEXT WG ? ▫Scenario 1: Setting up Mobility Sessions on Demand  Create additional mobility sessions on demand  e.g., additional connection for a particular service  A new mobility session with a new prefix is created WiMax MAG LMA PBU (HI=1) MAG 3G MN 3GWiBro MAG LMA PBU (HI=1) MAG MN 3GWiBro WiMax3G 다른 인터페이스의 스위치 를 올려서 단순하게 접속만 시도했군 ! 세션이동성은 없고 … Mobile IPTV flow VoIP flow Mobile IPTV flow VoIP flow HTTP flow 15

What Issues in NetEXT2 BoF ? ▫Scenario 2: Flow Mobility  If another access is enabled on the MN, some of the existing flows could be moved over, to achieve, e.g., load balancing and better user experience MAG LMA PBU (HI=2) MAG LMA PBU (HI=1) MAG MN 3G 새로운 인터페이스로 세션을 이동하고 있네 ? Vertical 핸드오버군 ! MN 3GWiBro VoIP flow Mobile IPTV flow WiMax3GWiMax3G WiBro Mobile IPTV flow VoIP flow New Issues in PMIPv6 (2/3) 16

New Issues in PMIPv6 (3/3) Horizontal Handover Vertical Handover Multiple Interface Management Multiple Flow Management A handover is initiated when mobile device exits the boundaries of an administrative domain. Single interface is used. A mobile device does need to move in order to initiate a handover. Multiple interfaces are required, but use one interface at a time. Simultaneous use of multiple interfaces and access networks. Association of an application with an interface Ability to split individual flows between links with respect to the requirements of the flows and the user preferences Complexity Level Host-based CMIPv6 Network-based PMIPv6 Mobility Support in IPv6 [RFC 3775, June 2004] Mobile IPv6 Support for Dual Stack Hosts and Routers [RFC 5555, June 2009] Fast Handovers for Mobile IPv6 [RFC 4068, July 2005] Multiple Care-of Addresses Registration [RFC 5648, Oct. 2009] Flow Bindings in Mobile IPv6 and NEMO Basic Support [draft-ietf-mext-flow-binding-04] Traffic Selectors for Flow Binding [draft-ietf-mext-binary-ts-01] Proxy Mobile IPv6 [RFC 5213, Aug. 2008] IPv4 Support for Proxy Mobile IPv6 [draft-ietf-netlmm-pmip6-ipv4-support-17] Fast Handovers for Proxy Mobile IPv6 [draft-ietf-mipshop-pfmipv6-11] Multiple Care-of Addresses Registration & Flow Bindings in Proxy Mobile IPv6 [draft-krishnan-netext-intertech-ps-02] [draft-hui-netext-multihoming-00] [draft-melia-netext-muho-solution-00] [draft-xia-netext-flow-binding-00] [draft-hui-netext-service-flow-identifier-01] [draft-koodli-netext-flow-handover-00] Next Research Items 이동성 관리 연구주제와 IETF 표준화 진행 상황 [2009 년 12 월 ] 17

18

Code Overview NS-2 version: 2.29 (NIST-modified) ▫without IEEE MIH function Supported MAC: IEEE , IEEE

Code Overview (Major Objects) Agents ▫LMAAgent, MAGAgent Packet Headers ▫PMIPv6, IP6Encap Classifiers ▫PMIPv6Src, PMIPv6Dest Tunneling Objects ▫PMIPv6Encapsulator, PMIPv6Decapsulator 20

Code Overview (Block Diagram) Classifier(Routing) MAGAgentEncapDecap Link/MAC Classifier(Routing) LMAAgentEncapDecap Link/MAC From CNTo MN From MN To CN LMAMAG PBU/PBA 21

PMIPv6Agent (Agent/PMIPv6) Super class of LMAAgent and MAGAgent Fields Functions NameDescription default_port_ Agent 추가시 사용되는 기본 포트 ( 기본값 : 250) binding_lifetime_ 기본 Binding 시간 ( 기본값 : 500 s) max_retry_count_ 최대 PBU 재전송 시도 회수 ( 기본값 : 5) NameDescription process_packet()Packet dispatcher (PBU/PBA) create_pbu(), create_pback() PBU/PBA packet 생성 22

LMAAgent (Agent/PMIPv6/LMA) LMA 기능 수행 Fields Functions NameDescription bcache_list_Binding Cache List hnp_list_Home Network Prefix List (MN 의 MAC+MN 의 IP 주소로 구성 ) NameDescription process_pbu() PBU packet 에 대한 처리 (Bcache 생성, Tunneling 관리 ) setup_route(), clear_route(), setup-route{}, clear-route{} MN 의 주소에 대한 터널링을 설정 / 해제 find_bce(), create_bce() Binding cache 검색 / 생성 send_pback() PBA packet 전송 23

MAGAgent (Agent/PMIPv6/MAG) MAG 기능 수행 Fields NameDescription bul_list_Binding Update List lma_addr_ LMA 의 주소 seqno_ PBU/PBA 에 사용되는 sequence 번호 24

MAGAgent (Agent/PMIPv6/MAG) Functions NameDescription new-mn{}, process_new_mn() MN 의 Attachment Event 처리 (BUL 생성, PBU 전송 ) process_pback() PBA packet 처리 (BUL 갱신, Tunneling 관리 ) setup_route(), clear_route(), setup-route{}, clear-route{} MN 의 주소에 대한 터널링을 설정 / 해제 find_bule(), create_bule() Binding Update List 검색 / 생성 send_pbu() PBU packet 전송 set-lmaa{} LMA 주소를 설정 (Tcl 함수 ) 25

Packet Headers PMIPv6 (PacketHeader/PMIPv6) ▫PBU/PBA packet 헤더 ▫Packet Type(PT_PBU, PT_PBA) 정의 ▫Fields NameDescription optype_ PBU/PBA packet 구분 A_, H_, P_ 각각 Ack required, Home registration, Proxy registration bit seq_ Sequence 번호 lftm_Binding Lifetime homeaddr_ Home Address (MN 의 IP 주소 ) coaddr_ Proxy-CoA 주소 mn_id_ MN 의 ID status_ 상태코드 26

Packet Headers IP6Encap (PacketHeader/IP6Encap) ▫IP-in-IP tunneling 헤더 ▫ 단일 tunneling 만 고려함 ▫Fields NameDescription hdr_Inner IP header ptype_Packet Type 27

Classifiers PMIPv6Src (Addr/Classifier/PMIPv6Src) ▫Source address based classifier ▫Packet 의 source IP 주소로 구분함 PMIPv6Dest (Addr/Classifier/PMIPv6Dest) ▫Destination address based classifier ▫ 기존의 classifier 와 동일 28

Tunneling Objects PMIPv6Encapsulator ▫Data packet encapsulation ▫Fields PMIPv6Decapsulator (Addr/Classifier/PMIPv6Decapsulator) ▫Data packet decapsulation NameDescription here_ Outer IP 헤더의 source 주소와 port dest_ Outer IP 헤더의 destination 주소와 port defttl_ Encapsulation 된 packet 의 TTL 값 ( 기본값 : 32) 29

Node Object New Fields NameDescription pmip6_agent_ Node 에 설치된 PMIPv6 Agent (LMA 또는 MAG) src_classifier_Source address based classifier dst_classifier_Destination address based classifier old_classifier_ 새로운 classifier 를 설치하기 이전의 classifier decap_PMIPv6Decapsulator Encaps_(array) Node 에 연결된 PMIPv6Encapsulator List ( 연결된 MAG 당 1 개의 Encapsulator 가 존재 ) 30

Node Object New Functions NameDescription install-lma{} Node 가 LMA 기능을 수행하도록 관련 Object 를 설치함 (LMAAgent, PMIPv6Dest, PMIPv6Decapsulator) install-mag{} Node 가 MAG 기능을 수행하도록 관련 Object 를 설치함 (MAGAgent, PMIPv6Src, PMIPv6Decapsulator) get-pmip6-agent{} pmip6_agent_ 값을 얻음 get-pmip6-encap{} PMIPv6Encapsulator 를 얻음. Tunneling Endpoint 에 대하여 이미 존재하면 배열의 값을 반환, 없으면 생성 후 반환 clear-pmip6-encap{} PMIPv6Encapsulator 를 삭제 31

32

Overview Initialization (Initial Object Setup) Binding Update Process Data Process MAC MAG Agent LMA Agent MN attached Layer 2 Trigger “new-mn{}” PBU PBA MAGLMA Encap From CN LMA Decap MAG Encap From MN To MN To CN 33

Initialization - LMA Setting up LMAAgent, Dest Classifier, and Decapsulator by calling “install-lma{}” function 34

Initialization - LMA install-lma{} function (in Node object) #attach agent set lma [new Agent/PMIPv6/LMA] $self attach $lma [$lma set default_port_] set pmip6_agent_ $lma #insert dest classifier set old_classifier_ $classifier_ set dst_classifier_ [new Classifier/Addr/PMIPv6Dest] $dst_classifier_ set mask_ 0xffffffff $dst_classifier_ set shift_ 0 $dst_classifier_ defaulttarget $old_classifier_ set nodetype [[Simulator instance] get-nodetype] $self insert-entry [$self get-module $nodetype] $dst_classifier_ $dst_classifier_ install-by-dest 0 $old_classifier_ 35

Initialization - LMA install-lma{} function (cont’d)  Install Decapsulator #install decapsulator set decap_ [new Classifier/Addr/PMIPv6Decapsulator] $decap_ set mask_ 0xffffffff $decap_ set shift_ 0 $decap_ defaulttarget $old_classifier_ #PMIPv6_TUNNEL_PORT=1 lappend $agents_ $decap_ $dmux_ install [Simulator set PMIPv6_TUNNEL_PORT] $decap_ 36

Initialization - MAG Setting up MAGAgent, Src Classifier, and Decapsulator by calling “install-mag{}” function 37

Initialization - MAG install-mag{} function (in Node object) #attach agent, default_port_ = 250 set mag [new Agent/PMIPv6/MAG] $self attach $mag [$mag set default_port_] set pmip6_agent_ $mag #insert src classifier set old_classifier_ $classifier_ set src_classifier_ [new Classifier/Addr/PMIPv6Src] $src_classifier_ set mask_ 0xffffffff $src_classifier_ set shift_ 0 $src_classifier_ defaulttarget $old_classifier_ set nodetype [[Simulator instance] get-nodetype] $self insert-entry [$self get-module $nodetype] $src_classifier_ $src_classifier_ install-by-src 0 $old_classifier_ 38

Initialization - MAG install-lma{} function (cont’d) #install decapsulator set decap_ [new Classifier/Addr/PMIPv6Decapsulator] $decap_ set mask_ 0xffffffff $decap_ set shift_ 0 $decap_ defaulttarget $old_classifier_ lappend $agents_ $decap_ $dmux_ install [Simulator set PMIPv6_TUNNEL_PORT] $decap_ # LL points previous hier_classifier as up-target # we should change this to our classifier if {[info exists ll_(0)] && $ll_(0) != ""} { $ll_(0) up-target $src_classifier_ } 39

MN Attachment Event (IEEE ) “new-mn{}” function in MAGAgent is called when AssocRes Ack received void Mac802_11::recvACK(Packet *p) { if( HDR_MAC802_11(pktManagement_)->dh_fc.fc_subtype == MAC_Subtype_AssocRes) { if(use_pmip6_ext_) { if(pmip6_agent_) { Tcl& tcl = Tcl::instance(); tcl.evalf(“%s new-mn %d”, pmp6_agent_->name(), n->id()); } 40

MN Attachment Event (IEEE ) “new-mn{}” function in MAGAgent is called when DSA_ACK received void Mac802_16::receive() { if(use_pmip6_ext_) { if(pmip6_agent_) { if(frame->type == MAC_DSA_ACK) { Tcl& tcl = Tcl::instance(); tcl.evalf(“%s new-mn %d”, pmp6_agent_->name(), peer->getPeerNode()); } 41

Binding Update Process – MAG(1) Function flow MAGAgent Mac802_11 Mac802_16 new-mn/TCL process_new_mn() -find_bule command() send_pbu() PMIPv6Agent create_pbu() send() 42

Binding Update Process – MAG(1) new-mn{} in MAGAgent::command() MAGAgent::process_new_mn() if(strcmp(argv[1], "new-mn") == 0) { uint32_t id = atoi(argv[2]); process_new_mn(id); bule = find_bule(mn_id); if(!bule) { //create new binding update list bule = create_bule(mn_id); bule->lmaa() = lma_addr_; bule->proxy_coa() = addr(); bule->lifetime() = binding_lifetime_; bule->insert_entry(&bul_list_); } 43

Binding Update Process – MAG(1) MAGAgent::send_pbu() if(!bule->pktPBU_) { //create reusuable PBU packet bule->pktPBU_ = create_pbu(bule->lmaa(), bule->mn_id(), bule->lifetime(), bule->proxy_coa()); } //send copy of PBU packet send(bule->pktPBU_->copy(), 0); //start PBU retransmit timer bule->BULTimer_.resched(1.0); 44

Binding Update Process - LMA Function flow LMAAgentPMIPv6Agent process_packet() setup_route() process_pbu() -find_bce() setup-route/TCL -get-pmip6-encap/TCL send_pback() recv() create_pback() send() 45

Binding Update Process - LMA PMIPv6Agent::recv() LMAAgent::process_packet() if(ch->ptype() == PT_PBU) { process_pbu(p); } 46

Binding Update Process - LMA LMAAgent::process_pbu() bce = find_bce(mn_id); if(!bce) { //de-registration if(h->lifetime()==0) { send_pback(p, 0); return; } //mn_id is not owned with this LMA if((mnaddr=find_mn_prefix(mn_id))==-1) { send_pback(p, 1); return; } //create new binding cache bce = create_bce(mn_id); bce->proxy_coa() = iph->saddr(); bce->mn_prefix() = mnaddr; bce->insert_entry(&bcache_list_); } //setup tunneling if(bce->lifetime()>0) setup_route(bce); 47

Binding Update Process - LMA LMAAgent::setup_route() setup-route{} in Agent/PMIPv6/LMA LMAAgent::process_pbu() LMAAgent::send_pback() #get an encapsulator for tunneling endpoint set encap [$node_ get-pmip6-encap $te] $clsfr_dst install-by-dest $mnaddr $encap send_pback(bce, 0); bce->BCacheTimer_.resched((double)bce->lifetime()); 48

Binding Update Process - LMA 49

Binding Update Process – MAG(2) Function flow MAGAgentPMIPv6Agent process_packet() setup_route() process_pback() -find_bule() setup-route/TCL -get-pmip6-encap/TCL recv() clear_route() clear-route/TCL bule_state: BUL_S_SETUP bule_state: BUL_S_DELETE 50

Binding Update Process – MAG(2) PMIPv6Agent::recv() MAGAgent::process_packet() MAGAgent::process_pback() bule = find_bule(h->mn_id()); switch(bule->get_state()) { case BUL_S_SETUP: setup_route(bule); 51

Binding Update Process – MAG(2) MAGAgent::setup_route() setup-route{} in Agent/PMIPv6/MAG set decap_ [$node_ set decap_] if {[$node_ info class] == "MobileNode/MIPBS" || [$node_ info class] =="Node/MobileNode" } { #if mobile node, target is adhoc routing agent set target [$node_ set ragent_] } else { #if wired link, target is direct link to the destination node set target [[$ns link $node_ [$ns get-node-by-addr $mnaddr]] head] } $decap_ install $mnaddr $target set clsfr_src [$node_ set src_classifier_] set encap [$node_ get-pmip6-encap $te] $clsfr_src install-by-src $mnaddr $encap 52

Binding Update Process – MAG(2) 53

Data Process LMA  MAG MAG  LMA PMIPv6Encapsulator PMIPv6Dest recv() classify() recv() target_->recv() PMIPv6Decapsulator recv() find() link->recv() PMIPv6Encapsulator PMIPv6Src recv() classify() recv() target_->recv() PMIPv6Decapsulator recv() find() link->recv() 54

Data Process PMIPv6Src::classify() int PMIPv6Src::classify(Packet *p) { hdr_ip* iph = hdr_ip::access(p); //classify by source IP address return mshift(iph->saddr()); } 55

Data Process PMIPv6Encapsulator::recv() //put original (outer) header to the encap (inner) header enh->hdr_ = *hdr; enh->ptype_ = ch->ptype(); //fill original (outer) header with tunnel addresses hdr->saddr() = here_.addr_; hdr->sport() = here_.port_; hdr->daddr() = dest_.addr_; hdr->dport() = dest_.port_; hdr->ttl() = defttl_; //increase packet size ch->size() += IPv6_HEADER_SIZE; target_->recv(p, h); 56

Data Process PMIPv6Decapsulator::recv() //swap outer header and inner header tmph = *hdr; *hdr = enh->hdr_; enh->hdr_ = tmph; //find target link NsObject* link = find(p); ch->size() -= IPv6_HEADER_SIZE; link->recv(p,h); 57

58

Simulation Topology 50m/s 100Mbps, 100ms 100Mbps, 10ms CN(2.0.0) LMA (1.0.0) Router (0.0.0) MAG1 (3.0.0) MAG2 (4.0.0) 100Mbps, 10ms 59

Wireless Configuration (IEEE ) # Parameter for wireless nodes set opt(chan)Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(adhocRouting) DSDV ;# routing protocol Mac/802_11 set basicRate_ 1Mb Mac/802_11 set dataRate_ 11Mb Mac/802_11 set RTSThreshold_ #define coverage area for base station: 20m coverage Phy/WirelessPhy set Pt_ Phy/WirelessPhy set RXThresh_ 2.025e-12 Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]] 60

LMA Setup set lma [$ns node 1.0.0] #attach Agent/PMIPv6/LMA to the LMA set lma_pm [$lma install-lma] #PMIPv6 agent must be installed before connecting link(duplex-link) $ns duplex-link $lma $router 100Mb $opt(dfLinkDelay) DropTail 61

MAG Setup set mag1 [$ns node 3.0.0] #NIST settings set mag1_mac [$mag1 getMac 0] set mag1_addr [$mag1_mac id] $mag1_mac bss_id $mag1_addr $mag1_mac set-channel 1 $mag1_mac enable-beacon #install PMIPv6/MAG agent to the MAG1 set mag1_pm [$mag1 install-mag] set lmaa [$lma node-addr] $mag1_pm set-lmaa [AddrParams addr2id $lmaa] #setup MAC to support MN ATTACH Event $mag1_mac set use_pmip6_ext_ 1 $mag1_mac pmip6-agent $mag1_pm $ns duplex-link $mag1 $router 100Mb $opt(dfLinkDelay) DropTail 62

MN Setup # creation of the mobile nodes $ns node-config -wiredRouting OFF \ -macTrace ON Mac/802_11 set dataRate_ 11Mb set mn [$ns node 1.0.1] $mn random-motion 0 $mn base-station [AddrParams addr2id [$mag1 node-addr]] $mn set X_ $mn set Y_ $mn set Z_ 0.0 set mn_mac [$mn set mac_(0)] [$mn set mac_(0)] set-channel 1 [$mn set netif_(0)] setTechno $lma_pm register-mn-addr [$mn_mac id] [AddrParams addr2id [$mn node-addr]] 63

#Traffic setup set agent [new $opt(agentType)] $agent set class_ 2 $ns attach-agent $cn $agent set traffic [new $opt(trafficType)] $traffic attach-agent $agent if { $opt(trafficType) == "Application/Traffic/CBR" } { $traffic set packetSize_ $opt(cbrPacketSize) $traffic set interval_ $opt(cbrInterval) } set sink [new $opt(sinkType)] $ns attach-agent $mn $sink $ns connect $agent $sink Traffic Setup set opt(agentType) Agent/UDP set opt(sinkType) Agent/LossMonitor set opt(trafficType) Application/Traffic/CBR #if traffic is CBR set opt(cbrInterval) 0.01 set opt(cbrPacketSize)

Simulation Scenario Simulation time: 20 seconds CBR starts at 0.5 second, and ends at 19.5 seconds MN moves towards MAG2 with 50m/s speed $ns at 0.0 "record" $ns at 0.5 "$traffic start" $ns at 19.5 "$traffic stop" $ns at 1.0 "$mn setdest " $ns at 20 "finish" 65

Trace Analysis (PBU/PBA exchange) s _5_ MAC ACK 38 [ ] s _4_ AGT pbu 68 [ ] [ : : ] pbu pbu r _4_ MAC ACK 38 [ ] r pbu pbu pbu r pbu pba pba r pba pba pba r pba r _4_ AGT pba 68 [ ] [ : : ] cbr cbr  (MAG2) (LMA) PMIPv6 Agent Port:

Trace Analysis (Tunneling) Before Handover (CN  LMA  MAG1  MN ) cbr cbr r _5_ MAC BCN 64 [20a ffffffff 0 0] r cbr cbr cbr r cbr cbr cbr r cbr s _3_ MAC cbr 1060 [13a ] [ : : ] [81] 0 0 r _5_ MAC cbr 1000 [13a ] [ : : ] [81] 1 0 s _5_ MAC ACK 38 [ ] r _5_ AGT cbr 1000 [13a ] [ : : ] [81] 1 0 r _3_ MAC ACK 38 [ ]  (CN) (MN) Packet size: 1000 bytes  (LMA) (MAG1) Packet size: 1040 bytes Tunnel Port: 1 67

Trace Analysis (Tunneling) After Handover ( CN  LMA  MAG2  MN ) r _5_ MAC BCN 64 [20a ffffffff 1 0] cbr cbr s _3_ MAC BCN 64 [20a ffffffff 0 0] r cbr cbr cbr r cbr cbr cbr r cbr s _4_ MAC cbr 1060 [13a ] [ : : ] [99] 0 0 r _5_ MAC cbr 1000 [13a ] [ : : ] [99] 1 0 s _5_ MAC ACK 38 [ ] r _5_ AGT cbr 1000 [13a ] [ : : ] [99]  (CN) (MN) Packet size: 1000 bytes  (LMA) (MAG2) Packet size: 1040 bytes Tunnel Port: 1 68

Result (IEEE , Packet Sequence) 69

Result (IEEE , Throughput) 70

Result (IEEE , Packet Sequence) 71

Result (IEEE , Throughput) 72

References NIST add-on ▫ PMIPv6 for NS-2 ▫ 73