1

I have device A and B. I need them networked together (see eachother on arp-scans etc). Device B has WiFi, but device A has Ethernet. Basically I just want the Pi to act like a simple router (maybe this isn't the right term) for an internal network.

How can I configure the Pi to host a WiFi network over wlan0 (hostapd + dnsmasq I guess) but also allow a client to connect via Ethernet in the same way a client connects over WiFi (including DHCP)?

Quick Note:

I've already had it almost working, but the Ethernet client was under 192.168.2.X while the WiFi clients were on 192.168.1.X. They could access each other by IP address, but were still on separate networks, which isn't what I want.

Below is a diagram of what I want:

Diagram

NaxNir
  • 13
  • 3

2 Answers2

0

Your question omits detail e.g. what the devices are, and what you expect them to be able to access.

The following should come close to what you stated you want to do i.e. allow B to access A.
Access Point

Frankly you would be better to either connect to your router (or buy a cheap router). The Pi makes a poor router (slow, limited ports), and would cost more.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

Usually different interfaces are connected to different subnets on a router and ip packets are routed from one subnet to others and routing tables determine to what subnet they should go. But you want that all devices have ip addresses from the same subnet. This can be done by "merging" the interfaces into a bridge. This way the separate subnets become one big broadcast domain that behaves like one big subnet.

I have made such a bridge with an uplink to an internet router at Configuring Raspberry pi as Router, Wifi and Ethernet Bridge. The setup is divided into two parts. First setting up the bridge and then create the uplink. Just follow only the first section Setting up an access point (wlan0) and bridge it with wired ethernet (eth0), then you should have what you want.

Ingo
  • 42,961
  • 20
  • 87
  • 207