Linking Two Networks? II

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2029

PostPosted: Mon Apr 05, 2021 14:10    Post subject: Linking Two Networks? II Reply with quote
In order to not hijack this thread
where user @CJ1045 would like to "link the two networks so devices on one can see devices on the other but each network only uses its own internet access".

I will start here in atheros since my routers are R7800's, 46177 & 46259, and Per Yngve Berg's method requires vlans.
Per Yngve Berg wrote:
One one of the routers create a new vlan (vlan3) and assign one switch port to this vlan.

Assign the VLAN3 an ip address from the sub-net of the other network.

Connect this port to a lan port on the other router


I have attempted setting vlan3 with ipaddress 192.168.2.3 on router 1 (192.168.1.1) switch port 1 (physical port 4) using various methods found here in the forum.
This is probably the preferred method but have had little or no success.

I also tried many versions of a static route on "other router" (192.168.2.1).
All in vain.

Not as preferable I have also tried eibgrad's spare DD-WRT router method
eibgrad wrote:
Worst case, if you have a spare router (preferably third-party firmware capable), you could always use it to route between the two networks

but i really don't know how that "spare" should be set up. I have tried as switch and Gateway auto dhcp. Very little success.
I might need to post in Advanced Networking? to pursue this method.
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Mon Apr 05, 2021 15:22    Post subject: Reply with quote
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "2 3 4 6"
swconfig dev switch0 vlan 3 set ports "1 6t"
swconfig dev switch0 set apply
vconfig add eth1 3


You shall now have port 1 on eth1.3

If eth1.3 does not take the IP address from the Networking tab, add:

ifconfig eth1.3 192.168.2.3 netmask 255.255.255.0
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2029

PostPosted: Mon Apr 05, 2021 19:00    Post subject: Reply with quote
Per Yngve Berg, I had these exact commands along with this Static Route on "other router"
Code:
Destination LAN NET 192.168.1.1/24
Gateway 192.168.2.3
.

This lets router 1 ping "other" router and devices (192.168.2.1/24).
But "other" router cannot ping router 1.

If I add both sets of commits to both routers (IP's reversed) nobody can ping anybody.

I had earlier not had vlan3 port 6 tagged.
That did not work.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6410
Location: UK, London, just across the river..

PostPosted: Mon Apr 05, 2021 19:10    Post subject: Reply with quote
i would ve add

ifconfig eth1.3 up

as not always router brings that interface up/on after restart...

than, you need to add DHCPd for that interface and IP range..do in mind, sometimes out of the blue that vlan3 may need to be added to a bridge on a separate bridge...and than you need to add DHCPd on that bridge instead...
either via GUI or add that line
brctl addif br1 eth1.3

on some routers, all my attempts to have vlan (only) failed, but all working when added to a bridge..

in order to work port 6t WAN must be tagged on a vlan interface

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Mon Apr 05, 2021 20:06    Post subject: Reply with quote
WAN is on port 0, not 6 and have the device name eth0.
On the LAN setup of 192.168.2.1, put 192.168.2.3 in the fatwa field.
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2029

PostPosted: Mon Apr 05, 2021 20:38    Post subject: Reply with quote
Per Yngve Berg wrote:
On the LAN setup of 192.168.2.1, put 192.168.2.3 in the fatwa field.


Ya got me there, I have no idea what fatwa field may be.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Tue Apr 06, 2021 3:24    Post subject: Reply with quote
Meant gateway.
Sometimes the spellchecker changes my writing.
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2029

PostPosted: Tue Apr 06, 2021 14:37    Post subject: Reply with quote
I have had trouble with spellcheck lately as well, problems at the factory I think...
I tried adding that with no change.

Alozaros I had previously played with brctl based on sweatbee's setup.
Played with it some more after your post yesterday but by then I had smoked to many fatwas Razz Laughing

Will look at it some more today.

Am also going to reverse router setups after while and see what changes.

AND
if anybody wants to address the "using another DD-WRT router" setup please feel free.

EDIT: I swapped the setups and results reversed as expected, the router with the vlan can ping the other network but not vica-versa.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Tue Apr 06, 2021 17:17    Post subject: Reply with quote
You have successfully pinged 192.168.2.3->192.168.2.1

Try to ping 192.168.2.1->192.168.2.3
Then 192.168.2.1->192.168.1.1
Then traceroute 192.168.1.1

If not passing 192.168.2.3, the check routing table.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum