Armadilloフォーラム

Armadillo-IoT G3L WirelessLAN設定(APモード)にて、PCからWireless接続後PCへIPアドレスが付与されるが、DHCPにてIPアドレスのrange指定をしたい

komori

2021年2月18日 11時26分

目的
Armadillo-IoT G3L WirelessLAN設定(APモード)にて、PCからWireless接続後、
ArmadilloのDHCPサーバー機能により、PC側へIPアドレス(range指定で192.168.254.100-192.168.254.200) を自動付与したい。

■確認依頼事項
Armadillo-IoT G3Lのアクセスポイントへ他端末(PC等)からWireless接続した場合、
ArmadilloのDHCPサーバ機能を用いて、range指定で192.168.254.100-192.168.254.200を自動付与したいのですが、
下記設定コマンドで指定していますが、結果PC側へ以下のIPアドレスが自動付与されてしまいます。
DHCPのrange指定の設定方法をご教示いただけないでしょうか。

PC側へipconfigの結果です。
Wireless LAN adapter Wi-Fi:
接続固有の DNS サフィックス . . . . .:
リンクローカル IPv6 アドレス. . . . .: fe80::4c42:6cd0:bfae:b456%18
自動構成 IPv4 アドレス. . . . . . . .: 169.254.180.86・・・★ここを192.168.254.100-192.168.254.200のrange指定としたい。
サブネット マスク . . . . . . . . . .: 255.255.0.0
デフォルト ゲートウェイ . . . . . . .:

■設定したコマンド
nmcli connection add type wifi ifname wlan0 ssid " + ssid ・・・ssidは任意に設定
nmcli connection modify wifi-wlan0 ipv4.never-default yes"
nmcli connection modify wifi-wlan0 \
802-11-wireless.mode ap \
802-11-wireless-security.key-mgmt wpa-psk \
802-11-wireless.band bg \
802-11-wireless.channel 9 \
ipv4.method manual \
ipv4.addresses 192.168.254.254/24 \
ipv4.gateway 192.168.254.254 \
ipv4.dns 192.168.254.254 \
802-11-wireless-security.psk " + password ・・・passwordは任意に設定

■現設定情報
root@armadillo:~# ifconfig
wlan0: flags=4163 mtu 1500
inet 192.168.254.254 netmask 255.255.255.0 broadcast 192.168.254.255
inet6 fe80::aa1b:22a:6fb5:cc25 prefixlen 64 scopeid 0x20
ether 50:33:8b:db:d8:9f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 32 bytes 4837 (4.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@armadillo:~# nmcli connection
NAME UUID TYPE DEVICE
wifi-wlan0 5724baba-d91e-4848-b5e3-d17135f5a8da 802-11-wireless wlan0
Wired connection 1 022a4eaf-e80c-3c70-8e62-96a458003a6d 802-3-ethernet --
gsm-ttyACM0 7c5c306f-2137-44ba-bc94-8ef61d5af711 gsm --

root@armadillo:~# nmcli device
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected wifi-wlan0
eth0 ethernet unavailable --
ttyACM0 modem unavailable --
usb0 ethernet unmanaged --
gretap0 gretap unmanaged --
ip6gre0 ip6gre unmanaged --
ip6_vti0 ip6tnl unmanaged --
ip6tnl0 ip6tnl unmanaged --
gre0 iptunnel unmanaged --
sit0 iptunnel unmanaged --
tunl0 iptunnel unmanaged --
lo loopback unmanaged --

root@armadillo:~# nmcli deviceconnection show wifi-wlan0
connection.id: wifi-wlan0
connection.uuid: 5724baba-d91e-4848-b5e3-d17135f5a8da
connection.stable-id: --
connection.interface-name: wlan0
connection.type: 802-11-wireless
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.timestamp: 1613362832
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: GALILEI_55555
802-11-wireless.mode: ap
802-11-wireless.band: bg
802-11-wireless.channel: 9
802-11-wireless.bssid: --
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address: --
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: 50:33:8B:DB:D8:9F
802-11-wireless.hidden: no
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:
802-11-wireless-security.pairwise:
802-11-wireless-security.group:
802-11-wireless-security.leap-username: --
802-11-wireless-security.wep-key0:
802-11-wireless-security.wep-key1:
802-11-wireless-security.wep-key2:
802-11-wireless-security.wep-key3:
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type: 0 (unknown)
802-11-wireless-security.psk:
802-11-wireless-security.psk-flags: 0 (none)
802-11-wireless-security.leap-password:
802-11-wireless-security.leap-password-flags:0 (none)
ipv4.method: manual
ipv4.dns: 192.168.254.254
ipv4.dns-search:
ipv4.dns-options: (default)
ipv4.dns-priority: 0
ipv4.addresses: 192.168.254.254/24
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: yes
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
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: wifi-wlan0
GENERAL.UUID: 5724baba-d91e-4848-b5e3-d17135f5a8da
GENERAL.DEVICES: wlan0
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.VPN: no
GENERAL.ZONE: --
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/1
GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/12
GENERAL.MASTER-PATH: --
IP4.ADDRESS[1]: 192.168.254.254/24
IP4.GATEWAY: --
IP4.DNS[1]: 192.168.254.254
IP6.ADDRESS[1]: fe80::aa1b:22a:6fb5:cc25/64

コメント

本件、自己解決いたしました。(自レスです)

要因は、dnsmasqのインストールおよび設定ができていなかった為でした。
下記情報源を元に、DHCPよりIoTからアクセス元へIPをrange指定して割り振ることができました。

Armadillo-X1:DHCPサーバーの構築
https://armadillo.atmark-techno.com/blog/10900/4108

Armadillo-WLANのアクセスポイントモードでdhcpdを動かす
https://armadillo.atmark-techno.com/index.php/blog/615/1237

Armadillo-IoT(G3):ルーターのように動かす(dnsmasqで実現)
https://armadillo.atmark-techno.com/blog/615/6816

Armadillo-IoT(G3):ルーターのように動かす(isc-dhcp-server+dnsmasqで実現)
https://armadillo.atmark-techno.com/blog/615/6736