Closed mnishiguchi closed 3 years ago
This part of the configuration specifically disables Internet access (the default gateway isn't set), so I think what you're seeing is the right thing (i.e. right IP, no internet).
ipv4: %{
method: :static,
address: "10.0.0.201",
prefix_length: 24
}
Could you run VintageNet.info
to check the runtime configuration? If you have a saved config, VintageNet uses that. The application config only specifies defaults. If you want to remove the saved configuration and go back to the default, run VintageNet.reset_to_defaults("wlan0")
.
Ah I see. My old config seems still alive as I run VintageNet.info
on Device A.
...
Interface wlan0
Type: VintageNetWiFi
Present: true
State: :configured (11.6 s)
Connection: :internet (8.1 s)
Addresses: ...
Configuration:
%{
ipv4: %{method: :dhcp}, #<--- This is expected to be static
type: VintageNetWiFi,
vintage_net_wifi: %{
networks: [
%{
key_mgmt: :wpa_psk,
mode: :infrastructure,
psk: "....",
ssid: "..."
}
]
}
}
After running VintageNet.reset_to_defaults("wlan0")
, Device A now behaves like Device B.
The settings look good but I cannot connect to the Internet...
Interface wlan0
Type: VintageNetWiFi
Present: true
State: :configured (15.4 s)
Connection: :internet (12.4 s)
Addresses: ...
Configuration:
%{
ipv4: %{
address: {10, 0, 0, 202},
gateway: {10, 0, 0, 1},
method: :static,
name_servers: [{75, 75, 75, 75}, {75, 75, 76, 76}],
prefix_length: 24
},
type: VintageNetWiFi,
vintage_net_wifi: %{
networks: [
%{
key_mgmt: :wpa_psk,
mode: :infrastructure,
psk: "....",
ssid: "..."
}
]
}
}
Could you change your name server to 1.1.1.1? You can access the internet, but DNS isn't working. This should fix that.
Thanks Frank. name_servers: [“1.1.1.1”]
worked. Now I get a response from nerves-project.org.
ipv4: %{
method: :static,
address: "10.0.0.202",
prefix_length: 24,
gateway: "10.0.0.1",
name_servers: ["1.1.1.1"]
}
After setting up the above mentioned, I cannot access Github including this page on Chrome (my main browser), I wonder if it is related to my Nerves network settings 🤔
Oh after a while, my Chrome works as normal 🤷
Background
I attempted to configure static IP addresses for my three raspberry Pis (all model Zero W) using
VintageNetWiFi
. All I did is basically switch from DHCP to a minimal static IP setting. I see a few strange phenomena and the static IP is not working as expected.Here is the setting I applied to all the device:
Problems
I see strange behavior in two patterns. I tweaked the setting by adding optional values such
gateway
andnetmask
but results were the same. I wonder if these are my setting specific or something is missing.Device A
This one device is so stubborn that its IP is always
10.0.0.204
no matter what IP I specify in its config. This happens to be Nerves Livebook but I don't know if it is relevant.10.0.0.201
ssh 10.0.0.204
(different IP though ¯_(ツ)_/¯)ping "https://nerves-project.org"
Device B
My other two devices have correct IP addresses but it cannot access the Internet.
10.0.0.202
ssh 10.0.0.202
ping "https://nerves-project.org"
My local network
Related links