Page 1 of 1

WAN+LAN through same LINK

Posted: Sat May 23, 2009 8:40 am
by beny30
HI all
I need some help if it possible to make this configuration:

Can I use Poit-to-Point Link for WAN and for LAN in the same time. In the first RB comes main WAN Link (right RB), in the same RB comes traffic for my LAN clients in this RB there are 2 Wireless cards in 2.4 GHz.
In the second RB (left RB) comes main WAN traffic which than goes to MAIN Router OS in interface 1 which has Public IP.
From Interface 2 of MAIN Router OS comes LAN traffic on the second RB (Left RB) in ether2 and than again goes to first RB (right RB) which uses Wireless cards to send LAN traffic to the clients.
Infrastructure.jpg
Is it possible any idea any suggestions???
Thanks and all the best!!!

Re: WAN+LAN through same LINK

Posted: Sat May 23, 2009 7:25 pm
by akmjahangir
you can create two sub interface with 2 VLAN ID in your 5 ghz radio port of both end Router.
those two sub interface can be bridged with two other interface one for public and another for private.

In this way you can easily pass two network over the same link.

Re: WAN+LAN through same LINK

Posted: Sat May 23, 2009 7:27 pm
by burek
you could use mangle to mark incoming packets with a mark and add a route saying where to send packets marked with such mark
consider the following image:
Drawing2.gif
on the left RB you should:
-mark all packets coming from IN1 interface with mark X
-add a route that forwards packets marked with mark X to the right RB
-add a route that forwards packets marked with mark Y to the computer on the left (packets from internet)

on the right RB you should:
-mark all packets coming from IN2 interface with mark Y
-add a route that forwards packets marked with mark Y to the left RB
-add a route that forwards packets marked with mark X to the internet (packets from left comp destined to internet)

I hope you get the point.
marking packets can be done using mangle, something like this (im not sure if the syntax is 100% correct):

on the left RB:
/ip firewall mangle add chain=prerouting action=mark-routing in-interface=<IN1> new-routing-mark=X
/ip route add routing-mark=X gateway=<RIGHT-RB-IP>
/ip route add routing-mark=Y gateway=<LEFT-COMP-IP>

(<IN1> - the actual name of the IN1 interface on the left RB, <RIGHT-RB-IP> - ip address of the right RouterBoard, <LEFT-COMP-IP> - ip address of the left computer)

on the right RB:
/ip firewall mangle add chain=prerouting action=mark-routing in-interface=<IN2> new-routing-mark=Y
/ip route add routing-mark=Y gateway=<LEFT-RB-IP>
/ip route add routing-mark=X gateway=<INTERNET-GATEWAY-IP>

(<IN2> - the actual name of the IN2 interface on the right RB, <LEFT-RB-IP> - ip address of the left RouterBoard, <INTERNET-GATEWAY-IP> - ip address of the right RB's default gateway for the internet access)

Re: WAN+LAN through same LINK

Posted: Sat May 23, 2009 11:26 pm
by beny30
Thanks for your help
Mr akmjahangir
Can give me any example how could I make it working and is it secure, this way it looks like more easy than in other way.

Re: WAN+LAN through same LINK

Posted: Wed May 27, 2009 8:59 am
by beny30
Any help???

Re: WAN+LAN through same LINK

Posted: Wed May 27, 2009 9:15 am
by burek

Re: WAN+LAN through same LINK

Posted: Wed May 27, 2009 6:26 pm
by beny30
I have tried in some ways but does not worked:
EoIP
IPIP
VLAN

Any help?