LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Assigning printer a static IP-address with dhcpcd (.conf)? (https://www.linuxquestions.org/questions/linux-networking-3/assigning-printer-a-static-ip-address-with-dhcpcd-conf-919591/)

Paraply 12-19-2011 09:30 PM

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?

fukawi1 12-19-2011 10:38 PM

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.

Paraply 12-20-2011 07:09 AM

Quote:

Originally Posted by fukawi1 (Post 4554190)
(...) 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.

fukawi1 12-20-2011 08:20 PM

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.


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.

Paraply 12-20-2011 08:46 PM

Quote:

Originally Posted by fukawi1 (Post 4554875)
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

michaelk 12-20-2011 09:31 PM

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.

Paraply 12-21-2011 07:55 AM

Quote:

Originally Posted by michaelk (Post 4554902)
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.

michaelk 12-21-2011 08:28 AM

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.

Paraply 12-21-2011 10:17 AM

Quote:

Originally Posted by michaelk (Post 4555269)
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.
Where did you see the checkbox?

michaelk 12-21-2011 11:19 AM

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.

Paraply 12-21-2011 12:05 PM

Quote:

Originally Posted by michaelk (Post 4555394)
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.

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?

fukawi1 12-21-2011 12:27 PM

Quote:

Originally Posted by fukawi1 (Post 4554875)
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.

What is your objection to this solution?

michaelk 12-21-2011 12:29 PM

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?

Paraply 12-21-2011 01:04 PM

Quote:

Originally Posted by fukawi1 (Post 4555449)
What is your objection to this solution?

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.

Paraply 12-21-2011 01:14 PM

Quote:

Originally Posted by michaelk (Post 4555451)
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.

Which command line manual do you have in mind?


All times are GMT -5. The time now is 10:43 AM.