Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Thursday, September 24, 2020

Using a Raspberry Pi for basic network services, Part 4: DNS server

No comments:
Raspberry Pi 4 Model B from the side.
Photo credit: Michael Henzler
Wikimedia Commons, CC BY-SA 4.0


The Raspberry Pi for basic Networking services series:

In previous articles, I described how to set up a Raspberry Pi computer to act as a DHCP server and how to configure it to serve static IP addresses. But this is only half of the solution.

If all your computers are only used to access Internet sites, then you may not need anything more, but if you run any services on your LAN, you will want to access them as well as Internet services. Some examples of services I run on my LAN include:

  • Printer. My printer has a built-in Ethernet interface and acts as a print server for the entire LAN.
  • Web server. Two of my computers are running web server software. I use these for documents that I want to make available to all the computers in my home. In the past, when I ran an Internet-accessible web site, I used my local web servers as a staging area for changes before uploading them to the main server.
  • File servers. Several of my computers have file sharing enabled so I can copy files between my computers.
  • Remote access. Several computers run different remote access tools including SSH, VNC, X2Go and others. This lets me access everything from anywhere in the house.

When accessing a remote service, you need to provide the machine's name or IP address. If you've got a small LAN, you can just type in the address. Or you can set up hosts files on your computers to assign names to the addresses. But once you get more than a trivial number of devices on your network, those two solutions quickly become unmanageable. As I wrote in part 1, I've got 26 active devices on my LAN and many more that are rarely used. Using hosts files really doesn't work because every computer needs to be updated whenever the content changes and some devices (especially embedded devices like set-top boxes and mobile phones) don't even have a hosts file that can be managed.

But there is a well-established solution to the problem. The solution is to use the DNS protocol.

Friday, August 14, 2020

Using a Raspberry Pi for basic network services, Part 3: Static IP addresses

No comments:
Raspberry Pi 4 Model B from the side.
Photo credit: Michael Henzler
Wikimedia Commons, CC BY-SA 4.0


The Raspberry Pi for basic Networking services series:

In part 2 of this series, I described how to set up a DHCP server on a Raspberry Pi so it can allocate and serve dynamic IP addresses. But sometimes you need a static address, where a given device always gets the same well-known address.

One obvious solution is to just disable the DHCP client on the device and manually configure its IP address and other networking credentials. This works well for many devices, especially desktop and laptop computers, but it is not without problems.

Tuesday, August 11, 2020

Using a Raspberry Pi for basic network services, Part 2: DHCP Server

2 comments:
Raspberry Pi 4 Model B from the side.
Photo credit: Michael Henzler
Wikimedia Commons, CC BY-SA 4.0


The Raspberry Pi for basic Networking services series:

Every computer on a LAN needs an IP address in order to communicate with anything else. While you can manually configure each device with a hard-coded ("static") address, this can be inconvenient and sometimes difficult. Especially for small IoT devices like smart appliances.

A long time ago, in the 1980's, several different technologies were invented so devices could be configured from a centralized location, without needing explicit on-device configuration of IP addresses and related information. The DHCP protocol was invented in 1993 and remains the most common mechanism in use today.

Using a Raspberry Pi for basic network services, Part 1

No comments:
Raspberry Pi 4 Model B from the side.
Photo credit: Michael Henzler
Wikimedia Commons, CC BY-SA 4.0


The Raspberry Pi for basic Networking services series:

If you're like me, your home network is a bit more complicated than just providing Internet access to a laptop and a few mobile devices.

My network, for example, has two desktop computers, five laptops, three tablets, four phones, a Raspberry Pi, an iPod Touch, two Kindle book readers, a printer, a smart TV, a DVR, three game consoles, an Apple TV and an Internet-connected Hi-Fi amplifier. That's 26 devices and I haven't even mentioned the cable modem, the router or any of my older devices that are rarely turned on.

Additionally, although most devices access Internet services, many of these devices access each other. For instance, the two desktop computers are running servers for web pages, file sharing, music sharing and remote login.

When you've got a network this big, the factory default configuration that comes with your router, whether purchased or provided by your ISP, just isn't going to cut it.