two lans sharing one network printer

Discussion in 'Linux Networking' started by softmasters, Mar 17, 2015.

  1. softmasters

    softmasters Guest

    Hello,
    I have two different lans in the same office with two separate routers and internet connections.
    LAN A has ip's in the class 192.168.8.xxx
    LAN B has ip's in the class 192.168.15.xxx

    LAN A has a network printer with a static IP address 192.168.8.230

    I want to share the printer, and only that, with LAN B.

    I've added a router between the two LANs: the WAN interface in the router has 192.168.8.2 and the LAN interface in the router has 192.168.15.99
    That is:
    <-- 192.168.8.x ->(wan)[router](lan)<-- 192.168.15.x -->

    The router is a TP-LINK TD-W8970 configured in "Wireless router" operation mode.

    Then, on a PC in LAN B I've added a static route with:
    route add -net 192.168.8.230 netmask 255.255.255.255 gw 192.168.15.99 dev eth1

    Anyway, if I try to ping the printer I get no answer. What am I missing?
    Thank you
     
    softmasters, Mar 17, 2015
    #1
    1. Advertisements

  2. The printer has to see both networks also, in your case changing the netmask
    from the printer to 255.255.0.0 same for the router, but using a switch
    between the networks could be more practical.
     
    Gerrit van den Hanenberg, Mar 17, 2015
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.