Hi.
Somedy could help me on this?
I've a simulation with two NICs and I only need to move traffic from one nic 
to the other through the simulation?
Can someboy help me with my script (showed below) or provide me a script?
Thanks in advance


>From: "Guillermo Frick" <[EMAIL PROTECTED]>
>To: ns-users@ISI.EDU
>Subject: [ns] Problem with thrutcp.tcl example
>Date: Fri, 11 May 2007 19:27:20 +0000
>
>
>Hi.
>I'm new with ns and I'm trying to make a simple emulation that works as a
>router.  I'm running ns 2.31 in a Fedora Core 6 machine.
>I was tryint to test the thrutcp.tcl example but it show an error as
>follows:
>TapAgent(_o66): linked sock 5 as READABLE
>TapAgent(_o72): linked sock 8 as READABLE
>IPTapAgent(_o66): sendpkt called while in read-only mode!
>0.42666 PTapAgent(_o66) recvpkt, cc:1
>IPTapAgent(_o66): sendpkt called while in read-only mode!
>0.72666 PTapAgent(_o66) recvpkt, cc:1
>
>I was trying to search Google with no success.  Can somebody help me on
>this.
>
>This is the script:
>
>
>########################################################
># Testing passing real world traffic through the
>#  ns  Simulator
># Author : Alefiya Hussain and Ankur Sheth
># Date   : 05/14/2001
>
>
>set ns [new Simulator]
>$ns use-scheduler RealTime
>
>set f [open out.tr w]
>$ns trace-all $f
>set nf [open out.nam w]
>$ns namtrace-all $nf
>
># Create the nodes needed to the transducer
>set n1 [$ns node]
>set n2 [$ns node]
>set n3 [$ns node]
>set n4 [$ns node]
>set n5 [$ns node]
>
># Setup connections between the nodes
>$ns simplex-link $n1 $n5 10Mb 5ms DropTail
>$ns simplex-link $n5 $n4 10Mb 5ms DropTail
>$ns simplex-link $n3 $n5 10Mb 5ms DropTail
>$ns simplex-link $n5 $n2 10Mb 5ms DropTail
>
># Configure the first entry node
>set tap1 [new Agent/IPTap];         # Create the TCPTap Agent
>set bpf1 [new Network/Pcap/Live];   # Create the bpf
>set dev [$bpf1 open readonly eth0]
>$bpf1 filter "src 10.0.0.1 and dst 10.175.145.26"
>#$bpf1 filter "src 128.9.160.95 and dst 128.9.160.196"
>$tap1 network $bpf1;                # Connect bpf to TCPTap Agent
>$ns attach-agent $n1 $tap1;         # Attach TCPTap Agent to the node
>
># Configure the first exit node
>set tap2 [new Agent/IPTap];         # Create a TCPTap Agent
>set ipnet2 [new Network/IP];        # Create a Network agent
>$ipnet2 open writeonly
>$tap2 network $ipnet2;              # Connect network agent to tap agent
>$ns attach-agent $n2 $tap2;         # Attach agent to the node.
>
>
># Configure the second entry node
>set tap3 [new Agent/IPTap];         # Create the TCPTap Agent
>set bpf3 [new Network/Pcap/Live];   # Create the bpf
>set dev [$bpf3 open readonly eth1]
>$bpf3 filter "src 10.175.145.26 and dst 10.0.0.1"
>#$bpf3 filter "src 128.9.160.196 and dst 128.9.160.95"
>$tap3 network $bpf3;                # Connect bpf to TCPTap Agent
>$ns attach-agent $n3 $tap3;         # Attach TCPTap Agent to the node
>
>
># Configure the second exit node
>set tap4 [new Agent/IPTap];         # Create a TCPTap Agent
>set ipnet4 [new Network/IP];        # Create a Network agent
>$ipnet4 open writeonly
>$tap4 network $ipnet4;              # Connect network agent to tap agent
>$ns attach-agent $n4 $tap4;         # Attach agent to the node.
>
>
># Connect the agents.
>$ns simplex-connect $tap1 $tap4
>$ns simplex-connect $tap3 $tap2
>
>
>$ns at 50.0 "finish"
>
>proc finish {} {
>     global ns f nf
>     $ns flush-trace
>     close $f
>     close $nf
>     exit 0
>}
>
>$ns run
>
>########################################################
>
>
>Thanks a lot!
>
>_________________________________________________________________
>Sabe más sobre la próxima generación del MSN Messenger.
>http://imagine-msn.com/minisites/messenger/default.aspx?locale=es-ar
>

_________________________________________________________________
Sabe más sobre la próxima generación del MSN Messenger. 
http://imagine-msn.com/minisites/messenger/default.aspx?locale=es-ar

Reply via email to