[Click] Using nsclick

Jens Mueller jmueller at informatik.hu-berlin.de
Tue Sep 6 12:35:45 EDT 2005


Hello,

I'd like to use nsclick. I installed it following the instructions from
the "Nsclick User Manual"
(http://systems.cs.colorado.edu/Networking/nsclick/nsclickmanual.ps).
Thus, I'm using ns-2.26 and click-1.4.3. The sample scripts (see
<ns-allinone-2.26>/ns-2.26/tcl/ex/nsclick*) worked.
I took "nsclick-simple-wlan.tcl" as a basis and wrote a simulation with
adapted click configuration files. "access-point.click" and
"station.click" were used as a starting point.
The files "test.tcl", "access-point.nsclick" and "station.nsclick"
are attached. Just execute "ns test.tcl" to run the simulation and to
generate the files.

It seems to me that there is a fundamental problem, because the frames
sent from the access point don't reach the station (The file
"node1_station_from_eth0" is empty.). Furthermore I don't know, why I
need to attach applications like "CBR", because the access point will
generate its packets on its own. I would also appreciate ns2 scripts
working with nsclick to work out the problem myself.

Bye,
Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tcl
Type: application/x-tcl
Size: 6665 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20050906/907c530f/test.tcl
-------------- next part --------------
//access_point.click

// This configuration contains a configuration for running 
// an 802.11b access point.
// It creates an interface using FromHost called "ap"
// and uses open authentication to allow stations to associate to it.
// This configuration assumes that you have a network interface named
// eth0 and that it is located on channel 3.

// Run it at user level with
// 'click access_point.click'

// Run it in the Linux kernel with
// 'click-install access-point.click'
// Messages are printed to the system log (run 'dmesg' to see them, or look
// in /var/log/messages), and to the file '/click/messages'.

AddressInfo(ap_bssid eth0:simnet);

winfo :: WirelessInfo(SSID "click-ssid", BSSID ap_bssid, CHANNEL 1, INTERVAL 2000);

rates :: AvailableRates(DEFAULT 2 4 11 22);

q :: Queue(10)
//-> Prism2Decap()
//-> Strip(10)
-> ToDump(access-point_to_eth0, PER_NODE 1, ENCAP 802_11)
-> ToSimDevice (eth0);

FromSimDevice(eth0, 4096)
//-> prism2_decap :: Prism2Decap()
//-> extra_decap :: ExtraDecap()
-> ToDump(access-point_from_eth0, PER_NODE 1, ENCAP 802_11)
-> phyerr_filter :: FilterPhyErr()
-> tx_filter :: FilterTX()
//-> dupe :: WifiDupeFilter(WINDOW 20) 
-> wifi_cl :: Classifier(0/08%0c 1/01%03, //data
			 0/00%0c); //mgt

wifi_cl [1] -> mgt_cl :: Classifier(0/00%f0, //assoc req
				    0/10%f0, //assoc resp
				    0/40%f0, //probe req
				    0/50%f0, //probe resp
				    0/80%f0, //beacon
				    0/a0%f0, //disassoc
				    0/b0%f0, //disassoc
				    );

wifi_cl [0] 
-> decap :: WifiDecap()
-> HostEtherFilter(ap_bssid, DROP_OTHER true, DROP_OWN true) 
-> Discard;


mgt_cl [0] -> Print ("assoc_req")
-> ar :: AssociationResponder(WIRELESS_INFO winfo,
			      RT rates)
-> q;

mgt_cl [1] -> Print ("assoc_resp") -> Discard;

mgt_cl [2]
-> beacon_source :: BeaconSource(WIRELESS_INFO winfo,
				 RT rates)
-> q;

mgt_cl [3] -> Print ("probe_resp", 200) -> Discard;
mgt_cl [4] -> bs :: BeaconScanner(RT rates) -> Discard; 
mgt_cl [5] -> Print ("disassoc") -> Discard;
mgt_cl [6] -> Print ("auth") -> auth :: OpenAuthResponder(WIRELESS_INFO winfo) -> q;





-------------- next part --------------
//station.click

// This configuration contains a configuration for running 
// an 802.11b station (which can connect to an access point).
// It creates an interface using FromHost called "station"
// and uses open authentication to connect to an access point.
// This configuration assumes that you have a network interface named
// eth0 and that it is located on channel 1.

// Run it at user level with
// 'click station.click'

// Run it in the Linux kernel with
// 'click-install station.click'
// Messages are printed to the system log (run 'dmesg' to see them, or look
// in /var/log/messages), and to the file '/click/messages'.
// You will have to remove the elements ControlSocket and ChatterSocket to run
// in the kernel.

// To associate to an access point, load this config and then write the 
// following handlers:
// 
// winfo.channel <channel (integer)>
// winfo.bssid <access_point etheraddress>
// winfo.ssid <ssid of access point>
//
// And then trigger the assocation requests by writing the following handlers:
//
// station_auth.send_auth_req 1
// station_auth.send_assoc_req 1
//
// You should then see the following messages:
//
// station_auth :: OpenAuthRequester: auth 0 seq 2 status 0
// station_assoc :: AssociationRequester: response 00:12:17:1c:f1:b1 +24 [ ESS ] status 0 associd 49156 ( { 2 4 11 22 } 36 48 72 108 )
//
// status of 0 means you associated/authenticated successfully.
//


//control :: ControlSocket("TCP", 7777);
//chatter :: ChatterSocket("TCP", 7778);

AddressInfo(station_address eth0:simnet);
winfo :: WirelessInfo(SSID "click-ssid", BSSID 00:03:47:70:89:01, CHANNEL 1);

rates :: AvailableRates(DEFAULT 2 4 11 22);

q :: Queue(10)
//-> SetTXRate(2)
//-> SetTXPower(63)
//-> extra_encap :: ExtraEncap()
-> ToDump(station_to_eth0,PER_NODE 1, ENCAP 802_11)
-> PrintWifi("ASASSS")
-> ToSimDevice (eth0);
//-> ToDump(station_from_eth0,PER_NODE 1, ENCAP 802_11)
//-> AssociationResponder(CHANNEL 1)

FromSimDevice(eth0, 4096)
-> prism2_decap :: Prism2Decap()
-> extra_decap :: ExtraDecap()
-> Print("station_IN")
-> ToDump(station_from_eth0,PER_NODE 1, ENCAP 802_11)
-> FilterPhyErr()
-> tx_filter :: FilterTX()
-> dupe :: WifiDupeFilter()
-> wifi_cl :: Classifier(0/00%0c, //mgt
			 0/08%0c, //data
			 );

// management
wifi_cl [0] 
-> management_cl :: Classifier(0/00%f0, //assoc req
					   0/10%f0, //assoc resp
					   0/80%f0, //beacon
					   0/a0%f0, //disassoc
					   0/50%f0, //probe resp
					   0/b0%f0, //auth
					   );
			     


station_probe :: ProbeRequester(ETH station_address,
				WIRELESS_INFO winfo,
				RT rates) 
-> PrintWifi(probe-req) -> Print(probe-req) -> q;

station_auth :: OpenAuthRequester(ETH station_address, WIRELESS_INFO winfo) 
-> PrintWifi(auth-req) 
-> q;

station_assoc ::  AssociationRequester(ETH station_address,
				       WIRELESS_INFO winfo,
				       RT rates) 
-> Print("sent assoc_req", 60) 
-> PrintWifi(assoc-req) 
-> q;

management_cl [0] -> Print ("assoc_req") -> Discard;
management_cl [1] -> Print ("assoc_resp", 60) -> station_assoc;
management_cl [2] -> beacon_t :: Tee(2) 
-> bs :: BeaconScanner(RT rates, WIRELESS_INFO winfo) -> Discard;
beacon_t [1] -> tracker :: BeaconTracker(WIRELESS_INFO winfo, TRACK 10) -> Discard;

management_cl [3] -> Print ("dissoc") -> station_assoc;
management_cl [4] -> PrintWifi(probe_resp) -> bs;
management_cl [5] -> PrintWifi(auth) -> station_auth;

wifi_cl [1] 
//-> PrintWifi(data)
-> Discard;

PokeHandlers(write winfo.channel 1,
            write winfo.bssid 00:03:47:70:89:02,
            write winfo.ssid click-ssid,
wait 2,
            wait 1,
            write station_assoc.send_assoc_req 1,
            wait 1,
            write station_auth.send_auth_req 1,
            wait 1,
            stop)



More information about the click mailing list