Assigning printer a static IP-address with dhcpcd (.conf)?
I have an Oki C5750 printer connected directly to my ADSL modem and it works fine set up with the given DHCP URIs. In order to avoid having to reconfigure the printer each time my ISP is rebooting his server, I would like to assign it a static IP address. CUPS' Online Help
http://localhost:631/help/network.ht...Started&QUERY= explains how to do this in /etc/dhcpd.conf: host hostname { hardware ethernet mac-address; fixed-address ip-address; } However, my Arch Linux system uses dhcpcd, which does not recognize the above code in dhcpcd.conf. The man page explains how to give a value (IP-address) to an 'option', but I don't understand how to make sure the same option has a certain MAC address; i.e. that the option is the printer. Can anyone enlighten me? |
Your printer shouldn't be affected by the DSL modem getting a new IP.
"dhcpcd" is the DHCP client daemon. "dhcpd.conf" is for configuring the DHCP server. The DSL modem should have an option to configure DHCP leases via its web console. Where you should be able to look up the MAC address associated with the printers current IP, and assign it a static lease from there. |
Quote:
Therefore I am looking for a way to do this in Arch Linux, equivalent to the method CUPS suggests for dhcpd.conf, or by another method. |
I cant for the life of me understand why an ISP would disable setting a static lease on the router but regardless..
Short answer, you would need to install the DHCP server daemon on the arch box to configure it as suggest in the first post. Code:
pacman -Ss dchpd A simpler option would be to set a static IP on the printer itself. http://www.c5750.co.uk/index.asp?con...c5750downloads has some manuals that show how to do it via the printers web UI. |
Quote:
Thank you for the answers. I think I will chance installing DHCPD. If worse comes to worse I can always reinstall |
A quick google on your particular MODEM shows that it is also a router. If so it should have a DHCP server built in however it appears the MODEM is setup for bridge mode which is why your devices are getting an IP address from the ISP.
If you reconfigure the MODEM to being a gateway the built in DHCP server should provide IP addresses in a selected private IP class range and you can either configure it to always assign the same IP or just assign your printer a static address. If setting a static IP address make sure it is outside the range of the pool provided by the MODEM. Home broadband services typically use DHCP and you have to pay extra for a static address. Any additional information you can provide about your network would be helpful. |
Quote:
I've had a closer look at DHCP, as well as Dnsmasq, but I'd need very close handholding to configure them correctly. Avahi is already installed, and given that it is a zeroconf application I am wondering if it can be used in this case, but I am again defeated by my lack of networking knowledge. |
Ok, what are the IP addresses of your computers?
According to the manual the default IP address of the MODEM is 192.168.1.254. From the DHCP pool manual page I might assume the default range is from 192.168.1.10 - 192.168.1.20. Configure your printer with a static IP address using anything outside the pool (192.168.1.21 - 192.168.1.253) and then configure cups using that IP address. Refer to the printer manual on how to setup a static IP address. There is also a checkbox to always configure the clients with the same IP. I would assume that if checked all your devices would receive the same IP address upon power up. |
Quote:
Quote:
Quote:
|
From the manual. I've made a few assumptions. Does this look like your device?
http://www.technicolorbroadbandpartn...le.php?id=3246 If your MODEMs LAN IP address is 10.0.0.138 then you will need to use the 10.0.0.xx instead of 192.168.1.x class. Check the MODEM's DHCP pool page. |
Quote:
However, I've finally found the printer's network manual. Among other things it says to enter the gateway address. Would that be 10.0.0.138? And would it be safe to choose a fixed address just above 10.0.0.138, say 10.0.0.139? |
Quote:
|
Probably. I am still trying to figure out your MODEM and I would still like to know the IP addresses being assigned to your computers.
Can you access the Router's web configuration pages? You might have to access the device via telnet. Do you have the CLI manual? |
Quote:
|
Quote:
Yes, I can access the router's web configuration pages, but the page for configuring the router itself is disabled. As is the page for setting Dynamic DNS; e.g. static IP addresses. Which command line manual do you have in mind? |
All times are GMT -5. The time now is 10:43 AM. |