2

I have the following setup:

  1. Wireless router - 192.168.2.1
  2. Linux mint laptop L - 192.168.2.166 (DHCP)
  3. Windows 10 laptop W - 192.168.2.152 (DHCP)
  4. Brother MFC 7360N printer connected to L with an Ethernet cable - 192.168.3.3 (static IP)

I can print from L just fine. But not from W.

I have read through a few step-by-step guides explaining how to share the printer, but they all seem to assume that W can ping the printer.

The printer's wired network method is Shared to Other Computers:

enter image description here

But it does not matter.

So, I am not asking how to share the printer. All I am asking is what am I to do to enable W to ping the printer?

I have full control over the router, the laptops and the printer.

P.S.

I have little understanding about the networking setup, but I am OK with command line solutions.

EDIT 1

My Bell Home Hub 1000 does not allow me to change the network mask. So, the printer should either be on 192.168.2.x or printing should be configured to work without ping, through cups. For this post I would like to concentrate on the pure network solution. Is it possible to stay on 255.255.255.0 and still make the printer pingable from all? I can change the IP address of the printer, of course, but doing this alone did not work for me.

  • Sharing a network printer with Windows PCs is done via the samba (or smb) protocol. So you need this installed. If you want a GUI solution please state your flavour of linux and which desktop environment you are using. – Fiximan Oct 26 '16 at 15:25
  • Can samba work if there is no ping? I know ping is enabled on the printer, because pinging it from L works as expected. So, can samba work without ping? I bet not. And this is the problem I want to solve first. – mark Oct 26 '16 at 17:24
  • I think yes, but not by sending the Windows PC's printing request directly to the printer but rather using the Linux PC as printer server. So Win only needs to be able to see Linux, and only Linux needs to see the printer. Search for cups printing server - it also has a browser-based GUI configuration. – Fiximan Oct 26 '16 at 19:13
  • Well, then there is something else wrong with my setup. I tried the tutorials - they are all very simple, but they do not work for me. That is why I want to bypass the tutorials and solve the purely networking issue of ping. – mark Oct 26 '16 at 19:23
  • I see - I would suggest you add a brief explanation of what you did so far to your question (I personally consider this a general rule on the stackexchange network). This will make it easier to target the actual problem. – Fiximan Oct 26 '16 at 19:28
1

The Ping request is broadcasted according to the subnet mask.

If you're subnet mask is set to 255.255.255.0, the printer won't received the request coming from 192.168.2.0/24 as it's not in its subnet: 192.168.3.0/24.

You can then change your subnet mask to allow communication between those IP ranges (255.255.0.0) or change the printer static IP so that it's part of the same IP range.

  • Despite the subnet, W should be able to ping any IP. – Fiximan Oct 26 '16 at 14:42
  • @Fiximan If something is outside the network it gets sent to the default gateway. – phk Oct 26 '16 at 18:21
  • Please, see EDIT 1. – mark Nov 13 '16 at 15:29
0

I think I found the answer how to make ping work. https://wiki.debian.org/BridgeNetworkConnectionsProxyArp was helpful. Basically, it is about configuring an ARP bridge on L.

So, here are the steps:

  1. Change the IP address of the printer to 192.168.2.5, make sure it lies within the range of IPs that are not assigned by the router's DHCP.
  2. Change the eth0 interface IP address of L to 192.168.2.4 (same constraint - this address should be excluded from DHCP).
  3. (as root on L) echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
  4. (as root on L) echo 1 > /proc/sys/net/ipv4/ip_forward
  5. (as root on L) ip ro add 192.168.2.5/32 dev eth0

And it worked! I could ping the printer from the other laptops on the network! And as a result I was able to add it as the Network Printer to all those laptops.

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.