Problem with Wi-fi hostAP and LAN routing

I want to ask is it possible to configure FreeBSD to be a router wi-fi and LAN. I use dhcpd and natd, but now the wi-fi card is 192.168.2.1 and the LAN is 192.168.1.1 (internal network), and the dhcpd gives 192.168.2.x network on wi-fi and 192.168.1.x on LAN. I tryed to configure them both on 192.168.1.x network (wi-fi 192.168.1.2 and lan 192.168.1.1) but the dhcpd returns an error. I am sure it is possible to do that becos how else can work the simple wi-fi routers and answer both wi-fi and LAN on a same IP? Any ideas?
10x
 
Those 'simple' wifi routers use bridging. You could use bridging on fbsd to get the same effect but not all wireless cards work. The card basically has to 'spoof' a client's MAC address and not all cards/drivers allow that.

Having said that, you don't need to bridge. Just add gateway_enable="YES" to /etc/rc.conf to enable routing. The fbsd box will happily route traffic between the 2 subnets.
 
Adding
Code:
gateway_enable="YES"
to /etc/rc.conf is the first thing I've done of course :) and everything is working perfectly fine already 2 weeks I thing :p.
But the problem is that the workstations behind the router are with windows OS and those 2 subnets gives me a lot troubles with communicating between laptops on wi-fi and desktops on LAN... you know file sharing, network applications and so on.
So back to the main question making wi-fi and LAN on a same subnets?
How do I found out does my card support bridging and is it the only way? Can I make the DHCP work fine with 2 cards in a same subnetwork with differend IPs, not with 2 cards bridged in to 1 IP and mac? Becos if I set up a static IPs on the laptop on 192.168.1.x networks it works fine with the desktops, but the DHCPD doesnt like to do it automaticly :(. I don't care if the wi-fi gateway is 192.168.1.2 and the LAN is 192.168.1.1, it is fine, just need them to be in the same subnet, doesn't matter witch interface they use for exit point of the network.
 
Can't be done without bridging.

As for your problems, there shouldn't be any. Both subnets use the FreeBSD box as default gateway. The FreeBSD box will route the traffic.

The only 'problem' you may have is with broadcasts as they're not forwarded. Setting up proper name resolution, so there's no need for a windows client to do a netbios name lookup broadcast, will solve that.
 
Ok dude 10x a lot I'll try that with the netbios name, sounds good, but anyway just informative how do I find out if the bridging is supported on my wi-fi card/driver? And the netbios settings, are they in dhcod.conf????
 
gnoma said:
how do I find out if the bridging is supported on my wi-fi card/driver?
Good question but I have no idea :e

I only know bridging wireless is still a little tricky (it popped up a couple of times here already).
 
Is you wireless card configured as an AP? Those should generally support bridging, I guess one could even say its a bug if it doesn't work. The keyword here is hostap, wireless clients and bridging is something totally different..

I do run a setup similar to yours with an ath(4) card for years without an issues regarding bridging.
 
Yes the card is configured as an AP, well I thing I better slove the problem with those netbios then bridge the cards becos is I make changes in future I won't have to preconfigure the network cards. Simply remove 1 card and leave the other 1 and it will be usefull to see what is this netbios. I'll try to configure it anyway and if it doesn't do the trick then I'll get on the bridging.
So anybody.... where should I look for the netbios server configuration? dhcpd.conf? Is this thing a feuture of the DHCP?
 
Setting up proper name resolution, so there's no need for a windows client to do a netbios name lookup broadcast, will solve that.
And where can I setup this proper name?
Sorry I don't understand a shit... :( I am kinda new in this world. Can you explane it to me what is this name and what is the proper syntax of this name and where shoud I set it up? And what this name does in the network?
Thank you
 
gnoma said:
And where can I setup this proper name?
Sorry I don't understand a shit... :( I am kinda new in this world. Can you explane it to me what is this name and what is the proper syntax of this name and where shoud I set it up? And what this name does in the network?

It's basically the wrong forum to ask, as they are Windows questions ;)

http://technet.microsoft.com/en-us/library/cc738412(WS.10).aspx
http://technet.microsoft.com/en-us/library/bb727005.aspx

To get the name resolving working properly you will also need to set up DHCP and BIND. Both need to be configured to use DDNS (dynamic DNS). Use DHCP/DDNS for workstations, configure your servers with static IPs and DNS entries.
 
Back
Top