[Click] nsclick promiscuous interface
Bart.Jooris
bart.jooris at intec.ugent.be
Wed Jun 1 04:52:39 EDT 2005
Hello,
Based on the information I found from Mike (November 2004 Archive) I added
a sniffer to the simple wired lan example (nsclick tutorial by Michael Neufeld).
This is the code of my Sniffer.click:
// Sniffer
//
FromSimDevice(eth0,4096) ->
ToDump(Sniffer)->
Discard;
Idle->
ToSimDevice(eth0);
I inserted this code in the tcl script after the node generator for loop
set i 4
set node_($i) [$ns_ node]
$node_($i) add-wired-interface $chan_1_ $netll $netmac \
$netifq 1 $netphy
* $node_($i) setpromiscuous 0 1*
$node_($i) random-motion 0
$node_($i) topography $wtopo
$node_($i) nodetrace $tracefd
[$node_($i) set classifier_] setnodename "node$isniffer"
[$node_($i) entry] loadclick "Sniffer.click"
After running the simple wired lan example I opened the
Sniffer file with ethereal. There was only one entry, the arp broadcast :(
any ideas on this?
Thnx,
Bart.
Hello-
You can do promiscuous mode in nsclick, you just have to enable it from
the tcl part of your scripts. For example, to make eth0 go promiscuous:
$node setpromiscuous 0 1
-Mike
Nicolas Letor wrote:
>/ Hello,
/>/
/>/ In the nsclick user manual (p11) there is a simple bridge example
/>/ with the following click script.
/>/ "
/>/ FromSimDevice(eth0, 4096) -> Queue -> ToDump(eth0.txt) -> ToSimDevice(eth1);
/>/ FromSimDevice(eth1, 4096) -> Queue -> ToDump(eth1.txt) -> ToSimDevice(eth0);
/>/ "
/>/
/>/ I tried it out, but it doesn't work because the bridge can only
/>/ forward packets who a broadcast address. So I thought by enabling
/>/ promiscous mode the bridge example.
/>/
/>/ Unfortunately nsclick's FromSimDevice doesn't support promiscous mode.
/>/ Has anyone an idea to solve this problem of promiscous mode?
/>/
/>/ Thanks,
/>/ Letor Nico/
--
Bart Jooris
Department of Information Technology (INTEC)
Gaston Crommenlaan 8 bus 201
B-9050 Ledeberg
Location:
Complex Zuiderpoort - Blok C0 - Bureau 3.13
More information about the click
mailing list