Setting Up A Raspberry Pi As A Wireless Access Point

Introduction

The Raspberry Pi can be used as a temporary or permanent access point (AP) that allows wireless devices to connect securely to the main LAN. Any model of Pi can be used provided it has an Ethernet connection for the LAN and some form of wireless capability for the AP function. The wireless capability can be built in to the board as on the Zero W/WH and any of the 3B or later models or it can be provided by a suitable USB dongle.

There are two scenarios where you might want to set up an AP:

1. Wireless Extension

This is a simple wireless extension of your main LAN, using the main router for firewall, DHCP and DNS services. Device discovery using SSDP or UDP will work across the Pi.

Raspberry Pi bridged network

2. Separate Routed Network

This creates a separate WLAN with its own IP address range and with the Pi managing all of the WLAN's services; firewall, DHCP, DNS, etc. You might want to use this for a temporary mobile WLAN where the Pi is collating data from sensors, of if you want to set up a guest network with limited access to the Internet, though there are usually other ways of doing this.

Raspberry Pi routed network

There are good instructions for each of these different scenarios on the Raspberry Pi website: bridged and routed

Notes on the official instructions

The official instructions state that the IP address of your Pi "will probably change" - it will change if you're using DHCP because the software creates a pseudo-MAC address that will be allocated a different IP address. If you're running the Pi headless then unless you record either its IP or pseudo-MAC address you may lose contact with it. To avoid this, once your AP is set up and running you can check the new pseudo-MAC and IP address for br0 using the ifconfig br0 command.