LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-19-2011, 09:30 PM   #1
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Rep: Reputation: 24
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?

Last edited by Paraply; 12-19-2011 at 09:32 PM. Reason: formatting
 
Old 12-19-2011, 10:38 PM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
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.
 
Old 12-20-2011, 07:09 AM   #3
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by fukawi1 View Post
(...) 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
 
Old 12-20-2011, 08:20 PM   #4
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
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.
 
Old 12-20-2011, 08:46 PM   #5
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Cool

Quote:
Originally Posted by fukawi1 View Post
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

Last edited by Paraply; 12-20-2011 at 08:52 PM.
 
Old 12-20-2011, 09:31 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
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.
 
Old 12-21-2011, 07:55 AM   #7
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by michaelk View Post
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.
 
Old 12-21-2011, 08:28 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
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.
 
Old 12-21-2011, 10:17 AM   #9
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by michaelk View Post
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?
 
Old 12-21-2011, 11:19 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
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.

Last edited by michaelk; 12-21-2011 at 11:35 AM.
 
Old 12-21-2011, 12:05 PM   #11
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by michaelk View Post
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?
 
Old 12-21-2011, 12:27 PM   #12
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Quote:
Originally Posted by fukawi1 View Post
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?
 
Old 12-21-2011, 12:29 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
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?

Last edited by michaelk; 12-21-2011 at 12:40 PM.
 
Old 12-21-2011, 01:04 PM   #14
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by fukawi1 View Post
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.
 
Old 12-21-2011, 01:14 PM   #15
Paraply
Member
 
Registered: Jun 2007
Location: Norway
Distribution: Arch Linux
Posts: 114

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by michaelk View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem on assigning static ip address.. RHEL 5 as guest OS on Virtualbox odessy Linux - Newbie 4 08-28-2009 11:51 AM
Problem on assigning static ip address.. RHEL 5 as guest OS on Virtualbox odessy Linux - Networking 1 08-28-2009 09:22 AM
Assigning a static IP address hangs system??? dmangal Linux - Networking 2 05-16-2007 04:12 PM
Assigning Static IP Problem canuck_barlow Linux - Newbie 5 01-06-2006 02:54 PM
assigning static ip vcheah Linux - Networking 5 12-25-2001 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration