25
mobiwan 報報報 報報報 696430066

Mobiwan 報告者:潘楷方 696430066. Mobile IP Mobile IP 機制,可以讓 Mobile Node (MN) 在不同的子網路換手時,可以保留原本的 IP 。 HOW? 藉由固定的

  • View
    230

  • Download
    3

Embed Size (px)

Citation preview

mobiwan

報告者:潘楷方 696430066

Mobile IP

Mobile IP 機制,可以讓 Mobile Node (MN)在不同的子網路換手時,可以保留原本的 IP 。

HOW?

藉由固定的 HoA 和變動的 CoA( 三個步驟:取得,註冊,傳送 )

Care-of-Address- Foreign Agent 指定- DHCP

Binding 包含三個元素- Home address- Care-of-address- Registration Lifetime

Foreign Agent (FA)

Home Agent (HA)

Corresponded Node (CN)

Mobile Node (MN)

Binding Update Data Transmission

Home Network

Foreign Network

Mobile IPv4 (MIP)

Tunneling to the Care-of-Address

Encapsulate- IP-within-IP (RFC2003)- Minimal Encapsulation (RFC2004)

在 packet 前加上新的 header ,但是原本的標頭維持不變。這樣子,就可以使用原本IP 層傳送封包的方法

三角路由 (Triangular Routing of Data )每次要傳送資料時,都必須透過 FA 和 HA

MIP to MIPv6

取消了 Foreign Agent ,並將其功能融入 IPv6 路由器之中。

CoA 改由 AR 分配

路由最佳化

Mobile IPv6 (MIPv6)

AccessRouter (AR)

Home Agent (HA)

Corresponded Node (CN)

Mobile Node (MN)

Binding Update Data Transmission

Home Network

Foreign Network

MIPv4 (MIP)

HoACoA

Binding Table

HoACoA

Binding Table

MIPv6

Mobiwan 簡介 MobiWAN 來自 Motorola 巴黎實驗室, M

obiWAN 主要進行了下面幾點的延伸: 提供了 mipv6 協定的支援 提供了 TopoGen TopoMan 這些生成拓撲結構

的工具 MobiWAN 目前支援 MIPv6 ,而不支援 HMIP

v6/FMIPv6 。

安裝 Mobiwan in NS 若 ns 版本是 2.26 或 2.27 ,可在

http://www.ti-wmc.nl/mobiwan2/ 下載 patch 檔

若是 2.28 ,可直接下載http://www.kolonianet.pl/przemac/ns/ns-228-mobiwan-102.diff.gz patch 檔

安裝步驟 安装 patch 前先不要 install ns ,只要先將原本的

ns-allinone-2.2x 解壓縮即可。

拷貝 patch 檔並放到 ns-2.2x 資料夾之中

執行 $zcat -f filenameofpatch |patch -p1

安裝完 ns2 之後,在 bashrc 設定路徑

http://www.ti-wmc.nl/mobiwan2/simple-mipv6.tcl.txt 執行上面連結的範例檔,若出現>-------------------- NS Addressing --------------------< Domains (domain_num) : 2 Clusters (cluster_num) : 1 5 Nodes (nodes_num) : 1 1 3 1 1 1 >-------------------------------------------------------<

31.902 get_coa for BS 1.2.0:4198400 Simulation finished

則代表安裝成功

注意,在安裝 mobiwan 之後,將無法執行MIPv4 的 tcl ,最好將 mobiwan 裝在新的資料夾。

MobiWAN in TCL - I 建立 MN :宣告 Agent/MIPv6/MN

建立 HA :宣告 Agent/MIPv6/BS

[$MN_ set regagent_] check-beacon 1.0 ;# 設定 beacon_ interval 1s MN 探測 RA 的頻率

[$HA_ set regagent_] beacon-period 0.3;# 設定 beacon_ interval 300ms 會影響 RA 頻率

MobiWAN in TCL - II set mobile_ [create-mobile 1.1.1 1.1.0 100 100 0 1 0.04] ;

home_addr = 1.1.1 (the home address of mobile_) ha_addr = 1.1.0 (the address of mobile_'s home agent) X = 500

Y = 500 Z = 0 random = 1 (0 means "random-motion" off; 1 means "random-motion" on) args = 0.04 (the time when "random-motion" should start)

MobiWAN in TCL - III set HA_ [create-base-station 1.1.0 1.0.0 1 2 0]

# 後面參數和 MN相同

Dump the Binding Update List of MN and Binding Cache of HA[[$MN_ set ha_] set regagent_] dump[$MN_ set regagent_] dump

Packet type PT_RADS : Advertisement from other BSs PT_BU: Home Registration PT_BACK: Binding ACK from the BS(MN only) PT_BREQ: BINDING REQUEST from other MNs PT_SOL : Solicitations from MN

The Home network

The Foreign network

The old entryThe new entry

MN_registration :- 若 MN 的 CoA 和 HoA相同,則取消 route 反之,增加 route- 會在此處發送 binding ACK給MN

Update_bcache :- 尋找該 CoA 是否有在 bcache 中出現過, 若有,則取出該 entry資料,反之,建立一個新的 entry- 會在這邊呼叫 encap/delete route- 會將目前時間,還有重新設定的 lifetime寫到 entry之中

Insert entry:- 若 update_bcache 中用到的是新建立的entry,則將該 entry 插入到 bcache 中(插入到 head)- 反之,如果 update_bcache 時是更新原本就存在於 bcache 中的 entry,則會呼叫 Update_entry

Encap / Delete route :

New BSOld BS

ExpiredNot

Expired

Add bs :在 bcache 中增加一個新的 entry用來紀錄新的 bs ,並在之後的 reg向這個bs 註冊一個新的 CoA

Update entry:檢查目前使用的 CoA 是否到期,若已經到期,則會切換目前的 CoA反之,啟動 BU_TIMER 來定時發出 BU