Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7158

Networking and servers • Re: Setup the pi as a wifi gateway

$
0
0
Do I understand you correctly? Your Pi is connecting to a WiFi AP and you want to share that connection with one or more devices connected to the Pi's ethernet interface? And you want the Pi to act as a network bridge?

If so, you're out of luck. The WIFi standard doesn't allow this. A WiFi interface in client mode cannot be part of a bridge.

You need to configure the Pi to route traffic between it's ethernet and WiFi interfaces. That means:
  • The Pi's ethernet IP address must be static.
  • All IP addresses in the ethernet network must be in a different subnet to the WiFi
  • You'll need to set up routing and NAT on the Pi.
  • You may wish to run borh a DHCP server and DNS server on the Pi's ethernet interface.
  • If using static addresses for ethernet connected devices they must have the Pi configured as their default gateway. They can have a DNS server on the other side of the PI but if so they won't be able to resolve hostnames of devices on the ethernet side except through mDNS (hostname.local).
  • If you want devices on the WiFi side of the Pi to be able to initiate copnnections to devices on it's ethernet that will require additional configuration.
Some further comments:
  • 192.168.0.0 and 192.168.1.0 may still be in the same subnet but that depends on the netmask. A /16 (255.255.0.0) or smaller netmask has them in the same subnet. A /24(255.255.255.0) netmask does not.
  • If you're using RPiOS Bookworm most online tutorials will be out of date. Bookworm removed dhcpcd and replace it (and most of the networking config) with Network Manager.

Statistics: Posted by thagrol — Tue Mar 05, 2024 12:07 am



Viewing all articles
Browse latest Browse all 7158

Trending Articles