Static IP makes network unusable. Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Static IP makes network unusable.

Post by Joulinar »

It is but you see the button Copy below? Means, if you are on DHCP, and all is working fine, just got to this menu, select STATIC + COPY to continue using the same IP address + DNS settings
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
maya95
Posts: 48
Joined: Tue Apr 20, 2021 12:20 pm

Re: Static IP makes network unusable.

Post by maya95 »

You mean I can only accept the DHCP IP address and set that IP as the STATIC IP? I can't choose my own?
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Static IP makes network unusable.

Post by Joulinar »

That's not what I tried to say but at least would be a good test to see how it behave if you continue using the IP address assigned via DHCP as STATIC. Would be really interesting.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
maya95
Posts: 48
Joined: Tue Apr 20, 2021 12:20 pm

Re: Static IP makes network unusable.

Post by maya95 »

BINGO! I need to use the copy method to set STATIC IP to get it going!

I reserved an IP address for the virtual ethernet adapter's MAC address on the router, reboot the VM and then use the copy IP method on Dietpi-Config to set STATIC IP and now nslookup, ping and Dietpi-Software all works!

A million thanks!!! 😁

But do you have an explanation for this?
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Static IP makes network unusable.

Post by Joulinar »

hard to say. can you create a screen print from dietpi-config network config
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
maya95
Posts: 48
Joined: Tue Apr 20, 2021 12:20 pm

Re: Static IP makes network unusable.

Post by maya95 »

Now I notice the difference, the DNS changed to 192.168.0.1

If I change the DNS setting to any built-in DNS entries, exit Dietpi-Config, re-run Dietpi-Software, it stops resolving immediately.

Code: Select all

Virtual Machine (x86_64) | IP: 192.168.0.8





β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ DietPi-Config β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Ethernet Details:                                                                                β”‚
β”‚ Usage   : Sent = 0 MiB | Recieved = 0 MiB                                                        β”‚
β”‚ Address : IP = 192.168.0.8 | Mask = 255.255.255.0 | Gateway = 192.168.0.1 | DNS = 192.168.0.1    β”‚
β”‚                                                                                                  β”‚
β”‚                                    ●─ DHCP/STATIC IP ──────────────────────●                     β”‚
β”‚                     Change Mode    : [STATIC]                                                    β”‚
β”‚                     Copy           : Copy current address to "Static"                            β”‚
β”‚                     Static IP      : [192.168.0.8]                                               β”‚
β”‚                     Static Mask    : [255.255.255.0]                                             β”‚
β”‚                     Static Gateway : [192.168.0.1]                                               β”‚
β”‚                     Static DNS     : [192.168.0.1]                                               β”‚
β”‚                                    ●─ Additional Options ──────────────────●                     β”‚
β”‚                     Link Speed     : [100]                                                       β”‚
β”‚                     Disable        : Disable Ethernet adapter                                    β”‚
β”‚                                    ●─ Apply ───────────────────────────────●                     β”‚
β”‚                     Apply          : Save all changes and restart networking                     β”‚
β”‚                                                                                                  β”‚
β”‚                                                                                                  β”‚
β”‚                           <Ok>                               <Back>

==

Whenever I ran Dietpi-Software, it takes a long time to get through the following screen if the DNS set to any pre-built DNS entries Image

and then this

Code: Select all

Virtual Machine (x86_64) | IP: 192.168.0.8






β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ DietPi-Software β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Checking DNS resolver                                                                            β”‚
β”‚  - Command: ping -c 1 -W 10 dns9.quad9.net                                                       β”‚
β”‚  - Exit code: 2                                                                                  β”‚
β”‚  - DietPi version: v7.0.2 (MichaIng/master) | HW_MODEL: 20 | HW_ARCH: 10 | DISTRO: 5             β”‚
β”‚  - Image creator: DietPi Core Team                                                               β”‚
β”‚  - Pre-image: Debian mini.iso                                                                    β”‚
β”‚  - Error log:                                                                                    β”‚
β”‚ ping: dns9.quad9.net: No address associated with hostname                                        β”‚
β”‚                                                                                                  β”‚
β”‚               Retry          : Re-run the last command that failed                               β”‚
β”‚               DietPi-Config  : Edit network, APT/NTP mirror settings etc                         β”‚
β”‚               Open subshell  : Open a subshell to investigate or solve the issue                 β”‚
β”‚               Send report    : Uploads bugreport containing system info to DietPi                β”‚
β”‚                              ●─ Devs only ──────────────────────────────────────●                β”‚
β”‚               Change command : Adjust and rerun the command                                      β”‚
β”‚                                                                                                  β”‚
β”‚                                                                                                  β”‚
β”‚                           <Ok>                               <Exit>
maya95
Posts: 48
Joined: Tue Apr 20, 2021 12:20 pm

Re: Static IP makes network unusable.

Post by maya95 »

Extra test shows that as long as if DNS set to 192.168.0.1, then it works, whether it's set by router's DHCP configuration or set by CUSTOM DNS entry. Nothing else works. CUSTOM DNS set to level3 DNS 4.1.1.1 which isn't on built-in DNS entries doesn't work either.

I then download and setup Technitium DNS 6.2.1 https://technitium.com/dns/ on Windows machine and point the STATIC DNS IP 192.168.0.21 to it, where I set 9.9.9.9, 8.8.8.8, 8.8.4.4, 1.1.1.1, 1.0.0.1 as forwarders and it works too. It seems that if the STATIC DNS is set to an IP address that will forward its query to upstream DNS then it works.

I either have to accept what it is or move to other distros/platforms. Thanks!
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Static IP makes network unusable.

Post by Joulinar »

Honestly this has nothing to do with DietPi. DietPi is always sending the DNS request out but somehow it did not get an answer back if you use a global upstream DNS provider. This we already tested using tcpdump Probably this is blocked somewhere. But for sure it's not something in DietPi or the base image below. At least as long as you don't install any tcp blocking software. DietPi did not know if you use a local DNS server like your router or a global public DNS server. Simply the configured DNS server is used. To find out what is blocked and where, you would need to continue tracing inside your local network and try to capture DNS packages. Maybe your router is offering such possibilities. As well you could use Wireshark on the computer hosting the VM to see what is going on.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
maya95
Posts: 48
Joined: Tue Apr 20, 2021 12:20 pm

Re: Static IP makes network unusable.

Post by maya95 »

Decided to install Pi-Hole/Unbound on the VM and call it a day.

Image

Image

Image
Post Reply