Upload
noreen-gilmore
View
257
Download
5
Embed Size (px)
DESCRIPTION
3
Citation preview
Proxy Mobile IPv6(PMIPv6) 을 위한 ns-2 코드 및 예제
한국기술교육대학교한연희 교수 ([email protected])
고려대학교 컴퓨터학과최현영 ([email protected])
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 pages2) Battery problem3) Waste of air resource4) 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 AgentMAG: 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 PrefixM: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 Features7
• RA*: MN의 Prefix 를 Policy Store 에서 수신한 경우의 Router Advertisement• RA**: MN 의 Prefix 를 LMA 에서 수신한 경우의 Router Advertisement
MN MAG AAA&Policy Store LMA CNMN Attachment AAA Query with MN-ID
AAA Reply with ProfileRA*
PBU with MN-ID, Home Network Prefix option, Timestamp option
PBA with MN-ID, Home Network Prefix optionRA**
[MN-HoA:CN](data)[Proxy-CoA:LMAA][MN-HoA:CN](data)
[MN-HoA:CN](data)
Tunnel Setup
PBU: Proxy Binding UpdatePBA: Proxy Binding Ack.
DHCP ServerDHCP Request
DHCP Response
DHCP RequestDHCP Response
Optional
PMIPv6 Operation Flow8
PMIPv6 over WiBro/WiMAX
PreviousMAG
PreviousMAG
TTA 단체표준 , “ 와이브로에서의 프록시 모바일 IPv6 적용 ,”TTAK.KO-10.0284, Dec. 2008"WiMAX Forum Network Architecture (Stage 3: Detailed Protocols and Procedures) Release 1 Version 1.2.3“, Jul 2008.
IP NetworkIP NetworkInternetInternet
E R E R
ACR/MAG
L2 Switch
BS/RAS
PSS
HA or LMA
AAA/Policy Store
ACR
ACR
DNSNMS
9
LMA
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
CellularIP network
WLANIP Network
WiBro IP Network
RAS
LTE BS
WLAN AP
IPv4
IPv6
Private IPv4NAT
AAA
DS-PMIPv6LMA
IPv4
IPv6
IPv4 Application(VoD, IP-Phone…)
IPv6 Application(VoD, IP-Phone…)
MN
DS-PMIPv6MAG
DS-PMIPv6MAG
DS-PMIPv6MAG
11
DS(Dual Stack)-PMIPv6
• PMIPv6’s Dual-Stack Support
Dual Stack LMAOnly-IPv6 enabled(LMMAv6)
Dual Stack MNor
IPv4 MN
PBU (HoAv6, Proxy CoAv6, HoAv4)HoAv4 and HoAv6Proxy CoAv6
[Mobility Binding]
IPv6 Tunnel (LMAAv6Proxy CoAv6)
IPv4 trafficCNv4 HoAv4
IPv6 trafficCNv6->HoAv6Dual Stack MAG
Only-IPv6 enabled(Proxy CoAv6) <MN in IPv6 domain>
Dual Stack LMAOnly-IPv4 enabled(LMAAv4)
Dual Stack MNor
IPv4 MN
PBU (HoAv6, Proxy CoAv4, HoAv4)HoAv4 and HoAv6
Proxy CoAv4
[Mobility Binding]
IPv4 Tunnel (LMAAv4Proxy CoAv4)
IPv4 trafficCNv4 HoAv4
IPv6 trafficCNv6->HoAv6Dual Stack MAG
Only-IPv4 enabled(Proxy CoAv4) <MN in IPv4 domain>
12
DS-PMIPv6 TestbedMN has Dual Stack and
both addresses are always enabled
SSID: PMIP1SSID: PMIP2
SSID: PMIP3
MAG1
ra0) 192.168.101.13ffe:1:1::1/64
fe80::1
eth0) 3ffe:1::2/64MAG2
ra0) 192.168.102.13ffe:1:2::1/64
fe80::1
eth0) 192.168.1.2
ra0) 10.0.1.13ffe:1:3::1/64
fe80::1
eth0) 10.0.0.1V6 networkV4 network
초기 실행 : v6 VoD Client 초기 실행 : v4 VoD Client
LMACN
NAT 192.168.1.3
eth0) 192.168.1.13ffe:1::1/64
eth1) 192.168.2.13ffe:2::1/64
eth0) 192.168.2.23ffe: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 MIPv6 UDP Throughput of PMIPv6
Test: MIPv6 vs. PMIPv614
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
LMAPBU
(HI=1)
MAG
3G
MN3GWiBro
MAG
LMA
PBU(HI=1)
MAG
MN3GWiBro
WiMax 3G
다른 인터페이스의 스위치를 올려서 단순하게 접속만 시도했군 !
세션이동성은 없고…
Mobile IPTVflow
VoIPflow
Mobile IPTVflow
VoIPflow
HTTPflow
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
LMAPBU
(HI=2)
MAGMAG
LMA
PBU(HI=1)
MAG
MN3G
새로운 인터페이스로 세션을 이동하고 있네 ?
Vertical 핸드오버군 !
MN3GWiBro
VoIPflow
Mobile IPTVflow
WiMax 3GWiMax 3G
WiBro
Mobile IPTVflow
VoIPflow
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
Com
p le x
i ty L
eve l
Host-based CMIPv6
Network-basedPMIPv6
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 802.21 MIH function
•Supported MAC: IEEE 802.11, IEEE 802.16
19
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)
MAGAgent Encap Decap
Link/MAC
Classifier(Routing)
LMAAgent Encap Decap
Link/MAC
From CN To MN
From MNTo CN
LMA MAG
PBU/PBA
21
PMIPv6Agent (Agent/PMIPv6)•Super class of LMAAgent and MAGAgent•Fields
•Functions
Name Descriptiondefault_port_ Agent 추가시 사용되는 기본 포트 ( 기본값 : 250)binding_lifetime_ 기본 Binding 시간 ( 기본값 : 500 s)max_retry_count_ 최대 PBU 재전송 시도 회수 ( 기본값 : 5)
Name Descriptionprocess_packet() Packet dispatcher (PBU/PBA)create_pbu(), create_pback()
PBU/PBA packet 생성
22
LMAAgent (Agent/PMIPv6/LMA)•LMA 기능 수행•Fields
•Functions
Name Descriptionbcache_list_ Binding Cache Listhnp_list_ Home Network Prefix List
(MN 의 MAC+MN 의 IP 주소로 구성 )
Name Descriptionprocess_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
Name Descriptionbul_list_ Binding Update Listlma_addr_ LMA 의 주소
seqno_ PBU/PBA 에 사용되는 sequence 번호
24
MAGAgent (Agent/PMIPv6/MAG)•Functions
Name Descriptionnew-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) 정의▫FieldsName Descriptionoptype_ PBU/PBA packet 구분
A_, H_, P_ 각각 Ack required, Home registration, Proxy registration bit
seq_ Sequence 번호
lftm_ Binding Lifetimehomeaddr_ Home Address (MN 의 IP 주소 )coaddr_ Proxy-CoA 주소
mn_id_ MN 의 IDstatus_ 상태코드
26
Packet Headers•IP6Encap (PacketHeader/IP6Encap)
▫IP-in-IP tunneling 헤더▫단일 tunneling 만 고려함▫FieldsName Descriptionhdr_ Inner IP headerptype_ 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
Name Descriptionhere_ Outer IP 헤더의 source 주소와 portdest_ Outer IP 헤더의 destination 주소와 portdefttl_ Encapsulation 된 packet 의 TTL 값 ( 기본값 : 32)
29
Node Object•New Fields
Name Descriptionpmip6_agent_ Node 에 설치된 PMIPv6 Agent (LMA 또는 MAG)src_classifier_ Source address based classifierdst_classifier_ Destination address based classifierold_classifier_ 새로운 classifier 를 설치하기 이전의 classifierdecap_ PMIPv6DecapsulatorEncaps_(array) Node 에 연결된 PMIPv6Encapsulator List
( 연결된 MAG 당 1 개의 Encapsulator 가 존재 )
30
Node Object•New Functions
Name Descriptioninstall-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
MACMAGAgen
t
LMAAgen
t
MNattached
Layer 2 Trigger“new-mn{}”
PBU
PBA
MAG LMA
Encap
From CN
LMA
Decap
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_
<tcl/lib/pmip6.tcl>
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_
<tcl/lib/pmip6.tcl>
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_
<tcl/lib/pmip6.tcl>
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_ }
<tcl/lib/pmip6.tcl>
39
MN Attachment Event (IEEE 802.11)•“new-mn{}” function in MAGAgent is
called when AssocRes Ack receivedvoid 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()); }}
<mac/mac-802_11.cc>
40
MN Attachment Event (IEEE 802.16)•“new-mn{}” function in MAGAgent is
called when DSA_ACK receivedvoid 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()); } }}
<wimax/mac802_16.cc>
41
Binding Update Process – MAG(1)•Function flow
MAGAgentMac802_11Mac802_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_); }
<pmip6/pmip6.cc>
<pmip6/pmip6.cc>
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 packetsend(bule->pktPBU_->copy(), 0);
//start PBU retransmit timerbule->BULTimer_.resched(1.0);
<pmip6/pmip6.cc>
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); }
<pmip6/pmip6.cc>
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);
<pmip6/pmip6.cc>
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 endpointset encap [$node_ get-pmip6-encap $te]$clsfr_dst install-by-dest $mnaddr $encap
send_pback(bce, 0);bce->BCacheTimer_.resched((double)bce->lifetime());
<tcl/lib/pmip6.tcl>
<pmip6/pmip6.cc>
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);
<pmip6/pmip6.cc>
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
<tcl/lib/pmip6.tcl>
52
Binding Update Process – MAG(2)
53
Data Process• LMA MAG
• MAG LMA
PMIPv6EncapsulatorPMIPv6Dest
recv()
classify()recv()
target_->recv()
PMIPv6Decapsulator
recv()find()
link->recv()
PMIPv6EncapsulatorPMIPv6Src
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());}
<pmip6/pmip6.cc>
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);
<pmip6/pmip6.cc>
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);
<pmip6/pmip6.cc>
57
58
Simulation Topology
50m/s
100Mbps, 100ms
100Mbps, 10msCN(2.0.0)
LMA(1.0.0)
Router(0.0.0)
MAG1(3.0.0)
MAG2(4.0.0)
100Mbps, 10ms 100Mbps, 10ms
59
Wireless Configuration (IEEE 802.11)
# Parameter for wireless nodesset opt(chan) Channel/WirelessChannel ;# channel typeset opt(prop) Propagation/TwoRayGround ;# radio-propagation modelset opt(netif) Phy/WirelessPhy ;# network interface typeset opt(mac) Mac/802_11 ;# MAC typeset opt(ifq) Queue/DropTail/PriQueue ;# interface queue typeset opt(ll) LL ;# link layer typeset opt(ant) Antenna/OmniAntenna ;# antenna modelset opt(ifqlen) 50 ;# max packet in ifqset opt(adhocRouting) DSDV ;# routing protocolMac/802_11 set basicRate_ 1MbMac/802_11 set dataRate_ 11MbMac/802_11 set RTSThreshold_ 30000
#define coverage area for base station: 20m coveragePhy/WirelessPhy set Pt_ 0.025Phy/WirelessPhy set RXThresh_ 2.025e-12Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]]
<pmip.tcl>
60
LMA Setupset lma [$ns node 1.0.0]
#attach Agent/PMIPv6/LMA to the LMAset lma_pm [$lma install-lma]
#PMIPv6 agent must be installed before connecting link(duplex-link)$ns duplex-link $lma $router 100Mb $opt(dfLinkDelay) DropTail
<pmip.tcl>
61
MAG Setupset mag1 [$ns node 3.0.0]
#NIST settingsset 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 MAG1set mag1_pm [$mag1 install-mag]set lmaa [$lma node-addr]$mag1_pm set-lmaa [AddrParams addr2id $lmaa]
#setup 802.11 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
<pmip.tcl>
62
MN Setup# creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ONMac/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_ 100.0$mn set Y_ 500.0$mn set Z_ 0.0
set mn_mac [$mn set mac_(0)][$mn set mac_(0)] set-channel 1[$mn set netif_(0)] setTechno 802.11
$lma_pm register-mn-addr [$mn_mac id] [AddrParams addr2id [$mn node-addr]]
<pmip.tcl>
63
#Traffic setupset 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<pmip.tcl>
set opt(agentType) Agent/UDPset opt(sinkType) Agent/LossMonitorset opt(trafficType) Application/Traffic/CBR
#if traffic is CBRset opt(cbrInterval) 0.01set opt(cbrPacketSize) 1000
64
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 600.00 500.00 50.00"$ns at 20 "finish"
<pmip.tcl>
65
Trace Analysis (PBU/PBA exchange)
s 9.361996775 _5_ MAC --- 0 ACK 38 [0 1 0 0] s 9.362301812 _4_ AGT --- 94 pbu 68 [0 0 0 0] ------- [16777216:250 4194304:250 32 0] + 9.362302 4 0 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94- 9.362302 4 0 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94r 9.362301812 _4_ MAC --- 0 ACK 38 [0 1 0 0] r 9.363307 4 0 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94+ 9.363307 0 1 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94- 9.363307 0 1 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94r 9.364313 0 1 pbu 68 ------- 0 4.0.0.250 1.0.0.250 -1 94+ 9.364313 1 0 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95- 9.364313 1 0 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95r 9.365318 1 0 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95+ 9.365318 0 4 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95- 9.365318 0 4 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95r 9.366324 0 4 pba 68 ------- 0 1.0.0.250 4.0.0.250 -1 95r 9.366323572 _4_ AGT --- 95 pba 68 [0 0 0 0] ------- [4194304:250 16777216:250 30 0] + 9.4 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 89 96- 9.4 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 89 96
4.0.0.2501.0.0.250 (MAG2) (LMA)PMIPv6 Agent Port: 250
66
Trace Analysis (Tunneling)•Before Handover (CN LMA MAG1
MN )+ 8.6 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 81 86- 8.6 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 81 86r 8.600597572 _5_ MAC --- 0 BCN 64 [20a ffffffff 0 0] r 8.61008 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 81 86+ 8.61008 1 0 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86- 8.61008 1 0 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86r 8.611163 1 0 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86+ 8.611163 0 3 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86- 8.611163 0 3 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86r 8.612246 0 3 cbr 1040 ------- 2 1.0.0.1 3.0.0.1 81 86s 8.612381400 _3_ MAC --- 86 cbr 1060 [13a 2 0 800] ------- [8388608:0 4194305:0 29 4194305] [81] 0 0r 8.613328470 _5_ MAC --- 86 cbr 1000 [13a 2 0 800] ------- [8388608:0 4194305:0 29 4194305] [81] 1 0s 8.613338470 _5_ MAC --- 0 ACK 38 [0 0 0 0] r 8.613353470 _5_ AGT --- 86 cbr 1000 [13a 2 0 800] ------- [8388608:0 4194305:0 29 4194305] [81] 1 0r 8.613644086 _3_ MAC --- 0 ACK 38 [0 0 0 0]
2.0.0.01.0.1.0 (CN) (MN)Packet size: 1000 bytes
1.0.0.13.0.0.1 (LMA) (MAG1)Packet size: 1040 bytesTunnel Port: 1
67
Trace Analysis (Tunneling)•After Handover ( CN LMA MAG2
MN )r 10.356151077 _5_ MAC --- 0 BCN 64 [20a ffffffff 1 0] + 10.4 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 99 106- 10.4 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 99 106s 10.400083958 _3_ MAC --- 0 BCN 64 [20a ffffffff 0 0] r 10.41008 2 1 cbr 1000 ------- 2 2.0.0.0 1.0.1.0 99 106+ 10.41008 1 0 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106- 10.41008 1 0 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106r 10.411163 1 0 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106+ 10.411163 0 4 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106- 10.411163 0 4 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106r 10.412246 0 4 cbr 1040 ------- 2 1.0.0.1 4.0.0.1 99 106s 10.412541400 _4_ MAC --- 106 cbr 1060 [13a 2 1 800] ------- [8388608:0 4194305:0 29 4194305] [99] 0 0r 10.413487859 _5_ MAC --- 106 cbr 1000 [13a 2 1 800] ------- [8388608:0 4194305:0 29 4194305] [99] 1 0s 10.413497859 _5_ MAC --- 0 ACK 38 [0 1 0 0] r 10.413512859 _5_ AGT --- 106 cbr 1000 [13a 2 1 800] ------- [8388608:0 4194305:0 29 4194305] [99] 1 0
2.0.0.01.0.1.0 (CN) (MN)Packet size: 1000 bytes
1.0.0.14.0.0.1 (LMA) (MAG2)Packet size: 1040 bytesTunnel Port: 1
68
Result (IEEE 802.11, Packet Sequence)
69
Result (IEEE 802.11, Throughput)
70
Result (IEEE 802.16, Packet Sequence)
71
Result (IEEE 802.16, Throughput)
72
References•NIST add-on
▫http://www.antd.nist.gov/seamlessandsecure/
•PMIPv6 for NS-2▫http://commani.net/pmip6ns
73