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

Re: asymetric link



Unfortunately nam cannot do asymmetric links; it assumes all links are
duplex and thus symmetric.

- Haobo

On Mon, 23 Aug 1999, Karim Benjelloun wrote:

> >
> > if you would like to set up something like
> >
> >     ------------------>
> > n0                       n1
> >     hello,
> >
> > if you would like to set up something like
> >
> >     ------------------>
> > n0                       n1
> >     <------------------
> >
> >
> > you could go like:
> >
> > set ns [new Simulator]
> > set n0 [$ns node]
> > set n1 [$ns node]
> >
> >
> > $ns simplex-link $n0 $n1 2Mb 300ms DropTail
> >                          ^^^^^^^^^^^^^^^^^^
> > $ns simplex-link $n1 $n0 0.5Mb 10ms DropTail
> >                          ^^^^^^^^^^^^^^^^^^^
> > of course, for ^^^, you put whatever you need!
> >
> > hope this helps,
> > chris
> >
> 
> This is exactly what I'm trying to do !!!
> For more convenience, here is the script I'm running :
> 
> -----------------------
> set ns [new Simulator]
> 
> set nf [open out.nam w]
> $ns namtrace-all $nf
> 
> proc finish {} {
>         global ns nf
>         $ns flush-trace
>         close $nf
>         exit 0
> }
> 
> # Nodes
> set n0 [$ns node]
> set n1 [$ns node]
> 
> # Asymetric Link
> $ns simplex-link $n0 $n1 10Mb 600ms DropTail
> $ns simplex-link $n1 $n0 28.8Kb 10ms DropTail
> 
> # TCPs
> set tcp0 [new Agent/TCP/SimpleTcp]
> $ns attach-agent $n0 $tcp0
> $tcp0 set fid_ 0
> set null0 [new Agent/TCPSink]
> $ns attach-agent $n1 $null0
> $null0 set fid_ 1
> $ns connect $tcp0 $null0
> 
> # FTP
> set ftp0 [new Application/FTP]
> $ftp0 attach-agent $tcp0
> 
> # Colors ...
> $ns color 0 Blue
> $ns color 1 Red
> 
> Application/FTP instproc start {} {
>     [$self agent] send 100;
> }
> 
> $ns at 0s "$ftp0 start"
> $ns at 10s "$ftp0 stop"
> $ns at 50s "finish"
> 
> $ns run
> -----------------------
> 
> When I run the nam, I notice that the speed of the first
> emitted pkt is equal to the speed of the corresponding ack,
> which should NOT be the case because the link is asymetric.
> Is this a problem related to the link, or to TCP (do I have
> to use another TCP ?) ?
> 
> Thank you very much, and sorry for disturbing
> 
> 	Karim
> 
> 
> 
> ______________________________________________________
> Bo�te aux lettres - Caramail - http://www.caramail.com
> 
>