From charlesreid1

Bridging

There are many kinds of bridges you can build on the Widy.

An invisible bridge is a bridge that seamlessly connects two networking devices, so that they mirror one another. This allows any clients connecting to the Widy's wireless network to actually send their traffic out over a wired network. This allows them to obtain a DHCP lease from another server on the network. This can be thought of as a repeater mode for the wireless network - the wireless network serves as a wireless repeater for a wired network.

Wired-Wireless Invisible Bridge

How It Works

We will use the Widy's OpenWrt Luci web interface to configure a network bridge between a wireless network (with the Widy as an access point - see Widy/Access Point for setup) and the Widy's ethernet port.

The scenario here is as follows: the Widy is plugged in, via ethernet cable, to a router or a wall socket or other source of network goodness.

The Widy's wireless access point is then created, joining everyone on the Widy's OpenWrts wireless network.

The bridge is then created, which allows all traffic to flow between the ethernet and wireless interfaces.

The bridge is invisible because each computer on either side does not see the interface, there is no filtering of traffic, and the two network devices mirror each other.

First Steps

The first step to bridging a wired and wireless connection is figuring out how to connect to a wired network with the Widy. When you connect the Widy to a router that's connected to the internet, it won't immediately be able to obtain an IP address.

Create Ethernet Interface in DHCP Client Mode

Open the Luci web interface by connecting to the Widy's Access Point wireless network (OpenWrts) and log in with your username and password.

Click Network > Interfaces, then edit the LAN interface (or create it).

You'll see that the Widy is probably set up to serve out IP addresses as a DHCP server, not accept an IP address as a DHCP client.

Make sure you are connected to the Widy via OpenWrts wireless AP network. Then shut down the lan connection.

Now create a new interface, called getwired. The protocol of this new interface will be "DHCP client." Now check the "Create a bridge over multiple interfaces" box. Cover the following interfaces: ethernet adapter (eth0, lan) and wireless network "OpenWrts" (wrtwifi).

Click Submit.

Now you should have a GETWIRED network interface that will act in DHCP client mode and will ask for an IP address.

Check It Worked

Click Network > Interfaces and see the GETWIRED connection. Click the "Connect" button next to it. You should see "IPv4: 192.168.1.37" (or whatever IP the router has assigned to the Widy device).

Now you can seamlessly connect to the internet from your devices connected only to the Widy's access point, the OpenWrts wireless network.

Victory Dance

Hooray! You have now simultaneously created a working wireless network.

Issues

Consistency Issues with Internet Connection

Having some consistency issues connecting to the internet from the Widy's OpenWrts wireless network.

However, with one computer (Linux, morpheus) I am able to consistently start from no network connections, bring up wireless, connect to Widy, and access a random Wikipedia page.

IP Schema Issues

The IP address schema of the Widy also seems to be screwed up somehow. I plug the ethernet cable into a router. I set the Widy to assign IP addresses to wireless clients from the namespace 192.168.1.X. Then I create the wired-wireless bridge.

If the wired-wireless bridge already exists, any new node that joins the network is automatically assigned an IP address by the router. If my home router is on 10.0.0.1, it is assigning IP addresses in the namespace 10.0.0.X. That means a computer that connects to the Widy OpenWrts wireless network will be asking for a DHCP lease, signed with its unique mac address, which will be directly forwarded on through to the Widy's wireless cable, and reach the router. This will then assign a new IP address to that mac address.

This is not quite what we want. This makes the Widy a WIRELESS REPEATER, and allows us to join wireless and wired.

What we really want is for Widy to act like a gateway. Everything happening on the OpenWrts router, happens there. Nothing leaves the private subnet unless it needs to. This approach can be accomplished using Linux/SSH and an SSH tunnel to bridge the two network interfaces. This would, e.g., let you create a bridge from one computer on the private wireless network (no network access) to another, remote computer at an IP address (on the other side, using Widy's ethernet cable).

Wired-Wireless Uninvisible Bridge

An uninvsiible bridge simply meanas that the Widy is connected to a wired network, and a wireless network, but keeps both separate. The wired network has a different IP space from the wireless network. If a computer on one side needs to reach a resource on the other, it creates an SSH tunnel through the Widy gateway.

This would have applications, e.g., with collecting Raspberry Pi data and sending it out to a command and control server. In this case, there would be some Python script going to get the files, then copying them out over the network.

Related

Widy/Toolbox