Journal TheRaven64's Journal: Look! No Wires! 4
Configuring WiFi on FreeBSD was so trivial it barely rated a section in the handbook. First of all, I needed to load the bridging kernel module (since I had not compiled bridging into my kernel).
# kldload bridge
Next, I had to tell the bridging module which interfaces to connect together. This was done with a pair of sysctls:
# sysctl net.link.ether.bridge=1
# sysctl net.link.ether.bridge_cfg="wi0 fxpl0"
Where, wi0 was my WiFi card, and fxp0 was the on board Intel NIC. Finally I had to bring the WiFi interface up. To do this, I wrote a simple init script, which I dumped in
#!/bin/sh
case $1 in
start)
ifconfig wi0 ssid RavenNet wepmode on wepkey x0123456789 channel 11 media DS/11MBps mediaopt hostap up stationname "Slave";;
stop)
ifconfig wi0 down;;
restart)
ifconfig wi0 down
ifconfig wi0 ssid RavenNet wepmode on wepkey 0x0123456789 channel 11 media DS/11MBps mediaopt hostap up stationname "Slave";;
*)
echo "Usage WiFi [start|stop]"
exit;;
esac
echo WiFi
Slashdot seems to have munched my indenting, but you get the idea.
Slave is now acting as a bridge between my PowerBook and the rest of the network. The only drawback is that I can't access slave directly from the wireless portion of the network. There are two solutions that I can see to this problem; I can either configure the interface as a router, rather than a bridge, or I can just pop in a spare network card (I probably have a load of rtl8139's spare), put that on a different address and tell it to bridge from the wireless card to this address. I will implement one of these once I have worked out which is less effort.
Why? (Score:2)
Re:Why? (Score:2)
Re:Why? (Score:2)
Of course there is, the loopback interface. It exists for this exact situation.
(wi0 has no ip address associated with it)
Ah, well there's the key bit of information I didn't have. So, this is not just bridging, it's also some flavor of NAT or similar.
What host do you get if you hit 127.0.0.1?
Re:Why? (Score:2)