› Foros › PC › Software libre
pi@raspberrypi:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 13 bytes 868 (868.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 868 (868.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.112 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::c66e:1fff:fe1d:5f46 prefixlen 64 scopeid 0x20<link>
ether c4:6e:1f:1d:5f:46 txqueuelen 1000 (Ethernet)
RX packets 74 bytes 20602 (20.1 KiB)
RX errors 0 dropped 151 overruns 0 frame 0
TX packets 103 bytes 17316 (16.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.5.1 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 fe80::ba27:ebff:fef2:65f7 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:f2:65:f7 txqueuelen 1000 (Ethernet)
RX packets 165 bytes 19721 (19.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 107 bytes 25292 (24.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@raspberrypi:~ $ iwconfig
enxb827eba730a2 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"ArcherD2" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.452 GHz Access Point: 18:A6:F7:66:19:91
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=88/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
wlan1 IEEE 802.11 Mode:Master Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
pi@raspberrypi:~ $ sudo systemctl status hostapd
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-12-08 22:54:14 CET; 1min 1s ago
Process: 706 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=0/SUCCESS)
Main PID: 731 (hostapd)
Tasks: 1 (limit: 1483)
CGroup: /system.slice/hostapd.service
└─731 /usr/sbin/hostapd -B -P /run/hostapd.pid -B /etc/hostapd/hostapd.conf
Dec 08 22:54:13 raspberrypi systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Dec 08 22:54:14 raspberrypi hostapd[706]: Configuration file: /etc/hostapd/hostapd.conf
Dec 08 22:54:14 raspberrypi hostapd[706]: wlan1: Could not connect to kernel driver
Dec 08 22:54:14 raspberrypi hostapd[706]: Using interface wlan1 with hwaddr b8:27:eb:f2:65:f7 and ssid "RaspberryAP"
Dec 08 22:54:14 raspberrypi hostapd[706]: wlan1: interface state UNINITIALIZED->ENABLED
Dec 08 22:54:14 raspberrypi hostapd[706]: wlan1: AP-ENABLED
Dec 08 22:54:14 raspberrypi systemd[1]: Started Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Dec 08 22:54:23 raspberrypi hostapd[731]: wlan1: STA 00:80:5a:4f:50:11 IEEE 802.11: associated
Dec 08 22:54:23 raspberrypi hostapd[731]: wlan1: STA 00:80:5a:4f:50:11 RADIUS: starting accounting session 7BE9D5E83E3A1FD0
Dec 08 22:54:23 raspberrypi hostapd[731]: wlan1: STA 00:80:5a:4f:50:11 WPA: pairwise key handshake completed (RSN)
pi@raspberrypi:~ $ sudo systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-12-08 22:54:14 CET; 1min 13s ago
Process: 707 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Process: 714 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 732 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Main PID: 730 (dnsmasq)
Tasks: 1 (limit: 1483)
CGroup: /system.slice/dnsmasq.service
└─730 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409b
Dec 08 22:54:14 raspberrypi dnsmasq[732]: Too few arguments.
Dec 08 22:54:14 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Dec 08 22:54:23 raspberrypi dnsmasq-dhcp[730]: DHCPREQUEST(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:23 raspberrypi dnsmasq-dhcp[730]: DHCPACK(wlan1) 192.168.5.158 00:80:5a:4f:50:11 RYZENPC
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPDISCOVER(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPOFFER(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPDISCOVER(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPOFFER(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPREQUEST(wlan1) 192.168.5.158 00:80:5a:4f:50:11
Dec 08 22:54:27 raspberrypi dnsmasq-dhcp[730]: DHCPACK(wlan1) 192.168.5.158 00:80:5a:4f:50:11 RYZENPC
# Internet (usb wifi)
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
# Wifi raspberry (AP)
auto wlan1
iface wlan1 inet static
address 192.168.5.1
netmask 255.255.255.0
interface=wlan1
dhcp-range=192.168.5.150,192.168.5.200,255.255.255.0,24h
bind-interfaces
bogus-priv
interface wlan1
static ip_address=192.168.5.10/24
static router=192.168.5.1
static domain_name_servers=8.8.8.8
nohook wpa_supplicant
interface=wlan1
driver=nl80211
ssid=RaspberryAP
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=raspberry
rsn_pairwise=CCMP