[Olsr-users] DLEP Radio test: Can mac80211_hwsim help?

Vigneswaran R (spam-protected)
Thu Dec 18 14:32:12 CET 2014


Did some changes to the configuration and now, the host in running 
"dlep_radio" on both wlan0 and wlan1. It seems, the DLEP session has 
been established between the radio(s) and the router(s).

# tcpdump -i br0 -nn
17:51:00.625162 IP 169.254.1.10.22222 > 169.254.1.1.38330: Flags [P.], 
seq 1217329362:1217329365, ack 997705816, win 227, options [nop,nop,TS 
val 13458618 ecr 12460473], length 3
17:51:00.625393 IP 169.254.1.1.38330 > 169.254.1.10.22222: Flags [.], 
ack 3, win 473, options [nop,nop,TS val 12461534 ecr 13458618], length 0

# tcpdump -i br1 -nn
17:51:08.825043 IP 169.254.1.20.22222 > 169.254.1.2.40930: Flags [P.], 
seq 3896498035:3896498038, ack 724390535, win 227, options [nop,nop,TS 
val 13466818 ecr 3856535], length 3
17:51:08.830642 IP 169.254.1.2.40930 > 169.254.1.20.22222: Flags [P.], 
seq 1:4, ack 3, win 473, options [nop,nop,TS val 3857635 ecr 13466818], 
length 3

On the host, I queried the DLEP radio device and got the following 
information.

# echo "layer2info json neighbor"|nc 127.0.0.1 2009
{
     "neighbor": [
         {
             "if" : "wlan0",
             "if_index" : 3,
             "if_local_addr" : "02:00:00:00:00:00",
             "neigh_addr" : "02:00:00:00:01:00",
             "neigh_lastseen" : 1629.272,
             "neigh_tx_signal" : "",
             "neigh_rx_signal" : "",
             "neigh_tx_bitrate" : "1 Mbit/s",
             "neigh_rx_bitrate" : "1 Mbit/s",
             "neigh_tx_max_bitrate" : "",
             "neigh_rx_max_bitrate" : "",
             "neigh_tx_bytes" : "524  byte",
             "neigh_rx_bytes" : "0  byte",
             "neigh_tx_frames" : "4",
             "neigh_rx_frames" : "0",
             "neigh_tx_throughput" : "543 kbit/s",
             "neigh_tx_retries" : "0",
             "neigh_tx_failed" : "0"
         },
         {
             "if" : "wlan1",
             "if_index" : 4,
             "if_local_addr" : "02:00:00:00:01:00",
             "neigh_addr" : "02:00:00:00:00:00",
             "neigh_lastseen" : 0.222,
             "neigh_tx_signal" : "",
             "neigh_rx_signal" : "",
             "neigh_tx_bitrate" : "54 Mbit/s",
             "neigh_rx_bitrate" : "54 Mbit/s",
             "neigh_tx_max_bitrate" : "",
             "neigh_rx_max_bitrate" : "",
             "neigh_tx_bytes" : "335.229 kbyte",
             "neigh_rx_bytes" : "5.543 Mbyte",
             "neigh_tx_frames" : "2.151 k",
             "neigh_rx_frames" : "36.467 k",
             "neigh_tx_throughput" : "42.37 Mbit/s",
             "neigh_tx_retries" : "0",
             "neigh_tx_failed" : "0"
         }
     ]
}

However, the same command (layer2info neighbor) didn't give any output 
on the VMs (router side). Not sure, how to query the DLEP router side 
database (replicated from radio).

Vignesh

On 12/18/2014 10:45 AM, Vigneswaran R wrote:
> On 12/17/2014 04:01 PM, Vigneswaran R wrote:
>> Hi,
>>
>> I am running DLEP radio on a linux host and DLEP router inside a 
>> virtual machine (VM) running on that host. The VM's host side tap 
>> interface is bridged with a (simulated) wifi device on the host.
>>
>> I am able to query DLEP radio for layer2info (as I mentioned earlier 
>> in this mail chain). However, how to verify whether the radio and 
>> router components are communicating and sharing data?
>>
>> Also, do we need to assign IP to any of the interfaces on the radio 
>> side (wlan, tap, bridge)? as of now, I haven't set IP address to any 
>> of them.
>
> My test setup looks like this,
>
> +----------------------------------------+
> | Host                                   |
> |                                        |
> | +-------------+        +-------------+ |
> | |VM1          |        |VM2          | |
> | |             |        |             | |
> | |             |        |             | |
> | |(dlep_router)|        |(dlep_router)| |
> | |             |        |             | |
> | |             |        |             | |
> | |    eth0     |        |     eth0    | |
> | +-----||------+        +------||-----+ |
> |   +--tap0                    tap1--+   |
> |   |                                |   |
> |BR0|                                |BR1|
> |   |                                |   |
> |   +-wlan0  [mac80211_hwsim]  wlan1-+   |
> |   (wlan0.sta1)                 |       |
> |       |                        |       |
> |       \~~~~~~~~~~~~~~~~~~~~~~~~/       |
> |   (hostapd)            (wpa_supplicant)|
> |                          (dlep_radio)  |
> +----------------------------------------+
>
> I am running OLSRv2 (with dlep_router plugin loaded) on VM1 and VM2. 
> The VMs are able to ping each other and OLSRv2 is able to establish 
> routes.
>
> For testing, I am running dlep_radio on the host, and configured to 
> collect information about wlan1 and send via tap1 ([dlep_radio=tap1] 
> source wlan1). I hope, this is equivalent to, having DLEP supported 
> radio device for VM2.
>
> On the host/radio side, I am able to query the dlep_radio and getting 
> the following information.
>
> # echo "/layer2info interface"|nc 127.0.0.1 2009
> wlan1    25    02:00:00:00:01:00                    2.412 GHz    0 
> Hz    20 MHz    0  Hz
>
> On the VM2/router side, how to check whether the DLEP session is 
> established, radio is sharing the Layer2 details (or whatever details 
> it supposed to share) etc.? Thanks.
>
> Vignesh
>
>>
>>
>> Vignesh
>>
>> On 12/16/2014 02:37 PM, Vigneswaran R wrote:
>>> On 12/16/2014 12:53 PM, Henning Rogge wrote:
>>>> On Tue, Dec 16, 2014 at 6:27 AM, Vigneswaran R 
>>>> <(spam-protected)> wrote:
>>>>> I could get some information using layer2info as shown below.
>>>> Yes :)
>>>>
>>>> (I meant the layer2info plugin when I said "layer2 viewer")
>>>
>>> Ok :-)
>>>
>>>>> # echo "/layer2info interface"|nc 127.0.0.1 2009
>>>>> wlan1    74    02:00:00:00:01:00                    2.412 GHz    0 
>>>>> Hz    20
>>>>> MHz    0  Hz
>>>>>
>>>>> I used the following configuration entries.
>>>>>
>>>>> dlep_radio.conf
>>>>> ===============
>>>>> [global]
>>>>>          plugin          dlep_radio
>>>>>          plugin          layer2info
>>>>>          plugin          nl80211_listener
>>>>>
>>>>> [dlep_radio=tap0]
>>>>>          source          wlan1
>>>>>
>>>>> [nl80211_listener]
>>>>>          if              wlan1
>>>>>          interval        1.0
>>>>>
>>>>> [layer2_viewer]
>>>> Remove this line or replace it with "[layer2info]".
>>>
>>> Ok. We have to update in 
>>> oonf/src-plugins/generic/dlep/README_DLEP_RADIO also. Thanks.
>>>
>>>
>>> Vignesh
>>>
>>>
>>
>>
>
>





More information about the Olsr-users mailing list