1

I have a Linux machine with eth0 for my router-modem and I want to add a second interface eth1 to connect to my Apple LaserWriter printer.

Everything is on 192.168.1.x:

  • My address IP is 192.168.1.2.
  • My router (default gw) IP is 192.168.1.1.
  • My printer IP is 192.168.1.100.

What should I do to route traffic to the printer. Is adding a static route all there is to it?

Would this work?

route add -host 192.168.1.100 netmask 255.255.255.0 dev eth1

What about determining the correct netmask if the above one is wrong?

2

I'd put the printer on a separate subnet then this will happen automatically. For example, make the printer 192.168.2.100/24 and your machine's eth1 192.168.2.2/24.

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.