Reduksi Konsumsi Energi Perangkat Bergerak WiMAX Melalui Pengaturan Beban Protokol Transport

LAMPIRAN 1
Masukan pada Script mac802_16SS.h

class Mac802_16SS : public Mac802_16 {
friend class BwRequest;

public:
Mac802_16SS();

//Kecepatan
double v_1=0;

//Kecepatan Mobile 1

double v_2=1.39;

//Kecepatan Mobile 2

double v_3=4.44;

//Kecepatan Mobile 3


double v_4=6.67;

//Kecepatan Mobile 4

double xbs_0=1000;

//Posisi koordinat X BTS

double ybs_0=1000;

//Posisi koordinat Y BTS

double D_;

//Jarak BTS ke Mobile

double x_;

//Posisi koordinat X


double y_;

//Posisi koordinat Y

//Posisi

//power receive
double Pr_;

//Power Receive

Universitas Sumatera Utara

double Pr_origin;
double Pr_dBm_;
double Pt_=10;

//Power Transmit


double Gr_=1;

//Gain antena receive

double Gt_=1;

//Gain antena Transmit

double L_=1;

//Loss pada Sistem

double pi_=3.14;
double lambda=0.12; //kecepatan cahaya dibagi frekuensi kerja 2.5 GHz
double B_=5e+6;

//Bandwidth

//KONSUMSI_ENERGI
double initial;

double energyTotal;
double battery=72000;
double energyTemp;
double idlePower=0.06;
double sleepPower=0.29;
double sendPower=0.17;
double recPower=0.07;
double ULPower=1;
double DLPower=1;
double turnON=1;

Universitas Sumatera Utara

LAMPIRAN 2
Masukan pada Script mac802_16SS.cc

A

Record konsumsi energi


energyTemp=(NOW-a)*recPower;
energyTotal=energyTotal+energyTemp;
battery=battery-energyTemp;
debug ("Energy model: at %f in Mac %d,battery: %.17f energy: %.17f total
energy %.17f\n", NOW, addr(), battery, energyTemp, energyTotal);

B

Record Jarak

void Mac802_16SS::receive ()
{
double a=initial;
assert (pktRx_);
struct hdr_cmn *ch = HDR_CMN(pktRx_);

//Pada Subscriber station 1
if(index_==1){
nn++;
sb++;

x_=600;
y_=800;

Universitas Sumatera Utara

//***
//MENGHITUNG JARAK BS ke SS
D_=sqrt((pow((x_-xbs_0),2))+(pow((y_-ybs_0),2)));

//power receive dalam watt
Pr_origin=(((Pt_*Gt_*Gr_*pow(lambda,2))/(pow((4*pi_*D_),2)*L_)));
Pr_=Pr_origin;

//power receive dalam dBm
Pr_dBm_=(10*log10(Pr_))+30;

}

//***


//Pada Subscriber station 2
}else if(index_==2){
nn++;
sb++;
x_=500/559.01*(v_2*NOW)+700;
y_=250/559.01*(v_2*NOW)+900;

Universitas Sumatera Utara

D_=sqrt((pow((x_-xbs_0),2))+(pow((y_-ybs_0),2)));
//***
//***
//Pada Subscriber station 3
}else if(index_==3){
nn++;
sb++;
x_=200/585.23*(v_3*NOW)+1100;
y_=550/585.23*(v_3*NOW)+800;
//***
//***

//Pada Subscriber station 4
}else if(index_==4){
nn++;
sb++;
x_=-600/813.94*(v_4*NOW)+1200;
y_=-550/813.94*(v_4*NOW)+1100;
//***
//***

}

Universitas Sumatera Utara

LAMPIRAN 3
Script wimax_uplink.Tcl

# Topology scenario:
#
#
|-----|

#
| MN0 |
#
|-----|
#
#
#
(^)
#
|
#
|--------------|
#
| Base Station |
#
|--------------|
#
|
#
|

#
|-----------|
#
| Sink node |
#
|-----------|
#

; 1.0.1

; 1.0.0

; 0.0.0

#check input parameters
if {$argc != 0} {
puts ""
puts "Wrong Number of Arguments! No arguments in this topology"
puts ""
exit (1)

}
# set global variables
set nb_mn 4
;# max number of mobile node
set packet_size
1052
;# packet size in bytes at CBR applications
set output_dir .
set gap_size 0 ;#compute gap size between packets
puts "gap size=$gap_size"
set traffic_start 30
#define debug values
Mac/802_16 set debug_ 1

Universitas Sumatera Utara

#Define WiMAX Parameters
Mac/802_16 set rtg_ 20
Mac/802_16 set ttg_ 20
Mac/802_16 set frame_duration_ 0.004
Mac/802_16 set client_timeout_ 110 ;#to avoid BS disconnecting the SS since the
traffic starts a 100s
Phy/WirelessPhy/OFDM set g_ 0.0; # Cyclic Prefix 0
WimaxScheduler/BS set dlratio_ 0.50; # 50% of Bandwidth is for downloading
#define coverage area for base station: 1000m coverage
Phy/WirelessPhy set Pt_ 0.281838
Phy/WirelessPhy set freq_ 5e+6
#Phy/WirelessPhy set RXThresh_ 2.90781e-09
Phy/WirelessPhy set RXThresh_ 1.42681e-12 ;#1000m radius
Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]]
# Parameter for wireless nodes
set opt(chan)
Channel/WirelessChannel ;# channel type
set opt(prop)
Propagation/TwoRayGround ;# radio-propagation model
set opt(netif)
Phy/WirelessPhy/OFDM
;# network interface type
set opt(mac)
Mac/802_16/BS
;# 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
set opt(x)
2000
;# X dimension of the topography
set opt(y)
2000
;# Y dimension of the topography
Mac/802_11 set basicRate_ 11Mb
Mac/802_11 set dataRate_ 11Mb
Mac/802_11 set bandwidth_ 11Mb
#defines function for flushing and closing files
proc finish {} {
global ns tf output_dir nb_mn
$ns flush-trace
close $tf
#Execute nam on the trace file
exec nam out1a.nam &
exit 0
}

Universitas Sumatera Utara

#create the simulator
set ns [new Simulator]
$ns use-newtrace
#create the topography
set topo [new Topography]
$topo load_flatgrid $opt(x) $opt(y)
#puts "Topology created"
#open file for trace
set tf [open $output_dir/out1a.res w]
$ns trace-all $tf
#initialize network animator
set namtrace [open out1a.nam w]
$ns namtrace-all-wireless $namtrace $opt(x) $opt(y)
#puts "Output file configured"
# set up for hierarchical routing (needed for routing over a basestation)
#puts "start hierarchical addressing"
$ns node-config -addressType hierarchical
AddrParams set domain_num_ 2
;# domain number
lappend cluster_num 1 1
;# cluster number for each
domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 1 [expr ($nb_mn+1)]
;# number of nodes for each
cluster (1 for sink and one for mobile nodes + base station
AddrParams set nodes_num_ $eilastlevel
puts "Configuration of hierarchical addressing done"
# Create God
create-god [expr ($nb_mn + 2)]
;# nb_mn + 2 (base
station and sink node)
#puts "God node created"
#creates the sink node in first addressing space.
set sinkNode [$ns node 0.0.0]
#provide some co-ord (fixed) to base station node
$sinkNode set X_ 1050.0
$sinkNode set Y_ 1050.0
$sinkNode set Z_ 0.0
#puts "sink node created"
#creates the Access Point (Base station)

Universitas Sumatera Utara

$ns node-config -adhocRouting $opt(adhocRouting) \
-llType $opt(ll) \
-macType Mac/802_16/BS \
-ifqType $opt(ifq) \
-ifqLen $opt(ifqlen) \
-antType $opt(ant) \
-propType $opt(prop) \
-phyType $opt(netif) \
-channel [new $opt(chan)] \
-topoInstance $topo \
-wiredRouting ON \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF
#puts "Configuration of base station"
set bstation [$ns node 1.0.0]
$bstation random-motion 0
#puts "Base-Station node created"
#provide some co-ord (fixed) to base station node
$bstation set X_ 1000.0
$bstation set Y_ 1000.0
$bstation set Z_ 0.0
[$bstation set mac_(0)] set-channel 0
# create the link between sink node and base station
$ns duplex-link $sinkNode $bstation 100Mb 1ms DropTail
$ns queue-limit $sinkNode $bstation 50
# creation trace traffic
set max_fragmented_size 1024
#add udp header(8 bytes) and IP header (20bytes)
set packetSize 1052
set original_file_name st20_20x
set trace_file_name video1.dat
set original_file_id [open $original_file_name r]
set trace_file_id [open $trace_file_name w]
set pre_time 0
while {[eof $original_file_id] == 0} {
gets $original_file_id current_line
scan $current_line "%d%s%d%d%f" no_ frametype_ length_ tmp1_ tmp2_

Universitas Sumatera Utara

set time [expr int(($tmp2_ - $pre_time)*1000000.0)]
if { $frametype_ == "I" } {
set type_v 1
set prio_p 0
}
if { $frametype_ == "P" } {
set type_v 2
set prio_p 0
}
if { $frametype_ == "B" } {
set type_v 3
set prio_p 0
}
if { $frametype_ == "H" } {
set type_v 1
set prio_p 0
}
puts $trace_file_id "$time $length_ $type_v $prio_p $max_fragmented_size"
set pre_time $tmp2_
}
close $original_file_id
close $trace_file_id
set end_sim_time $tmp2_
puts "$end_sim_time"
set trace_file [new Tracefile]
$trace_file filename $trace_file_name
# creation of the mobile nodes
$ns node-config -macType Mac/802_16/SS \
-wiredRouting OFF \
-macTrace ON
;# Mobile nodes cannot do
routing.
for {set i 0} {$i < $nb_mn} {incr i} {
set wl_node_($i) [$ns node 1.0.[expr $i + 1]]
;# create the node
with given @.
$wl_node_($i) random-motion 0
;# disable random
motion
$wl_node_($i) base-station [AddrParams addr2id [$bstation node-addr]]
;#attach mn to basestation

Universitas Sumatera Utara

if {$i == 0 } {
#compute position of the node
$wl_node_($i) set X_ 600
$wl_node_($i) set Y_ 800
$wl_node_($i) set Z_ 0.0
$ns at 0 "$wl_node_($i) setdest 1100.0 1050 0.0" ;#Fixed camera
}
if {$i == 1 } {
#compute position of the node
$wl_node_($i) set X_ 700
$wl_node_($i) set Y_ 900
$wl_node_($i) set Z_ 0.0
$ns at 0 "$wl_node_($i) setdest 1200.0 1150 1.39" ;#Walking
speed average: 5km/h according Wikipedia
}
if {$i == 2 } {
#compute position of the node
$wl_node_($i) set X_ 1100
$wl_node_($i) set Y_ 800
$wl_node_($i) set Z_ 0.0
$ns at 0 "$wl_node_($i) setdest 1300.0 1350 4.44" ;#Tram speed
average: 16km/h based on Yarra tram
}
if {$i == 3 } {
#compute position of the node
$wl_node_($i) set X_ 1200
$wl_node_($i) set Y_ 1100
$wl_node_($i) set Z_ 0.0
$ns at 0 "$wl_node_($i) setdest 600.0 550 6.67" ;#Bus speed in
city: average 24km/h based on Swedish city
}
puts "wireless node $i created ..."

;# debug info

[$wl_node_($i) set mac_(0)] set-channel 0
[$wl_node_($i) set mac_(0)] set-diuc 7 ;# Change the node profile here
(7=64QAM_3_4)
#create source traffic
#Create a UDP agent and attach it to node n0
set udp_($i) [new Agent/myUDP]
$udp_($i) set_filename udpSend1a_($i)

Universitas Sumatera Utara

$udp_($i) set packetSize_ 1052
#$udp_($i) set set_max_fd_ 0.3
#$udp_($i) set ccdelay_ 0.0
#$udp_($i) set set_win_ 0
#$udp_($i) set set_ack_distance 10
$udp_($i) set set_window_ 0
$ns attach-agent $wl_node_($i) $udp_($i)
# Attach video traffic source
set video1a_($i) [new Application/Traffic/myEvalvid]
$video1a_($i) attach-tracefile $trace_file
$video1a_($i) attach-agent $udp_($i)
# Create the Null agent to sink traffic
set null_($i) [new Agent/myEvalvid_Sink]
$null_($i) set_filename udpRec1a_($i)
$ns attach-agent $sinkNode $null_($i)
# Attach the 2 agents
$ns connect $udp_($i) $null_($i)
}
# Traffic scenario: if all the nodes start talking at the same
# time, we may see packet loss due to bandwidth request collision
set traffic_stop 271
set diff 0.1
for {set i 0} {$i < $nb_mn} {incr i} {
$ns at [expr $traffic_start+$i*$diff] "$video1a_($i) start"
$ns at [expr $traffic_stop+$i*$diff] "$video1a_($i) stop"
}
#$ns at 4 "$nd_(1) dump-table"
#$ns at 5 "$nd_(1) send-rs"
#$ns at 6 "$nd_(1) dump-table"
#$ns at 8 "$nd_(1) dump-table"
$ns at 275 "finish"
#$ns at $simulation_stop "$ns halt"
# Run the simulation
puts "Running simulation for $nb_mn mobile nodes..."
$ns run
puts "Simulation done."

Universitas Sumatera Utara

LAMPIRAN 4

A. Tanpa Pengaturan Beban
1

I

15876 16

0

24

P

2644

3

0.92

2

P

1223

2

0.04

25

P

2625

3

0.96

3

P

1116

2

0.08

26

P

2334

3

1

4

P

937

1

0.12

27

P

2449

3

1.04

5

P

1163

2

0.16

28

P

2805

3

1.08

6

P

1168

2

0.2

29

P

3192

4

1.12

7

P

1079

2

0.24

30

P

3275

4

1.16

8

P

1234

2

0.28

31

P

3532

4

1.2

9

P

1290

2

0.32

32

P

3349

4

1.24

10

P

1388

2

0.36

33

P

2887

3

1.28

11

P

1230

2

0.4

34

P

2752

3

1.32

12

P

1383

2

0.44

35

P

2880

3

1.36

13

P

1727

2

0.48

36

P

3088

4

1.4

14

P

2016

2

0.52

37

P

3069

3

1.44

15

P

2387

3

0.56

38

P

3165

4

1.48

16

P

3010

3

0.6

39

P

3185

4

1.52

17

P

3526

4

0.64

40

P

3066

3

1.56

18

P

3753

4

0.68

41

I

15781 16

1.6

19

P

3946

4

0.72

42

P

2408

3

1.64

20

P

3938

4

0.76

43

P

2372

3

1.68

21

I

16026 16

0.8

44

P

2181

3

1.72

22

P

2698

3

0.84

45

P

2340

3

1.76

23

P

2711

3

0.88

46

P

2411

3

1.8

Universitas Sumatera Utara

47

P

2561

3

1.84

74

P

3322

4

2.92

48

P

2866

3

1.88

75

P

2418

3

2.96

49

P

2546

3

1.92

76

P

2350

3

3

50

P

2158

3

1.96

77

P

2775

3

3.04

51

P

1462

2

2

78

P

3111

4

3.08

52

P

1326

2

2.04

79

P

3340

4

3.12

53

P

1633

2

2.08

80

P

3389

4

3.16

54

P

1934

2

2.12

81

I

15683 16

3.2

55

P

2134

3

2.16

82

P

2516

3

3.24

56

P

2199

3

2.2

83

P

2399

3

3.28

57

P

2120

3

2.24

84

P

2387

3

3.32

58

P

1713

2

2.28

85

P

2661

3

3.36

59

P

2410

3

2.32

86

P

3169

4

3.4

60

P

2575

3

2.36

87

P

3289

4

3.44

61

I

15689 16

2.4

88

P

3123

4

3.48

62

P

2478

3

2.44

89

P

2941

3

3.52

63

P

2493

3

2.48

90

P

2971

3

3.56

64

P

2430

3

2.52

91

P

2842

3

3.6

65

P

2416

3

2.56

92

P

2882

3

3.64

66

P

2276

3

2.6

93

P

2893

3

3.68

67

P

2721

3

2.64

94

P

2827

3

3.72

68

P

2672

3

2.68

95

P

2890

3

3.76

69

P

2927

3

2.72

96

P

3111

4

3.8

70

P

3246

4

2.76

97

P

2956

3

3.84

71

P

3456

4

2.8

98

P

2615

3

3.88

72

P

3685

4

2.84

99

P

1948

2

3.92

73

P

3551

4

2.88

100

P

2101

3

3.96

Universitas Sumatera Utara

101

I

15854 16

4

128

P

1748

2

5.08

102

P

2075

3

4.04

129

P

1840

2

5.12

103

P

2082

3

4.08

130

P

2226

3

5.16

104

P

2266

3

4.12

131

P

2167

3

5.2

105

P

3021

3

4.16

132

P

2351

3

5.24

106

P

3207

4

4.2

133

P

2272

3

5.28

107

P

3105

4

4.24

134

P

2110

3

5.32

108

P

2759

3

4.28

135

P

2407

3

5.36

109

P

3022

3

4.32

136

P

3219

4

5.4

110

P

2975

3

4.36

137

P

3502

4

5.44

111

P

2649

3

4.4

138

P

3350

4

5.48

112

P

2626

3

4.44

139

P

3124

4

5.52

113

P

2694

3

4.48

140

P

2850

3

5.56

114

P

2477

3

4.52

141

I

16123 16

5.6

115

P

2514

3

4.56

142

P

2469

3

5.64

116

P

2386

3

4.6

143

P

2279

3

5.68

117

P

2080

3

4.64

144

P

2041

2

5.72

118

P

1863

2

4.68

145

P

2220

3

5.76

119

P

1510

2

4.72

146

P

2174

3

5.8

120

P

1325

2

4.76

147

P

2020

2

5.84

121

I

15681 16

4.8

148

P

2142

3

5.88

122

P

1653

2

4.84

149

P

1898

2

5.92

123

P

2014

2

4.88

150

P

2010

2

5.96

124

P

1871

2

4.92

151

P

2120

3

6

125

P

1718

2

4.96

152

P

2261

3

6.04

126

P

1873

2

5

153

P

2514

3

6.08

127

P

1845

2

5.04

154

P

2575

3

6.12

Universitas Sumatera Utara

155

P

2666

3

6.16

182

P

1893

2

7.24

156

P

2665

3

6.2

183

P

2075

3

7.28

157

P

2909

3

6.24

184

P

1838

2

7.32

158

P

2921

3

6.28

185

P

1672

2

7.36

159

P

2666

3

6.32

186

P

1631

2

7.4

160

P

2738

3

6.36

187

P

1730

2

7.44

161

I

15823 16

6.4

188

P

2064

3

7.48

162

P

2201

3

6.44

189

P

2075

3

7.52

163

P

2633

3

6.48

190

P

1748

2

7.56

164

P

2681

3

6.52

191

P

2120

3

7.6

165

P

2483

3

6.56

192

P

1548

2

7.64

166

P

2007

2

6.6

193

P

1355

2

7.68

167

P

1769

2

6.64

194

P

1306

2

7.72

168

P

1810

2

6.68

195

P

1466

2

7.76

169

P

1907

2

6.72

196

P

1640

2

7.8

170

P

1700

2

6.76

197

P

1537

2

7.84

171

P

1697

2

6.8

198

P

1685

2

7.88

172

P

1585

2

6.84

199

P

1991

2

7.92

173

P

1562

2

6.88

200

P

2036

2

7.96

174

P

1350

2

6.92

201

I

15761 16

8

175

P

1236

2

6.96

202

P

1759

2

8.04

176

P

1388

2

7

203

P

1961

2

8.08

177

P

1690

2

7.04

204

P

1878

2

8.12

178

P

1881

2

7.08

205

P

1794

2

8.16

179

P

2144

3

7.12

206

P

1827

2

8.2

180

P

2247

3

7.16

207

P

1943

2

8.24

181

I

15794 16

7.2

208

P

2398

3

8.28

Universitas Sumatera Utara

209

P

2685

3

8.32

236

P

2823

3

9.4

210

P

2619

3

8.36

237

P

2921

3

9.44

211

P

2545

3

8.4

238

P

2814

3

9.48

212

P

2667

3

8.44

239

P

2861

3

9.52

213

P

2691

3

8.48

240

P

2491

3

9.56

214

P

2846

3

8.52

241

I

16193 16

9.6

215

P

2889

3

8.56

242

P

2619

3

9.64

216

P

3043

3

8.6

243

P

2919

3

9.68

217

P

3042

3

8.64

244

P

2661

3

9.72

218

P

3033

3

8.68

245

P

2493

3

9.76

219

P

3055

3

8.72

246

P

2735

3

9.8

220

P

3038

3

8.76

247

P

2524

3

9.84

221

I

16097 16

8.8

248

P

2573

3

9.88

222

P

2509

3

8.84

249

P

2629

3

9.92

223

P

2715

3

8.88

250

P

2774

3

9.96

224

P

2736

3

8.92

251

P

2707

3

10

225

P

2674

3

8.96

252

P

2443

3

10.04

226

P

2589

3

9

253

P

2640

3

10.08

227

P

2562

3

9.04

254

P

2721

3

10.12

228

P

2228

3

9.08

255

P

2525

3

10.16

229

P

2414

3

9.12

256

P

2258

3

10.2

230

P

2154

3

9.16

257

P

1741

2

10.24

231

P

1896

2

9.2

258

P

1922

2

10.28

232

P

2140

3

9.24

259

P

2552

3

10.32

233

P

2187

3

9.28

260

P

3031

3

10.36

234

P

2196

3

9.32

261

I

15999 16

10.4

235

P

2511

3

9.36

262

P

2505

10.44

3

Universitas Sumatera Utara

263

P

2610

3

10.48

290

P

2382

3

11.56

264

P

2444

3

10.52

291

P

2682

3

11.6

265

P

1976

2

10.56

292

P

2680

3

11.64

266

P

1573

2

10.6

293

P

2357

3

11.68

267

P

1863

2

10.64

294

P

2068

3

11.72

268

P

2116

3

10.68

295

P

2322

3

11.76

269

P

2153

3

10.72

296

P

2597

3

11.8

270

P

2007

2

10.76

297

P

2574

3

11.84

271

P

1922

2

10.8

298

P

2169

3

11.88

272

P

2012

2

10.84

299

P

2132

3

11.92

273

P

2062

3

10.88

300

P

1885

2

274

P

1936

2

10.92

275

P

2084

3

10.96

276

P

2359

3

11

277

P

2635

3

11.04

278

P

3148

4

11.08

279

P

3299

4

11.12

280

P

3265

4

11.16

281

I

15783 16

11.2

282

P

2597

3

11.24

283

P

2783

3

11.28

284

P

2778

3

11.32

285

P

2770

3

11.36

286

P

2733

3

11.4

287

P

2731

3

11.44

288

P

2452

3

11.48

289

P

2219

3

11.52

11.96

Universitas Sumatera Utara

B. Pengaturan Beban 1
1

I

15876 16

0

26

P

4972

6

1.84

2

P

2339

4

0.08

27

P

5412

6

1.92

3

P

2100

3

0.16

28

P

3620

5

2

4

P

2247

4

0.24

29

P

2959

4

2.08

5

P

2524

4

0.32

30

P

4068

5

2.16

6

P

2618

4

0.4

31

P

4319

6

2.24

7

P

3110

4

0.48

32

P

4123

5

2.32

8

P

4403

5

0.56

33

P

2575

3

2.36

9

P

6536

7

0.64

34

I

15689 16

2.4

10

P

7699

8

0.72

35

P

4971

6

2.48

11

P

3938

4

0.76

36

P

4846

6

2.56

12

I

16026 16

0.8

37

P

4997

6

2.64

13

P

5409

6

0.88

38

P

5599

6

2.72

14

P

5269

6

0.96

39

P

6702

8

2.8

15

P

4783

6

1.04

40

P

7236

8

2.88

16

P

5997

7

1.12

41

P

5740

7

2.96

17

P

6807

8

1.2

42

P

5125

6

3.04

18

P

6236

7

1.28

43

P

6451

8

3.12

19

P

5632

6

1.36

44

P

3389

4

3.16

20

P

6157

7

1.44

45

I

15683 16

3.2

21

P

6350

8

1.52

46

P

4915

6

3.28

22

P

3066

3

1.56

47

P

5048

6

3.36

23

I

15781 16

1.6

48

P

6458

8

3.44

24

P

4780

6

1.68

49

P

6064

7

3.52

25

P

4521

6

1.76

50

P

5813

6

3.6

Universitas Sumatera Utara

51

P

5775

6

3.68

78

I

16123 16

5.6

52

P

5717

6

3.76

79

P

4748

6

5.68

53

P

6067

7

3.84

80

P

4261

5

5.76

54

P

4563

5

3.92

81

P

4194

5

5.84

55

P

2101

3

3.96

82

P

4040

5

5.92

56

I

15854 16

4

83

P

4130

5

6

57

P

4157

6

4.08

84

P

4775

6

6.08

58

P

5287

6

4.16

85

P

5241

6

6.16

59

P

6312

8

4.24

86

P

5574

6

6.24

60

P

5781

6

4.32

87

P

5587

6

6.32

61

P

5624

6

4.4

88

P

2738

3

6.36

62

P

5320

6

4.48

89

I

15823 16

6.4

63

P

4991

6

4.56

90

P

4834

6

6.48

64

P

4466

6

4.64

91

P

5164

6

6.56

65

P

3373

4

4.72

92

P

3776

4

6.64

66

P

1325

2

4.76

93

P

3717

4

6.72

67

I

15681 16

4.8

94

P

3397

4

6.8

68

P

3667

4

4.88

95

P

3147

4

6.88

69

P

3589

4

4.96

96

P

2586

4

6.96

70

P

3718

4

5.04

97

P

3078

4

7.04

71

P

3588

4

5.12

98

P

4025

5

7.12

72

P

4393

6

5.2

99

P

2247

3

7.16

73

P

4623

6

5.28

100

I

15794 16

7.2

74

P

4517

6

5.36

101

P

3968

5

7.28

75

P

6721

8

5.44

102

P

3510

4

7.36

76

P

6474

8

5.52

103

P

3361

4

7.44

77

P

2850

3

5.56

104

P

4139

6

7.52

Universitas Sumatera Utara

105

P

3868

5

7.6

132

P

2491

3

9.56

106

P

2903

4

7.68

133

I

16193 16

9.6

107

P

2772

4

7.76

134

P

5538

6

9.68

108

P

3177

4

7.84

135

P

5154

6

9.76

109

P

3676

4

7.92

136

P

5259

6

9.84

110

P

2036

2

7.96

137

P

5202

6

9.92

111

I

15761 16

8

138

P

5481

6

10

112

P

3720

4

8.08

139

P

5083

6

10.08

113

P

3672

4

8.16

140

P

5246

6

10.16

114

P

3770

4

8.24

141

P

3999

5

10.24

115

P

5083

6

8.32

142

P

4474

5

10.32

116

P

5164

6

8.4

143

P

3031

3

10.36

117

P

5358

6

8.48

144

I

15999 16

10.4

118

P

5735

6

8.56

145

P

5115

6

10.48

119

P

6085

6

8.64

146

P

4420

5

10.56

120

P

6088

6

8.72

147

P

3436

4

10.64

121

P

3038

3

8.76

148

P

4269

6

10.72

122

I

16097 16

8.8

149

P

3929

4

10.8

123

P

5224

6

8.88

150

P

4074

5

10.88

124

P

5410

6

8.96

151

P

4020

5

10.96

125

P

5151

6

9.04

152

P

4994

6

11.04

126

P

4642

6

9.12

153

P

6447

8

11.12

127

P

4050

5

9.2

154

P

3265

4

11.16

128

P

4327

6

9.28

155

I

15783 16

11.2

129

P

4707

6

9.36

156

P

5380

6

11.28

130

P

5744

6

9.44

157

P

5548

6

11.36

131

P

5675

6

9.52

158

P

5464

6

11.44

Universitas Sumatera Utara

159

P

4671

6

11.52

163

P

5171

6

11.84

160

P

5064

6

11.6

164

P

4301

6

11.92

161

P

5037

6

11.68

165

P

1885

2

11.96

162

P

4390

6

11.76

Universitas Sumatera Utara

C. Pengaturan Beban 2
1

I

15876 16

0

26

P

7401

9

2.52

2

P

3276

5

0.12

27

P

7413

9

2.64

3

P

3410

6

0.24

28

P

8845

10

2.76

4

P

3912

6

0.36

29

P

10692 12

2.88

5

P

4340

6

0.48

30

P

8090

10

3

6

P

7413

8

0.6

31

P

9226

11

3.12

7

P

11225 12

0.72

32

P

3389

4

3.16

8

P

3938

0.76

33

I

15683 16

3.2

9

I

16026 16

0.8

34

P

7302

9

3.32

10

P

8053

9

0.92

35

P

9119

11

3.44

11

P

7408

9

1.04

36

P

9035

10

3.56

12

P

9272

11

1.16

37

P

8617

9

3.68

13

P

9768

11

1.28

38

P

8828

10

3.8

14

P

8720

10

1.4

39

P

7519

8

3.92

15

P

9419

11

1.52

40

P

2101

3

3.96

16

P

3066

3

1.56

41

I

15854 16

4

17

I

15781 16

1.6

42

P

6423

9

4.12

18

P

6961

9

1.72

43

P

9333

11

4.24

19

P

7312

9

1.84

44

P

8756

9

4.36

20

P

7570

9

1.96

45

P

7969

9

4.48

21

P

4421

6

2.08

46

P

7377

9

4.6

22

P

6267

8

2.2

47

P

5453

7

4.72

23

P

6243

8

2.32

48

P

1325

2

4.76

24

P

2575

3

2.36

49

I

15681 16

4.8

25

I

15689 16

2.4

50

P

5538

4.92

4

6

Universitas Sumatera Utara

51

P

5436

6

5.04

78

P

4412

6

7.8

52

P

5814

7

5.16

79

P

5213

6

7.92

53

P

6790

9

5.28

80

P

2036

2

7.96

54

P

7736

10

5.4

81

I

15761 16

8

55

P

9976

12

5.52

82

P

5598

6

8.12

56

P

2850

3

5.56

83

P

5564

6

8.24

57

I

16123 16

5.6

84

P

7702

9

8.36

58

P

6789

8

5.72

85

P

7903

9

8.48

59

P

6414

8

5.84

86

P

8778

9

8.6

60

P

6050

7

5.96

87

P

9130

9

8.72

61

P

6895

9

6.08

88

P

3038

3

8.76

62

P

7906

9

6.2

89

I

16097 16

8.8

63

P

8496

9

6.32

90

P

7960

9

8.92

64

P

2738

3

6.36

91

P

7825

9

9.04

65

I

15823 16

6.4

92

P

6796

9

9.16

66

P

7515

9

6.52

93

P

6223

8

9.28

67

P

6259

7

6.64

94

P

7530

9

9.4

68

P

5417

6

6.76

95

P

8596

9

9.52

69

P

4844

6

6.88

96

P

2491

3

9.56

70

P

3974

6

7

97

I

16193 16

9.6

71

P

5715

7

7.12

98

P

8199

9

9.72

72

P

2247

3

7.16

99

P

7752

9

9.84

73

I

15794 16

7.2

100

P

7976

9

9.96

74

P

5806

7

7.32

101

P

7790

9

10.08

75

P

5033

6

7.44

102

P

7504

9

10.2

76

P

5887

8

7.56

103

P

6215

7

10.32

77

P

5023

7

7.68

104

P

3031

3

10.36

Universitas Sumatera Utara

105

I

15999 16

10.4

106

P

7559

9

10.52

107

P

5412

6

10.64

108

P

6276

8

10.76

109

P

5996

7

10.88

110

P

6379

8

11

111

P

9082

11

11.12

112

P

3265

4

11.16

113

I

15783 16

11.2

114

P

8158

9

11.32

115

P

8234

9

11.44

116

P

7053

9

11.56

117

P

7719

9

11.68

118

P

6987

9

11.8

119

P

6875

9

11.92

120

P

1885

2

11.9

Universitas Sumatera Utara

LAMPIRAN 5
Proses Saat Menjalankan Simulasi NS-2

1. Hal yang pertama dilakukan adalah membuka “command line” pada OS
Ubuntu 12.35. Dengan cara “ Ctrl + Alt + T “, apabila sudah dilakukan akan
terlihat pada gambar berikut.

Gambar Terminal Pada Ubuntu 12.35

2. Langkah selanjutnya, kita membuat sebuah “Folder” di “Home” dan kita
tempatkan file yang berformat .tcl yaitu program yang sudah dibuat
sebelumnya (Lampiran 3) dan trafik video yang berformat .txt (Lampiran 4).

Universitas Sumatera Utara

Gambar Membuat Folder dan Meletakkan File .Tcl

3. Apabila sudah selesai dilakukan, maka kembali ke “command line” untuk
proses pengujian simulasi pada NS-2. Pada “command line” ketik sebuah
perintah “cd” yang mana fungsinya kita untuk masuk kedalam folder yang kita
buat sebelumnya, kalau pada simulasi ini nama foldernya “Tanpa Pengaturan
beban
protokol” yang dapat terlihat pada gambar dibawah. Kemudian tekan “Enter”.

Gambar Command Line Pada Ubuntu 12.35

4. Jika sudah, ketik sebuah perintah “ns” yang mana fungsinya untuk
menjalankan program NS-2. Lalu tekan “Enter”.

Universitas Sumatera Utara

Gambar Command Line Pada Ubuntu 12.35
5. Pada gambar dibawah, menunjukkan program NS-2 sedang berjalan.

Gambar Pogram NS-2 Sedang Berjalan
6. Jadi, pada saat proses simulasi sudah selesai berjalan, maka akan muncul
sebuah animasi .nam yang sudah dilakukan menggunakan program .Tcl yang
dapat terlihat pada gambar dibawah. Untuk melihat proses terjadinya simulasi
dengan mengklik “Play Forward”.

Universitas Sumatera Utara

Gambar Animasi Simulasi Pada NS-2

Universitas Sumatera Utara

7. Kemudian, dari simulasi pada NS-2 didapat sebuah file yang berbentuk .txt
yang nantinya kita olah kedalam Ms.Exel untuk mendapat hasil simulasi yang
kita inginkan. Untuk Tugas akhir ini hanya menganalisa permintaan client saja
sehingga file dengan nama “udprec” yang diolah nantinya. Seperi yang terlihat
pada gambar dibawah.

Gambar Hasil Simulasi Pada NS-2

Universitas Sumatera Utara

8. Pada Gambar dibawah, itu adalah salah satu isi hasil simulasi yang telah
dilakukan dan hasil simulasi tersebut di olah menggunakan Ms.Exel agar
didapat perhitungan delaydan packet loss.

Gambar Hasil Simulasi Pada NS-2

Universitas Sumatera Utara