Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2005 11:00:41 +0200
From:      Giorgos Keramidas <keramida@linux.gr>
To:        Imrani <priarifire@yahoo.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Configure wireless connection using Cisco aironet 350
Message-ID:  <20051128090041.GA1623@flame.pc>
In-Reply-To: <20051127161859.96903.qmail@web60022.mail.yahoo.com>
References:  <20051127135315.GA17605@flame.pc> <20051127161859.96903.qmail@web60022.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Please *don't* post a reply on top of the original, quoting the entire
original message.  Top-posting is a bit annoying and quoting all the
text of the original message when it's unnecessary is usually a waste
of bandwidth and reader's time.

On 2005-11-27 08:18, Imrani <priarifire@yahoo.com> wrote:
> Giorgos Keramidas <keramida@linux.gr> wrote:
> > Your interface only has an IPv6 address. Is that expected? How
> > are you bringing up the an0 interface?
> >
> > For instance, my /root/netstart-home.sh script contains (among a
> > few other things):
> >
> > # Default setup for my bge0 interface.
> > export ifconfig_ath0="DHCP ssid 'XXXX' \
> >     wepmode on weptxkey 1 wepkey '1:0xXXXXXXXXXXXXXXXXXXXXXXXXXX'"
> >
> > /etc/rc.d/netif stop bge0
> > /etc/rc.d/netif stop ath0
> > /etc/rc.d/netif start ath0
> >
> > This seems to take care of everything here.
>
> I don't have any netstart-home.sh under /root directory. Moreover I
> dont' want IPv6 and its not something I expect.

That's not a "default" script of FreeBSD.  It's just a wrapper around
/etc/rc.d/netif that I use here, because my wireless connection is not
always necessary.  I don't want my wireless interface to be brought up
automatically *every* time I boot, so I wrote the netstart-home.sh
script to fire up the wireless interface only when I need to do so.

This works because the /etc/rc.d scripts use /etc/rc.conf as a
"persistent storage" of options that they look up in the environment of
the current process.  This way, by setting things in the current
environment, before a script from /etc/rc.d runs (the 'netif' script in
this case), I don't have to edit my /etc/rc.conf file manually every
time I want to tweak just one option (the ifconfig_ath0 option here).

> With regards to bringing up network, problem is network doesn't work
> and this is what I did:
>
> 1) edited /etc/rc.conf and add following line:
> ifconfig_an0="DHCP"

That's probably ok, if your wireless interface is supposed to obtain an
IP address automatically.  Then you'll have to run:

    /etc/rc.d/netif start an0

to let the system startup script 'netif' bring up the interface.  This
will take care of running 'dhclient an0', which in turn will set up
routing, the gateway, the DNS servers and all the other options your
/etc/dhclient.conf is configured to use for the 'an0' interface.

You didn't use 'netif' though.

> 2) Then I run following command:
> ifconfig an0 inet 192.168.2.110 netmask 255.255.255.0 wepmode on wepkey 0x00000000000000000000654321 ssid myhome

Why?  You don't need this.  Just use /etc/rc.d/netif as described above
to bring up the 'an0' interface with whatever options your /etc/rc.conf
specifies (DHCP in this case).

You haven't specified any "up" ifconfig option too, so this will set the
parameters of the an0 interface but will *NOT* bring it up automatically.
This is probably one of the reasons why you're having problems later on.

> Once I run this.. ifconfig an0 status shows "associated" but
> unfortunately i cannot use this network for any connection.
> Even ping 192.168.2.1 doesn't work (thats my router IP).

Is the an0 interface "up"?  It's very likely that it isn't.

> but I get this problem:
>
> "an0: record length mismatch -- expected 194, got 196 for Rid ff10"
>
> can u please suggest something?

Ok, this sounds like a problem.  But before we try to troubleshoot this
one, you should use the process I described above to bring the interface
up.  To summarize:

    1. Edit /etc/rc.conf and add:

       ifconfig_an0="DHCP ssid myhome wepmode on weptxkey 1 wepkey 1:0x00000000000000000000654321"

       This should be all in one line and you should edit ssid and the
       wepkey to match your local settings.

    2. Bring up the interface using /etc/rc.d/netif:

       # /etc/rc.d/netif start an0

    3. Wait until it's associated:

       # while true; do
            status=$( ifconfig an0 2>&1 | grep status: | \
                      awk '{print $2}' )
            if [ "$status" = 'associated' ]; then
                echo "an0 associated"
            fi
         done

    4. Check your routing table and the IP address of your an0
       interface:

       # ifconfig an0
       # netstat -rn

Then, if you are still having problems with the an0 interface, we can
start looking for a real bug.

- Giorgos




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051128090041.GA1623>