AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-271974

Guerlando OCs's questions

Martin Hope
Guerlando OCs
Asked: 2019-10-14 05:47:09 +0800 CST

Como usar instalar e usar o gerenciador de rede no debian?

  • 0

Estou executando o Qubes com o Debian 9 e, portanto, tenho uma instalação debian não trivial. Eu tentei instalar network-managere network-manager-gnomemas não sei como iniciá-los.

Eu também instalei o painel de configurações do gnome. Quando clico no símbolo de rede, recebo esta mensagem (depois de um longo atraso):

NetworkManager needs to be running

aqui está o serviço networkmanager:

● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/NetworkManager.service.d
           └─30_qubes.conf
   Active: inactive (dead)
Condition: start condition failed at Sun 2019-10-13 10:29:37 -03; 22min ago
           └─ ConditionPathExists=/var/run/qubes-service/network-manager was not met
     Docs: man:NetworkManager(8)
debian
  • 1 respostas
  • 1103 Views
Martin Hope
Guerlando OCs
Asked: 2018-10-07 06:06:31 +0800 CST

/etc/fstab para minha unidade usb não inicializa

  • 0

Eu costumava sudo blkidmontar minha unidade com fstab assim em /etc/fstab:

UUID=1169dd89-29fe-436c-9aef-fa78ea7ee138 /media/hd ext4 defaults,auto,umask=000,users,rw 0 0

eu também tentei

PARTUUID=df63cda7-01  /media/hd ext4 defaults,auto,umask=000,users,rw 0 0

No entanto, meu raspberry pi não inicializa. Também formatei o sistema para ext4 antes de obter o uuid. Ele entra no modo de emergência ao inicializar e me pede para digitarjournalctl -xb

Agora adicionei a nofailopção para inicializar pelo menos, para não precisar continuar editando meu cartão SD:

PARTUUID=df63cda7-01  /media/hd ext4 defaults,auto,nofail,umask=000,users,rw 0 0

O que está dando errado?

Quando inicializo, não consigo ver /dev/sda1, df -hmas aparecesudo blkid

pi@raspberrypi:~ $ sudo file -sL /dev/sda1
/dev/sda1: Linux rev 1.0 ext4 filesystem data, UUID=1169dd89-29fe-436c-9aef-fa78ea7ee138 (extents) (64bit) (large files) (huge files)

Este é dmesg-w quando eu reconecto a unidade

[ 1156.384704] usb 1-1.2: USB disconnect, device number 5
[ 1156.399483] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1156.399843] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
[ 1165.388431] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[ 1165.600753] usb 1-1.2: New USB device found, idVendor=0bc2, idProduct=231a
[ 1165.600776] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1165.600787] usb 1-1.2: Product: Expansion
[ 1165.600796] usb 1-1.2: Manufacturer: Seagate
[ 1165.600806] usb 1-1.2: SerialNumber: NA8Z9LSP
[ 1165.606573] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 1165.629063] scsi host0: usb-storage 1-1.2:1.0
[ 1166.650056] scsi 0:0:0:0: Direct-Access     Seagate  Expansion        0708 PQ: 0 ANSI: 6
[ 1166.657494] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1167.877041] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB)
[ 1167.877944] sd 0:0:0:0: [sda] Write Protect is off
[ 1167.877969] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
[ 1167.889766] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1167.936469]  sda: sda1
[ 1167.944243] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1168.710434] EXT4-fs (sda1): Unrecognized mount option "umask=000" or missing value

Este é o meu lsusb:

pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 001 Device 006: ID 0bc2:231a Seagate RSS LLC 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
boot raspberry-pi
  • 1 respostas
  • 795 Views
Martin Hope
Guerlando OCs
Asked: 2018-08-06 09:08:38 +0800 CST

Hostapd SSID desaparece após alguns segundos

  • 5

Estou usando o hostapd para compartilhar outra conexão wifi através do meu raspberry pi zero w bult no cartão wifi. Após a inicialização do raspberry pi, posso ver meu SSID no meu telefone e até me conectar a ele e usá-lo por alguns segundos. Em seguida, o SSID simplesmente desaparece.

O status do hostapd não mostra nada de errado:

pi@raspberrypi:~ $ sudo service hostapd status
● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
   Active: active (running) since Sun 2018-08-05 16:55:06 UTC; 6min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 557 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hostapd.service
           └─597 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf

Aug 05 16:55:04 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Aug 05 16:55:06 raspberrypi hostapd[557]: Starting advanced IEEE 802.11 management: hostapd.
Aug 05 16:55:06 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

Aqui está o meu dmesg:

[    9.951912] bcm2835_alsa bcm2835_alsa: card created with 8 channels
[   10.988983] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[   11.023394] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
[   11.023812] usbcore: registered new interface driver brcmfmac
[   11.550743] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[   11.551907] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 7.11.15 Compiler: 1.24.2 ClmImport: 1.24.1 Creation: 2014-05-26 10:53:55 Inc Data: 9.10.39 Inc Compiler: 1.29.4 Inc ClmImport: 1.36.3 Creation: 2017-10-23 03:47:14 
[   12.469798] Indeed it is in host mode hprt0 = 00001101
[   14.180038] uart-pl011 20201000.serial: no DMA platform data
[   14.366758] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[   14.366994] Indeed it is in host mode hprt0 = 00001101
[   16.080543] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   16.161385] mt7601u 1-1:1.0: ASIC revision: 76010001 MAC revision: 76010500
[   16.252009] mt7601u 1-1:1.0: Warning: unsupported EEPROM version 0d
[   16.252028] mt7601u 1-1:1.0: EEPROM ver:0d fae:00
[   16.771510] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   16.776815] usbcore: registered new interface driver mt7601u
[   18.456287] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[   18.625722] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.625756] brcmfmac: power management disabled
[   18.753324] Bluetooth: Core ver 2.22
[   18.753500] NET: Registered protocol family 31
[   18.753508] Bluetooth: HCI device and connection manager initialized
[   18.753534] Bluetooth: HCI socket layer initialized
[   18.753548] Bluetooth: L2CAP socket layer initialized
[   18.753612] Bluetooth: SCO socket layer initialized
[   18.781182] Bluetooth: HCI UART driver ver 2.3
[   18.781197] Bluetooth: HCI UART protocol H4 registered
[   18.781202] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   18.786141] Bluetooth: HCI UART protocol Broadcom registered
[   19.362969] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.362997] Bluetooth: BNEP filters: protocol multicast
[   19.363027] Bluetooth: BNEP socket layer initialized
[   20.245972] wlan1: authenticate with 48:ee:0c:1f:d8:73
[   20.308671] wlan1: send auth to 48:ee:0c:1f:d8:73 (try 1/3)
[   20.310399] wlan1: authenticated
[   20.313517] wlan1: associate with 48:ee:0c:1f:d8:73 (try 1/3)
[   20.317906] wlan1: RX AssocResp from 48:ee:0c:1f:d8:73 (capab=0x411 status=0 aid=7)
[   20.362268] wlan1: associated
[   21.491599] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   32.303384] nf_conntrack version 0.5.0 (7168 buckets, 28672 max)
[   33.692972] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

wlan1é o wireless no qual o raspberry pi está conectado. wlan0é o próprio wifi embutido da framboesa. Não vejo erros.

Aqui está /var/log/syslog:

Aug  5 16:55:06 raspberrypi kernel: [   33.692972] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Aug  5 16:55:06 raspberrypi hostapd[557]: Starting advanced IEEE 802.11 management: hostapd.
Aug  5 16:55:06 raspberrypi dnsmasq[599]: started, version 2.76 cachesize 150
Aug  5 16:55:06 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
Aug  5 16:55:06 raspberrypi dnsmasq[599]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug  5 16:55:06 raspberrypi dnsmasq-dhcp[599]: DHCP, IP range 192.168.4.2 -- 192.168.4.20, lease time 1d
Aug  5 16:55:06 raspberrypi dnsmasq[599]: reading /run/dnsmasq/resolv.conf
Aug  5 16:55:06 raspberrypi dnsmasq[599]: using nameserver 192.168.25.1#53
Aug  5 16:55:06 raspberrypi dnsmasq[599]: read /etc/hosts - 5 addresses
Aug  5 16:55:06 raspberrypi dnsmasq[600]: Too few arguments.
Aug  5 16:55:06 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Multi-User System.
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Graphical Interface.
Aug  5 16:55:06 raspberrypi systemd[1]: Starting Update UTMP about System Runlevel Changes...
Aug  5 16:55:06 raspberrypi systemd[1]: Reached target Host and Network Name Lookups.
Aug  5 16:55:06 raspberrypi systemd[1]: Started Update UTMP about System Runlevel Changes.
Aug  5 16:55:06 raspberrypi systemd[1]: Startup finished in 1.995s (kernel) + 32.367s (userspace) = 34.362s.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::ba27:ebff:feaa:1f8.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: New relevant interface wlan0.IPv6 for mDNS.
Aug  5 16:55:07 raspberrypi avahi-daemon[188]: Registering new address record for fe80::ba27:ebff:feaa:1f8 on wlan0.*.
Aug  5 16:55:28 raspberrypi systemd[1]: Time has been changed
Aug  5 16:55:28 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 27min 26.673226s random time.
Aug  5 16:55:28 raspberrypi systemd-timesyncd[173]: Synchronized to time server [2a01:4f8:110:30e1::9]:123 (2.debian.pool.ntp.org).
Aug  5 16:55:28 raspberrypi systemd[1]: apt-daily.timer: Adding 7h 36min 12.296585s random time.
Aug  5 17:01:05 raspberrypi systemd[1]: Created slice User Slice of pi.
Aug  5 17:01:05 raspberrypi systemd[1]: Started Session c1 of user pi.
Aug  5 17:01:05 raspberrypi systemd[1]: Starting User Manager for UID 1000...
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent and passphrase cache.
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent (access for web browsers).
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Timers.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Paths.
Aug  5 17:01:06 raspberrypi systemd[668]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Sockets.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Basic System.
Aug  5 17:01:06 raspberrypi systemd[668]: Reached target Default.
Aug  5 17:01:06 raspberrypi systemd[668]: Startup finished in 178ms.
Aug  5 17:01:06 raspberrypi systemd[1]: Started User Manager for UID 1000.
Aug  5 17:02:40 raspberrypi wpa_supplicant[373]: wlan1: WPA: Group rekeying completed with 48:ee:0c:1f:d8:73 [GTK=CCMP]

também não vejo erros

ATUALIZAÇÃO: O problema parece acontecer somente depois que alguém se conecta à rede. As últimas mensagens no syslog são

Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: associated
Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 RADIUS: starting accounting session 5B672BEA-00000000
Aug  5 17:39:27 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: pairwise key handshake completed (RSN)
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPDISCOVER(wlan0) 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPOFFER(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPREQUEST(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:39:27 raspberrypi dnsmasq-dhcp[599]: DHCPACK(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 17:41:35 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated
Aug  5 17:41:35 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated

Mas não vejo erros.

ATUALIZAR:

Aqui está o meu /etc/hostapd/hostapd.confarquivo:

interface=wlan0
driver=nl80211
ssid=NameOfNetwork
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=AardvarkBadgerHedgehog
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

ATUALIZAR:

Aqui está o hostapd com mais verbosidade:

Aug  5 18:21:22 raspberrypi systemd[1]: Started User Manager for UID 1000.
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: associated
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: event 1 notification
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: start authentication
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: unauthorizing port
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 1/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: EAPOL-Key timeout
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 1/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: received EAPOL-Key frame (2/4 Pairwise)
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: sending 3/4 msg of 4-Way Handshake
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: received EAPOL-Key frame (4/4 Pairwise)
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: authorizing port
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 RADIUS: starting accounting session 5B674006-00000000
Aug  5 18:21:40 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: pairwise key handshake completed (RSN)
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPDISCOVER(wlan0) 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPOFFER(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPREQUEST(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:40 raspberrypi dnsmasq-dhcp[599]: DHCPACK(wlan0) 192.168.4.16 38:80:df:35:8a:d3
Aug  5 18:21:54 raspberrypi systemd[664]: Time has been changed
Aug  5 18:21:54 raspberrypi systemd[1]: Time has been changed
Aug  5 18:21:54 raspberrypi systemd[1]: apt-daily.timer: Adding 10h 13min 39.087355s random time.
Aug  5 18:21:54 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 28min 49.504522s random time.
Aug  5 18:22:27 raspberrypi systemd[1]: Time has been changed
Aug  5 18:22:27 raspberrypi systemd[1]: apt-daily.timer: Adding 55min 40.693498s random time.
Aug  5 18:22:27 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 23min 53.062642s random time.
Aug  5 18:22:27 raspberrypi systemd[664]: Time has been changed
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 WPA: event 2 notification
Aug  5 18:24:06 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.1X: unauthorizing port
Aug  5 18:24:14 raspberrypi hostapd: wlan0: STA 38:80:df:35:8a:d3 IEEE 802.11: disassociated

ATUALIZAR:

Eu já havia configurado este raspberry pi com ethernet USB. Agora reinstalei uma nova imagem e apenas configurei o necessário para a funcionalidade do AP sem fio. O problema ainda acontece. Também ainda acontece depois sudo apt update && sudo apt upgrade -y, então parece mais um bug do que uma configuração errada.

Alguém tem alguma idéia de como depurá-lo?

networking wifi
  • 2 respostas
  • 5374 Views
Martin Hope
Guerlando OCs
Asked: 2018-08-05 20:44:20 +0800 CST

Crie um ponto de acesso para 'ponte' entre duas conexões sem fio. Como deve ser /etc/network/interfaces?

  • 1

Estou seguindo este guia: Configurando um Raspberry Pi como um ponto de acesso em uma rede autônoma (NAT) para criar um ponto de acesso. A única diferença é que estou usando outra conexão wifi onde estaria a conexão ethernet, então apenas mudei eth0em wlan1todo o tutorial, pois wlan1é meu dongle USB que está conectado ao meu roteador.

No entanto, não há nada sendo dito sobre o /etc/network/interfacesarquivo. Aqui está o meu:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Eu posso ver o SSID e me conectar a ele, mas ele continua obtendo o endereço IP para sempre. Acho que tem algo a ver /etc/network/interfaces. Dê uma olhada no meu ifconfig:

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 4  bytes 156 (156.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 156 (156.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.25.6  netmask 255.255.255.0  broadcast 192.168.25.255
        inet6 fe80::ba27:ebff:feaa:1f8  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:aa:01:f8  txqueuelen 1000  (Ethernet)
        RX packets 42  bytes 5757 (5.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 37  bytes 5838 (5.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.25.6  netmask 255.255.255.0  broadcast 192.168.25.255
        inet6 2804:7f0:e181:b678:2e0:4dff:fe06:4f8  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::2e0:4dff:fe06:4f8  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4d:06:04:f8  txqueuelen 1000  (Ethernet)
        RX packets 86  bytes 11978 (11.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 86  bytes 15855 (15.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Como pode wlan0ter IP 192.168.25.6? Este é o IP fornecido pelo roteador no qual wlan1se conecta.

Como devo editar as wlan0configurações? Eu tenho tentado muitas configurações estáticas, mas quando faço algo diferente do que está na tela, a interface wifi integrada desaparece e, em seguida, o dongle USB substitui o wlan0.

Além disso, existe uma maneira de garantir que o dongle usb sempre receba wlan1e o wifi onboard wlan0? Parece arbitrário.

ATUALIZAR

● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/dhcpcd.service.d
           └─wait.conf
   Active: failed (Result: exit-code) since Sun 2018-08-05 04:54:32 UTC; 7s ago
  Process: 853 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

Aug 05 04:54:32 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Aug 05 04:54:32 raspberrypi dhcpcd[853]: Not running dhcpcd because /etc/network/interfaces
Aug 05 04:54:32 raspberrypi dhcpcd[853]: defines some interfaces that will use a
Aug 05 04:54:32 raspberrypi dhcpcd[853]: DHCP client or static address
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Aug 05 04:54:32 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
networking wifi
  • 1 respostas
  • 358 Views
Martin Hope
Guerlando OCs
Asked: 2018-07-05 04:09:19 +0800 CST

Como fazer com que o wlan seja sempre a rota padrão? (lista de rotas ip)

  • 9

Sempre que eu adiciono meu modem 4G ao meu framboesa, ele fica em cima das rotas padrão ou ip route list, porém eu quero que tudo passe por wlan, e só uso o modem 4G para receber conexões SSH.

Encontrei esta resposta sobre como desativar as rotas padrão.

no entanto, após a reinicialização, o modem 4G volta ao topo.

Como faço wlan0para ser sempre a primeira regra no default?

ATUALIZAR:

Aqui está a saída dmesg quando conecto o dongle USB:

[426102.910168] usb 1-1.5.1: new full-speed USB device number 6 using dwc_otg
[426103.046670] usb 1-1.5.1: not running at top speed; connect to a high speed hub
[426103.056674] usb 1-1.5.1: New USB device found, idVendor=12d1, idProduct=1f01
[426103.056693] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[426103.056704] usb 1-1.5.1: Product: HUAWEI_MOBILE
[426103.056714] usb 1-1.5.1: Manufacturer: HUAWEI_MOBILE
[426103.056724] usb 1-1.5.1: SerialNumber: 0123456789ABCDEF
[426103.121355] usb-storage 1-1.5.1:1.0: USB Mass Storage device detected
[426103.122875] scsi host0: usb-storage 1-1.5.1:1.0
[426103.987177] usb 1-1.5.1: USB disconnect, device number 6
[426105.470211] usb 1-1.5.1: new full-speed USB device number 7 using dwc_otg
[426105.606666] usb 1-1.5.1: not running at top speed; connect to a high speed hub
[426105.615673] usb 1-1.5.1: New USB device found, idVendor=12d1, idProduct=14dc
[426105.615692] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[426105.615703] usb 1-1.5.1: Product: HUAWEI_MOBILE
[426105.615713] usb 1-1.5.1: Manufacturer: HUAWEI_MOBILE
[426105.766297] usb-storage 1-1.5.1:1.2: USB Mass Storage device detected
[426105.766768] scsi host0: usb-storage 1-1.5.1:1.2
[426105.855053] cdc_ether 1-1.5.1:1.0 eth1: register 'cdc_ether' at usb-3f980000.usb-1.5.1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[426105.855593] usbcore: registered new interface driver cdc_ether
[426106.785653] scsi 0:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[426106.803758] sd 0:0:0:0: Attached scsi generic sg0 type 0
[426106.820687] sd 0:0:0:0: [sda] Attached SCSI removable disk

Aqui estáip addr

eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::584f:751f:bb3e:e26b/64 scope link 
       valid_lft forever preferred_lft forever

ATUALIZAÇÃO 2

Anexei mais algumas vezes até mostrar a eth1rota:

[10787.229141] usb 1-1.5: new full-speed USB device number 7 using dwc_otg
[10787.363515] usb 1-1.5: New USB device found, idVendor=05e3, idProduct=0606
[10787.363533] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10787.363544] usb 1-1.5: Product: USB Hub 2.0
[10787.363555] usb 1-1.5: Manufacturer: ALCOR
[10787.365166] hub 1-1.5:1.0: USB hub found
[10787.369831] hub 1-1.5:1.0: 4 ports detected
[10797.419094] usb 1-1.5.1: new full-speed USB device number 8 using dwc_otg
[10797.555636] usb 1-1.5.1: not running at top speed; connect to a high speed hub
[10797.565759] usb 1-1.5.1: New USB device found, idVendor=12d1, idProduct=1f01
[10797.565777] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10797.565789] usb 1-1.5.1: Product: HUAWEI_MOBILE
[10797.565799] usb 1-1.5.1: Manufacturer: HUAWEI_MOBILE
[10797.565808] usb 1-1.5.1: SerialNumber: 0123456789ABCDEF
[10797.630477] usb-storage 1-1.5.1:1.0: USB Mass Storage device detected
[10797.631101] scsi host0: usb-storage 1-1.5.1:1.0
[10798.472745] usb 1-1.5.1: USB disconnect, device number 8
[10799.469081] usb 1-1.5.1: new full-speed USB device number 9 using dwc_otg
[10799.630768] usb 1-1.5.1: not running at top speed; connect to a high speed hub
[10799.646891] usb 1-1.5.1: New USB device found, idVendor=12d1, idProduct=14dc
[10799.646909] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10799.646920] usb 1-1.5.1: Product: HUAWEI_MOBILE
[10799.646930] usb 1-1.5.1: Manufacturer: HUAWEI_MOBILE
[10799.814489] usb-storage 1-1.5.1:1.2: USB Mass Storage device detected
[10799.815008] scsi host0: usb-storage 1-1.5.1:1.2
[10799.897788] cdc_ether 1-1.5.1:1.0 eth1: register 'cdc_ether' at usb-3f980000.usb-1.5.1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[10799.898127] usbcore: registered new interface driver cdc_ether
[10800.889652] scsi 0:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[10800.910585] sd 0:0:0:0: Attached scsi generic sg0 type 0
[10800.923297] sd 0:0:0:0: [sda] Attached SCSI removable disk

Aqui estároute -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
0.0.0.0         192.168.8.1     0.0.0.0         UG    207    0        0 eth1
0.0.0.0         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     202    0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     204    0        0 docker0
169.254.0.0     0.0.0.0         255.255.0.0     U     206    0        0 veth4557ad2
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0
192.168.8.0     0.0.0.0         255.255.255.0   U     207    0        0 eth1

Veja que eu fiz ifmetric wlan0para poder usar o wlan0to sshna minha framboesa

ATUALIZAÇÃO 09/10:

allow-hotplug wlan0
iface wlan0 inet dhcp
    up ifmetric wlan0 0
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Isso não fará com que minha wlan0métrica tenha 0. O que estou fazendo de errado?

networking debian
  • 4 respostas
  • 7383 Views
Martin Hope
Guerlando OCs
Asked: 2018-01-23 19:33:36 +0800 CST

Como falar diretamente com a câmera IP através da Ethernet (sem switch, hub, roteadores...). Diferentes sub-redes na câmera e na porta Ethernet

  • 0

Quero configurar uma câmera IP que está na porta ethernet do meu raspberry pi (eu me conecto a ela por wifi).

Conectei a câmera e é isso que vejo quando corroifconfig

eth0      Link encap:Ethernet  HWaddr b8:27:eb:a2:10:08  
          inet addr:169.254.248.2  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::ce99:232c:964e:7070/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5600 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27715 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3219770 (3.0 MiB)  TX bytes:10481558 (9.9 MiB)

Isso significa que meu raspberry pi tem o endereço IP 169.254.248.2. Tentei acessar 169.254.248.1e digitalizar, nmap 169.254.0.0/16mas o único host que vejo é o próprio raspberry pi.

Em seguida, executo o tcpdump no eth0:

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
03:13:53.963493 IP (tos 0x0, ttl 64, id 13074, offset 0, flags [none], proto UDP (17), length 368)
    0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:a2:10:08 (oui Unknown), length 340, xid 0x252200b7, secs 65535, Flags [none]
          Client-Ethernet-Address b8:27:eb:a2:10:08 (oui Unknown)
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            Client-ID Option 61, length 7: ether b8:27:eb:a2:10:08
            SLP-NA Option 80, length 0""
            NOAUTO Option 116, length 1: Y
            MSZ Option 57, length 2: 1500
            Vendor-Class Option 60, length 44: "dhcpcd-6.7.1:Linux-4.9.48-v7+:armv7l:BCM2835"
            Hostname Option 12, length 11: "raspberrypi"
            T145 Option 145, length 1: 1
            Parameter-Request Option 55, length 14: 
              Subnet-Mask, Classless-Static-Route, Static-Route, Default-Gateway
              Domain-Name-Server, Hostname, Domain-Name, BR
              NTP, Lease-Time, Server-ID, RN
              RB, Option 119

O que parece que meu raspberry pi está tentando encontrar um IP para si mesmo. Não ouvi nada da câmera. Não devo receber suas mensagens de transmissão tentando obter um IP?

Ok, continuei e instalei https://help.ubuntu.com/community/isc-dhcp-server com o seguinte arquivo de configuração:

# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 169.254.248.255;
option routers 169.254.248.254;
option domain-name "mydomain.example";

subnet 169.254.248.0 netmask 255.255.255.0 {
range 169.254.248.10 169.254.248.100;
}

Deve fazer o cliente dhcp da câmera solicitar um endereço e pegar 169.254.248.10, certo?

Nada disso funcionou, então comecei a lembrar algumas coisas sobre esta câmera:

Eles vêm pré-configurados para funcionar em 192.168.1.xe com IP fixo (que não sei o que é).

Isso significa que a câmera nunca funcionará na minha porta ethernet, a menos que eu faça o endereço ethernet estar na faixa 192.168.1.x?

Não devo receber mensagens broadcast da câmera, mesmo que esteja em uma sub-rede diferente e mesmo que seu IP seja fixo? Acho que devo receber mensagens ARP brocadcast informando em qual IP está, algo assim, certo? No entanto, não ouço nada vindo da câmera quando o façotcpdump -i eth0

Se as respostas a essas duas últimas perguntas forem falsas, posso fazer minha porta ethernet funcionar no 192.168.1.xintervalo, mesmo que minha interface wlan0 já esteja funcionando nela? (Quero dizer, eu poderia pelo menos fazer isso de forma virtual apenas para falar com a câmera? Como é Ethernet bruta, eu poderia fingir que o eth0 está ligado 192.168.1.xapenas para enganar a câmera). Estou perguntando isso porque tudo o que estou fazendo é remoto, não posso mexer nas configurações de wlan e não posso colocá-lo em uma sub-rede diferente.

networking network-interface
  • 1 respostas
  • 2411 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve