Article 59JQP Help me! Why can't I access the internet on a static IP address?

Help me! Why can't I access the internet on a static IP address?

by
anamnedelcu
from LinuxQuestions.org on (#59JQP)
Hello,

I need some help. I set up a static IP address for my ubuntu 16.04 server and now I don't have an internet connection anymore. I can ping my router but when I try to ping 8.8.8.8 it says "connect: Network is unreachable".

/etc/network/interfaces:

auto enp0s3
iface enp0s3 inet static
address 192.168.101.1
netmask 255.255.255.1
network 192.168.101.0
broadcast 192.168.101.255
gateway 192.168.101.1
dns-nameservers 192.168.101.1 8.8.8.8 8.8.4.4

/etc/resolv.conf
nameserver 192.168.101.1
nameserver 8.8.8.8
nameserver 8.8.4.4latest?d=yIl2AUoC8zA latest?i=oGJjY-CyXtc:qYFbPDs8rXI:F7zBnMy latest?i=oGJjY-CyXtc:qYFbPDs8rXI:V_sGLiP latest?d=qj6IDK7rITs latest?i=oGJjY-CyXtc:qYFbPDs8rXI:gIN9vFwoGJjY-CyXtc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments