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

Re: Re: [ns] emulation problems



Hi,Anurag Goel

Thank you for your help very much!

I added the following 2 lines to my scripts:

set myether [$card0 linkaddr]
$card0 filter "(dst $clientaddr or dst $serveraddr) and (not ether src $myether)"

This time nse did not duplicate package THOUSANDS time, but TWICE.

$ns attach-agent $node0 $AgentCard
$ns attach-agent $node1 $AgentOut
#$AgentCard target $AgentOut;  #line 1
#$ns connect $AgentCard $AgentOut; #line 2
$ns simplex-connect $AgentCard $AgentOut; #line 3

Choosing line 1 or 2 or 3 did not affect the result.

I am debuging, perhaps the line "      $card0 filter "(dst $clientaddr or dst $serveraddr) and (not ether src $myether)"         " is wrong. Logic expression is wrong?


Thank you very much.

Regards

Zhi Guo



2001-07-03 00:54:00 You wrote��
>You need to make a few changes in your script:
>
>--- zhi guo <[email protected]> wrote:
>> Hi��all
>> 
>> I installed FreeBSD in a PC. I wrote a tcl file and
>> run it on NSE. 
>> Following figure is the topology.
>> 
>> 
>> 	   +--------------+       +---------------+        
>>   +--------------+
>> 	   | 192.168.0.47 |	<---->| 192.168.0.139 |	 <---->
>>   | 192.168.0.53 |
>> 	   +--------------+	      +---------------+        
>>   +--------------+
>> 			client												server
>
>> 
>> $card0 filter "dst $clientaddr or dst $serveraddr";
>
>Your packets are being duplicated because you are
>using the same interface for reading and writing the
>packets. Since your filter is configured to intercept
>packets for either destination. even the packets that
>you send out using the raw ip agent will be
>intercepted by it and sent back to the emulation, and
>this will result in an infinite loop within the
>topology !!! To get around this problem use the
>following filter:
>
>card0 filter "dst $clientaddr or dst $serveraddr and
>(not ether src $myether)" ;
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com