ifconfig/ wicontrol changes

Andrew Thomson andrewjt at applecomm.net
Sun Jan 18 15:11:36 PST 2004


Hi all.

I've been running Freebsd 5.0 for a while on my laptop (IBM X24) as 5.1
didn't agree with it! I've just recently upgraded to 5.2 and fortunately
it still boots! :)

However I now have a couple of issues surrounding the configuration of
my wi0 interface and some ipsec security stuff.

My firewall is a 4.9 box with a wi0 card in it. My laptop also has a wi0
card in it and I just run an adhoc network between the two hosts. I then
use IPSEC to secure the link rather than the WEP stuff.

On my laptop, I used to configure the wi0 with the following:

ifconfig_wi0="inet 192.168.14.2 netmask 255.255.255.0 ssid watching
channel 6 -wep station oblivion media DS/11Mbps"

Then I would run wicontrol -p 3 to switch it to adhoc.

However doing those steps on 5.2, lead to the system mentioning the
wicontrol is now deprecated and one should use ifconfig.

I now use the following command:

ifconfig_wi0="inet 192.168.14.2 netmask 255.255.255.0 ssid watching
channel 6 -wep station oblivion media DS/11Mbps mediaopt adhoc"

However this does not reveal the same results as my old method above.

The ifconfig output from my original method is such:

wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.14.2 netmask 0xffffff00 broadcast 192.168.14.255
        ether 00:40:05:ae:bd:48
        media: IEEE 802.11 Wireless Ethernet DS/11Mbps <adhoc>
(DS/11Mbps <flag0,adhoc>)

However if I just use ifconfig to configure the interface, the ifconfig
output is different.

wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.14.2 netmask 0xffffff00 broadcast 192.168.14.255
        ether 00:40:05:ae:bd:48
        media: IEEE 802.11 Wireless Ethernet DS/11Mbps <adhoc>
(DS/11Mbps)

The interface only works once I run wicontrol -p 3 over it.

Also using just ifconfig to configure the interface, if I run wicontrol
to check things out, port type is -1.

Port type (1=BSS, 3=ad-hoc):            [ 3 ]

Any suggestions on that one would be appreciated.

The other problem is related to IPSEC setup. What used to work no longer
works!!

spdadd 192.168.14.2/32 0.0.0.0/0 any -P out ipsec
   esp/tunnel/192.168.14.2-192.168.14.1/require;
spdadd 0.0.0.0/0 192.168.14.2/32 any -P in ipsec
   esp/tunnel/192.168.14.1-192.168.14.2/require;

Well, any help on either topic would be appreciated.

Regards,

ajt.









More information about the freebsd-mobile mailing list