Re: statically address wifi interface without an SSID



On Tue, 2016-04-05 at 08:42 -0500, Matt Zagrabelny wrote:
On Mon, Apr 4, 2016 at 2:47 PM, Dan Williams <dcbw redhat com> wrote:

On Mon, 2016-04-04 at 14:07 -0500, Matt Zagrabelny wrote:

Hey Dan,

On Mon, Apr 4, 2016 at 1:54 PM, Dan Williams <dcbw redhat com>
wrote:


On Mon, 2016-04-04 at 11:47 -0500, Matt Zagrabelny wrote:


Greetings,

I have an rpi2 with two USB wifi dongles. One dongle I use to
connect
to whatever wifi network I'm around. This works great. Thanks
NM!

The other wifi dongle I'm using with hostapd.

I'd love for NM to be able to statically address this
interface
without needing to assign it an SSID - since the interface is
running
in master mode.

Does anyone know if this is possible? Perhaps by manually
tweaking
files in /etc/NetworkManager?
NM can use wpa_supplicant's lightweight AP mode to do most of
what
hostapd does, if you don't need extensive features like
802.1x/EAP.
 Perhaps that could work instead of hostapd?
And it is configured via the "hotspot" option in NM?

Does it handle DHCP or do I need to run that separately?
Currently
using udhcpd.
Yes.  First select "Hotspot" (AP) mode in nm-connection-editor and
assign the SSID.  Now you have a choice of IP addressing; you can
either assign whatever static address you want and use your own
DHCP,
DNS forwarding, and routing rules.
When attempting to manually set the v4 address I am at:

IPv4 Settings -> Method

- Shared to other computers
- Disable

The other choices are unselectable. When I hover over "Manual" it
does
not highlight as it does for the two listed above.

If I wanted manually assign, am I looking at the right option?

I forgot that while the option works, it's not enabled in the UI.  But
if you create it with Shared, then edit the conneciton file in
/etc/NetworkManager/system-connections and something like this:

[ipv4]
addresses=172.16.5.1/24
and then 'nmcli con reload', it should do the right thing when you
start the hotspot connection.  For a /24 I think it'll start handing
out DHCP leases at .10, leaving you some static IPs to play around
with.

Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]