0

I have a home network where ip addresses are assigned with DHCP. I want to connect an HP Color Laserjet 3600n to one of my pc's directly through an ethernet cable and not via my router. The PC has one ethernet port and the printer will only be used by it locally. How should I do that?

OS: Linux Mint 18.3 Sylvia

Desktop session: xfce

  • If I were you, I would just run the Ethernet cord. Any particular reason why you wouldn't want to connect through wireless? – Rhett Bohling Sep 11 '19 at 10:44
  • 1
    you would need two network interfaces if you want the PC to connect to both the printer and the router at the same time. you'd also need to either run a dhcp daemon on the port that's connected to the printer or configure a static IP on the printer (the second NIC in the PC should also have a static IP and it must be in the same IP subnet as the IP address allocated to the printer). It's probably not worth the bother....better to plug it into the router and configure the router to only allow access to the printer from that PC. – cas Sep 11 '19 at 10:53
  • 1
    technically, you could plug the PC, the printer, and the router into a switch or hub - but there's no advantage over just just plugging the printer into the router. – cas Sep 11 '19 at 10:55
  • 1
    To actually connect the printer via ethernet and get it all working will be hours of work (or possibly days, since it's all new to you otherwise you wouldn't be asking) and at the end of that you'd have an inferior solution to just connecting via USB (unless you bought and installed a 2nd network interface in the PC). Somebody like me who's been working with ethernet since the 80s and IP networking since the very early 90s could probably do it in about 2 minutes....but you've got a lot of learning ahead of you before you can even get started. – cas Sep 11 '19 at 13:20
  • 1
    and even then, I would just plug it in via USB because it's easier and less hassle. – cas Sep 11 '19 at 13:28
0

Are you going to do this as a temporary arrangement, or a permanent one?

Also, note that I'm going to assume1 that you already have your CUPS print driver set up and already able to print in your current state, and network path to the printer uses printer's name rather than IP address... (And before doing anything, read footnote 2 first)

  • In case of temporary (i.e. haphazard) arrangement with minimal configuration:

    1. Set your printer to show its IP address on its screen.
    2. Connect both your PC and your printer to your router, wait until both IP addresses are established.
    3. Unplug your printer's Ethernet cable from the router.
    4. Unplug Ethernet cable from your PC.
    5. Plug your printer's Ethernet cable to your PC's Ethernet port.2
    6. Wait 10 sec for Ethernet link to renegotiate.
    7. Print your document. (If printer's IP address is needed, use the one you see from printer's screen)
    8. Once you finished printing document, restore your cables to the original state.
  • In case of permanent arrangement however, be aware that you'd have to find other way for your PC to connect to the network if you need Internet on this machine...

    An easiest way to make this work is to use static IP address configuration between your PC and printer, with addresses that does not clash with your network. In this case, I would randomly suggest 192.168.12.x network with 255.255.255.0 subnet mask.

    1. Connect your printer's Ethernet cable to your PC.2
    2. Configure your printer to use static IP address 192.168.12.2, with subnet mask 255.255.255.0, screw default gateway.
    3. Configure your PC to use static IP address 192.168.12.1, with subnet mask 255.255.255.0, screw default gateway.
    4. Print your document. (If printer's IP address is needed, use the one from step 2)
  • There is also a semi-permanent arrangement where you can unplug your PC from the printer2, and plug it to router to surf the net anytime.

    In this case, do steps like permanent arrangement, but use IP addresses that are in your router's network instead of the my made-up ones above; it is usually 192.168.1.x for home routers, but yours can be very different. Care should be taken to pick a pair of IP addresses that is not reserved for your router's DHCP allocation (and you need to check your router's configuration for this). PC's default gateway must also be set to router's LAN IP address too.

Note

I'm using a completely different printer/desktop/distribution combo, so I'm providing this answer from theoretical standpoint. If you have trouble setting your IP address, you'd need to elaborate more about how and which tool you are using to configure your IP address in comment first; and I would edit the answer accordingly. This answer is getting too lengthly already.


Footnotes

  • 1 Also, I'm going to assume that, for some reason, you cannot (or not willing to) print on USB connection.
  • 2 This assumes that your PC is using Gigabit Ethernet port (which always support auto-crossover). If it's not, you will have to change this printer-PC cable to a crossover Ethernet cable. This is because your printer is using Fast Ethernet, which usually cannot do auto-crossover by itself.

In Reply to Comments

I can't make comment on my own, so I will address them here:

  • About OP's (@Nick) comment on Internet access...

    So isn't it possible to print via ethernet (with static ip's) and at the same connect to the internet?

    Normally, it is possible: the most straightforward way is to follow the semi-permanent arrangement but leave both PC and printer connected to your router.

    Obviously, I must stress that doing this squarely contradicts to the conditions you originally set on the question, especially the italicized part:

    I want to connect an HP Color Laserjet 3600n to one of my pc's directly through an ethernet cable and not via my router. The PC has one ethernet port

    Apart from the screw-the-question approach I just mentioned; I have yet to see any way to break this dilemma other than introducing extra hardware (which actually warrants a separate question due to myriad of possibilities involved), or you'd have reconsider the requirements you put in your question.

  • I'll try the permanent solution and I'll give you my feedback. So isn't it possible to print via ethernet (with static ip's) and at the same connect to the internet? – Nick Sep 11 '19 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.