[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lan simulation



802.3 implementation lacked mac-level retransmissions.  I hope I have
fixed that - try downloading daily snapshot and see if that solves
your problem.

   -Yuri

Jeff Donahoo <[email protected]> writes:

> This is a multi-part message in MIME format.
> 
> ------=_NextPart_000_0040_01BF1B1F.6A9578A0
> Content-Type: text/plain;
> 	charset="EUC-KR"
> Content-Transfer-Encoding: 7bit
> 
> Hi!  We noted this problem a while back and posted example code similar to
> yours (in fact our code also showed a condition where a single collision
> stopped both senders forever).  We never got an answer to our question.  The
> conclusion we reached is that the 802_3 code is broken.  No correction has
> been posted that I have seen.  Let me know if you find a patch or
> work-around.
> 
> Good Luck.
> 
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Kisoon Sung
> Sent: Wednesday, October 20, 1999 3:47 AM
> To: ns users
> Subject: lan simulation
> 
> 
>     Hi, all!!
>     I don't understand it..
> 
>     #Open the output files
>     set f0 [open out0.tr w]
>     set f1 [open out1.tr w]
>     set f2 [open out2.tr w]
> 
>     #Create lan env
> 
>     set opt(tr)     out
>     set opt(namtr)  "mylan2.nam"
>     set opt(seed)   0
>     set opt(stop)   20
>     set opt(node)   8
> 
>     set opt(qsize)  100
>     set opt(bw)     10Mb
>     set opt(delay)  1ms
>     set opt(ll)     LL
>     set opt(ifq)    Queue/DropTail
>     set opt(mac)    Mac/802_3
>     set opt(chan)   Channel
> 
> 
>     #Define a 'finish' procedure
>     proc finish {}
> 
>             global env nshome pwd
>             global f0 f1 f2 ns opt trfd
>             #Close the output files
>             close $f0
>             close $f1
>             close $f2
>             close $trfd
>             #Call xgraph to display the results
>             exec nam mylan2.nam
> 
>     #       exec xgraph out0.tr out1.tr out2.tr -geometry 800x400 &
>             exit 0
>     }
> 
>     proc attach-expoo-traffic { node sink size burst idle rate }
> 
>             #Get an instance of the simulator
>             set ns [Simulator instance]
>             #Create a UDP agent and attach it to the node
>             set source [new Agent/CBR/UDP]
>             $ns attach-agent $node $source
>             #Create an Expoo traffic agent and set its configuration
> parameters
>             set traffic [new Traffic/Expoo]
>             $traffic set packet-size $size
>             $traffic set burst-time $burst
>             $traffic set idle-time $idle
>             $traffic set rate $rate
>             #Attach the traffic agent to the traffic source
>             $source attach-traffic $traffic
>             #Connect the source and the sink
>             $ns connect $source $sink
>             return $source
>     }
> 
>     proc record {}
> 
>             global sink0 sink1 sink2 f0 f1 f2 opt
>             #Get an instance of the simulator
>             set ns [Simulator instance]
>             #Set the time after which the procedure should be called again
>             set time 0.5
>             #How many bytes have been received by the traffic sinks?
>             set bw0 [$sink0 set bytes_]
>             set bw1 [$sink1 set bytes_]
>             set bw2 [$sink2 set bytes_]
>             #Get the current time
>             set now [$ns now]
>             #Calculate the bandwidth (in MBit/s) and write it to the files
>             puts $f0 "$now [expr $bw0/$time*8/1000000]"
>             puts $f1 "$now [expr $bw1/$time*8/1000000]"
>             puts $f2 "$now [expr $bw2/$time*8/1000000]"
>             #Reset the bytes_ values on the traffic sinks
>             $sink0 set bytes_ 0
>             $sink1 set bytes_ 0
>             $sink2 set bytes_ 0
>             #Re-schedule the procedure
>             $ns at [expr $now+$time] "record"
>     }
> 
>     proc create-trace {}
> 
>             global ns opt
> 
>             if [file exists $opt(tr)]
> 
>                     catch "exec rm -f $opt(tr) $opt(tr)-bw [glob
> $opt(tr).*]"
>             }
> 
>             set trfd [open $opt(tr) w]
>             $ns trace-all $trfd
>             if {$opt(namtr) != ""}
> 
>                     $ns namtrace-all [open $opt(namtr) w]
>             }
>             return $trfd
>     }
> 
>     #Configure lan
>     proc create-topology {}
> 
>             global ns opt
>             global lan node source node(0) node(1) node(2)
> 
> 
>             set num $opt(node)
>          for {set i 0} {$i < $num} {incr i}
> 
>                     set node($i) [$ns node]
>                     lappend nodelist $node($i)
>             }
> 
>             set lan [$ns newLan $nodelist $opt(bw) $opt(delay) \
>                             -llType $opt(ll) -ifqType $opt(ifq) \
>                             -macType $opt(mac) -chanType $opt(chan)]
> 
> 
>     }
> 
>     ##MAIN##
>     set ns [new Simulator]
>     set trfd [create-trace]
> 
>     create-topology
> 
>     #Create three traffic sinks and attach them to the node n4
>     set sink0 [new Agent/LossMonitor]
>     set sink1 [new Agent/LossMonitor]
>     set sink2 [new Agent/LossMonitor]
>     $ns attach-agent $node(7) $sink0
>     $ns attach-agent $node(7) $sink1
>     $ns attach-agent $node(7) $sink2
> 
>     #Create three traffic sources
>     set source0 [attach-expoo-traffic $node(0) $sink0 200 2s 1s 100k]
>     set source1 [attach-expoo-traffic $node(1) $sink1 200 2s 1s 200k]
>     set source2 [attach-expoo-traffic $node(2) $sink2 200 2s 1s 300k]
> 
>     #Start logging the received bandwidth
>     $ns at 0.0 "record"
>     #Start the traffic sources
>     $ns at 10.0 "$source0 start"
>     $ns at 10.0 "$source1 start"
>     $ns at 10.0 "$source2 start"
>     #Stop the traffic sources
>     $ns at 50.0 "$source0 stop"
>     $ns at 50.0 "$source1 stop"
>     $ns at 50.0 "$source2 stop"
>     #Call the finish procedure after 60 seconds simulation time
>     $ns at 60.0 "finish"
> 
>     #Run the simulation
>     $ns run
> 
>     I simulated  this source...
>     This source's base topology is LAN and it's mac is 802_3.
>     But packet transmitted at same time and not occured collision..
>     I know 803_3 is csma/cd protocol... isn't is?
> 
>     Please help me!!
> 
> 
>     --
>     ****************************
>     Chungnam national University
>     Computer Communications Lab.
>     Kisoon Sung
>     [email protected]
>     +82-42-821-7792
>     ****************************
> 
> 
> 
> ------=_NextPart_000_0040_01BF1B1F.6A9578A0
> Content-Type: text/html;
> 	charset="EUC-KR"
> Content-Transfer-Encoding: quoted-printable
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
> <HTML>
> <HEAD>
> 
> <META content=3D"text/html; charset=3Dks_c_5601-1987" =
> http-equiv=3DContent-Type>
> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
> </HEAD>
> <BODY>
> <DIV><SPAN class=3D046541622-20101999><FONT color=3D#0000ff face=3DArial =
> 
> size=3D2>Hi!&nbsp; We noted this problem a while back and posted example =
> code=20
> similar to yours (in fact our code also showed a condition where a =
> single=20
> collision stopped both senders forever).&nbsp; We never got an answer to =
> our=20
> question.&nbsp; The conclusion we reached is that the 802_3 code is=20
> broken.&nbsp; No correction has been posted that I have seen.&nbsp; Let =
> me know=20
> if you find a patch or work-around.</FONT></SPAN></DIV>
> <DIV><SPAN class=3D046541622-20101999><FONT color=3D#0000ff face=3DArial =
> 
> size=3D2></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D046541622-20101999><FONT color=3D#0000ff face=3DArial =
> size=3D2>Good=20
> Luck.</FONT></SPAN></DIV>
> <DIV><SPAN class=3D046541622-20101999><FONT color=3D#0000ff face=3DArial =
> 
> size=3D2></FONT></SPAN><FONT face=3DTahoma size=3D2><BR><B>From:</B>=20
> [email protected]=20
> [mailto:[email protected]]<B>On Behalf Of </B>Kisoon=20
> Sung<BR><B>Sent:</B> Wednesday, October 20, 1999 3:47 AM<BR><B>To:</B> =
> ns=20
> users<BR><B>Subject:</B> lan simulation<BR><BR></FONT></DIV>
> <BLOCKQUOTE=20
> style=3D"BORDER-LEFT: #0000ff solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
> 5px">Hi,=20
>     all!!=20
>     <P>I don't understand it..=20
>     <P><FONT size=3D-1>#Open the output files</FONT> <BR><FONT =
> size=3D-1>set f0=20
>     [open out0.tr w]</FONT> <BR><FONT size=3D-1>set f1 [open out1.tr =
> w]</FONT>=20
>     <BR><FONT size=3D-1>set f2 [open out2.tr w]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>#Create lan env</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>set =
> opt(tr)&nbsp;&nbsp;&nbsp;&nbsp;=20
>     out</FONT> <BR><FONT size=3D-1>set opt(namtr)&nbsp;=20
>     &quot;mylan2.nam&quot;</FONT> <BR><FONT size=3D-1>set =
> opt(seed)&nbsp;&nbsp;=20
>     0</FONT> <BR><FONT size=3D-1>set opt(stop)&nbsp;&nbsp; 20</FONT> =
> <BR><FONT=20
>     size=3D-1>set opt(node)&nbsp;&nbsp; 8</FONT> <BR><FONT =
> size=3D-1>&nbsp;</FONT>=20
>     <BR><FONT size=3D-1>set opt(qsize)&nbsp; 100</FONT> <BR><FONT =
> size=3D-1>set=20
>     opt(bw)&nbsp;&nbsp;&nbsp;&nbsp; 10Mb</FONT> <BR><FONT size=3D-1>set=20
>     opt(delay)&nbsp; 1ms</FONT> <BR><FONT size=3D-1>set=20
>     opt(ll)&nbsp;&nbsp;&nbsp;&nbsp; LL</FONT> <BR><FONT size=3D-1>set=20
>     opt(ifq)&nbsp;&nbsp;&nbsp; Queue/DropTail</FONT> <BR><FONT =
> size=3D-1>set=20
>     opt(mac)&nbsp;&nbsp;&nbsp; Mac/802_3</FONT> <BR><FONT size=3D-1>set=20
>     opt(chan)&nbsp;&nbsp; Channel</FONT> <BR><FONT =
> size=3D-1>&nbsp;</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>#Define a =
> 'finish'=20
>     procedure</FONT> <BR><FONT size=3D-1>proc finish {} {</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global env =
> nshome=20
>     pwd</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     global f0 f1 f2 ns opt trfd</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Close the =
> output=20
>     files</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     close $f0</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close =
> $f1</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close =
> 
>     $f2</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     close $trfd</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Call xgraph to =
> display=20
>     the results</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec nam=20
>     mylan2.nam</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec xgraph out0.tr =
> out1.tr=20
>     out2.tr -geometry 800x400 &amp;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 0</FONT> =
> <BR><FONT=20
>     size=3D-1>}</FONT><FONT size=3D-1></FONT>=20
>     <P><FONT size=3D-1>proc attach-expoo-traffic { node sink size burst =
> idle rate=20
>     } {</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Get=20
>     an instance of the simulator</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ns =
> [Simulator=20
>     instance]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Create a UDP =
> agent and=20
>     attach it to the node</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set source [new =
> 
>     Agent/CBR/UDP]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ns =
> attach-agent $node=20
>     $source</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     #Create an Expoo traffic agent and set its configuration =
> parameters</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set =
> traffic=20
>     [new Traffic/Expoo]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $traffic set =
> packet-size=20
>     $size</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     $traffic set burst-time $burst</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $traffic set =
> idle-time=20
>     $idle</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     $traffic set rate $rate</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Attach the =
> traffic agent=20
>     to the traffic source</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $source =
> attach-traffic=20
>     $traffic</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     #Connect the source and the sink</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ns connect =
> $source=20
>     $sink</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     return $source</FONT> <BR><FONT size=3D-1>}</FONT><FONT =
> size=3D-1></FONT>=20
>     <P><FONT size=3D-1>proc record {} {</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global sink0 =
> sink1 sink2=20
>     f0 f1 f2 opt</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Get an =
> instance of the=20
>     simulator</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ns =
> [Simulator=20
>     instance]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Set the time =
> after which=20
>     the procedure should be called again</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set time =
> 0.5</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #How =
> many bytes=20
>     have been received by the traffic sinks?</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set bw0 [$sink0 =
> set=20
>     bytes_]</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     set bw1 [$sink1 set bytes_]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set bw2 [$sink2 =
> set=20
>     bytes_]</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     #Get the current time</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set now [$ns =
> now]</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
> #Calculate the=20
>     bandwidth (in MBit/s) and write it to the files</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; puts $f0 =
> &quot;$now [expr=20
>     $bw0/$time*8/1000000]&quot;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; puts $f1 =
> &quot;$now [expr=20
>     $bw1/$time*8/1000000]&quot;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; puts $f2 =
> &quot;$now [expr=20
>     $bw2/$time*8/1000000]&quot;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Reset the =
> bytes_ values=20
>     on the traffic sinks</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sink0 set =
> bytes_=20
>     0</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sink1=20
>     set bytes_ 0</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sink2 set =
> bytes_=20
>     0</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     #Re-schedule the procedure</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ns at [expr =
> $now+$time]=20
>     &quot;record&quot;</FONT> <BR><FONT size=3D-1>}</FONT><FONT =
> size=3D-1></FONT>=20
>     <P><FONT size=3D-1>proc create-trace {} {</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global ns =
> opt</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [file exists =
> $opt(tr)]=20
>     {</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     catch &quot;exec rm -f $opt(tr) $opt(tr)-bw [glob =
> $opt(tr).*]&quot;</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
> }</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set trfd [open =
> $opt(tr)=20
>     w]</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ns=20
>     trace-all $trfd</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if {$opt(namtr) =
> !=3D=20
>     &quot;&quot;} {</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     $ns namtrace-all [open $opt(namtr) w]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return =
> $trfd</FONT>=20
>     <BR><FONT size=3D-1>}</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> =
> <BR><FONT=20
>     size=3D-1>#Configure lan</FONT> <BR><FONT size=3D-1>proc =
> create-topology {}=20
>     {</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global=20
>     ns opt</FONT> <BR><FONT =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     global lan node source node(0) node(1) node(2)</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set num =
> $opt(node)</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp; for {set i 0} {$i &lt; =
> $num}=20
>     {incr i} {</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     set node($i) [$ns node]</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
>     lappend nodelist $node($i)</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set lan [$ns =
> newLan=20
>     $nodelist $opt(bw) $opt(delay) \</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
> p;=20
>     -llType $opt(ll) -ifqType $opt(ifq) \</FONT> <BR><FONT=20
>     =
> size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
> p;=20
>     -macType $opt(mac) -chanType $opt(chan)]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>}</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> <BR><FONT=20
>     size=3D-1>##MAIN##</FONT> <BR><FONT size=3D-1>set ns [new =
> Simulator]</FONT>=20
>     <BR><FONT size=3D-1>set trfd [create-trace]</FONT> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>create-topology</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>#Create three traffic =
> sinks and=20
>     attach them to the node n4</FONT> <BR><FONT size=3D-1>set sink0 [new =
> 
>     Agent/LossMonitor]</FONT> <BR><FONT size=3D-1>set sink1 [new=20
>     Agent/LossMonitor]</FONT> <BR><FONT size=3D-1>set sink2 [new=20
>     Agent/LossMonitor]</FONT> <BR><FONT size=3D-1>$ns attach-agent =
> $node(7)=20
>     $sink0</FONT> <BR><FONT size=3D-1>$ns attach-agent $node(7) =
> $sink1</FONT>=20
>     <BR><FONT size=3D-1>$ns attach-agent $node(7) $sink2</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>#Create three traffic =
> sources</FONT>=20
>     <BR><FONT size=3D-1>set source0 [attach-expoo-traffic $node(0) =
> $sink0 200 2s=20
>     1s 100k]</FONT> <BR><FONT size=3D-1>set source1 =
> [attach-expoo-traffic $node(1)=20
>     $sink1 200 2s 1s 200k]</FONT> <BR><FONT size=3D-1>set source2=20
>     [attach-expoo-traffic $node(2) $sink2 200 2s 1s 300k]</FONT> =
> <BR><FONT=20
>     size=3D-1>&nbsp;</FONT> <BR><FONT size=3D-1>#Start logging the =
> received=20
>     bandwidth</FONT> <BR><FONT size=3D-1>$ns at 0.0 =
> &quot;record&quot;</FONT>=20
>     <BR><FONT size=3D-1>#Start the traffic sources</FONT> <BR><FONT =
> size=3D-1>$ns at=20
>     10.0 &quot;$source0 start&quot;</FONT> <BR><FONT size=3D-1>$ns at =
> 10.0=20
>     &quot;$source1 start&quot;</FONT> <BR><FONT size=3D-1>$ns at 10.0=20
>     &quot;$source2 start&quot;</FONT> <BR><FONT size=3D-1>#Stop the =
> traffic=20
>     sources</FONT> <BR><FONT size=3D-1>$ns at 50.0 &quot;$source0=20
>     stop&quot;</FONT> <BR><FONT size=3D-1>$ns at 50.0 &quot;$source1=20
>     stop&quot;</FONT> <BR><FONT size=3D-1>$ns at 50.0 &quot;$source2=20
>     stop&quot;</FONT> <BR><FONT size=3D-1>#Call the finish procedure =
> after 60=20
>     seconds simulation time</FONT> <BR><FONT size=3D-1>$ns at 60.0=20
>     &quot;finish&quot;</FONT> <BR><FONT size=3D-1>&nbsp;</FONT> =
> <BR><FONT=20
>     size=3D-1>#Run the simulation</FONT> <BR><FONT size=3D-1>$ns =
> run</FONT>=20
>     <BR><FONT size=3D-1>&nbsp;</FONT> <BR>I simulated&nbsp; this =
> source...=20
>     <BR>This source's base topology is LAN and it's mac is 802_3. =
> <BR>But packet=20
>     transmitted at same time and not occured collision.. <BR>I know =
> 803_3 is=20
>     csma/cd protocol... isn't is?=20
>     <P>Please help me!! <BR>&nbsp;=20
>     <P>-- <BR>**************************** <BR>Chungnam national =
> University=20
>     <BR>Computer Communications Lab. <BR>Kisoon Sung=20
>     <BR>[email protected] <BR>+82-42-821-7792=20
>     <BR>**************************** <BR>&nbsp; =
> </P></BLOCKQUOTE></BODY></HTML>
> 
> ------=_NextPart_000_0040_01BF1B1F.6A9578A0--