cditty
Posts: 31
Joined: Fri Sep 28, 2012 3:05 pm

Access Point / Bridge with a dedicated IP

Thu Nov 30, 2017 10:49 pm

I am trying to do a proof of concept at work so that I can get the door opened for some Raspberry Pi devices. One of the tasks I am trying is to turn the pi into a access point. I was able to do this using these instructions. However, I need the device to have a dedicated ip address also.

I set the static line in the dhcpcd.conf file for my dedicated IP address, but everytime I reboot/restart, I get a different ip address. It is usually the next one issued out from the router I'm connected to.

Anyone have any advice or suggestion as to what I am doing wrong? My access point has to have a dedicated IP address or it is of no use for this task.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Access Point / Bridge with a dedicated IP

Thu Nov 30, 2017 11:00 pm

If you don't want dhcp network assignments, put this in /etc/dhcpcd.conf before any interface sections.

Code: Select all

denyinterfaces wlan0 eth0
Then assign the static network settings to the bridge br0. Change these to match your network.

Code: Select all

interface br0
static ip_address=192.168.1.254/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

cditty
Posts: 31
Joined: Fri Sep 28, 2012 3:05 pm

Re: Access Point / Bridge with a dedicated IP

Thu Nov 30, 2017 11:03 pm

I need dhcp for all the devices that connect, I just need the pi to have a dedicated IP address.

Thank you. After seeing the interface br0 section, that makes sense. I think that is what I need. I'll try it in the am. Thank you.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Access Point / Bridge with a dedicated IP

Thu Nov 30, 2017 11:05 pm

All other devices will get dhcp assignments. Only the RPi will have a static assignment.

sdikfguhjdfgj
Posts: 1
Joined: Tue Oct 10, 2017 8:55 pm

Re: Access Point / Bridge with a dedicated IP

Fri Dec 01, 2017 9:32 am

Hi. I've followed the guide of surfertim and im facing the same issue right now. I need my access point to have a static IP so that the people connecting to it can see my captive portal. ive tried what you mentioned above but i cant seem to give it a static ip. am i missing something?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Access Point / Bridge with a dedicated IP

Fri Dec 01, 2017 12:27 pm

sdikfguhjdfgj wrote: Hi. I've followed the guide of surfertim and im facing the same issue right now. I need my access point to have a static IP so that the people connecting to it can see my captive portal. ive tried what you mentioned above but i cant seem to give it a static ip. am i missing something?
This guide?
https://github.com/SurferTim/documentat ... s-point.md
With this?
To configure the static IP address, edit the dhcpcd configuration file with:

Code: Select all

sudo nano /etc/dhcpcd.conf
Go to the end of the file and edit it so that it looks like the following:

Code: Select all

interface wlan0
    static ip_address=192.168.4.1/24
If you need static network settings on the eth0 interface, there are examples in /etc/dhcpcd.conf.

Edit: I have posted a few guides. Standalone (NATed), bridge, and ap/client on the same interface. Be more specific about which you are using if you want more help.

ezimmert
Posts: 3
Joined: Sat Feb 03, 2018 2:34 pm
Location: FR

Re: Access Point / Bridge with a dedicated IP

Sat Feb 03, 2018 2:46 pm

Hi,
I followed SurferTim's great instructions here https://github.com/SurferTim/documentat ... s-point.md and succeed to create both standalone network and Ap with shared Internet connection.

Would it be possible to have both working together?

On the Pi, I have a nginx server serving a collaborative workspace for students. It works perfectly as a standalone network. The WLAN interface has a static address (10.0.77.1) and the server is listening on port 80. The students can connect to the Wifi AP and find the workspace at edu.box domain in their browser.
Now how could I make them connect to the Internet (bridge br0 between wlan0 and eth0) and still make the worspace available at edu.box (which would serve content from the nginx server on the Pi)?

Note: I am using Raspbian Stretch

Return to “Troubleshooting”