Static IP makes network unusable.

I’m using newest VMWare x86 vmdk buster image. Tested multiple times.

Whenever I set static IP for IPv4, the whole network stop working. Can’t ping anything, network test always fail.

Disabling IPv6 did not hep. Changing DNS servers did not help .(Ex. change DNS from quad9 to Google)

Changing timezone also didn’t help. It makes using DietPi as a server impossible.

IIRC, it’s been like this even a year ago.

Can you set it to DHCP and run ip a. Once done set it to STATIC and run ip a again

Still fails after execute ip a command.

There is an issue resolving the address.
First make sure you can reach the nameserver: traceroute 8.8.8.8
Then verify that the correct nameserver is used:

head -n -0 /etc/resolv.conf 
head -n -0 /etc/resolvconf/resolv.conf.d/*
nslookup dietpi.com

Post also the output of the following

ip -4 addr; ip -4 ro; ip -4 ru; ip neigh show

ip a doesn’t do anything. It’s showing current configuration only. Pls share the output for DHCP as well as STATIC

missing commands and files.

There is no need to create screen shots, you can easily copy the content from SSH terminal. This is way better reading than looking at a screen shot

OK. It won’t even let me run DietPi-Software since the DNS could not be reached, however.

BTW, I’m a Windows guy. I might need to recreate the VM. It just blue screen and stops working after I exit to the command line.

Your configuration looks correct. However The fact that arp entry to the gateway is stale shows that there is something misconfigured with the VM.

New VM. login through ssh (putty)

Noticed that the dietpi upgrade itself from 6.x to 7.0.2, only selected SAMBA being installed.

==

login as: root
root@192.168.0.103's password:
 ─────────────────────────────────────────────────────
 DietPi v7.0.2 : 13:26 - Tue 04/20/21
 ─────────────────────────────────────────────────────
 - Device model : Virtual Machine (x86_64)
 - CPU temp : N/A
 - LAN IP : 192.168.0.103 (eth0)
 - MOTD : Spring in northern hemisphere: Do you know the tulip command?
          Run "ss -tulp" to see which process listens on which TCP/UDP port.
 ─────────────────────────────────────────────────────

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image           : DietPi Core Team (pre-image: Debian mini.iso)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Patreon Legends : Camry2731
 Donate          : https://dietpi.com/#donate
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place.
 dietpi-config   : Feature rich configuration tool for your device.
 dietpi-software : Select optimized software for installation.
 htop            : Resource monitor.
 cpu             : Shows CPU information and stats.

root@DietPi:~# traceroute 8.8.8.8
-bash: traceroute: command not found
root@DietPi:~# ifconfig
-bash: ifconfig: command not found
root@DietPi:~#

traceroute is not installed by default. Therefore command is not working.

ifconfig depreciated and was replaced by ip command long time ago

OK. Traceroute installed itself while waiting in ssh session. Traced to 8.8.8.8 fine.

root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:f4:ac:2e brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.103/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 5892sec preferred_lft 5892sec
    inet6 fe80::20c:29ff:fef4:ac2e/64 scope link
       valid_lft forever preferred_lft forever

Do you still have an issue?

Is this the DHCP scenario?
Can you repeat the ip neigh show ?
Is there any chance that you are running some kind of dhcp snooping or port-security?

Yes.

Virtual Machine (x86_64) | IP: 192.168.0.5



┌──────────────────────────────┤ DietPi-Config ├───────────────────────────────┐
│ Please select an option to change:                                           │
│                                                                              │
│                          ●─ Adapter Options ──────────────●                  │
│                 Ethernet : Available | [On] | Connected                      │
│                 WiFi     : Not Found | [Off] | Disconnected                  │
│                          ●─ Additional Options ───────────●                  │
│                 IPv6     : [Off]                                             │
│                 Proxy    : [Off]                                             │
│                 Test     : [Failure] | Offline                               │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Back>                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
  1. static / DNS set to 1.1.1.1 and 1.0.0.1
192.168.0.1 dev eth0 lladdr b8:a3:86:fb:54:f4 REACHABLE
192.168.0.22 dev eth0 lladdr 00:60:6e:01:11:3a STALE
192.168.0.21 dev eth0 lladdr 64:00:6a:59:65:16 REACHABLE
  1. no

Noticed that when I reboot the VM, I got these messages and it counted to 60/60

can you do following and share the output

ping -4 -c 1 one.one.one.one
ping -4 -c 1 1.1.1.1



ping -4 -c 1 dns9.quad9.net
ping -4 -c 9.9.9.9
root@DietPi:~# ping -4 -c 1 one.one.one.one
PING one.one.one.one (1.0.0.1) 56(84) bytes of data.
64 bytes from one.one.one.one (1.0.0.1): icmp_seq=1 ttl=60 time=10.3 ms

--- one.one.one.one ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 10.333/10.333/10.333/0.000 ms
root@DietPi:~# ping -4 -c 1 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=60 time=51.7 ms

--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 51.693/51.693/51.693/0.000 ms
root@DietPi:~# ping -4 -c 1 dns9.quad9.net
PING dns9.quad9.net (149.112.112.9) 56(84) bytes of data.
64 bytes from dns9.quad9.net (149.112.112.9): icmp_seq=1 ttl=56 time=42.6 ms

--- dns9.quad9.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 42.643/42.643/42.643/0.000 ms
root@DietPi:~# ping -4 -c 9.9.9.9
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
             [-l preload] [-m mark] [-M pmtudisc_option]
             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
             [-W timeout] destination
root@DietPi:~#

OK. Last command should be
ping -4 -c 1 9.9.9.9

I’s all good. But in Dietpi-Config network test https://dietpi.com , https://google.com http://apple.com always fail.

PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.
64 bytes from 9.9.9.9: icmp_seq=1 ttl=56 time=40.0 ms

--- 9.9.9.9 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 39.997/39.997/39.997/0.000 ms