Printing to a printer on a different subnet?

Velvis

Well-Known Member
Reaction score
46
Location
Medfield, MA
I have a client who rents space in a building, so we have no access to the main networking equipment to make any changes. We have 3 laptops and one ethernet wired printer (HP 400 Pro).

The wifi laptops get a 192.168.1.x address and the wired printer gets a 192.168.6.x address.

Is there a way to get the laptops to print to the printer on the different subnet, without any access to the router, etc.?
 
You will need to drop in your own router, connect both network segments to it and bridge the two networks together. Then connect all of your remaining equipment to the router and it will route your TCP requests accordingly.
 
If the two subnets are already routed to each other, then yes, you'll just need to configure the printer by IP (rather than using its network name or discovery). Can you ping from one subnet to the other?

Otherwise, you'll need to do something like phaZed suggests.
 
I have a client who rents space in a building, so we have no access to the main networking equipment to make any changes. We have 3 laptops and one ethernet wired printer (HP 400 Pro).

The wifi laptops get a 192.168.1.x address and the wired printer gets a 192.168.6.x address.

Is there a way to get the laptops to print to the printer on the different subnet, without any access to the router, etc.?

Where do the Laptops get their IP address from?

Any reason you just can't change their address to match the main networks?

192.168.1.x is just the default addresses of most all equipment.
 
Routers already (by default) route traffic for their directly-connected networks, and these routes are automatically populated in the routing tables simply by assigning an IP address on a router (or Layer-3 switch) interface and bringing the interface "UP" (i.e. you may need to issue a "no shutdown" type of command depending upon the router).

In your example, if you took a plain Cisco router (or layer-3 switch) with a couple of simple Ethernet ports, assigned them IP addresses (as described), and brought them up, the routing table would simply look like this:

Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.6.0/24 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
Router#

Note: On a Layer-3 switch, you probably need to issue a "no switchport" command on the Interfaces you are going to tag with Layer-3 addresses.

***************

What PhaZed seems to be talking about is sharing routes between routers in which case, you would ultimately tell a router that in order to access a specific network subnet (that it doesn't have already directly-connected) that it needs to route that out a specific interface (toward another router) or that it needs to route that traffic to another IP, that is the interface on another router, which is directly connected to this one.


For example, if you had two (2) routers and one hosted the 192.168.1/24 network and the other hosted the 192.168.6/24 network, they would NOT know what network is on the other router unless someone configured a route either statically or via a dynamic routing protocol. That said, both routers would have to be connected together via two interfaces on the same subnet.

Here is what I am saying:

Let's say two routers are both connected via their FastEthernet0/1 interfaces. That is FastEthernet0/1 is connected to FastEthernet0/1.... both of these two interfaces MUST be on the same subnet. That said, they can be totally different than the destination network. I am going to use a 10.0.0.0/8 network, which will dramatically show the difference.

Router1#sh ip int br
Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.1.1 YES manual up up

FastEthernet0/1 10.0.0.1 YES manual up up

Vlan1 unassigned YES unset administratively down down
Router1#

Router2#sh ip int br
Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.6.1 YES manual up up

FastEthernet0/1 10.0.0.2 YES manual up up

Vlan1 unassigned YES unset administratively down down
Router2#




As long as from Router 1 (the router with the 192.168.1.x network) you have a route that says you can get to the 192.168.6.x network via 10.0.0.2 (On Router 2), Router 1 will find it because it has an interface (10.0.0.1) that can communicate with that router.


Here are the tables:

Router1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.6.0/24 [1/0] via 10.0.0.2
Router1#

Router2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/1
S 192.168.1.0/24 [1/0] via 10.0.0.1
C 192.168.6.0/24 is directly connected, FastEthernet0/0
Router2#


***************************

Another option other than routing to a specific IP is to route out an Interface. It will show as directly connected via a static route the "S" because it is not really directly connected... only it works the same because the other router will answer.

The tables would then look like this:

Router1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.6.0/24 is directly connected, FastEthernet0/1
Router1#


Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/1
S 192.168.1.0/24 is directly connected, FastEthernet0/1
C 192.168.6.0/24 is directly connected, FastEthernet0/0
Router2#
 
What he said ^^^^^ :D

Yes. I was thinking the exact same thing.

Sheesh, NEtWizz, no need to show off. :D

Seriously, I loved the first book. When is the second one coming out? :D

And where, exactly, does the flux capacitor go? :D

And that's your basic setup for your very own Large Hadron Collider. :D

That's what she said. :D


Man, I really crack myself up!
 
Routers already (by default) route traffic for their directly-connected networks......mega-snipped....

Wow, I wish I could say "Thanks for the education!", but I don't even know enough to make head nor tail of it! :)

But I do know the OP stated right off the bat that he didn't have access to any of the network gear.

So NetWizz, he's going to need another primer on how to inject all that stuff into the network. How about a custom, self replicating router-virus?

Or maybe something like Will Smith and Jeff Goldblum used against the aliens in Independence Day?

IndependenceDayJeffGoldblumWillSmithLS20thCenturyFox_featured_photo_gallery.jpg
 
1) Why not just plug in a router to the ethernet, turn off DHCP, plug the printer into the router, configure your own wireless, connect laptops to your wireless network, print all you like, have a beer?

2) Then explain to the customer that for all intents and purposes, their data should be considered compromised as anyone in the building has had access to their computers since day 1.

Have I missed something here or 1) is it really that simple, and 2) if you have no control of the networking equipment you have no idea what is going on upstream from you - someone could be running wireshark, etc..
 
1. I think that's the easiest route to take. In fact, I'd bet it's how most offices in that situation set it up.

2. Also true. Unfortunately, most shared office space setups like that (I used one back in the day) release the owners from any liability. In the end, this set up is not secure as you only control the last tiny % of the network you are sharing with who knows who. Worse than that, some of these setups are not even physically secure! I have walked into more than one network closet, unbeknownst to any of the staff, without a key, etc. It was hard not to pull the power cable just to teach them a lesson.
 
Back
Top