I use the original Raspberry WiFi dongle on a Raspberry Pi 2. I changed interface file in etc/network and the wpa_supplicant.conf file, addding the SSID and the psk password for my wifi connection. And yet, I am not able to connect to my wifi network. What is even stranger is that in the GUI it seems that the Rasberry doesn't recognise the wifi dongle. When I left-click on the network icon, it says No wireless interfaces found.
Do you have any suggestions that may help me solve this issue?
Here are the last lines of the dmesg command
[20108.919617] usb 1-1.2: Product: Remote Download Wireless Adapter
[20108.919633] usb 1-1.2: Manufacturer: Broadcom
[20108.919650] usb 1-1.2: SerialNumber: 000000000001
[20109.170317] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Apr 3 2014 04:43:32 version 6.10.198.66 (r467479) FWID 01-32bd010e
[20109.190470] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[20109.278344] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[20109.278371] brcmfmac: brcmf_add_if: ignore IF event
Here is what the ifconfig wlan0 command gives:
wlan0 Link encap:Ethernet HWaddr b4:ee:b4:87:2d:09
inet6 addr: fe80::b6ee:b4ff:fe87:2d09/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:3500 errors:0 dropped:11 overruns:0 frame:0
TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1431948 (1.3 MiB) TX bytes:11710 (11.4 KiB)
Related
I try to run a NTP server/client. The application for which I am using NTP is running in a docker.
I am little bit confused, because:
1. I don't know if I have to configure the /etc/ntp.conf file inside the docker or outside on my machine.
2. Which IP address I have to use. If I use ifconfig I get the output below. I dont know if I have to use the IP of the docker or the one of wlp4s0. Also, if I check my IP via https://whatismyipaddress.com/de/meine-ip , I get a totally different IP address which I don't see if I run ifconfig. I don't know If its important, but I am using the WLAN of my company.
docker0 Link encap:Ethernet HWaddr 02:42:5e:fd:b4:0d
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
inet6 addr: fe80::42:5eff:fefd:b40d/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1713 (1.7 KB)
enp6s0 Link encap:Ethernet HWaddr 4c:cc:6a:de:50:f6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4092 errors:0 dropped:0 overruns:0 frame:0
TX packets:4092 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:689519 (689.5 KB) TX bytes:689519 (689.5 KB)
wlp4s0 Link encap:Ethernet HWaddr 9c:b6:d0:1b:90:8b
inet addr:10.39.158.200 Bcast:10.39.159.255 Mask:255.255.252.0
inet6 addr: fe80::dc16:b5ad:2f01:d58a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7821858 errors:0 dropped:0 overruns:0 frame:0
TX packets:1046710 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10548810679 (10.5 GB) TX bytes:96754356 (96.7 MB)
Thank you!
You should set-up your NTP server on the underlying host not inside a container.
When considering your ntp.conf you should ensure you have a minimum of 3 upstream servers, and ideally 5 to ensure robust timing. Ideally you should find some low stratum low round trip time servers to use as your upstream providers.
It seems people have reported issues with containers using the wrong time-zone;
If you use an Alpine image then you need to install tzdata before hand then set the following inside your docker file;
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
If your using something else other than Alpine then you can still use that same command in your docker file to ensure the correct time zone is set.
A list of valid time-zones can be found here.
As for IP addressing;
wlp4s0 looks like your physical Ethernet interface for the underlying host - if that is the case then that's the address you should use provided all your containers will run on that host, and they themselves can reach that IP address. The reason you see a different IP address when you check on-line is because everything in the output you provided only showed private IP addresses, not public ones. It looks like your public IP is being provided via NAT or similar from your hosting provider/network provider.
We have several devices that create an access point using wlan1 with hostapd. The problem is that all of them come with the same MAC address for wlan1, which translates in all the devices having the same BSSID, so when we have more than one device at range we cannot connect to any of them. We have tried to change the BSSID in several ways, and all of them have an effect on the HWaddr shown in the ifconfig output, but when we scan the network from a client, we don't see this change, but the original BSSID for all the devices instead.
We can see that the MAC address for this wlan1 interface is stored in /sys/class/net/wlan1/address, which is a read-only file with the content: 02:03:7f:d7:00:01, which is the BSSID that we see for all the devices.
The question is then how can we change the BSSID for the APs, so we can see an effect on the client side, resulting in different networks with different BSSIDs so we can establish connection to different devices when they are all at range?
Things we have tried to change the BSSID
With hostapd configuration file
/etc/hostapd_wlan1.conf
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# WPA2-AES encryption
bssid=DC:EC:BE:91:EA:F1
ssid=ap-wlan1-ccee
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=password-wpa2aes
# IEEE 802.11ac
hw_mode=a
channel=36
ieee80211ac=1
ieee80211n=1
Which is run with /usr/sbin/hostapd /etc/hostapd_wlan1.conf using SysVinit
ifconfig output after reboot
wlan1 Link encap:Ethernet HWaddr DC:EC:BE:91:EA:F1
inet addr:192.168.46.30 Bcast:192.168.46.255 Mask:255.255.255.0
inet6 addr: fe80::deec:beff:fe91:eaf1%lo/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1016 errors:0 dropped:0 overruns:0 frame:0
TX packets:977 errors:0 dropped:7 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:134304 (131.1 KiB) TX bytes:135467 (132.2 KiB)
With ip commands
ip link set wlan1 down
ip link set dev wlan1 address DC:EC:BE:91:EA:F1
ip link set wlan1 up
ifconfig output
wlan1 Link encap:Ethernet HWaddr DC:EC:BE:91:EA:F1
inet addr:192.168.46.30 Bcast:192.168.46.255 Mask:255.255.255.0
inet6 addr: fe80::deec:beff:fe91:eaf1%lo/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1016 errors:0 dropped:0 overruns:0 frame:0
TX packets:977 errors:0 dropped:7 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:134304 (131.1 KiB) TX bytes:135467 (132.2 KiB)
WirelessNetView result for any case
change the .conf is useless because every time you reboot, a new conf will replace it.
in
/lib/netifd/wireless/mac80211.sh
mac80211_prepare_vif()
try to change $macaddr which is the final bssid.
wish it will be helpful.
This question already has an answer here:
DOCKER: Linux Container on Windows 10, how to use nmap to scan device's mac address
(1 answer)
Closed 2 years ago.
My goal is to make my Linux container live on the same lan as host and other devices.
Because I need to use nmap frequently to scan the devices mac address on the lan. Unfortunately, the nmap scanning is only working when these machines all live on the same subnet.
I've tried several ways to make it happen, but all failed.
Although there are lots of instructions about how to do this, seem like they are all for Docker for Linux.
For example, a very detailed instructions from stackoverflow:
Docker on CentOS with bridge to LAN network is also not working for me.
Things I've tried:
Macvlan:
it seems like Docker for Windows 10 doesn't support macvlan due to I have no way to make Windows network adapter as parent..
Pipework:
which is only working on Linux system but I am using Windows 10..
Modify bip from daemon.json:
I tried, which will set docker0 to static IP then container is still not able to ping devices on the LAN. I guess it's because the container is placed at NAT and change docker0 bridge ip won't be able to achieve my goal.
Run image with --net host:
which ifconfig shows:
docker0 Link encap:Ethernet HWaddr 02:42:2d:b8:0b:7c
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
inet6 addr: fe80::42:2dff:feb8:b7c/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:540 (540.0 B)
eth0 Link encap:Ethernet HWaddr 02:50:00:00:00:01
inet addr:192.168.65.3 Bcast:192.168.65.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111 errors:0 dropped:0 overruns:0 frame:0
TX packets:147 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9701 (9.7 KB) TX bytes:10384 (10.3 KB)
hvint0 Link encap:Ethernet HWaddr 00:15:5d:0d:52:27
inet addr:10.0.75.2 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::215:5dff:fe0d:5227/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:359819 errors:0 dropped:1303 overruns:0 frame:0
TX packets:1157 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:54740692 (54.7 MB) TX bytes:103676 (103.6 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:57 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:5732 (5.7 KB) TX bytes:5732 (5.7 KB)
It's able to ping everything on my subnet, but the IP is still not from my subnet but 192.168.65.3.
Then I was trying to change the eth0 ip to static IP by editing /etc/network/interface.d/eth0, after restart networking service, the eth0 ip is changed to static ip from my subnet, but the network is not working anymore.
PLEASE, if anyone here knows how to place Windows 10's Linux Container on the LAN as same as host's.
My Docker Version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: false
I'm still working on this, but your assertion that macvlan doesn't work on Windows 10 is incorrect. Using some of the instructions in the question you linked, I got a fairly functional macvlan network set up on Windows 10. I'm still wrestling with getting hosts on my network to be able to ping hosts on the macvlan network.
Here's what I did:
In an admin powershell window: Set-NetIPInterface -ifindex <interface_index> -Forwarding Enabled setting (use Get-NetAdapter to get list of network adapters and their ifindex numbers)
docker network create routed0 --subnet 192.168.2.0/24 replacing 192.168.2.0/24 with the correct network number and netmask bits for the network you want to assign to the routed0 network
For me, this yielded a docker network via which attached containers could successfully talk with internet hosts via the router for 192.168.1.0/24. However, I have yet to figure out how to configure the windows 10 box acting as the gateway for 192.168.2.0/24 to actually act as a gateway (and do things like route ICMP requests from hosts on 1.0/24 to the docker network 2.0/24 that it's hosting).
I had posted another question which is the same root cause of this question. Therefore, they could apply to the same solution.
The solution is post on
DOCKER: Linux Container on Windows 10, how to use nmap to scan device's mac address
I'm trying to add a wifi hotspot/access point to my raspberry pi running Android Things OS. I figured I would do this by adding an additional USB Wifi Adapter (Edimax EW-7811Un) and bridge it with the pi's internal wifi adapter.
Unfortunately, I am not linux savvy and am used to plug and play with windows and osx and not having to tweak any configurations manually!
After googling and running the various commands, I can see the adapter has been found.
Searching though dmesg, I can see the device...
[ 4.131380] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[ 4.232604] usb 1-1.4: New USB device found, idVendor=7392, idProduct=7811
[ 4.232616] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.232624] usb 1-1.4: Product: 802.11n WLAN Adapter
[ 4.232630] usb 1-1.4: Manufacturer: Realtek
[ 4.232637] usb 1-1.4: SerialNumber: 00e04c000001
Running lusb shows the device (004)...
rpi3:/ # lsusb
Bus 001 Device 002: ID 0424:9514
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 0424:ec00
Bus 001 Device 004: ID 7392:7811
But running ifconfig /a only shows the default hardware...
wlan0 Link encap:Ethernet HWaddr b8:27:eb:87:50:67 Driver brcmfmac_sdio
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2a00:23c4:7400:5c00:d848:e0c3:e997:182/64 Scope: Global
inet6 addr: fdaa:bbcc:ddee:0:d848:e0c3:e997:182/64 Scope: Global
inet6 addr: fdaa:bbcc:ddee:0:691d:ecb5:3fd2:94e0/64 Scope: Global
inet6 addr: 2a00:23c4:7400:5c00:7b46:c90f:599a:4551/64 Scope: Global
inet6 addr: fe80::29c9:aa36:a6bb:ddc5/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2121 errors:0 dropped:42 overruns:0 frame:0
TX packets:1775 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:474636 TX bytes:889088
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 TX bytes:0
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:33 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:4154 TX bytes:4154
eth0 Link encap:Ethernet HWaddr b8:27:eb:d2:05:32 Driver smsc95xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0
Can anyone advise whether Android Things OS can support an additional USB Wifi Adapter and if so, what I need to do to make the device active?
I've compiled and built a MirageOS unikernel for XEN following this guide https://github.com/mirage/mirage-www/blob/master/tmpl/wiki/hello-world.md (mostly last part, Step 4, stackv4) but after I launch it I'm not able to pass the DHCP discovery phase, as shown in the following log:
Parsing config from stackv4.xl
Xen Minimal OS!
Initialising console ... done.
getenv(OCAMLRUNPARAM) -> null
getenv(CAMLRUNPARAM) -> null
getenv(PATH) -> null
Unsupported function lseek called in Mini-OS kernel
Unsupported function lseek called in Mini-OS kernel
Unsupported function lseek called in Mini-OS kernel
getenv(OCAMLRUNPARAM) -> null
getenv(CAMLRUNPARAM) -> null
getenv(TMPDIR) -> null
getenv(TEMP) -> null
Netif: add resume hook
Netif.connect 0
Netfront.create: id=0 domid=0
sg:true gso_tcpv4:true rx_copy:true rx_flip:false smart_poll:false
MAC: 00:16:3e:7e:c0:0d
Attempt to open(/dev/urandom)!
Unsupported function getpid called in Mini-OS kernel
Unsupported function getppid called in Mini-OS kernel
Manager: connect
Manager: configuring
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
....
My MirageOS unikernel configuration:
name = 'stackv4'
kernel = '/home/mirage/mirage-skeleton/stackv4/mir-stackv4.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
disk = [ ]
# if your system uses openvswitch then either edit /etc/xen/xl.conf and set
# vif.default.script="vif-openvswitch"
# or add "script=vif-openvswitch," before the "bridge=" below:
vif = [ 'bridge=xenbr0' ]
My network configuration:
eth0 Link encap:Ethernet HWaddr 02:01:06:02:83:c0
inet6 addr: fe80::1:6ff:fe02:83c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110876 errors:0 dropped:0 overruns:0 frame:0
TX packets:14602 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9736700 (9.7 MB) TX bytes:1999992 (1.9 MB)
Interrupt:117
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:384394 errors:0 dropped:0 overruns:0 frame:0
TX packets:384394 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26761500 (26.7 MB) TX bytes:26761500 (26.7 MB)
vif16.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:58 errors:0 dropped:0 overruns:0 frame:0
TX packets:11289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:33640 (33.6 KB) TX bytes:778590 (778.5 KB)
xenbr0 Link encap:Ethernet HWaddr 02:01:06:02:83:c0
inet addr:131.159.24.167 Bcast:131.159.25.255 Mask:255.255.254.0
inet6 addr: fe80::1:6ff:fe02:83c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110689 errors:0 dropped:0 overruns:0 frame:0
TX packets:11987 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8328727 (8.3 MB) TX bytes:1703101 (1.7 MB)
My bridge configuration:
bridge name bridge id STP enabled interfaces
xenbr0 8000.0201060283c0 no eth0
vif16.0
My /etc/network/interface:
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
# up ip link set eth0 up
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
I'm trying to understand what is the problem but everything appears to be correct (according to this other guide http://wiki.xen.org/wiki/Network_Configuration_Examples_(Xen_4.1%2B)#Example_Debian-style_bridge_configuration_.28e.g._Debian.2C_Ubuntu.29).
Some suggestions:
Check you're actually running a DHCP server.
Run tcpdump or wireshark on the bridge machine (probably dom0) and see what traffic there is. Do you see the DHCP request?
Try configuring a static IP address and see if that works.
Try running a Linux guest and see if DHCP works there (and compare packet captures for that).