how to Bridging with a wireless NIC

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

how to Bridging with a wireless NIC

Tuyosi Takesima
hi all ,


 my room has no wired lan cord .

my situation is

internet
|
wifi router
192.168.100.254
|
|wireless
|
rum0:dhcpcd
openbsd
re0
|
|wired LAN
|
video recorder

my intension is that
video recorder recieves address from  wifi router ( ***not from openbsd***)

debian linux has
https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC
.
but this setting  is compex and hard to follow .

openbsd has logical simplicity .
so are there someone who overcome it ?
-----
regards

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Adam Van Ymeren
On Tue, Feb 16, 2016 at 8:54 PM, Tuyosi Takesima
<[hidden email]> wrote:

> hi all ,
>
>
>  my room has no wired lan cord .
>
> my situation is
>
> internet
> |
> wifi router
> 192.168.100.254
> |
> |wireless
> |
> rum0:dhcpcd
> openbsd
> re0
> |
> |wired LAN
> |
> video recorder
>
> my intension is that
> video recorder recieves address from  wifi router ( ***not from openbsd***)
>
> debian linux has
> https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC
> .
> but this setting  is compex and hard to follow .
>
> openbsd has logical simplicity .
> so are there someone who overcome it ?

http://www.openbsd.org/faq/faq6.html#Bridge

On your openbsd system

/etc/hostname.rum0 should read
dhcp

/etc/hostname.re0 should read
up

/etc/hostname.bridge0 should read
add rum0
add re0
up

That should do it



> -----
> regards

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Tuyosi Takesima
In reply to this post by Tuyosi Takesima
i follow your advice .

the resul is
-------------------
# ifconfig  -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        priority: 0
        groups: lo
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
re0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST>
mtu 1500
        lladdr f0:76:1c:6c:41:af
        priority: 0
        media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
        status: active
enc0: flags=0<>
        priority: 0
        groups: enc
        status: active
rum0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:22:cf:01:22:6f
        priority: 4
        groups: wlan egress
        media: IEEE802.11 autoselect (OFDM12 mode 11g)
        status: active
        ieee80211: nwid URoad-9BF5EC chan 1 bssid 00:1d:93:9b:f5:ec 114dBm
wpakey 0x33948dd44dd$
        inet 192.168.100.102 netmask 0xffffff00 broadcast 192.168.100.255
bridge0: flags=41<UP,RUNNING>
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto
rstp
        rum0 flags=3<LEARNING,DISCOVER>
                port 4 ifpriority 0 ifcost 0
        re0 flags=3<LEARNING,DISCOVER>
                port 1 ifpriority 0 ifcost 0
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33144
        priority: 0
        groups: pflog

---------------
but fails .


acording to http://marc.info/?l=openbsd-misc&m=113037538815977&w=2

it may be too hard for me (i have no knowlege about hostap).

---------------------
regards

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Stefan Sperling-5
In reply to this post by Tuyosi Takesima
On Wed, Feb 17, 2016 at 10:54:54AM +0900, Tuyosi Takesima wrote:
> wifi router
> 192.168.100.254
> |
> |wireless
> |
> rum0:dhcpcd

This kind of bridge between two wireless devices requires support for
the WDS ("wireless distribution system") extension for both the wifi
router and rum0. https://en.wikipedia.org/wiki/Wireless_distribution_system
This functionality is not part of standard 802.11.

OpenBSD doesn't support WDS, so you're out of luck and your plan won't work
like this. Sorry. If the wifi router supports WDS you could try to build
a wireless bridge with some other device (e.g. some device running OpenWRT)
and run a cable to your OpenBSD box from there.

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Adam Van Ymeren
On Wed, Feb 17, 2016 at 12:39 PM, Stefan Sperling <[hidden email]> wrote:

> On Wed, Feb 17, 2016 at 10:54:54AM +0900, Tuyosi Takesima wrote:
>> wifi router
>> 192.168.100.254
>> |
>> |wireless
>> |
>> rum0:dhcpcd
>
> This kind of bridge between two wireless devices requires support for
> the WDS ("wireless distribution system") extension for both the wifi
> router and rum0. https://en.wikipedia.org/wiki/Wireless_distribution_system
> This functionality is not part of standard 802.11.
>
> OpenBSD doesn't support WDS, so you're out of luck and your plan won't work
> like this. Sorry. If the wifi router supports WDS you could try to build
> a wireless bridge with some other device (e.g. some device running OpenWRT)
> and run a cable to your OpenBSD box from there.
>

My bad, I didn't realize you couldn't bridge this way.  I have the
reverse setup going in my room, wire from gateway to BSD box which
provides an additional access point to other wireless devices in my
room.

I know it doesn't meet your original requirements but you could set up
your openbsd box to host a second LAN off of re0 and then nat-to its
address on the wireless.  Or just set up a second network and
configure your routing tables approriately and you shouldn't need NAT.

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Tuyosi Takesima
Hi all .

my final goal is openbsd .

the prementary step is on Linux.
tool is only dynmasq and bridge


schima is next
-------------------------------------

wifi router
192.168.100.254
.
wifi
.
wlan0:192.168.100.103
raspberry pi (minibian  , a kind of debian )
eth0;192.168.0.1
|
|
eth0
Debiandog



1)no firewall

then
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


2) /etc/network/interfaces is simple
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0


3) /etc/dnsmasq.conf
interface=eth0
dhcp-range=192.168.0.21,192.168.0.22,72h
dhcp-option=option:router,192.168.0.1
domain-needed
bogus-priv
no-resolv
no-poll
server=8.8.8.8
no-hosts
expand-hosts


4)run shell script

ifconfig eth0 192.168.0.1    # perhaps neddless
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/init.d/dnsmasq restart
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
dhclient br0


then debiandog  get address 192.168.100.104 (not 192.168.0.X)

this is very simple method.
so , there is posiibility  of ethenet converter on OpenBSD

my bed room has no lan cable .
and the video recorder has no wifi ,
so i want ethenet converter

----
regards , tuyosi

Reply | Threaded
Open this post in threaded view
|

Re: how to Bridging with a wireless NIC

Stefan Sperling-5
On Sun, Feb 21, 2016 at 11:50:05PM +0900, Tuyosi Takesima wrote:
> then debiandog  get address 192.168.100.104 (not 192.168.0.X)
>
> this is very simple method.
> so , there is posiibility  of ethenet converter on OpenBSD
>
> my bed room has no lan cable .
> and the video recorder has no wifi ,
> so i want ethenet converter

On Linux, can you run:

  iw wlan0 info | grep type

and show me the output?

And the full output of:

  iw phy0 info

as well.