Get LAN and WLAN networks under same IP range

1

I'm a newbie in network stuff and haven't enough knowledge to do what I'm wanting for now, so I need your help, please.

I've two networks, a wired and another wireless.

The wired one is between two computers that acts as routers/gateways. The first one receives provider's Internet link and routes to second, which manages a wireless network and routes Internet to it's clients.

                         |  Computer 1  |    wired     |  Computer 2  |    wireless    | Client
[Internet link] ======== | 192.168.45.1 | ============ | 192.168.45.2 | ============== | Client
                         |              |              | 172.16.45.1  |                | etc.

Currently, wired network has a /30 IP range and wireless a /24. They are distinct ranges (192.168.45.0/30 for wired and 172.16.45.0/24 for wireless). This setting doesn't allow Clients reach Computer 1 or vice versa.

What I want is to have everything within the same IP range, making possible Computer 1 reach Computer 2 and Clients, Clients reach Computer 2 and Computer 1 and Computer 2 reach Computer 1 and Clients. Ultimately, everyone be able to communicate with everyone.

I got a solution which is simply add a routing rule in Computer 1 to reach 172.16.45.0/24 through 192.168.45.2, but by this way, remain exist two distinct IP ranges.

I saw somewhere that is possible to do something like this:

Wired network:
Network address: 192.168.45.0
Netmask: 255.255.255.252
Available IPs: 192.168.45.1-2
Broadcast address: 192.168.45.3

Wireless network:
Network address: 192.168.45.4
Netmask: 255.255.255.128
Available IPs: 192.168.45.5-131
Broadcast address: 192.168.45.132

It's possible, and if yes, how can I make this setting assuming Computer 1 runs Linux and Computer 2 runs Windows 7? I've searched a lot but found nothing useful, maybe I'm not searching for right term.

Tiago.SR

Posted 2014-03-02T00:11:48.017

Reputation: 23

Answers

1

Update: It seems it is impossible to bridge a hosted network in Windows, sorry.

The easiest solution is a network bridge. To do this, open the Network and Sharing Center, click on "Change adapter settings" in the left pane. Then, select both your wired and wireless network adapters, right click and "Bridge Connections".

This of course doesn't include setting up the wireless connection. Windows 7 can host an infrastructure network, keyword "netsh hostednetwork". This is, however, up to the driver to support. If this mode doesn't work, you'll only be able to use an ad-hoc network. Some devices do not support this.

Your whole setup is, however, rather... suboptimal. I recommend getting a WiFi router, it saves power (none of the computers has to be running!) and usually has vastly superior wireless performance.

Daniel B

Posted 2014-03-02T00:11:48.017

Reputation: 40 502

I currently use netsh wlan ... hostednetwork ... to setup wifi network here. How I do configure this bridge? I've set it to 192.168.45.2/29, and Computer 1 to 192.168.45.1/29. However, Virtual Wifi Adapter requires a IP setting. I tried to set 192.168.45.3/29 to it. I tested connecting wifi client with 192.168.45.4/29 and gateway 192.168.45.2/3/1, and none of these settings worked.

About power use and wireless performance: just Computer 1 is almost of time on. Computer 2 and it's clients rarely are turned on. – Tiago.SR – 2014-03-02T02:32:01.763

NICs that are part of a bridge don't require an IP addres, it is set on the bridge. If the Virtual WiFi Adapter does, it is not part of the bridge. Also, why not use DHCP? And why limit yourself to a network that can contain at most 6 devices? – Daniel B – 2014-03-02T11:04:58.947

It's not possible to create a bridge between Ethernet and Virtual Wifi Adapter. I created it between Ethernet and real wireless interface.
Only a limited number of known devices will connect to Wifi, so I don't have no need for DHCP.
I made a mistake on writing /29 instead of /28, which is sufficient.
– Tiago.SR – 2014-03-02T16:48:05.507

Well, apparently it's not possible to bridge a hosted network, sorry. Get a router or access point. Also, use DHCP and a /24 network. – Daniel B – 2014-03-02T17:31:19.990

Hm. Thanks for your answers. It's a shame I can't vote up for your answer (I've not minimum required reputation). – Tiago.SR – 2014-03-02T17:45:58.120