NUMBER PORTABILITY

Posted: June 12, 2010 in Uncategorized

Banyak negara mengimplementasikan number portability karena pertumbuhan pengguna telepon, terutama telepon bergerak, telah berada pada satu titik masif, yang tidak akan bisa tumbuh secara signifikan lagi. Karenanya, agar iklim kompetisi tetap berjalan dan menarik investor, maka dikeluarkan kebijakan number portability.Kemudahan yang didapat pengguna seluler untuk berpindah operator tanpa perlu berganti nomor besar kemungkinan akan meningkatkan angka churn. Inilah yang ditakutkan oleh operator dominan. Mereka tentu tidak ingin pelanggannya yang selama ini setia karena alasan malas berganti nomor, pindah ke operator lain. Selain itu, tingkat kerumitan, terkait dengan database pelanggan, penyesuaian nomor dan dukungan infrastruktur lainnya, yang dihadapi oleh operator dominan pasti lebih besar dibanding operator yang pelanggannya masih sedikit.
Berdasarkan hal diatas, maka dibangun sebuah jaringan sederhana yang terdiri dari 2 server Trixbox dengan ENUM di dalamnya yang bisa di representasikan sebagai 2 provider. Setelah itu ke dua server tersebut di interkoneksikan agar bisa mempresentasikan tekonologi yang disebut number portability dengan pengalihan panggilan atau biasa di sebut dengan arsitektur Call Diversion. Melalui ENUM, diharapkan teknologi number portability ini bisa di imlementasikan. ENUM adalah pemetaan nomor perangkat elektronik (dalam hal ini nomor telepon berdasarkan format dalam rekomendasi ITU-T E.164) kepada system penamaan DNS, Uniform Resource Identifier (URI) yang digunakan secara global dalam Internet. Pada akhirnya, permintaan penggunaan berbagai layanan telekomunikasi dengan pengguna lain dapat diakses dengan satu nomor saja. Selain itu, adanya perubahan detail layanan pada tiap pengguna tetap dapat dihubungi dengan nomor yang sama.
Setelah mengintegrasikan teknologi number portability di server Trixbox dengan ENUM di dalamnya, maka dikoneksikan jaringan IP tersebut dengan jaringan PSTN agar bisa berhubungan antara softphone atau IP Phone yang berbasis IP dengan telepon analog biasa atau Handphone. Cara menyambungkan ke dua jaringan tersebut dengan mengkoneksikan ke dua jaringan tersebut dengan IP PBX milik IT Telkom. Dan diharapkan bisa di implementasikan teknologi number portability secara sederhana.

Kata kunci : number portability, ENUM, Call Diversion, DNS, IP PBX, Trixbox, VoIP

SCRIPT AWK

Posted: June 12, 2010 in Uncategorized

Berikut akan di beri contoh script2 awk untuk pengambilan data QoS, seperti delay, throughput, packetloss dan jitter..

Contoh script awk untuk qos delay:

BEGIN {

for (i in send) {

send[i] = 0

sendt[i] = 0

}

for (i in recv) {

recv[i] = 0

recvt[i] = 0

}

delay = 0

num = 0

avg_delay = 0

}

{

# Trace line format: normal

if ($2 != “-t”) {

event = $1

time = $2

node_id_s = $3

node_id_d = $4

pkt_type = $5

pkt_size = $6

pkt_attrib = $7

pkt_id = $12

}

# Trace line format: new

#if ($2 == “-t”) {

#        event = $1

#        time = $3

#        node_id = $5

#        flow_id = $39

#        pkt_id = $41

#}

# Store packets sent

if (event == “+” && node_id_s == “2” && pkt_type == “exp”) {

send[pkt_id] = time

sendt[pkt_id] = 1

#       print(“send[“,pkt_id,”] = “,time)

}

# Store packets arrival time

if (event == “r” && node_id_d == “9” && pkt_type == “exp”) {

recv[pkt_id] = time

recvt[pkt_id] = 1

#        print(“recv[“,pkt_id,”] = “,time)

#       print(” –> delay[“,pkt_id,”]= “,recv[pkt_id]-send[pkt_id])

if (recvt[pkt_id] == 1 && sendt[pkt_id] == 1) {

print (time,” “,(recv[pkt_id]-send[pkt_id])) > “delay.tr” }

}

}

END {

# Compute average delay

for (i in recv) {

if (sendt[i] == 1 && recvt[i] == 1) {

delay += recv[i] – send[i]

num ++

}

}

if (num != 0) {

avg_delay = delay / num

} else {

avg_delay = 0

}

print(“”)

print(“”)

print(“==> Average delay = “,avg_delay,”s”)

print(”                  = “,avg_delay*1000,”ms”)

}


Contoh script awk untuk qos throughput:

BEGIN {

for (i in send) {

send[i] = 0

}

for (i in recv) {

recv[i] = 0

}

tx = 0

drop = 0

pkt_loss = 0

pkt_rcvd = 0

time_obsrv = 15

}

{

# Trace line format: normal

if ($2 != “-t”) {

event = $1

time = $2

node_id_s = $3

node_id_d = $4

pkt_type = $5

pkt_size = $6

pkt_attrib = $7

pkt_id = $12

}

# Trace line format: new

#if ($2 == “-t”) {

#        event = $1

#        time = $3

#        node_id = $5

#        flow_id = $39

#        pkt_id = $41

#}

# Store packets sent

if (event == “+” && node_id_s == “2” && pkt_type == “exp”) {

send[pkt_id] = 1

#printf(“send[%g] = 1\n”,pkt_id)

}

# Store packets arrival time

if (event == “r” && node_id_d == “9” && pkt_type == “exp”) {

recv[pkt_id] = 1

#printf(“\t\trecv[%g] = 1\n”,pkt_id)

}

}

END {

#printf(“%10g “,flow)

for (i in send) {

if (send[i] == 1) {

tx ++

if (recv[i] == 0) {

drop ++

#printf(“pkt %g not recvd\n”,i)

}

}

}

if (tx != 0) {

pkt_loss = drop / tx

pkt_rcvd = tx – drop

} else {

pkt_loss = 0

}

print(“”)

print(“Packet sent             = “,tx)

print(“Packet success received = “,pkt_rcvd)

print(“==> Throughput                      = “,pkt_rcvd/time_obsrv,”packets/s” )

print(”                                    = “,(pkt_rcvd/time_obsrv)*(8/1000)*66,”kbps” )

}


Contoh script awk untuk qos packetloss:

BEGIN {

for (i in send) {

send[i] = 0

}

for (i in recv) {

recv[i] = 0

}

tx = 0

drop = 0

pkt_loss = 0

}

{

# Trace line format: normal

if ($2 != “-t”) {

event = $1

time = $2

node_id_s = $3

node_id_d = $4

pkt_type = $5

pkt_size = $6

pkt_attrib = $7

pkt_id = $12

}

# Trace line format: new

#if ($2 == “-t”) {

#        event = $1

#        time = $3

#        node_id = $5

#        flow_id = $39

#        pkt_id = $41

#}

# Store packets sent

if (event == “+” && node_id_s == “2” && pkt_type == “exp”) {

send[pkt_id] = 1

#printf(“send[%g] = 1\n”,pkt_id)

}

# Store packets arrival time

if (event == “r” && node_id_d == “9” && pkt_type == “exp”) {

recv[pkt_id] = 1

#printf(“\t\trecv[%g] = 1\n”,pkt_id)

}

}

END {

#printf(“%10g “,flow)

for (i in send) {

if (send[i] == 1) {

tx ++

if (recv[i] == 0) {

drop ++

#printf(“pkt %g not recvd\n”,i)

}

}

}

if (tx != 0) {

pkt_loss = drop / tx

} else {

pkt_loss = 0

}

print(“”)

print(“Packet sent        = “,tx)

print(“Packet dropped          = “,drop)

print(“==> Packet loss    = “,pkt_loss*100,”%”)

print(“”)

}


Contoh script awk untuk qos jitter:

BEGIN {

num_recv=0

for (i in sendTime) {

sendTime[i] = 0

}

for (i in recvTIme) {

recvTime[i] = 0

}

}

{

# Trace line format: normal

if ($2 != “-t”) {

event     = $1

time      = $2

node_id_s = $3

node_id_d = $4

flow_id   = $8

pkt_id    = $12

pkt_size  = $6

pkt_type  = $5

}

# Trace line format: new

#             if ($2 == “-t”) {

#             event    = $1

#             time     = $3

#             node_id_s = $5

#             node_id_d = $7

#             flow_id  = $39

#             pkt_id   = $41

#             pkt_size = $37

#             pkt_type = $35

#             flow_t   = $45

#             level    = $19

#             }

# Store packets send time

if (event == “+” && pkt_type == “exp” && node_id_s == “2”) {

sendTime[pkt_id] = time

}

# Store packets arrival time

if (event == “r” && pkt_type == “exp” && node_id_d == “9”) {

recvTime[pkt_id] = time

num_recv++

}

}

END {

# Compute average jitter

jitter1 = jitter2 = tmp_recv = 0

prev_time = delay = prev_delay = processed = 0

prev_delay = -1

for (i=0; processed<num_recv; i++) {

if(recvTime[i] != 0) {

tmp_recv++

if(prev_time != 0) {

delay = recvTime[i] – prev_time

e2eDelay = recvTime[i] – sendTime[i]

if(delay < 0) delay = 0

if(prev_delay != -1) {

jitter1 += abs(e2eDelay – prev_e2eDelay)                                                                                                                                      jitter2 += abs(delay – prev_delay)

}

prev_delay = delay

prev_e2eDelay = e2eDelay

}

prev_time = recvTime[i]

processed++

}

}

}

END {

print(“One way jitter       = “,jitter1*1000/tmp_recv,” ms”);

print(“Inter arrival jitter = “,jitter2*1000/tmp_recv,” ms”);

}

function abs(value) {

if (value < 0) value = 0-value

return value

}


Contoh perhitungan yang keluar:

SCRIPT JARINGAN WIRED + WIRELESS

Posted: June 12, 2010 in Uncategorized

Kalau yang ini contoh script jaringan wired + wireless, di buat saat pelatihan network simulator tahun 2009 silam.

# Copyright (c) 2009 Regents of the research.conf ’06

# Switching Technique Laboratory

# wireless.tcl

# simulation of a wired+wireless topology running with mobile nodes

# ======================================================================

# Define options

# ======================================================================

set opt(chan)        Channel/WirelessChannel                 ;# channel type

set opt(prop)         Propagation/TwoRayGround           ;# radio-propagation model

set opt(netif)         Phy/WirelessPhy                                  ;# network interface type

set opt(mac)         Mac/802_11                                        ;# 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(nn)             4                                                                             ;# number of mobilenodes

set opt(adhocRouting)   DSDV                                         ;# routing protocol

set opt(cp)             “”                                                                             ;# cp file not used

set opt(sc)              “”                                                                             ;# node movement file.

set opt(x)               1000                                                                       ;# x coordinate of topology

set opt(y)               1000                                                                       ;# y coordinate of topology

set opt(seed)         0.0                                                                          ;# random seed

set opt(stop)          250                                                                         ;# time to stop simulation

set opt(ftp1-start)     100.0

set num_wired_nodes     2

set num_bs_nodes        2                                                    ;# number of base nodes

# ======================================================================

# check for boundary parameters and random seed

if { $opt(x) == 0 || $opt(y) == 0 } {

puts “No X-Y boundary values given for wireless topology\n”

}

if {$opt(seed) > 0} {

puts “Seeding Random number generator with $opt(seed)\n”

ns-random $opt(seed)

}

# create simulator instance

set ns_   [new Simulator]

# set up for hierarchical routing

$ns_ node-config -addressType hierarchical

AddrParams set domain_num_ 3                    ;# number of domains

lappend cluster_num 1 1 1                                ;# number of clusters in each domain

AddrParams set cluster_num_ $cluster_num

lappend eilastlevel 2 3 3                                     ;# number of nodes in each cluster

AddrParams set nodes_num_ $eilastlevel      ;# of each domain

set tracefd  [open wireless.tr w]

set namtrace [open wireless.nam w]

$ns_ use-newtrace

$ns_ trace-all $tracefd

$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)

# Create topography object

set topo   [new Topography]

# define topology

$topo load_flatgrid $opt(x) $opt(y)

# create God

#   2 for AP1 dan AP2

create-god [expr $opt(nn) + $num_bs_nodes]

#create wired nodes

set temp {0.0.0 0.0.1}                                                                         ;# hierarchical addresses

for {set i 0} {$i < $num_wired_nodes} {incr i} {

set W($i) [$ns_ node [lindex $temp $i]]

}

# Configure for AP1 &AP2

$ns_ node-config                 -mobileIP OFF \

-adhocRouting $opt(adhocRouting) \

-llType $opt(ll) \

-macType $opt(mac) \

-ifqType $opt(ifq) \

-ifqLen $opt(ifqlen) \

-antType $opt(ant) \

-propType $opt(prop) \

-phyType $opt(netif) \

-channelType $opt(chan) \

-topoInstance $topo \

-wiredRouting ON \

-agentTrace ON \

-routerTrace ON \

-macTrace OFF

# Create AP1 and AP2

set AP1 [$ns_ node 1.0.0]

set AP2 [$ns_ node 2.0.0]

$AP1 random-motion 0

$AP2 random-motion 0

$AP1 color blue

$AP2 color red

$AP1 label “AP kharis”

$AP2 label “AP dodyst”

# Position (fixed) for base-station nodes (AP1 & AP2).

$AP1 set X_ 600.000000000000

$AP1 set Y_ 600.000000000000

$AP1 set Z_ 0.000000000000

$AP2 set X_ 650.000000000000

$AP2 set Y_ 600.000000000000

$AP2 set Z_ 0.000000000000

# create a mobilenode that would be moving between AP1 and AP2.

# note address of revient indicates its in the same domain as AP1.

$ns_ node-config -wiredRouting OFF

set revient [$ns_ node 1.0.1]

set node_(0) $revient

$node_(0) base-station [AddrParams addr2id [$AP1 node-addr]]

$revient label “revient”

#baru topek

set topek [$ns_ node 1.0.2]

set node_(1) $topek

$node_(1) base-station [AddrParams addr2id [$AP1 node-addr]]

$topek label “topek”

#baru satya

set satya [$ns_ node 2.0.1]

set node_(2) $satya

$node_(2) base-station [AddrParams addr2id [$AP2 node-addr]]

$satya label “satya”

#baru arief

set arief [$ns_ node 2.0.2]

set node_(3) $arief

$node_(3) base-station [AddrParams addr2id [$AP2 node-addr]]

$arief label “arief”

#letak topek

$topek set Z_ 0.000000000000

$topek set Y_ 500.000000000000

$topek set X_ 400.000000000000

# letak revient

$revient set Z_ 0.000000000000

$revient set Y_ 600.000000000000

$revient set X_ 400.000000000000

#letak satya

$satya set Z_ 0.000000000000

$satya set Y_ 700.000000000000

$satya set X_ 400.000000000000

#letak arief

$arief set Z_ 0.000000000000

$arief set Y_ 800.000000000000

$arief set X_ 400.000000000000

# goes back to HA

$ns_ at 50.000000000000 “$revient setdest 600.000000000000 700.000000000000 20.000000000000”

$ns_ at 50.000000000000 “$topek setdest 500.000000000000 700.000000000000 20.000000000000”

$ns_ at 50.000000000000 “$satya setdest 700.000000000000 700.000000000000 20.000000000000”

$ns_ at 50.000000000000 “$arief setdest 800.000000000000 700.000000000000 20.000000000000”

$ns_ at 100.000000000000 “$topek setdest 990.000000000000 500.000000000000 20.000000000000”

$ns_ at 100.000000000000 “$revient setdest 990.000000000000 600.000000000000 20.000000000000”

$ns_ at 100.000000000000 “$satya setdest 990.000000000000 700.000000000000 20.000000000000”

$ns_ at 100.000000000000 “$arief setdest 990.000000000000 800.000000000000 20.000000000000”

$ns_ at 150.000000000000 “$topek setdest 500.000000000000 500.000000000000 20.000000000000”

$ns_ at 150.000000000000 “$revient setdest 600.000000000000 500.000000000000 20.000000000000”

$ns_ at 150.000000000000 “$satya setdest 700.000000000000 500.000000000000 20.000000000000”

$ns_ at 150.000000000000 “$arief setdest 800.000000000000 500.000000000000 20.000000000000”

$ns_ at 200.000000000000 “$topek setdest 400.000000000000 500.000000000000 20.000000000000”

$ns_ at 200.000000000000 “$revient setdest 400.000000000000 600.000000000000 20.000000000000”

$ns_ at 200.000000000000 “$satya setdest 400.000000000000 700.000000000000 20.000000000000”

$ns_ at 200.000000000000 “$arief setdest 400.000000000000 800.000000000000 20.000000000000”

# create links between wired and BaseStation nodes

$ns_ duplex-link $W(0) $W(1) 5Mb 2ms DRR

$ns_ duplex-link $W(1) $AP1 5Mb 2ms DropTail

$ns_ duplex-link $W(1) $AP2 5Mb 2ms DropTail

$ns_ duplex-link-op $W(0) $W(1) orient down

$ns_ duplex-link-op $W(1) $AP1 orient left-down

$ns_ duplex-link-op $W(1) $AP2 orient right-down

# setup TCP connections between a wired node and the MobileHost

#warna-warna

$ns_ color 0 blue

$ns_ color 1 red

$ns_ color 2 green

$ns_ color 3 magenta

$W(0) label “Server FTP”

$W(1) label “Router”

set tcp1 [new Agent/TCP]

$tcp1 set class_ 0

set sink1 [new Agent/TCPSink]

$ns_ attach-agent $W(0) $tcp1

$ns_ attach-agent $revient $sink1

$ns_ connect $tcp1 $sink1

set ftp1 [new Application/FTP]

$ftp1 attach-agent $tcp1

$ns_ at 3.0 “$ftp1 start”

set tcp2 [new Agent/TCP]

$tcp2 set class_ 1

set sink2 [new Agent/TCPSink]

$ns_ attach-agent $W(0) $tcp2

$ns_ attach-agent $topek $sink2

$ns_ connect $tcp2 $sink2

set ftp2 [new Application/FTP]

$ftp2 attach-agent $tcp2

$ns_ at 3.0 “$ftp2 start”

set tcp3 [new Agent/TCP]

$tcp3 set class_ 2

set sink3 [new Agent/TCPSink]

$ns_ attach-agent $W(0) $tcp3

$ns_ attach-agent $arief $sink3

$ns_ connect $tcp3 $sink3

set ftp3 [new Application/FTP]

$ftp3 attach-agent $tcp3

$ns_ at 3.0 “$ftp3 start”

set tcp4 [new Agent/TCP]

$tcp4 set class_ 3

set sink4 [new Agent/TCPSink]

$ns_ attach-agent $W(0) $tcp4

$ns_ attach-agent $satya $sink4

$ns_ connect $tcp4 $sink4

set ftp4 [new Application/FTP]

$ftp4 attach-agent $tcp4

#$ns_ at  $opt(ftp2-start) “$ftp2 start”

$ns_ at 3.0 “$ftp4 start”

# source connection-pattern and node-movement scripts

if { $opt(cp) == “” } {

puts “*** NOTE: no connection pattern specified.”

set opt(cp) “none”

} else {

puts “Loading connection pattern…”

source $opt(cp)

}

if { $opt(sc) == “” } {

puts “*** NOTE: no scenario file specified.”

set opt(sc) “none”

} else {

puts “Loading scenario file…”

source $opt(sc)

puts “Load complete…”

}

# Define initial node position in nam

for {set i 0} {$i < $opt(nn)} {incr i} {

# 20 defines the node size in nam, must adjust it according to your

# scenario

# The function must be called after mobility model is defined

$ns_ initial_node_pos $node_($i) 20

}

# Tell all nodes when the siulation ends

for {set i 0} {$i < $opt(nn) } {incr i} {

$ns_ at $opt(stop).0 “$node_($i) reset”;

}

$ns_ at $opt(stop).0 “$AP1 reset”;

$ns_ at $opt(stop).0 “$AP2 reset”;

$ns_ at $opt(stop).0002 “puts \”NS EXITING…\” ; $ns_ halt”

$ns_ at $opt(stop).0001 “stop”

proc stop {} {

global ns_ tracefd namtrace

close $tracefd

close $namtrace

exec nam wireless.nam &

exec awk -f delay.awk wireless.tr &

exec awk -f packetloss.awk wireless.tr &

exec awk -f throughput.awk wireless.tr &

exec awk -f jitter.awk wireless.tr &

exec xgraph delay.tr -geometry 400×800 &

exit 0

}

# some useful headers for tracefile

puts $tracefd “M 0.0 nn $opt(nn) x $opt(x) y $opt(y) rp \

$opt(adhocRouting)”

puts $tracefd “M 0.0 sc $opt(sc) cp $opt(cp) seed $opt(seed)”

puts $tracefd “M 0.0 prop $opt(prop) ant $opt(ant)”

puts “Starting Simulation…”

$ns_ run

#=======================================================================

Animasi yang keluar:

Gambar animasi jaringan wired+wireless

SCRIPT SIMULASI JARINGAN WIRED

Posted: June 12, 2010 in Uncategorized

Berikut di sajikan contoh script simulasi jaringan wired sederhana, script ini di buat bersama team riset switching pada saat pelatihan 2009 silam, bersama akang2 yang luar biasa seperti akang arip, satya, topek dan pak kordas kharis….

# Copyright (c) 2009 Regents of the research.conf ’06

# Switching Technique Laboratory IT Telkom

# wired.tcl

# simulation of a wired topology

#===================================================================

# Define options

#===================================================================

#starting simulations

set ns [new Simulator]

set f [open wired.tr w]

set nf [open wired.nam w]

$ns trace-all  $f

$ns namtrace-all $nf

proc finish {} {

global ns f nf

$ns flush-trace

close $f

close $nf

exec nam wired.nam &

exec awk -f delay.awk wired.tr &

exec awk -f packetloss.awk wired.tr &

exec awk -f throughput.awk wired.tr &

exec awk -f jitter.awk wired.tr &

exec xgraph delay.tr -geometry 400×400 &

exit 0

}

$ns at 15.0 “finish”

#create nodes

for {set i 0} {$i < 10 } {incr i} {

set n($i) [$ns node]

}

#initializing packet colors

$ns color 0 blue

$ns color 1 red

$ns color 2 green

#initializing nodes

$n(0) color blue

$n(0) label “Transmit FTP”

$n(1) color red

$n(1) label “Transmit CBR”

$n(2) color green

$n(2) label “Transmit Voip”

for {set j 3} {$j < 9} {incr j} {

$n($j) label “Router $j”

$n($j) shape hexagon }

$n(9) color magenta

$n(9) shape box

$n(9) label “Receive All”

#created links

$ns duplex-link $n(0) $n(3) 1Mb 6ms DropTail

$ns duplex-link $n(1) $n(3) 1Mb 6ms DropTail

$ns duplex-link $n(2) $n(3) 1Mb 6ms DropTail

$ns duplex-link $n(3) $n(4) 1Mb 10ms DropTail

$ns duplex-link $n(3) $n(5) 1Mb 10ms DropTail

$ns duplex-link $n(4) $n(5) 1Mb 6ms DropTail

$ns duplex-link $n(4) $n(6) 1Mb 6ms DropTail

$ns duplex-link $n(4) $n(7) 1Mb 10ms DropTail

$ns duplex-link $n(5) $n(6) 1Mb 10ms DropTail

$ns duplex-link $n(5) $n(7) 1Mb 6ms DropTail

$ns duplex-link $n(6) $n(7) 1Mb 6ms DropTail

$ns duplex-link $n(6) $n(8) 1Mb 10ms DropTail

$ns duplex-link $n(7) $n(8) 1Mb 10ms DropTail

$ns duplex-link $n(8) $n(9) 1Mb 10ms DropTail

#positioning every nodes

$ns duplex-link-op $n(0) $n(3) orient right-down

$ns duplex-link-op $n(1) $n(3) orient right

$ns duplex-link-op $n(2) $n(3) orient right-up

$ns duplex-link-op $n(3) $n(4) orient right-up

$ns duplex-link-op $n(3) $n(5) orient right-down

$ns duplex-link-op $n(4) $n(5) orient down

$ns duplex-link-op $n(4) $n(6) orient right

$ns duplex-link-op $n(4) $n(7) orient right-down

$ns duplex-link-op $n(5) $n(6) orient right-up

$ns duplex-link-op $n(5) $n(7) orient right

$ns duplex-link-op $n(6) $n(7) orient down

$ns duplex-link-op $n(6) $n(8) orient right-down

$ns duplex-link-op $n(7) $n(8) orient right-up

$ns duplex-link-op $n(8) $n(9) orient right

#(life or death) link

$ns rtmodel-at 3.0 down $n(5) $n(6)

$ns rtmodel-at 8.0 up $n(5) $n(6)

#routing type

$ns rtproto DV

#link value

$ns cost $n(3) $n(4) 4

$ns cost $n(3) $n(5) 3

$ns cost $n(4) $n(5) 2

$ns cost $n(4) $n(6) 4

$ns cost $n(4) $n(7) 5

$ns cost $n(5) $n(6) 4

$ns cost $n(5) $n(7) 3

$ns cost $n(6) $n(7) 5

$ns cost $n(6) $n(8) 3

$ns cost $n(7) $n(8) 5

#created transport agent and application

set tcp [new Agent/TCP]

$tcp set class_ 0

$tcp set packetSize_ 700

$ns attach-agent $n(0) $tcp

set ftp [new Application/FTP]

$ftp attach-agent $tcp

set tcpsink [new Agent/TCPSink]

$ns attach-agent $n(9) $tcpsink

$ns connect $tcp $tcpsink

set udp [new Agent/UDP]

$udp set class_ 1

$udp set packetSize_ 500

$udp set interval_ 0.005

$ns attach-agent $n(1) $udp

set cbr [new Application/Traffic/CBR]

$cbr attach-agent $udp

set nulludp [new Agent/Null]

$ns attach-agent $n(9) $nulludp

$ns connect $udp $nulludp

set rtp [new Agent/RTP]

$rtp set class_ 2

$rtp set packetSize_ 66

$ns attach-agent $n(2) $rtp

set voip [new Application/Traffic/Exponential]

$voip set rate_ 8Kb

$voip set packetSize_ 20

$voip attach-agent $rtp

set nullrtp [new Agent/Null]

$ns attach-agent $n(9) $nullrtp

$ns connect $rtp $nullrtp

#start and stop apllication

$ns at 1.0 “$ftp start”

$ns at 1.0 “$cbr start”

$ns at 1.0 “$voip start”

$ns at 14.5 “$ftp stop”

$ns at 14.5 “$cbr stop”

$ns at 14.5 “$voip stop”

puts “created by ns team (revin,topik,satya,arip,kharis)”

$ns run

#===================================================================

Kalau di jalankan, Insya Allah gambar yang akan mucul seperti ini:

Gambar animasi jaringan wired

CARA MENGINSTAL NS-2

Posted: February 15, 2009 in Uncategorized

Salah satu Kelebihan NS-2 adalah dapat di jalankan di berbagai operating sistem. Pada awalnya NS di bangun untuk di jalankan pada OS yang menggunakan platform UNIX seperti Linux, Sun OS, Solaris dan Free BSD. Namun pada pengembangannya NS dapat juga di jalankan di atas Windows.

Sekarang OS yang kita gunakan adalah Slackware 12.0 dan software NS yang di gunakan adalah ns-allinone-2.31. Ns-allinone adalah source NS-2 yang berisi seluruh komponen wajib dan opsional yang di butuhkan saat menjalankan program NS.

INSTALASI

1. Ekstrak paket NS

#tar -xzvf ns-allinone-2.31.tar.gz

2. Masuk ke direktori hasil ekstrak

#cd/ns-allinone-2.31

3. Install NS

#./install

4.  Setelah instalasi ketik

#nano /etc/profile

Lalu tambahkan script di bawah ini

export PATH=/root/ns-allinone-2.31/bin:$PATH

export LD_LIBRARY=/root/ns-allinone-2.31/otcl-1.13:/root/ns-allinone-2.31/lib:$PATH

export TCL_LIBRARY=/root/ns-allinone-2.31/tcl-8.4.14:$PATH

Setelah di edit, simpan dan keluar dari file editor

ctrl+x lalu ketik “y”

5. Restart linux

#reboot

PENGUJIAN INSTALASI

Untuk menguji ns-allinone.2.31 telah terinstalasi dengan benar atau belum, dapat dicoba dengan masuk ke direktori

#cd /ns-allinone-2.31/ns2.31/tcl/ex

lalu jalankan

#ns simple.tcl

jika instalasi berhasil Insya Allah akan muncul tampilan sebagai berikut:

Gambar animasi dari simple.tcl