Javier Sánchez | 1 Sep 2009 16:02
Picon

Re: Accurate timers with polling Tasks: Help a newbie?

Hi Kevin,

I think click is not the correct way to implement TDM over wireless.

You have to face multiple software delays per packet, and the worse,
they are variable.

receive : hardware - drivers (monitor mode) - linux kernel - click router.
send: the inverse.

May be there is 200-500 us variablility (not really sure).

Anyway, I think current click timers can have more than 1 ms
resolution. But the real problem i see is this "variable" delay
packets would have.

For example, if u send a control beacon that orders STA1 use slot 1 ,
STA2 use slot 2, may be STA1 sees this control beacon 200 us after
sta2 does.

If u decide to implement, maybe u can try to begin with something like this:

define ($IP_ADR, 6.0.0.1/8)
define ($MAC_ADR, 00:00:00:00:00:00)  //use u real hw mac
define ($STA, NODE1)

FromHost(fake, $IP_ADR, ETHER $MAC_ADR)
->Queue()
->[1]Custom_Unqueue[1]  //unqueue when a beacon is received on input port 2
->[1]Custom_Delay_Unqueue[1]  //read my timeslot from
(Continue reading)

blues man | 2 Sep 2009 18:28
Picon

Newbie question with regards to modifying bandwidth limits

Hello,

What's the best way to dynamically access and modify bandwidth usage, packet
drops etc. on bandwidth limiting elements running in kernel mode (e.g.
BandwidthShaper)? It's through a socket, IIRC. I'm pretty sure I saw it
somewhere in the documentation, but I can't seem to find it now. It's got to
work in kernel mode.

Thanks,
mcd
Harald Schiöberg | 3 Sep 2009 13:29
Picon

Re: Help!! Madwifi Monitor Mode vs Ad-Hoc Mode... Annotations?


> Before anybody jumps on me, I know that I'm doing dubious things here.  
>   I know that under Ad-hoc mode the wireless driver will convert my  
> Ethernet frames into 802.11 frames.  Under Monitor mode, I am  
> transmitting raw Ethernet frames -

not true, in monitor mode you have to supply pre-formatted 802.11
frames, see AthEncap instead of EtherEncap...

and for your script, you have do decap 802.11 manually and re-encap in
802.3

you can not send 802.3 frames over the air, no way to do that.

--
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
María Gómez | 3 Sep 2009 13:56
Picon
Favicon

Help!!! Help!! LinkUnqueue


Hi again!!!

I have a big problem. My configuration lost loses too many packets. The LinkUnqueue element  loses
approximately 80,000 packets per 100,000...I don´t know why.

//if you check the values of c5 and c6 (-h c5.count, -h c6.count),you´ll see how many packets the link loses

define($DEV tun0)

r::RatedSource(DATA \<55 44 50 20  70 61 63 6b  65 74 21 0a  04 00 00 00  01 00 00 00  
  01 00 00 00  00 00 00 00  00 80 04 08  00 80 04 08  53 53 00 00
  53 53 00 00  05 00 00 00  00 10 00 00  01 00 00 00  54 53 00 00
  54 e3 04 08  54 e3 04 08  d8 01 00 00>, RATE 10000, LIMIT 100000, STOP true)  //datos = 72    
    -> c::Counter    
    -> SetTimestamp        
    -> DynamicUDPIPEncap(src_addr, 1234, dst_addr, 1234, INTERVAL 10)      //(headerIP 20 + headerUDP 8)
    -> SetUDPChecksum    
    -> SetIPChecksum    
    //-> Print("packet")    
    -> c5::Counter    
    -> q1::Queue(90000) 
    -> l::LinkUnqueue(0.04, 1000 kbps)
        -> q2::Queue(90000)
    -> c6::Counter
    //-> IPPrint("SOURCE", PAYLOAD hex, ID true, TTL true, LENGTH true)            
    -> ToDevice($DEV)

Script(TYPE ACTIVE,
    set tasa $(mul 1000000 $carga),
(Continue reading)

Javier Sánchez | 3 Sep 2009 14:38
Picon

Re: Help!! Madwifi Monitor Mode vs Ad-Hoc Mode... Annotations?

hi,

at click/conf/wifi you have some click examples. As Harald says u have
to pull & push the correct headers into the packet.

u can begin with this basic pseudo-ibss script.

regards
Javier Sánchez

// *** CONFIGURATION ***

define($IP_ADR 6.0.0.1/8)
define($MAC_ADR 00:1B:11:BB:F1:78)  //change, use u real hw mac
define($BSSID 00:00:00:00:00:00)
define($TXPOWER 63)
define($TXRATE 22)
define($DEVICE ath0)

// *** SEND ***

FromHost(fake1, $IP_ADR, ETHER $MAC_ADR)
  -> Queue()
  -> WifiEncap(0, $BSSID)
  -> SetTXPower($TXPOWER)
  -> SetTXRate($TXRATE)
  -> RadiotapEncap()
  -> ToDevice($DEVICE);
	

(Continue reading)

g91d5350 | 3 Sep 2009 15:56
Picon

Re: Help!! Madwifi Monitor Mode vs Ad-Hoc Mode... Annotations?

Javier, Harald - Thanks, you guys rock!

The psuedo-ibss code works a treat, thanks!  The version in my  
/click/conf/wifi seems to be out-of-date (although my click should be  
current), so I really appreciate having some working sample code as a  
starting point.

But when I try to ping across the psuedo-ibss connection, I get  
duplicate packets (see ping log below).  Yet SSH seems to work fine.   
Any idea why this would be?

I am still battling to understand why I have to encapsulate my frames  
and can't send them RAW.  As far as I can see, I can deliver RAW  
frames across the network OK ... I just seem to have problems  
forwarding them to Linux.  Oh well... by this time next week I'll have  
twice the Click experience I have now; I'll learn.  :-)

Gratefully,
- Kevin

PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data.
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=1.68 ms
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=2.41 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=3.18 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=5.80 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=6.58 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=7.80 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=9.33 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=10.4 ms (DUP!)
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=11.5 ms (DUP!)
(Continue reading)

Harald Schiöberg | 3 Sep 2009 16:18
Picon

Re: Help!! Madwifi Monitor Mode vs Ad-Hoc Mode... Annotations?


g91d5350 <at> campus.ru.ac.za wrote:
> Javier, Harald - Thanks, you guys rock!
> 
> The psuedo-ibss code works a treat, thanks!  The version in my  
> /click/conf/wifi seems to be out-of-date (although my click should be  
> current), so I really appreciate having some working sample code as a  
> starting point.
> 
> But when I try to ping across the psuedo-ibss connection, I get  
> duplicate packets (see ping log below).  Yet SSH seems to work fine.   
> Any idea why this would be?

do you use kernel or userspace? in userspace you may want the
SNIFFER=false option to your FromDevice element, otherwise both click
and the kernel forward the packet.

another thing: if you create a monitor interface and an ibss interface
on the same atheros card, the ibss interface silently goes into promisc.
mode, gave me some headache with duplicated packets while routing with
more than 2 nodes

> I am still battling to understand why I have to encapsulate my frames  
> and can't send them RAW.  

Well, because you are using an 802.11 network. and as such you need
802.11 headers which are totally different from 802.3 headers.

It's just the linux device driver that emulates an 802.3 interface if
you are using anything but monitor mode. In reality the driver will do a
(Continue reading)

Victor | 3 Sep 2009 17:18

problem with StaticIPLookup

I am really confused with how "StaticIPLookup" is used for packet forwarding
in basic-router

 In my basic-router I (see below )  I have configuration for the forwarding
between 192.168.1.x and 192.168.10.x where (as far as  can see )
StaticIPLookup output 1 of 192.168.1.x is sent back to eth0, StaticIPLookup
output2 of 192.168.10.x is sent back to eth1, and both are sent to the local
stack (ToHost).

Can someone be so kind to explain the forwarding logic? I would expect to
see something like:

"take output of 192.168.1.x, if destination address belongs to 192.168.10.x
- send it to eth1".  

Or, is my basic-router.click not created correctly?

Thanks

Student of click

Basic-router.click

// eth0 192.168.1.176 00:00:C0:3B:71:EF

// eth1 192.168.10.1 00:00:C0:CA:68:EF

// Shared IP input path and routing table ip :: Strip(14)

    -> CheckIPHeader(INTERFACES 192.168.1.176/255.255.255.0
(Continue reading)

Eddie Kohler | 8 Sep 2009 00:37
Favicon

Re: Script element

María,

1:

Script(print $(if_test.run 1),
        print $(if_test.run 2));
if_test::Script(TYPE PASSIVE,
        return $(if $(eq $1 1) "GAVE ME ONE" "GAVE ME NOT ONE"))

When run this will print
"GAVE ME ONE"
"GAVE ME NOT ONE"

2:

By default every Click run uses the same random seed, leading to a predictable 
& deterministic sequence of random values.  This behavior should not be 
depended on, and in fact I will probably change it today.  In the mean time, 
try adding a "RandomSeed" element to your configuration.  When given no 
arguemnts, RandomSeed sets the random seed unpredictably on each run.

E.g.:

letni% click -e 'Script(print $(random), stop)'
1804289383
letni% click -e 'Script(print $(random), stop)'
1804289383
letni% click -e 'Script(print $(random), stop)'
1804289383
letni% click -e 'Script(print $(random), stop); RandomSeed'
(Continue reading)

Eddie Kohler | 8 Sep 2009 00:54
Favicon

Re: Script element

I checked in the new behavior that will give you a "truly random" seed 
whenever a router is configured.

E

Eddie Kohler wrote:
> María,
> 
> 1:
> 
> Script(print $(if_test.run 1),
>         print $(if_test.run 2));
> if_test::Script(TYPE PASSIVE,
>         return $(if $(eq $1 1) "GAVE ME ONE" "GAVE ME NOT ONE"))
> 
> When run this will print
> "GAVE ME ONE"
> "GAVE ME NOT ONE"
> 
> 
> 2:
> 
> By default every Click run uses the same random seed, leading to a predictable 
> & deterministic sequence of random values.  This behavior should not be 
> depended on, and in fact I will probably change it today.  In the mean time, 
> try adding a "RandomSeed" element to your configuration.  When given no 
> arguemnts, RandomSeed sets the random seed unpredictably on each run.
> 
> E.g.:
> 
(Continue reading)


Gmane