# ifconfig ral0 problems on 8.0-RELEASE



## Seeker (Nov 28, 2009)

What used to work in /etc/rc.conf, for 7.2, fails for 8.0
ral0 can not be assigned IP
Even manually:

```
ifconfig ral0 inet 192.168.0.1...
```
Gives some sioctl error, syntax, error, etc.
It is NOT typo 100%


----------



## DutchDaemon (Nov 28, 2009)

Is this yet another example of having to create a wlan interface first and then defining the real interface on that? See the EXAMPLES section of ral(4).


----------



## Seeker (Nov 28, 2009)

Hey thanks!
But hm...
Why did it worked on 7.2
That is..., a step of creating a wlan interface never existed


----------



## DutchDaemon (Nov 28, 2009)

You are using a new major release. The listed number of changes and new functionality is longer than your street!


----------



## Seeker (Nov 28, 2009)

Ok, then.
To stick to this issue.

I've succesfully created wlan0
I can't assign IP to wlan0, as I get:

```
ral0: need multicast update callback
```

I wana also have another aliased IP
How to do it(rc.conf)


----------



## lyuts (Nov 30, 2009)

wlans_ral0="wlan0"
ifconfig_wlan0="DHCP <NAME>"


----------



## Seeker (Dec 5, 2009)

Ok, so, here is a problem:
I wana wlan0(which works like AP) to *NOT* use media *autoselect*
I set *media OFDM/54Mbps*, but as soon as I make it *UP* it shifts from:

```
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g <hostap> (autoselect <hostap>)
```
to:

```
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
```
So hostap is shifting it on it's own!


----------



## Seeker (Dec 6, 2009)

Come one guys. How do I change this:

```
(autoselect <hostap>)
```
to this:

```
(OFDM/54Mbps <hostap>)
```
while _down_


----------



## Seeker (Dec 6, 2009)

```
# ifconfig wlan create wlandev ral0 wlanmode ap media OFDM/54Mbps mode 11g
```
*MAKES*

```
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g <hostap> (autoselect <hostap>)
```
So as soon as I:

```
# ifconfig wlan0 up
```
I get:

```
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
```
And do you know which speed I get?
*54Kb/s max!!!*

OFDM/54Mbps was solution on 7.2, but I can't get it running here on 8.0 in AP mode.


----------



## Seeker (Dec 6, 2009)

I am totally frustrated with being ignored and for a 7 hours unable to make it work, except at minimal speed.
After this:

```
# ifconfig wlan0 media OFDM/54Mbps
```
It remains at:

```
media: IEEE 802.11 Wireless Ethernet [color="Red"]autoselect[/color] mode 11g <hostap>
```


----------



## Seeker (Dec 6, 2009)

```
# ifconfig wlan0 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG   
00:18:4d:b2:52:1f    1    6  48M  9.0    0   2790    176 EPS  AE      WPA
00:1f:e1:71:1a:b9    2    6   1M 18.5    0   4070  47216 EPS  AE      WPA
```
and a little later look *this*:

```
# ifconfig wlan0 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG   
00:18:4d:b2:52:1f    1    6   [color="Red"]2M[/color]  8.0    0   4674  21488 EPS  AE      WPA
00:1f:e1:71:1a:b9    2    6   [color="#ff0000"]1M[/color] 20.5    0   6179   1040 EPS  AE      WPA
```
It is simply forcing speed to the minimum!


----------



## richardpl (Dec 6, 2009)

Why are you using WPA? better switch to RSN.

I think you are looking for 'ucastrate' and 'mcastrate'

Note that driver may not have support for fixed rate(in hostap).


----------



## DutchDaemon (Dec 6, 2009)

richardpl said:
			
		

> 'ucastrate'



Some developers have a sense of humor..


----------



## Seeker (Dec 6, 2009)

richardpl said:
			
		

> Why are you using WPA? better switch to RSN.


You think on WPA2, also called RSN (Robust Security Network)?
That is easy as shifting wep=*1* to wep=*2* in hostapd.conf
I will, as soon as I fix this speed issue. To isolate all possible causes.


			
				richardpl said:
			
		

> I think you are looking for 'ucastrate' and 'mcastrate'


*That was solution!* :e
Now I am getting around 622.190 KB/s with:

```
# ifconfig wlan0 ucastrate 54 mcastrate 54
```
Tell me, what is an ideal number for those 2? :stud
How can I know max?


----------



## Seeker (Dec 6, 2009)

And look it now:

```
media: IEEE 802.11 Wireless Ethernet [color="Red"]OFDM/54Mbps[/color] mode 11g <hostap>
```
54Mbps in hostap mode!

Duh!
And it did not wana set it directly with *media OFDM/54Mbps*
What a hassle! And lost 7 hours...


----------



## mickey (Dec 6, 2009)

Seeker said:
			
		

> What a hassle! And lost 7 hours...



But think of the experience gained


----------



## Seeker (Dec 6, 2009)

mickey said:
			
		

> But think of the experience gained


LOL!
Somebody is seeing glass half filled 

Anyway, wpa*2* is now on.
Now speed dropped a little to 523.603 KB/s

Now, I kind of expect speed to be at least 4 times more.
That is 2 MB/s (Megabytes)

Is current speed realistic / expected? :stud


----------



## richardpl (Dec 6, 2009)

There is 'mcastrate', 'mgtrate' and 'ucastrate', in your case only setting last one is useful. ifconfig(8)

If you really need higher speeds than use chip which supports 11n.

ral(4) doesnt have hardware encryption implemented so that can be one of the reasons in speed drop.


----------



## Seeker (Dec 7, 2009)

Ok, thanks!
Just one last question.

With WPA 2 and ral0 that works at 54 Mbps, which is also older chip...
Is this speed of ~0.5 MB/s expected / normal?


----------



## richardpl (Dec 7, 2009)

There are many factors which can saturate network speed ...


----------



## Seeker (Dec 8, 2009)

_Location: Croatia_..., just like me. 
Well then..., just give me a tool, which would expose me this data, as you appear to be very knowledgeable, when it comes to networking.


----------



## aksis (Mar 22, 2010)

*Setting ucastrate in /etc/rc.conf*

Hello;



```
$ uname -rs
FreeBSD 8.0-RELEASE-p2
```


I have setup ral0/wlan0 in /etc/rc.conf thusly:


```
wlans_ral0="wlan0"
   create_args_wlan0="wlanmode sta mcastrate 54 ssid linksys channel 6"
   ifconfig_wlan0="inet 10.0.0.10 netmask 255.255.255.0"
```


This provides a working interface but ucastrate is not being set at boot and I have to manually set it after I login with:


```
# ifconfig wlan0 ucastrate 54
```


How can I effectively set ucastrate in rc.conf?


Magnanimously,

Christopher Theodore


----------



## richardpl (Mar 22, 2010)

You move u/mcastrate one line bellow, but I think you will need to specify also mode (I'm not sure, but I managed to get it working only after association).


----------

