主要參數設定(cont.)

Download Report

Transcript 主要參數設定(cont.)

The Network Simulator NS-2 & SCTP Module
Student : Kuo-Lun Lu
Advisor : Dr. Jen-Yi Pan
Outline
• SCTP
- what's is SCTP
- important features
• SCTP module
- multi-interface
- set nodes
- configuration parameters
What is SCTP ?
• SCTP ( Stream Control Transmission Protocol )
- PSTN signaling messages over IP Networks
• Similar to TCP and UDP
- transport layer
- reliable / unreliable transmission
- congestion control
- ordered / unordered transmission
Important Features
•
•
•
•
•
Multi-homing
Multiple Streams
SACK
reliable / unreliable transmission
ordered / unordered
SCTP Multi-homing
• More than one IP address.
- one of the IP addresses is set to be the primary
address  primary path
- other IP addresses  secondary path
#path1
Interface 1
#path2
Interface 2
Host A
Interface 1
#path3
#path4
Interface 2
four possibly independent paths
Host B
Multi-homing – change path
Multi-homing
HostA
HostB
OS
NI-2
X
NI-1
Primary Path
X
ERROR
Data
Data
Data
Data
Data
Data
Data
Data
Data
IP network
Data
Data
NI-1
Secondary Path
OS
X
Secondary Path
Primary Path
SCTP Multiple Stream
• The streams within an SCTP association
allow the endpoints to transfer multiple
sequences of messages at the same time.
HostA
HostB
OS
NI
Data3 Data2 Data1
Data0
Data7 Data6 Data5
Data4
Data9
Data8
OS
Data11
Data10
Multiple Streams
NI
Acknowledgment chunk
• SCTP detects packet losses by checking
the blocking gaps in its Selective
Acknowledgment (SACK) chunks.
SCTP module
• Base SCTP Agent在撰寫的過程中,主要遵循 RFC2960
與其相關的後續推出的draft。包括有:
–
–
–
–
–
–
–
–
–
–
–
–
–
Normal Establishment of an Association (rudimentary handshake)
Transmission of DATA Chunks
Acknowledgment on Reception of DATA Chunks
Management Retransmission Timer
Multi-homed SCTP Endpoints
Stream Identifier and Stream Sequence Number
Ordered and Unordered Delivery
Report Gaps in Received DATA TSNs
SCTP Slow-Start and Congestion Avoidance
Endpoint Failure Detection
Path Failure Detection
Path Heartbeat (without upper layer control)
Partial Reliability (draft-ietf-tsvwg-usctp-01.txt)
Multi-interface
• NS2's architecture, a node can't actually
be multihomed.
 Each multihomed node is actually made up of
more than one node.
- core node
- interface node
建立多網路介面節點方法 -- command
Where to find?

in sctp.cc
• set-multihome-core : 建立核心節點
host1_if0
• multihome-add-interface : 核心節點與網路介面Link
[$ns node 1.0.2]
$ns node-config-multihome-core \
-wiredRouting OFF \
-macTrace OFF
set host1_core [$ns node 1.0.1]
host1_core
set host1_if0 [$ns node 1.0.2]
[$ns node 1.0.1]
host1_if1
set host1_if1 [$ns node 2.0.1]
[$ns node 2.0.1]
$ns multihome-add-interface $host1_core $host1_if0
$ns multihome-add-interface $host1_core $host1_if1
在節點加上SCTP agent
• multihome-attach-agent :將SCTP agent加到節點上
– 若SCTP僅有單一網路介面則用 attach-agent
set sctp0 [new Agent/SCTP]
$ns attach-agent $host0 $sctp0
– 若SCTP有多個網路介面則用 multihome-attach-agent
set sctp1 [new Agent/SCTP]
$ns multihome-attach-agent $host1_core $sctp1
設定路徑
• set-primary-destination:目的端有多個介面,設定要到達的
Destination 位置
– $sctp0 set-primary-destination $host1_if0
不指定?

• force-source:設定多界面節點的主用interface
– $ns at 0 "$sctp1 force-source $host1_if0“
主要參數設定
Where to find?

in sctp.cc
• PathMaxRetrans_ 5
– 當路徑的錯誤計數器超過此參數值時,會將此路徑的狀態設為INACTIVE
並改由其他路徑傳輸。
• maxInitRetransmits 8
– 是INIT Chunk 的最大重傳次數
• heartInterval_ 30
– 當路徑超過此參數時間沒有資料傳送時,將路徑視為是idle path,並開始
透過HEARTBEAT 機制偵測路徑的狀態(以秒為單位)。
主要參數設定(cont.)
• mtu_ 1500
– 是指每條路徑的最大傳輸單位
• initialSsthresh_ 65536
– Ssthresh(以Byte 為單位)
• InitialCwnd_ 2
– Cwnd (以MTU - SCTP/IP headers 為單位)
• numOutStreams_ 1
– 指由傳送端到接收端有幾條outbound stream
• unordered_ 0
– 所傳輸的資料是有序或無序傳輸,預設0 指ordered
• ipHeaderSize_ 20
– IP header 的長度
主要參數設定(cont.)
• dataChunkSize_ 512
– Data chunk 的長度
• useDelayedSacks_ 1
– 是否使用Delay SACK
• rtxToAlt_ 1
….其餘參數設定可參閱NS2使用手冊
• rtxToAlt_
– 重傳的資料是否要使用其他路徑傳輸 0 = same,
1 = alt, 2 = fast rtx to same + timeouts to alt