Re: Can Network Manager be used for router-type configurations?



Just circling round this one again

On 03/04/2018 13:11, Nick Howitt wrote:



On 03/04/2018 12:50, Thomas Haller wrote:
On Mon, 2018-04-02 at 16:46 +0100, Nick Howitt wrote:

Hi Nick,


1 - change the DHCP server range of addresses for a Wireless
Hotspot
You can do that by configuring a static/manual IP address. That
address
is assigned to the router, and the same subnet is shared. Explained
in
`man nm-settings`.
If I set the interface with an address and /24 subnet I see the DHCP
server using that subnet, but it always seems to use .10-.254 for
its
available address range. From your link in 3 below, can I pass the
parameters "first" and "last" to the script or are they hard coded?
They depend on the address that you set, see examples at:
https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/dnsmasq/tests/test-dnsmasq-utils.c?id=eb8257dea5802a004af9cccacb30af98440e2172#n122

(older versions behaved slightly different: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=d512ed9f1f1353166ae2110e2e6ffeb3d5f624d7 )
I'll have a look
The examples/tests seem to show that the DHCP range is selected automatically and are not user configurable. All the user can do is change the NIC IP address. The only way to reserve a bunch of addresses is to configure a NIC somewhere in the middle of a subnet then NM/dhcp will not use the smaller block of remaining available addresses. With the more common assignments of a .1 or .254 addresses, this will not happen.

2 - get WPA/PSK to work on the hotspot (it would configure bit
not
allow
connections)
Not sure what you are doing. WPA/PSK hotspot works for me with NM.
I'll have to try again. Configuring as WEP worked. Changing to WPA
and
changing the PSK never allowed a connection from Android. I also
tried a
simplistic configuration at the command line:
nmcli c add type wifi ifname wlp0s18f2u2 con-name nick autoconnect
no
ssid TEST
nmcli connection modify nick 802-11-wireless.mode ap
802-11-wireless.band bg ipv4.method shared
nmcli connection modify nick wifi-sec.key-mgmt wpa-psk
nmcli connection modify nick wifi-sec.psk "12345678"
nmcli connection up nick

but no dice.
if you do this, ipv6.method will be "auto". That (usually) will not
work. Set it to "ignore" or "shared".
Good idea to try.
Failed :(

An alternative might be to create the profile with `nmcli device wifi
hotspot` or the hotspot button in gnome-shell (and adjust it from
there).
Tried and failed again:
nmcli device wifi hotspot ifname wlp0s18f2u2 ssid HOTSPOT band bg password 12345678

gives:
[root@oldserver ~]# nmcli connection show Hotspot
connection.id:                          Hotspot
connection.uuid: 75d8f78b-1ca9-4aa9-a415-2cae8d8db9cc
connection.stable-id:                   --
connection.interface-name:              --
connection.type:                        802-11-wireless
connection.autoconnect:                 no
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.timestamp:                   1524485225
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        -1 (default)
802-11-wireless.ssid:                   HOTSPOT
802-11-wireless.mode:                   ap
802-11-wireless.band:                   bg
802-11-wireless.channel:                1
802-11-wireless.bssid:                  --
802-11-wireless.rate:                   0
802-11-wireless.tx-power:               0
802-11-wireless.mac-address:            00:19:CB:04:59:5B
802-11-wireless.cloned-mac-address:     --
802-11-wireless.generate-mac-address-mask:--
802-11-wireless.mac-address-blacklist:  --
802-11-wireless.mac-address-randomization:default
802-11-wireless.mtu:                    auto
802-11-wireless.seen-bssids:            00:19:CB:04:59:5B
802-11-wireless.hidden:                 yes
802-11-wireless.powersave:              default (0)
802-11-wireless-security.key-mgmt:      wpa-psk
802-11-wireless-security.wep-tx-keyidx: 0
802-11-wireless-security.auth-alg:      --
802-11-wireless-security.proto:         rsn
802-11-wireless-security.pairwise:      ccmp
802-11-wireless-security.group:         ccmp
802-11-wireless-security.leap-username: --
802-11-wireless-security.wep-key0:      <hidden>
802-11-wireless-security.wep-key1:      <hidden>
802-11-wireless-security.wep-key2:      <hidden>
802-11-wireless-security.wep-key3:      <hidden>
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type:  0 (unknown)
802-11-wireless-security.psk:           <hidden>
802-11-wireless-security.psk-flags:     0 (none)
802-11-wireless-security.leap-password: <hidden>
802-11-wireless-security.leap-password-flags:0 (none)
ipv4.method:                            shared
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       (default)
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-timeout:                      0
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)
ipv6.method:                            ignore
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       (default)
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.token:                             --
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
GENERAL.NAME:                           Hotspot
GENERAL.UUID: 75d8f78b-1ca9-4aa9-a415-2cae8d8db9cc
GENERAL.DEVICES:                        wlp0s18f2u2
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        no
GENERAL.DEFAULT6:                       no
GENERAL.VPN:                            no
GENERAL.ZONE:                           --
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/21
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/10
GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/113
GENERAL.MASTER-PATH:                    --
IP4.ADDRESS[1]:                         10.42.0.1/24
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         fe80::219:cbff:fe04:595b/64
IP6.GATEWAY:                            --

But no connection possible with my ZyXel G-202 or Edimax EW-7811Un NIC's
I tried but could only connect using WEP configured with nm-connection-editor and not nmtui (on Centos7.4). Using the Hotspot button created other complications by adding extra connection definitions and I lost where I was. From memory even nm-connection-editor and nmtui may have caused problems when trying to redefine a current interface to a Hotspot.


best,
Thomas

_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
Is there any way of wiping everything from nmcli, nmtui and the Gnome GUI and starting again?

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