What's new

[SOLVED]Question regarding Lan to Lan static route

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

hamwong

Occasional Visitor
I am noob to router advance using, but I really need help on setting up my netowrk (if it is possibile)
I got 2 ISP with 2 router, each with difference ip
router1 ip:192.168.11.254 subnet:255.255.255.0
router2 ip:192.168.10.254 subnet:255.255.255.0
both router ethernet port 4 connected to each other

both router have own DHCP Enabled for assign ip to their own connected devices.
so what I wanna to have/do is some of devices on router2 can communicte with router1 devices and router1 can ssh/http router 2
under this circumstances, both router dhcp won't try to assign ip to other group devices.
and both group devices will go internet on their own group router wan.

please kindly provide detail command with steps to achieve my request

Thanks and regards
Ham
 
both router ethernet port 4 connected to each other
Don't do this, it will create conflicts on your network.

so what I wanna to have/do is some of devices on router2 can communicte with router1 devices and router1 can ssh/http router 2
under this circumstances, both router dhcp won't try to assign ip to other group devices.
and both group devices will go internet on their own group router wan.
You can't do this in the webUI. For each router you would need to detach a LAN port from the internal bridge and configure it as a new network interface. You could then create static routes between the networks. This is not simple. You might be better of using a firmware like Tomato to do it.
 
Hi Colin,

Thanks, for your response,
in fact I do some basic try on router (didn't nvram write yet)
(I actually use port 1 for connect another router)
and I have try to add a interface on ifconfig but traffic not works.
that is reason I post here look for help

Switch: enabled gigabit
Port 0: 1000FD enabled stp: none vlan: 2 jumbo: on mac: xx:xx:xx:xx:xx:xx
Port 1: 100FD enabled stp: none vlan: 30 jumbo: on mac: xx:xx:xx:xx:xx:xx
Port 2: 100FD enabled stp: none vlan: 1 jumbo: on mac: xx:xx:xx:xx:xx:xx
Port 3: 1000FD enabled stp: none vlan: 1 jumbo: on mac: xx:xx:xx:xx:xx:xx
Port 4: DOWN enabled stp: none vlan: 1 jumbo: on mac: xx:xx:xx:xx:xx:xx
Port 5: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 8: 1000FD enabled stp: none vlan: 2 jumbo: off mac: xx:xx:xx:xx:xx:xx
VLANs: BCM53115 enabled mac_check mac_hash
1: vlan1: 1 2 3 4 8t
2: vlan2: 0 8u
30: vlan30: 1 8t


vlan30 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.10.1 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:195187 errors:0 dropped:0 overruns:0 frame:0
TX packets:552 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23811856 (22.7 MiB) TX bytes:47328 (46.2 KiB)


Thanks & regards
Ham
 
Sorry I can't help you with VLANs. But it might help others if you tell us what model routers you are using and what firmware version.
 
I am using RT-AC66U with Merlin FW:380.68_2
In fact I just go for a try with VLAN,
I don't know what should be the proper way.
 
I am using RT-AC66U with Merlin FW:380.68_2
In fact I just go for a try with VLAN,
I don't know what should be the proper way.

The proper way is to get a router that supports dual WAN. Asus makes some. You won't get that to work, and VLAN 30 is already ready messed up. The broadcast address is wrong..
 
Not sure what devices you want to communicate with one another, but if they're Windows desktops or laptops, what about connecting to both routers using different NICs? I do it all the time on my network -- for example my laptop is connected to my primary router by Ethernet. This leaves my WiFi adapter free to connect to another router. When connected to both routers devices from either subnet are available to me, not to mention having two routes to the Internet. This can be done with multiple WiFi or Ethernet adapters too, and they can be pretty cheap.

I realize this may or may not apply to your use case given the information we have to work with, but just thought I'd throw it out there as a potentially easy solution. BTW, on Windows anyway, Ethernet will always be the primary route to the Internet when there's more than one available and the other is WiFi.
 
Last edited:
The proper way is to get a router that supports dual WAN. Asus makes some. You won't get that to work, and VLAN 30 is already ready messed up. The broadcast address is wrong..

Hi, as merlin firmware can enable dual wan, does it mean that I can enable dual wan and run on that way?
should I set both router as dual wan and both second wan connect to each other, set as static router with other end router ip?

I like to keep on use merlin firmware, I know my request should works after ssh command/script,
but I don't know what should be the proper / most simply way that can achieve my request as I am only know some of basic network knowledge

Please kindly advise me
 
Last edited:
Thanks all for advise me, especially netwrks, thanks for brain storm me, I get the hints and go for Dual wan, now it works, I'll share what I found these day,

router1 ip:192.168.11.254 subnet:255.255.255.0
router2 ip:192.168.10.254 subnet:255.255.255.0

1) I set router1 (RT-AC66U) enable Dual Wan, Second Wan set as Ethernet Lan - Lan Port 1,
Load Balance, Than Activate static route,
192.168.11.0 192.168.10.0 secondary wan
ssh to router1 and command
iptables -I FORWARD -i vlan3 -j ACCEPT

ssh to router 2 (my router 2 don't have static route function in web)
route add -net 192.168.11.0 netmask 255.255.0.0 gw 192.168.10.5
On router 2, I have set DHCP static ip 192.168.10.5 to router 1

basicly now should able to ping/connect to each other ip group,
but config will be lose after power reset on router / or changes on web,
so on merlin router, I put a script at /jffs/scripts/firewall-start

#!/bin/sh
iptables -I FORWARD -i vlan3 -j ACCEPT

on second router you will have to found your own way, difference brand got difference way
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top