Networking Forums

Networking Forums > Computer Networking > Linux Networking > CUPS and DHCP for remote printer

Reply
Thread Tools Display Modes

CUPS and DHCP for remote printer

 
 
Al. C
Guest
Posts: n/a

 
      03-04-2005, 06:08 PM
I have standard home network... three machines on a Linksys router which
does the DHCP assignments.

Two of the machines has a local printer.

I want each machine to be able to print to the other machine's printers.

I can get it to work in CUPS when I tell it the IP of each machine in the
CUPS "add printer". The problem is that often one of the machines with a
printer is turned off and when it is turned back on it has a different IP
and obviously I can't print to its printer.

How do you handle that, short of deleting the printer and reinstalling it?

Thanks,
Al

 
Reply With Quote
 
 
 
 
James Knott
Guest
Posts: n/a

 
      03-04-2005, 06:14 PM
Al. C wrote:

> I have standard home network... three machines on a Linksys router which
> does the DHCP assignments.
>
> Two of the machines has a local printer.
>
> I want each machine to be able to print to the other machine's printers.
>
> I can get it to work in CUPS when I tell it the IP of each machine in the
> CUPS "add printer". The problem is that often one of the machines with a
> printer is turned off and when it is turned back on it has a different IP
> and obviously I can't print to its printer.
>
> How do you handle that, short of deleting the printer and reinstalling it?


Does the Lynksys support permanently assigning an IP to a MAC address?
How long is your lease time?

 
Reply With Quote
 
Al. C
Guest
Posts: n/a

 
      03-04-2005, 07:45 PM
James Knott wrote:

> Al. C wrote:
>
>> I have standard home network... three machines on a Linksys router which
>> does the DHCP assignments.
>>
>> Two of the machines has a local printer.
>>
>> I want each machine to be able to print to the other machine's printers.
>>
>> I can get it to work in CUPS when I tell it the IP of each machine in the
>> CUPS "add printer". The problem is that often one of the machines with a
>> printer is turned off and when it is turned back on it has a different IP
>> and obviously I can't print to its printer.
>>
>> How do you handle that, short of deleting the printer and reinstalling
>> it?

>
> Does the Lynksys support permanently assigning an IP to a MAC address?
> How long is your lease time?



Not that I can see. I went into the admin screens and poked around but could
not find anything. I CAN disable DHCP but that would mean I'd have to
re-configure everything to assign static IPs and perhaps change init
scripts etc.

It looks to me that CUPS was set up for remote printers (or servers) on
systems that use static IPs. I fail to see how it can work otherwise. Maybe
if I run bind or some DNS service I could integrate that in with CUPS?

Al

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      03-05-2005, 02:33 AM
Al. C wrote:

>> Does the Lynksys support permanently assigning an IP to a MAC address?
>> How long is your lease time?

>
>
> Not that I can see. I went into the admin screens and poked around but
> could not find anything. I CAN disable DHCP but that would mean I'd have
> to re-configure everything to assign static IPs and perhaps change init
> scripts etc.


You can use both dhcp and static addresses on the same network. You just
reduce the dhcp range, so that there are some free addresses available for
static assignment. If your printer supports manual IP configuration, this
may be the way to go.


 
Reply With Quote
 
Michael Meissner
Guest
Posts: n/a

 
      03-05-2005, 02:26 PM
"Al. C" <(E-Mail Removed)> writes:

> I have standard home network... three machines on a Linksys router which
> does the DHCP assignments.
>
> Two of the machines has a local printer.
>
> I want each machine to be able to print to the other machine's printers.
>
> I can get it to work in CUPS when I tell it the IP of each machine in the
> CUPS "add printer". The problem is that often one of the machines with a
> printer is turned off and when it is turned back on it has a different IP
> and obviously I can't print to its printer.
>
> How do you handle that, short of deleting the printer and reinstalling it?


In some routers, you can configure the DHCP server to give out a permanent
address for a given machine, based on the MAC address (ethernet hardware
address). To get the MAC address do an ifconfig on your network address. For
example on this laptop, I get:

--> ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:EB:02:1F:3A
inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:ebff:fe02:1f3a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10674 errors:0 dropped:0 overruns:0 frame:0
TX packets:7599 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7559077 (7.2 Mb) TX bytes:1032913 (1008.7 Kb)
Interrupt:10 Base address:0x3000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:251312 errors:0 dropped:0 overruns:0 frame:0
TX packets:251312 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13644383 (13.0 Mb) TX bytes:13644383 (13.0 Mb)

So the MAC address of the ethernet is 00:50:EB:02:1F:3A.

As others have mentioned another solution is to use fixed addresses for your
machines, and use manual routing to the router. To be on the safe side, reduce
the range of the DHCP server cliend addresses so that it doesn't give out the
address used by static hosts.

Another possibility is using a secondary address on the same ethernet device
that is fixed (ie, eth0:1 might be bound to 10.0.0.254, while eth0 gets its
address from DHCP). This is a lot of trouble for 3 machines. I use it in my
home network to fix the server de-jure at 10.0.0.254, so I don't have to
reconfigure things depending on whether tiktok or pumpkin-head are currently
acting as server.

A third possibility is CUPS has printer browsing, which would allow printers to
broadcast their status, and you can automatically pick up printers as they come
online. I don't use this, so I can't say how well it works.

--
Michael Meissner
email: (E-Mail Removed)
http://www.the-meissners.org
 
Reply With Quote
 
Al. C
Guest
Posts: n/a

 
      03-05-2005, 04:10 PM
Michael Meissner wrote:

> As others have mentioned another solution is to use fixed addresses for
> your
> machines, and use manual routing to the router. To be on the safe side,
> reduce the range of the DHCP server cliend addresses so that it doesn't
> give out the address used by static hosts.
>


I'm still trying to get my head around this one. Not sure what is meant by
"manual routing." Does the above process mean that I disable DHCP on the
router? If so, then I need to assign static IPs and I need to make sure
that each machine has all the IPs of the network? Kind of a PITA even for 3
machines. As much as DHCP can be problematic, you have to admire how simple
it makes things.



I poked around the admin screens of the Linksys 4-port router (BEFSR41) and
did not see where I can assign a permanent address to the router


> Another possibility is using a secondary address on the same ethernet
> device that is fixed (ie, eth0:1 might be bound to 10.0.0.254, while eth0
> gets its
> address from DHCP). This is a lot of trouble for 3 machines.


I didn't know that a machine could have 2 IPs. I'll have to do some research
on this. I don't use the color deskjet too often so this is not a big deal

> I use it in
> my home network to fix the server de-jure at 10.0.0.254, so I don't have
> to reconfigure things depending on whether tiktok or pumpkin-head are
> currently acting as server.
>
> A third possibility is CUPS has printer browsing, which would allow
> printers to broadcast their status, and you can automatically pick up
> printers as they come
> online. I don't use this, so I can't say how well it works.
>


I thought 'browsing' was nothing more than the 'permission' to allow another
computer to use 'your' computers printer. As long as the IPs all match up
(I'm .100 (with laser), second (with color) is .101, and third (laptop - no
printer) is .102 it all works. It's when the third is booted up before the
second and the IPs switch that (obviously) neither machine can print to the
other's printer. PITA sometimes as I have to go in and delete the printer
and add it back with the hard-coded IP address. I don't understand why the
network scanner on my machine (named Alpha) can't find the 'name' of the
other two machihnes (Bravo and Charlie)? Doesn't ever Linux machine have
an /etc/hostname file that could be read? Couldn't the scanner hit the
router, pick up the IPs that have been assigned on the network and go from
there? Conceptually it seems simple.

Al



 
Reply With Quote
 
David Serrano (Hue-Bond)
Guest
Posts: n/a

 
      03-05-2005, 07:00 PM
Al. C, sáb20050305@18:10:17(CET):
>
> If so, then I need to assign static IPs and I need to make sure that each
> machine has all the IPs of the network? Kind of a PITA even for 3 machines.


> It's when the third is booted up before the second and the IPs switch that
> (obviously) neither machine can print to the other's printer. PITA
> sometimes as I have to go in and delete the printer and add it back with
> the hard-coded IP address.


From my humble point of view, what you are doing currently is a much bigger
hassle than configuring no more than three static IPs and forgetting about
problems from then on.


--
David Serrano
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cups upgrade remote printing breaks PenguinsAnonymous@notAchance.org Linux Networking 2 08-15-2007 12:22 PM
cups printer does not like me Mauricio Tavares Linux Networking 0 02-28-2007 01:42 AM
CUPS printer hangs after inactivity, requires CUPS restart Frnak McKenney Linux Networking 0 07-28-2005 11:56 PM
Printer sharing with 2 machines using CUPS and router? Al C. Linux Networking 5 07-25-2004 04:39 AM
Network printer & Cups - What about you ? apkwa Linux Networking 1 10-07-2003 01:52 PM



1 2 3 4 5 6 7 8 9 10 11