The Issue
I am a web developer so basically a newbie at networking. I am working on a kiosk application which requires to start a chromium browser loading another web page which is not being served locally. So if it's dynamic everything works just fine but on static ip nothing works
Model : Raspberry Pi 3 Model B Rev 1.2
==================================================================
uname -a
==================================================================
Linux raspberrypi 4.19.93-v7+ #1290 SMP Fri Jan 10 16:39:50 GMT 2020 armv7l
GNU/Linux
=======================================================================
cat /etc/os-release
=======================================================================
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
When on static IP
I can ping any ip address whether local or not, SSH into my rpi, and use FTP via my IDE which is visual code and it uploads files folders you name it!
I have tried giving it multiple dns as static domain_name_servers
but still nothing
==================================================================
Settings for static ip at /etc/dhcpcd.conf
===================================================================
interface eth0
static ip_address=192.168.0.253/24
static routers=192.168.0.1
static domain_name=204.92.15.211
==================================================================
ifconfig
===================================================================
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.253 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fd00:fc:8d77:9032:63c0:ff96:ec1c:21aa prefixlen 64 scopeid
0x0<global>
inet6 fe80::9896:372:d041:417e prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:1d:e6:29 txqueuelen 1000 (Ethernet)
RX packets 198 bytes 20566 (20.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 139 bytes 20235 (19.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
===================================================================
ip -4 route show
===================================================================
default via 192.168.0.1 dev eth0 src 192.168.0.253 metric 202
192.168.0.0/24 dev eth0 proto dhcp scope link src 192.168.0.253 metric 202
=====================================================================
ip -4 addr show
=====================================================================
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.0.253/24 brd 192.168.0.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
When on Dynamic
Everything works just fine
==========================================
ifconfig
==========================================
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.20 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::9896:372:d041:417e prefixlen 64 scopeid 0x20<link>
inet6 fd00:fc:8d77:9032:63c0:ff96:ec1c:21aa prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:1d:e6:29 txqueuelen 1000 (Ethernet)
RX packets 997 bytes 368526 (359.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 686 bytes 96921 (94.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
==========================================
ip -4 route show
==========================================
default via 192.168.0.1 dev eth0 proto dhcp src 192.168.0.20 metric 202
192.168.0.0/24 dev eth0 proto dhcp scope link src 192.168.0.20 metric 202
==========================================
ip -4 addr show
==========================================
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.0.20/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
valid_lft 604415sec preferred_lft 528815sec
Also tried
I tried changing mtu 1500
to mtu 1400
still no results.
Please let me know if you need any further information regarding this
Temporary failure resolving 'raspbian.raspberrypi.org'
error, you should be concerned about the/etc/resolv/conf
file. I mean, check thenameserver
s (which is the DNS server) there. However, if you wanna a temporary solution, comment all lines there and addnameserver 4.2.2.4
thenping archive.raspberrypi.org
. You should see the echo reply. Of course, the raspberry pi must get echo reply onping 4.2.2.4
if you wish this solution works. – M. Rostami Jan 26 '20 at 19:40static domain_name_servers=4.2.2.4
at the end of this/etc/dhcpcd.conf
file. Please inform the result then I'll make answer these comments. – M. Rostami Jan 26 '20 at 19:44domain_name
then please read the question carefully otherwise according to the link you provided I am following the dhcpcd.conf approach. – Mani Jan 27 '20 at 17:00archive.raspberrypi.org
domain. I realized that the DNS server might be the problem. Alright. – M. Rostami Jan 27 '20 at 20:27/etc/resolv.conf
was really helpful – Mani Jan 28 '20 at 02:46"I have tried giving it multiple dns as static domain_name_servers but still nothing"
YOU DEFINITELY DIDN'T READ THAT STATEMENT. – Mani Jan 28 '20 at 02:49