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

Raspberry Pi OS • Re: nmcli of a bridged wifi access point?

$
0
0
You didn't mention what version of the OS you're using, but I assume it's Bookworm. The magic incantation you're looking for is the following:

Create network Bridge connection:

Code:

sudo nmcli con add type bridge con-name 'Bridge' ifname br0
Add Ethernet connection to Bridge:

Code:

sudo nmcli con add type ethernet slave-type bridge con-name 'Ethernet' ifname eth0 master br0
Create Hotspot connection using WiFi interface, and add it to Bridge:

Code:

sudo nmcli con add con-name 'Hotspot' ifname wlan0 type wifi slave-type bridge master br0 \    wifi.mode ap wifi.band bg wifi.channel 6 wifi.ssid 'SSID' \    wifi-sec.key-mgmt wpa-psk wifi-sec.psk 'PASSWORD'
Note that when you reboot the Raspberry Pi, your router will assign a different IP address, as the wlan0 (not eth0) MAC address is assigned to the Bridge connection. You'll see what I mean if you use ifconfig. If you want your Pi to have a static IP address, use nmtui to change the IPv4 Configuration to Manual for the Bridge connection, and configure appropriately.

Statistics: Posted by T J Kong — Mon Jul 07, 2025 3:44 am



Viewing all articles
Browse latest Browse all 8023

Trending Articles