1

I am trying to set up a raspberry pi-powered print server based off of this guide.

So far I have installed CUPS, and am now on the step of creating a static IP address to make my pi discoverable.

I've entered sudo nano /etc/dhcpcd.conf into the terminal, and followed this guide for detailed specifics on the rest of this step, but I have some conceptual questions related to a bug I am encountering.

The problem is, after setting static ip_address= (my computer's IPv4 address), routers= (my router IP), and domain_name_servers= (my DNSIP), pressing ctrl-x-y to save the changes, and then closing and reopening the terminal, I am unable to open the IP address in another browser.

In particular, the result of hostname -I does not equal any field in the static IP address I just tried making. Plus, whenever I try opening any of the fields of this static IP in another browser like http://169.254.112.161:631, my system just times out.

Though I am trying to fix my bug, I would like to understand what I am doing in following this tutorial.

In particular, what are the criteria for establishing a static ip address? I've tried using my computer's IPv4 address, as well as 192.168.0.99/24 given by the guide. One of these is correct, but which one is it, and why?

In response to a comment, the dhcpcd file is:

interface wlan0
static ip_address= 192.168.43.233/24
static routers=169.254.112.161
static domain_name_servers= 192.168.137.1

The router is a university one. I believe that this means that the internal address of the router is 169.254.112.161 as this is what I get from running ip r | grep default and hostname -I. I am not sure of how to figure out the range of the router.

  • 1
    Can you put you dhcpcd file in the question please? Local IP addresses are not sensitive / reachable from outside your network. The 169.254 network should not be used for general use (it's possible but care is needed before anyone chips in) - what is the internal address of your router? What range does the router give out addresses? You need to make sure there is no clash. Can you set a fixed address on the router (normally by MAC) rather than the Pi? –  Mar 18 '21 at 22:10
  • @Andrew I just edited to include what I think (possibly incorrectly) should go into the dhcpcd file. I am most confused by the line in the first linked post that says "Add a static IP address and details of the router, and DNS server to the bottom of the file. These details will be different depending on how your router is configured." I am not entirely sure what is general here, and what is specific to my system. – Gnumbertester Mar 18 '21 at 22:34
  • It would be best to talk to the university IT team as it's possible they limit the number of devices per room or restrict possible IP ranges per port (I've known both via my kids). It's highly unlikely the router address is as shown as that's a link local address https://en.wikipedia.org/wiki/Link-local_address and not routable. It would be best to check this on a PC / Mac that works. Just be very careful what you do as it's not your network! –  Mar 19 '21 at 00:14
  • See https://raspberrypi.stackexchange.com/a/74428/8697 for detailed instructions. NOTE it is usually better to request an address rather than set static. – Milliways Mar 19 '21 at 00:17

0 Answers0