Tom's Hardware > Forum > General Networking > General Gateways, Routers and Firewalls > printing from a different subnet question

printing from a different subnet question

Forum General Networking : General Gateways, Routers and Firewalls - printing from a different subnet question

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

have a network attached printer ( a Ricoh Laser ). I want
to print FROM a different subnet . The devices that are on the same
subnet can print to the printer just fine. But I cannot see the printer
from a different subnet ( I have more than one router on my home
network ) . So I have to find the router config that will let me
print from one subnet to a printer that is on a different subnet.

any ideas on how to go about this ?

Thanks

Sponsored Links
Register or log in to remove.

You can't due to the fact that private IP addresses are non-routable. You need to have just one subnet.

Grumpy

Reply to Grumpy9117

Actually, you can print from different subnet, whether or not private IP's are used. Ignore the following phrases, intended for google search hits

gateway return icmp host unreachable
router not forward icmp redirect

There are 2 parts for answer: network part and setting up printer part. Gateway, hereafter, means not the cheap SoHo off-the-shelf routers; it means manually configurable ones like Cisco or Linux or BSD gateways.

For the network part, lets say there are gw-A and printer-A in subnet A and gw-B and node-B in subnet B. node-B tries to print to printer-A. printer-A has gw-A as gateway and properly set up IP address but it does not have any ARP entry matched to any IP address in subnet B (and you as an admin cannot put in any static route in printer's host routing table). Here is what happen:

1) node-B prints to printer-A. The packet goes to gw-B which in turn, forwards it to printer-B. gw-B has interfaces in both subnets

2) printer-A replies but when it does, it looks at source IP and finds that it is not in the same broadcast domain. So printer-A sends the packet to its default gateway, gw-A. gw-A has, for i.e, an interface in Internet and in subnet A.

3) gw-A, upon receiving given-up packet from printer-A, consults its routing table and finds that gateway for destination net is gw-B and forwards the packet to gw-B. This is critical point. gw-A CANNOT modify packet's source or destination IP (using for i.e SNAT/DNAT in iptables or nat/rdr in pf) or else the packet will be dropped. So how does it forward to gw-B without IP? Using ARP address of gw-B! If you are still vague, google on ARP IP interactions.
gw-A will also send icmp redirect to printer-A saying a better route is via gw-B. Due to this, printer-A will send directly to gw-B in the future (until its ARP entry expires).
If you are stuck at this point, there are only 2 most likely causes. One is your firewall rules on gw-A are dropping this given-up packet or you have disabled icmp redirects on gw-A. To troubleshoot, run tcpdump at gw-A interface to subnet A.

4) gw-B will then forward the packet to node-B. Viola, everybody's happy!

5) Btw, alternative solution to this network part is to enable NAT on gw-B's subnet A interface. Then, you won't have to deal with this troubleshooting mess. But there are some disadvantages to this approach.

Here is the printer part! This seemingly easy part took out a couple of hours from me. There are 3 ways to set up printer in Windows: local, network, via http.

1) If you try to set up via network, it WON'T work. Why? That network setup assumes one broadcast domain (a.k.a one subnet). Even if you use printer software that comes with printer, the same assumption applies

2) Via http? It will work (in my case) only if you have print server in front of the printer. The printer will connect to print server which will connect to the network. This case is not considered since I don't have print server.

3) Normally, people think of local as printer has to be physically attached. Only partially correct. This is the correct way to set up a printer located in different subnet. In Windows XP, go to Add Printer > Local printer (uncheck auto-detect box) > Create A New Port > Select TCP/IP > [Next] > Type in IP address and follow the rest of instructions to load the driver.

I hope my post saves countless hours of people time. Have fun!!!

Reply to JustAGuy51

I like to add one minor thing for network part #3:

Not only your firewall rules need to allow given-up packet but also allow that packet and subsequent packets to go back out of the same interface to gw-B.

Reply to JustAGuy51
Tom's Hardware > Forum > General Networking > General Gateways, Routers and Firewalls > printing from a different subnet question
Go to:

There are 1187 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them