I set up a Debian server on an old laptop while on my home network that uses a Netgear Genie WNDR4500v2 as the router. When I set up the Debian server with a static IP it worked fine at home. It was able to do updates and resolve urls like deb.debian.org.
Here is the contents of the /etc/network/interfaces file on the Debian server
source /etc/network/interfaces.d/* # the loopback network interface auto lo iface lo inet loopback # The primary network interface auto enp1s0 iface enp1s0 inet static address 192.168.1.220 gateway 192.168.1.1
When I moved this “Debian server” to my work a small office that use a Comcast Business Class Router, DNS no longer worked. I tried
ping deb.debian.org and it failed. I tried
ping 18.104.22.168 and that got an immediate response, so my guess is that I had access to the internet but I didn’t have DNS working at the office. When I changed the
/etc/network/interfaces file from “static” to “dhcp” and commented out the “address” and “gateway” lines and rebooted, I got a different IP address assigned, but now I had DNS. I could
ping deb.debian.org and get a response.
The router at home and the router at the office are both found at 192.168.1.1.
- Any thoughts why I had DNS at home but not at the office when using a static IP?
- Is there an additional setting that I could add to the
/etc/network/interfacesfile that I neglected?
I know that one solution that I could probably do is to reserve an IP address for the “Debian Server” when it is at the office through the interface of the Comcast Router. Perhaps that is the best solution, but I’m checking to see if I missed something else in my mobile home lab set up.