Assigning printer a static IP-address with dhcpcd (.conf)?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
Last edited by Paraply; 12-19-2011 at 09:32 PM.
Reason: formatting
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.
(...) 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.
Yes, I should, but that service is disabled by my ISP. The printer's model, MAC address, and IP address are visible, but it seems to be impossible to assign static IP addresses to devices from the modem's web interface. The modem is SpeedTouch 780 at software version 7.4.4.7.
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.
Last edited by Paraply; 12-20-2011 at 07:25 AM.
Reason: grammar
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
But having two DHCP servers on the same subnet, is probably going to cause some issues, so you may need to set up DHCP relaying, which may well cause problems with the DSL modem since it appears to be fairly restrictive.
I cant for the life of me understand why an ISP would disable setting a static lease on the router but regardless.. (...)
After my last post I decided to call my ISP to ensure I hadn't overlooked something. They replied it was indeed disabled *for private subscribers*. Not for business subscribers. Money rules - at least over here...
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.
Any additional information you can provide about your network would be helpful.
Well, my network is rather simple. The modem has four ports, of which I use one for an internet phone service, two for PC's and the last for the printer. It also has a wireless access point, which I currently don't use. Everything is working fine, but I would like the printer to have a static IP address. In the modem, under Home Network -> Devices, I have two choices: "Assign a game or application to a local network device", and "Assign the public IP address of a connection to a device", neither of which I believe is useful for my purpose. I know of no way to reconfigure the modem itself, except resetting it to 'factory values'.
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.
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.
The modem's ('dsldevice') IP address is 10.0.0.138. The various devices are assigned addresses from 10.0.0.1 upto ?
Quote:
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.
OK
Quote:
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.
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.
It very much looks like mine, except my modem is called 780 (WLT). There is no 'pool page' that I can find. "System Configuration Web Browsing Interception: Disabled", in addition to the service I mentioned earlier.
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?
I looked briefly at the "How to Guides" on the Oki page and dismissed them when I only saw Windows XP and Win 7 mentioned. The how-to's that came with the printer seem to be more OS neutral, but I didn't detect the single Network guide buried in a heap of other guides in 20 different language versions before I was prompted to have another look.
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?
The IP addresses currently assigned are: 10.0.0.4; 10.0.0.7; 10.0.0.9; 10.0.0.11; 10.0.0.12. The 10.0.0.9 is assigned to both an unconnected computer and an ADSL splitter (for the Internet phone).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.