LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-19-2006, 02:20 PM   #1
beezum88
Member
 
Registered: Aug 2006
Location: Texas
Distribution: Ubuntu Maverick Meerkat, openSUSE 11.4
Posts: 45

Rep: Reputation: 15
Which IP Address do I Use for print sharing?


Okay, I've been trying to set up a print share hosted by my linux machine over an apple network. I found instructions on how to do it at http://software.newsforge.com/articl...&tid=6&tid=138. However, this site doesn't tell you which ip address to use.

When I typed "ifconfig" in Konsole, I got this:

eth0 Link encap:Ethernet HWaddr 00:50: DA:08:AE:18
inet addr:10.0.1.4 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::250:daff:fe08:ae18/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22606 errors:0 dropped:0 overruns:0 frame:0
TX packets:15268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22393334 (21.3 Mb) TX bytes:2605861 (2.4 Mb)
Interrupt:11 Base address:0x1000

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:28028 errors:0 dropped:0 overruns:0 frame:0
TX packets:28028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4786422 (4.5 Mb) TX bytes:4786422 (4.5 Mb)

I tried both 10.0.1.4 and 127.0.0.1 and the Mac still won't print to the printer on the linux machine. then I went to https://www.grc.com/x/ne.dll?bh0bkyd2 and got 24.26.199.175 as my public IP Address. It didn't work either. If I'm using the wrong string of numbers, then which one should I use?

The only other reason I can think of that this doesn't work is that port 631 isn't open in the firewall.

Thanks,

Last edited by beezum88; 08-19-2006 at 02:24 PM.
 
Old 08-19-2006, 04:36 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Is the Apple network inside or outside your firewall?

This is a crucial question. If it is inside the firewall, which probably means it is in the same building, then the right IP address is the 10.0.1.4. (Never use 127.0.0.1 to go from one machine to another.)

If it is outside the firewall, then the packets have to travel across the internet, so you must use your external IP address, 24.26.199.175. (BTW, you could have also found this at http://jackson.io/ip/.)

But for an external connection there is one more very important step. You have to log into your router and configure it to forward port 631 to local IP address 10.0.1.4.

If you think you have everything setup correct and you just can't figure out where the packets are getting lost, you could install and run wireshark (formerly ethereal). It's a very powerful (but not simple) tool to detect what network traffic is doing.

Last edited by KenJackson; 08-21-2006 at 04:58 AM.
 
Old 08-19-2006, 04:36 PM   #3
trashmanal
LQ Newbie
 
Registered: Aug 2006
Posts: 3

Rep: Reputation: 0
Check your network configuration

I am a newbie at Linux, but I do know quite a bit about networks and IPs.

127.0.0.1 is the address any machine uses to refer to itself, so this is never a good choice.

24.26.199.175 is your address on the internet, your other local machines might see this as your linux machine... but if they did, they would go through the internet first to get to it, rather than through your network, and most print sharing I've seen over the net doesn't work very well.

That being said, the first "inet address" SHOULD be the one you're using. However, the address that's being used 10.0.1.4 I find to be a little odd. This can be used for local addressing, but isn't the usual choice. What are the IP addresses of your other machines?

All of your machines may have a local IP of 192.168.0.x where x can pretty much be any number 1-255.

Either way, they should all begin with 10.0, or all begin with 192.168 (or 172.16 is another option). If you have one computer or set that's 10.0 and the rest 192.168 or something else, they won't as easily talk to eachother.

Other sets of numbers will work, but those are the ones least likely to give you trouble.

Are you using DHCP? Usually that will automatically set you up with IPs that work.

Last edited by trashmanal; 08-19-2006 at 04:47 PM.
 
Old 08-20-2006, 11:14 PM   #4
beezum88
Member
 
Registered: Aug 2006
Location: Texas
Distribution: Ubuntu Maverick Meerkat, openSUSE 11.4
Posts: 45

Original Poster
Rep: Reputation: 15
I now have the correct IP address! Thank you! ... still won't work :-/

I checked the IPs on my other machines and they are all 10.0.1.x with x being a number 1-5. However, when I put 10.0.1.4 in as the location of my printer and tried to print, either of two things happened, with no apparent pattern as to which one occured when:

1. The operation times out in the "connecting to printer on port 631" phase OR

2. The print jobs arbitrarily stop


Just out of curiosity, I got in the terminal in one of the macs and signed in to the linux box using SSH, so I know there's no problem with the IP address. I also turned off the firewall on the linux box to see if it was interfering with the printer connection and no such luck. So thanks for the comments, but I appear to be back at square one anyway.


Just one curiosity question, though. If the 127.0.0.1 isn't used in the local network, and it isn't used for the internet, then what is it good for?
 
Old 08-21-2006, 05:22 AM   #5
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Quote:
Originally Posted by beezum88
Just one curiosity question, though. If the 127.0.0.1 isn't used in the local network, and it isn't used for the internet, then what is it good for?
Well, one thing it's good for is checking on your printers. Cups is administered via a web interface with at http://localhost:631/. The name localhost is resolved by reading 127.0.0.1 from your /etc/hosts file. Cups is actually running a little webserver that only works on the computer it is run on.

If you are running a real web server, ftp server, or other server, you can usually access it and test it the same way by selecting the right port or letting it go to the default.

As for your printer problem, that http://localhost:631/ link would be a good place to search for answers, both to actually manage the print queue and to read the documentation.
 
  


Reply

Tags
firewall, port forwarding, printer sharing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
file and print sharing gwc Linux - Newbie 3 06-03-2005 02:59 PM
file and print sharing bdika Mandriva 6 10-09-2004 02:46 AM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM
slack and samba print sharing? doublefailure Linux From Scratch 1 06-08-2003 11:10 AM
Print sharing with samba katarn444 Linux - Networking 2 05-21-2003 10:40 AM


All times are GMT -5. The time now is 10:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration