I
I
imarketing2013-10-01 18:37:26
Network administration
imarketing, 2013-10-01 18:37:26

Help setting up routing

The question, of course, is lamer, but the easier it will be to answer it. ;-)
There are two routers in a small office. Connected in series as follows:
image

There is only a problem that I have been struggling with for 3 days in a row. From computers 192.168.2.*, user shares (samba) and network printers connected to both router 1 and router 2 (192.168.1.* and 192.168.2.*, respectively) are accessible via direct IP. And for users with IP 192.168.1.*, unfortunately, only 192.168.1.* connections are available via direct IP. There is no access to all connections from router No. 2.

As I understand it, this is all solved with one line entered into router No. 1 through a SHH connection. But what should this line be? For example, this line does not help:
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.2
Help!

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
Mikhail Vasilyev, 2013-10-01
@mickvav

Ordinary routers usually do not only route, but also NAT with a firewall to the heap.
The problem you describe requires either disabling NAT on the 2nd (something like iptables -t nat -F POSTROUTING plus something else, to the heap) or even easier to do - kill on the 2nd dhcp, insert the wire from the first to the second to one of the LAN and enjoy. If there are not enough addresses, expand the network.

I
Ingtar, 2013-10-01
@Ingtar

It is important for you to keep two subnets?
The repeater mode is a very good thing, if the firmware can do this.

N
Nikolai Turnaviotov, 2013-10-01
@foxmuldercp

In your version, I would switch the second router to a dumb access point mode, feeding it an internal network into one of the LAN ports, thus eliminating all unnecessary in the form of NAT and all kinds of masquerading.
At the same time, I would set up the “allow visibility of Wifi devices from the wired segment” mode there, I had such a checkmark on the old Asus.
Without it, Wifi devices saw only a router.

M
Melkij, 2013-10-01
@melkij

Support Ingtar Are
two networks really needed?
Disable DHCP on router2 (maybe something else, look in the manual for setting it as an access point) and move the cable from router1 from WAN to LAN port. They will live in the same network.

S
Scape, 2013-10-01
@Scape

I join the question. At most three networks. How is routing configured? Poke to lan to set up a repeater, etc. etc. does not fit.

R
randomtoy, 2013-10-02
@randomtoy

Is ip_forward enabled on router 2? What pieces of iron and axes are used?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question