NSG2 Wired

download NSG2 Wired

of 18

Transcript of NSG2 Wired

  • 7/25/2019 NSG2 Wired

    1/18

    NSG

    NSG

    NSG ns2 !"

    #NSG2$%#NSG1$&'()*+,-.NSG2/0123

    456789:23;567?NSG2@ABCD23 ns2

    EFGHI

    1. ;567D4567#J+2345D;5KL$

    2. 23NodeGHIWirelessNodeDWiredNode

    3. 23WirelessNodeMNO

    4. 23 LinkGHIDuplex-linkD Simplex-link

    5. Agent23

    #T!PT!"T#$oePT!"%enoPT!"Ne&renoPT!"'eg#sPT!SinkP(D!D

    N(LL$

    ). 23Appli*#tionGH+%D ,T!

    . 23%outing proto*olGHIDSD'PDS%PAD'D T%A

    /. 230ueueGHIDropT#ilP%DP,0PD%%PS,0D+0

    . 4567QRO

    1. /2.11STO#NSGUVW /2.11XST$

    Y. NSG2 < #6# Z[\]^-_`23 #6# abcde#f

    Windo&sPLinuxP7#* S ...$g9NSG2< #6# #rhi)jk

  • 7/25/2019 NSG2 Wired

    2/18

    n6ironment#%$ #6# S De6elopment 9it#D9$< Windo&

    AOtuv #6#^- DS >v:

    java

    -version:ftuy #6#c? #6#

    #S 1${

    1.tuv #6#

    ftuvJy % D9^- #6#6c=p

    % D9S6c{

    A'A6I$ttp8"";#6#.sun.*om";#6#se"do&nlo#ds"index.;sp

    AzNNSG2^- DS>vsNSG2irv#]v

    NSG2r-8

  • 7/25/2019 NSG2 Wired

    3/18

  • 7/25/2019 NSG2 Wired

    4/18

    3. NSG2v@AEFR

    Hand mode

    -@#nd modei=BC@A^

  • 7/25/2019 NSG2 Wired

    5/18

    i|v0$#in8%9aPGrid#nn$D%#ndomonO

    Node%Node8,-^:*67;O- Link

    modev^)ONode%Node?7f Simplex-link Duplex-link

    mOQRST#'@*PA>GH${OBC

    4DAE"Node^OF^G)?7

    STH/?7{

    Agent mode

    - Agent modev^OAIJ-NodecKO#- ns2vL

    Agent$NSG2@A23 T!#Gh$%(D!KO|

    OioA-AIJNodec=4A5

    Agent^

    Agent-.IJ-M

    Nodec!+N

    Oo00

  • 7/25/2019 NSG2 Wired

    6/18

    AgentGc?i4)Of T! *ongestion &indo&

    p#*ket si?eQRO{

    Application mode

    - Appli*#tion mode i6=^

  • 7/25/2019 NSG2 Wired

    7/18

    uvw~AST^*}-5NSG~.=k[sv{

    2. H/EF=EFBQREFH/fH/

    Node;s=Node LinkD;IJs=NodeAgentH

    /!AgentH/;IJ-=AgentAppli*#tion

    H/{

    3. OAgent];O'ST#UT$- TL

    =Agentxy\=AgentOJsv

    +;0{

    NSG);567

  • 7/25/2019 NSG2 Wired

    8/18

    4. n2-n3h 17psO 2ms{

    5. ;?7Duplex-linkPA>DropT#ilA>*

    #0ueue limit$O 1*{

    -WiO

    1. *r*}O 15>tesm< 17ps'S@*)jS-

    1S-! 4E'S{

    2. *r1*}O 15>tesm< 17ps'S@*)jS

    m- 2S-! 3E'S{

    3. O 5{

    YZY. ns2(D!KOX*} 1>tes

    *}y 1>tes (D! w'})'S

    # Segment#tion$tes

  • 7/25/2019 NSG2 Wired

    9/18

    5.;567

    Step2bnANode4A5Node

  • 7/25/2019 NSG2 Wired

    10/18

    ) 8OF nodeQR

    Step3ONode8?7s Link mode#= Link@

    trlC3$=>STOF{

    1. Link-t>peduplex-link

    2. 0ueue t>peDropT#il

    3. #p#*it>27ps

    4. !rop#g#tion del#>

    1ms

    5. 0ueue si?e1

    Step4O 17ps!rop#g#tion del#>O 2ms

    b n2-n3?7bFf fbyv;ST

    ]OF^

  • 7/25/2019 NSG2 Wired

    11/18

    8OF node8?7

    Step5s Agent mode#= Agent@ trlC4$)eK

    OO{4DAgent t>pe(D!mO*}#!#*ket si?e$

    15 >tesm- n n1cb Agent4D Agent t>pe

    N(LLm- n4Pn5cbN(LL Agent{bFAgent8:

    AO Agent85|Oi4DAb5

    "Agent-]X-#udpPnull2$%#udp1Pnull3$8b

    5bF8f /{

  • 7/25/2019 NSG2 Wired

    12/18

    / 8bAgents

    Step)s Appli*#tion mode#= Appli*#tion@ trlC5$)

    ecdWiO Appli*#tion t>peO +%mOzN

    #St#rt time$ 1E#Stop time$ 4*}

    15>tes ' @ * 17ps - n c b +%

    Appli*#tionzN#St#rt time$ 2E#Stop

    time$ 3m- n1cb+% Appli*#tionf {

  • 7/25/2019 NSG2 Wired

    13/18

    8bAppli*#tion

    StepOST#= !#r#meters^@ trlC)$-

    v\b;567

  • 7/25/2019 NSG2 Wired

    14/18

    07b-br

    :^

  • 7/25/2019 NSG2 Wired

    15/18

    #pen the NS trace (ileset trace(ile ,open out.tr w-ns trace0all trace(ile

    #pen the N trace (ileset nam(ile ,open out.nam w-ns namtrace0all nam(ile

    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# Nodes 3e(inition#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#+reate 4 nodesset n& ,ns node-set n1 ,ns node-set n2 ,ns node-set n5 ,ns node-set n6 ,ns node-set n% ,ns node-

    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# 7in8s 3e(inition#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#+reatelin8s between nodesns duple90lin8 n& n2 2.&b 1&ms 3ropTailns ueue0limit n& n2 1&ns duple90lin8 n2 n1 2.&b 1&ms 3ropTailns ueue0limit n2 n1 1&ns duple90lin8 n6 n5 2.&b 1&ms 3ropTailns ueue0limit n6 n5 1&ns duple90lin8 n5 n% 2.&b 1&ms 3ropTailns ueue0limit n5 n% 1&ns duple90lin8 n2 n5 1.&b 2&ms 3ropTail

    ns ueue0limit n2 n5 1&

    #Gi"e node position (or N$ns duple90lin80op n& n2 orient right0downns duple90lin80op n2 n1 orient le(t0downns duple90lin80op n6 n5 orient le(t0downns duple90lin80op n5 n% orient right0downns duple90lin80op n2 n5 orient right

    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# gents 3e(inition#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#Setup a ;3 connection

    set udp& ,new gent/;3-ns attach0agent n& udp&set null2 ,new gent/Null-ns attach0agent n6 null2ns connect udp& null2udp& set pac8etSi*e= 1%&&

    #Setup a ;3 connectionset udp1 ,new gent/;3-ns attach0agent n1 udp1set null5 ,new gent/Null-ns attach0agent n% null5ns connect udp1 null5

    udp1 set pac8etSi*e= 1%&&

  • 7/25/2019 NSG2 Wired

    16/18

    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# pplications 3e(inition#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#Setup a +>? pplication o"er ;3 connectionset cbr& ,new pplication/Tra((ic/+>?-cbr& attach0agent udp&cbr& set pac8etSi*e= 1%&&cbr& set rate= 1.&bcbr& set random= nullns at 1.& @cbr& start@ns at 6.& @cbr& stop@

    #Setup a +>? pplication o"er ;3 connectionset cbr1 ,new pplication/Tra((ic/+>?-cbr1 attach0agent udp1cbr1 set pac8etSi*e= 1%&&cbr1 set rate= 1.&bcbr1 set random= nullns at 2.& @cbr1 start@ns at 5.& @cbr1 stop@

    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!# Termination#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#3e(ine a A(inishA procedureproc (inish BC B global ns trace(ile nam(ile ns (lush0trace close trace(ile close nam(ile e9ec nam out.nam D e9it &

    Cns at "alstop$ @ns nam0end0wireless "alstop$@ns at "alstop$ @(inish@ns at "alstop$ @puts E@doneE@ ' ns halt@ns run

    NSG?)NzNNA7)yf+

    NA7zN^-NSGvSTONA7 ,ile4>O-1NSGw+

    zNNA7[sv{ 12NA7zN^

  • 7/25/2019 NSG2 Wired

    17/18

    12

  • 7/25/2019 NSG2 Wired

    18/18

    y