NETWORK CODING INTRO AND MODULE DESIGN THINKING
-
Upload
yvonne-austin -
Category
Documents
-
view
57 -
download
1
description
Transcript of NETWORK CODING INTRO AND MODULE DESIGN THINKING
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
1
NETWORK CODING INTRO AND MODULE DESIGN THINKINGPresenter: Yi-Quan Chen
2
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
OUTLINE
What is Network coding? Main Reference of the Module Design Thinking Module Design Flowchart & Thinking
3
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
WHAT IS NETWORK CODING?
emerged in 2000 Without Network Coding
Independent information are kept separate Intermediate nodes only forward it
With Network Coding Intermediate processes the incoming independent
information flows
4
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
BenefitsBenefits
Throughput Wireless resources Security
5
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Benefits(1)Benefits(1) Throughput
Y uses all resources Z uses all resources
6
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Benefits(2)Benefits(2) Wireless resources
7
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Benefits(2)Benefits(2)
Wireless resourcesEnergy efficiencyDelayWireless bandwidth
7
8
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Benefits(3)Benefits(3)
SecurityAssume that adversary can wiretap a single path
Someone can intercept one of them
Can’t decode with single symbols
8
9
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
ChallengesChallenges
Complexity Security Integration with existing infrastructure
9
10
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Challenges(1)Challenges(1)
ComplexityIn wireless example
Node B : 1. additional memory requirements
2. has to perform operations The same with node A and C.
Important questionAssessingTradeoffs
10
11
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Challenges(2 & 3)Challenges(2 & 3)
SecurityBanking transactions
Integration with existing infrastructureWithout dramatic changesHow to integrate in current network protocols?
11
12
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Main Reference of the Module Design Thinking
“XORs in The Air: Practical Wireless Network Coding”, S. Katti, H. Rahul, W. Hu, D. Katabi, M. Medard, and J. Crowcroft, SIGCOMM’06, Sep. 11-15, 2006
“The importance of being opportunistic: Practical network coding for wireless environments”, S. Katti, D. Katabi, W. Hu, H. S. Rahul, and M. M´edard., 2005.
“Network Coding Fundamentals”, Christina Fragouli and Emina Soljanin, 2007
13
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
COPE Introduction
COPE inserts a coding shim between the IP and MAC layers. To detect coding opportunities and exploits them to forward
multiple packets in a single transmission COPE leads to larger bandwidth savings Is based on two key principles:
Dispose of the p2p abstraction and embraces the broadcast nature of the wireless channel
Employs network coding
14
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
COPE overview
Incorporate three main techniques:
Opportunistic Listening
Opportunistic Coding
Learning Neighbor State
15
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Opportunistic Listening
Sets the nodes in promiscuous mode Store the overheard packets for a limited period T Each node broadcast reception report to tell its
neighbors which packets it has stored A node that has no data packets to transmit periodically
sends the reception reports in special control packets
16
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Opportunistic Coding
The key question is what packets to code together to maximize throughput.
It should aim to maximum the number of native packets delivered in a single transmission, while ensuring that each intended nexthop has enough information to decode its native packet
17
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Opportunistic Coding
18
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Learning Neighbor State
Reception report may get lost in collisions The node may has already made a suboptimal coding decision Guess ! COPE estimates the probability that a particular neighbor has
a packet as the delivery probability of the link If guess wrong, the relevant native packet is retransmitted,
potentially encoded with a new set of native packets
19
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Making it work
Packet Coding Algorithm Packet Decoding Pseudo-broadcast Hop-by-Hop ACKs and retransmissions Preventing TCP packet reordering
20
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Packet Coding Algorithm
Each node has a FIFO queue of packets to be forwarded, which called the output queue.
For each neighbor, the node maintains two per-neighbor virtual queues, one for small packet, and the other for large packets
The node keeps a hash table, packet info, that is keyed on packet-id, the table indicates the probability of each neighbor having that packet
21
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Packet Decode
Each node maintains a packet pool, in which it keeps a copy of each native packet it has received or sent out.
The packets are stored in a hash table keyed on packet id Is garbage collected every few second
22
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Pseudo-Broadcast
Piggybacks on 802.11 unicast and benefits from its reliability and backoff mechanism
Promiscuous mode The link-layer destination field is set to the MAC
address of one of the intended recipients XOR-header listing all nexthops of the packet Does not completely solve the reliability problem
23
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Hop-by-Hop ACKs and Retransmissions
The sender gets syn-ACK only from the link-layer destination of the packet
COPE may optimistically guess that a nexthop has enough information to decode an XOR-ed packet, when it actually does not.
The sender expect the nexthops of an XOR-ed packet to decode it, and ack it in Ta
Nexthop receives an encoded packet decodes it and schedule an acl event
24
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
THE COPE DESIGN IMPLEMENTATION FLOWCHART
24
CN
group, CC
U, C
hia-Yi, T
aiwan
Packet Deque &
Check whether can
Code ?
Add Informati
on to Coding Header
Edit the Mac
XOR Coding
25
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
25
CN
group, CC
U, C
hia-Yi, T
aiwan
The Queue In NS2
26
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
THE PACKET IN QUEUE CLASS OF NS2
26
CN
group, CC
U, C
hia-Yi, T
aiwan
5 4 3 2 1
5 4 3 2 1
PacketQueue Class in NS2
I made a copy of each packet
Packet Queue
27
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
THE HEADER CONTENT OF COPE
27
CN
group, CC
U, C
hia-Yi, T
aiwan
28
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
THE PACKET STRUCTURE OF NS2
28
CN
group, CC
U, C
hia-Yi, T
aiwan
Insert COPE Header
Coding Header body
29
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
THE TRAFFIC FLOW IMAGINATION UNDER NETWORK CODING
29
CN
group, CC
U, C
hia-Yi, T
aiwan
RTS CTSPacket A RTSCTS Packet BRTSCTSRTS CTS
I have the Coding Chance
Packet A ⊕BPromiscuous Packet A ⊕B
WHAT I HAVE DONE ? 1. 封包在 node 中的資訊,對我比較重要的如:
next_hop, Prev_hop, 以及時 間…等,取出。
2. 寫完 queue.h 內,有關 packetqueue 的註解,並在priqueue.cc 內,把封包的資訊 dump 出來,看看是否能達到我要找的東西。
3. 在 queue.h 內,加入了封包進入 queue 後,封包備份儲存的動作,在此不考慮帶有 routing 資訊、 mac資訊及 ack 的封包。封包可以儲存在自己的 queue 中。
預計加入可以定期清除的機制。
CN
group, CC
U, C
hia-Yi, T
aiwan
30
4. 目前構想的封包 enque 及 deque 程序: enque 的部分:
封包 enque 後, check 是否是 xor 的封包。if (xored...)then (check the coding header to find 自己是否是在 destination 端欄位中。是的話, decode it 。否則就只是單純轉送。 )copy decode 後的 pure packet ,並刪除重複的部分。
deque 的部分:要 deque 前,先用 head_ 封包,與備份的封包做 check ,確保兩個封包的 prev_hop 與 next_hop 不同, ( 這樣代表封包來自不同方向 )if (prev_hop 相同 )then (head_ 不變, next_ 向後移一位,再做 check 。 )else if (next_hop 是否為自己 )如果不是, then coding it 。
CN
group, CC
U, C
hia-Yi, T
aiwan
31
WHAT I HAVE DONE - 2 加入了單層的 Header 。 1. 寫了兩支 cope.cc cope.h ,用來新增 COPE header 這個物件,並成功列印出 hdr_cope class 下
的資料,資料也有填進去, source 欄位填的 OK 。但是目前比較疑惑的是,要如何去實現PAPER 中的 pkt_map 與 ack_map 的部 分。
2. 尚未測試類似 MPLS 中的 push Header 的功能是否可以正確動作,必須另外寫幾個函式,來做到這些事情。
3. ns2 中的 TCP ,做的事情跟實際中的 TCP 不太一樣, one-way TCP 在回 ACK 的時候,就是純的 ACK ,沒有辦法使用 piggyback 的方式,把要送的資料也回填回去給剛剛送資料來的source 。不知道這個部分會不會影響到往後的實現。
4. 目前有修改過的原始程式碼如下: ns-packet.tcl queue.h priqueue.cc cope.h cope.cc packet.h
5. 找到一份大陸人寫的講述有關 packet class 的文件,裡面有詳細的講出說在各層中,哪個函式會填入各層對應的資料,我想,填資料的部分,應該可以 SURVEY 看看這份文件。
CN
group, CC
U, C
hia-Yi, T
aiwan
32
33
CN
gro
up, C
CU
, Chia
-Yi, T
aiw
an
Question ?