[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ral (Cnet CWP-854) wireless hostap + dhcpd - what is the obvious bit I am missing?

Seeing that in 3.7, wireless support had come to include the really
cheap ralink based cards, I thought I'd ran out of excuses and bought me
a couple.  I was a bit worried when I noticed too late (ie after I'd
ordered the cards from a web shop) that ral(4) cards require PCI 2.2.
Then again I never got around to figuring out how to nail which PCI
revision a system uses, and it does not seem to have anything to do with
whatever is stopping the setup from working (the card gets recognized
and appears to be sending signals).

Anyway, one ral went into the box my wife insists needs to run microsoft,
and one went into the gateway as that machine's third network interface.
The other two are 

xl0 - facing an ADSL router, with our sole official and fixed address,
      hostname.xl0 says

      inet NONE

xl1 - facing the wired home network, hostname xl1 says

      inet NONE

no surprises, obviously I do NAT between the two. It has Just Worked for
quite a while, and this part still does.

Adding to this we now have ral0, with hostname.ral0 which now says

up media DS11 mediaopt hostap nwid kakemonster nwkey 0x1deadbeef1

(the DS11 part is there because a laptop I tend to use has that mode as
its top speeed, and I started out with a two internal subnets - for wireless and for wired - but
switched to a bridged config which sounded reasonable after reading
http://marc.theaimsgroup.com/?l=openbsd-pf&m=104788096126953&w=2.  No
noticeable difference I'm afraid other than a noticeable delay while
network deamons start and for the login parts of ssh connections)

I thought DHCP would be useful (and since I've never needed to set up 
a dhcpd before, this may be where the problem lies), and arrived at this

default-lease-time 600;
max-lease-time 7200;


shared-network BSDLY {

# Ethernet Network
subnet netmask {
    option  domain-name "bsdly.net";
    option  routers;
    option domain-name-servers,,,,;

host dellheim {
    hardware ethernet 00:08:A1:85:8D:86;

host amidala {
    hardware ethernet 00:03:0d:12:49:d7;

It works, sort of - sshing in to the gateway via the wired net and doing
a "dhclient ral0" gets an answer from the dhcpd listening on ral0, and
apparently an address gets assigned.  However, on the intended clients
coming from the wireless, the effects are not quite what I wanted - the
kakemonster network announces itself, but never actually assigns an IP
address to the client.

At the moment, ifconfig says

peter_(_at_)_skapet:~$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
        inet netmask 0xff000000 
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7
        address: 00:10:5a:86:18:2c
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet netmask 0xfffffff8 broadcast
        inet6 fe80::210:5aff:fe86:182c%xl0 prefixlen 64 scopeid 0x1
        address: 00:60:97:83:84:0d
        media: Ethernet autoselect (10baseT)
        status: active
        inet netmask 0xffffff00 broadcast
        inet6 fe80::260:97ff:fe83:840d%xl1 prefixlen 64 scopeid 0x2
        address: 00:08:a1:85:8d:8c
        ieee80211: nwid kakemonster chan 3 bssid 00:08:a1:85:8d:8c nwkey <not displayed> 100dBm 
        media: IEEE802.11 DS11 hostap (autoselect mode 11b hostap)
        status: active
        inet6 fe80::208:a1ff:fe85:8d8c%ral0 prefixlen 64 scopeid 0x3
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
pfsync0: flags=0<> mtu 2020
enc0: flags=0<> mtu 1536
bridge0: flags=41<UP,RUNNING> mtu 1500

re bridge, my bridgename.bridge0 says

peter_(_at_)_skapet:~$ cat /etc/bridgename.bridge0
add ral0 
add xl1 
#blocknonip ral0 
#blocknonip xl1 
fwddelay 1

while brconfig gives

peter_(_at_)_skapet:~$ brconfig -a
bridge0: flags=41<UP,RUNNING>
                priority 32768 hellotime 2 fwddelay 1 maxage 20
                xl1 flags=3<LEARNING,DISCOVER>
                        port 2 ifpriority 128 ifcost 55
                ral0 flags=3<LEARNING,DISCOVER>
                        port 3 ifpriority 128 ifcost 55
        Addresses (max cache: 100, timeout: 240):
                00:03:0d:12:49:d7 xl1 1 flags=0<>

and finally for completeness dmesg gives

OpenBSD 3.7 (GENERIC) #50: Sun Mar 20 00:01:57 MST 2005
cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 351 MHz
real mem  = 268009472 (261728K)
avail mem = 237785088 (232212K)
using 3297 buffers containing 13504512 bytes (13188K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(8f) BIOS, date 10/09/98, BIOS32 rev. 0 @ 0xf0520
apm0 at bios0: Power Management spec V1.2 (BIOS mgmt disabled)
apm0: APM power management enable: unrecognized device ID (9)
apm0: APM engage (device 1): power management disabled (1)
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xd92
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf0d10/128 (6 entries)
pcibios0: PCI Interrupt Router at 000:04:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xc000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x02
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Rage Pro" rev 0x5c
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 4 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 4 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALL EL5.1A>
wd0: 16-sector PIO, LBA, 4892MB, 10018890 sectors
wd1 at pciide0 channel 0 drive 1: <WDC WD2000JB-00GVA0>
wd1: 16-sector PIO, LBA48, 190782MB, 390721968 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
wd2 at pciide0 channel 1 drive 0: <ST36531A>
wd2: 32-sector PIO, LBA, 6204MB, 12706470 sectors
atapiscsi0 at pciide0 channel 1 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <SAMSUNG, CD-ROM SC-148B, BS10> SCSI0 5/cdrom removable
wd2(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
cd0(pciide0:1:1): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 4 function 2 "Intel 82371AB USB" rev 0x01: irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
"Intel 82371AB Power Mgmt" rev 0x02 at pci0 dev 4 function 3 not configured
xl0 at pci0 dev 10 function 0 "3Com 3c905B 100Base-TX" rev 0x30: irq 10, address 00:10:5a:86:18:2c
exphy0 at xl0 phy 24: 3Com internal media interface
xl1 at pci0 dev 11 function 0 "3Com 3c905 100Base-TX" rev 0x00: irq 12, address 00:60:97:83:84:0d
nsphy0 at xl1 phy 24: DP83840 10/100 PHY, rev. 1
ral0 at pci0 dev 12 function 0 "Ralink RT2560" rev 0x01: irq 11, address 00:08:a1:85:8d:8c
ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 (mux 1 ignored for console): console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
lm0 at isa0 port 0x290/8: W83781D
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask e765 netmask ff65 ttymask ffe7
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 82
dkcsum: wd1 matched BIOS disk 81
dkcsum: wd2 matched BIOS disk 80
root on wd2a
rootdev=0x20 rrootdev=0x320 rawdev=0x322

now if you've read this far, I'm grateful even if you did not notice
anything obvious :)

But as usual I'm fairly convinced that there's something silly like a
typo or something other truly trivial that's tripping me up here.

And since you're probably wondering, there seems to be a generous
handful of wide open wireless networks withing range.  I won't need to
impose too much on my neighbors, I hope.
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://www.blug.linux.no/rfc1149/ http://www.datadok.no/ http://www.nuug.no/
"First, we kill all the spammers" The Usenet Bard, "Twice-forwarded tales"

Visit your host, monkey.org