Community discussions

MikroTik App
 
Bikonja
just joined
Topic Author
Posts: 13
Joined: Thu Apr 14, 2016 11:37 pm
Contact:

Adding ether1-gateway to bridge

Sat Apr 16, 2016 2:56 pm

The normal setup is that ether1-gateway interface is connected to a DSL modem and it is entirely outside of the LAN, if I understand correctly.
However, I want to be able to access the modem from the LAN so I thought the best way would be to add the ether1-gateway interface to the bridge-local interface witch connectes the ether2-master (which is the master to ether3, 4 and 5), wlan1 and wlan2 interfaces I have. This worked in the sense that I was now able to access the modem from the LAN, but the modem soon disconnected it's PPPoE connection and it didn't reestablish until I removed the ether1-gateway interface from the bridge.

Since there were some adjustment periods involved (the PPPoE connection didn't break immediately, it didn't reestablish immediately after removing the ether1-gateway from the bridge), I was wondering if it was just a coincidence or is it really not supposed to work that way, and if not, what would be the correct way to enable access to the modem from the LAN while retaining the PPPoE connection on ether1-gateway?
 
nxs02
Member Candidate
Member Candidate
Posts: 119
Joined: Sat Nov 07, 2015 1:25 pm
Location: Planet Earth

Re: Adding ether1-gateway to bridge

Sat Apr 16, 2016 6:32 pm

its supposed ether1 isnt in the bridge and also u can access the modem with Firewall (if u are using default forward drop) and NAT rules
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Adding ether1-gateway to bridge

Sat Apr 16, 2016 6:54 pm

When your modem is accessible with IP and also serves as a relay for PPPoE, you should configure some subnet
on ether1 which contains the modem address and an address for the router, and put a route in the modem that
routes your local network via the router address.
You can then browse/telnet to the modem address from your network, the router will do NAT to the subnet that
you put on ether1 and the modem will return the traffic via the route that you put in there.

I use this method with a MikroTik router and a Draytek 130 modem.
My modem is 192.168.0.1 and I put 192.168.0.2/24 on ether1 for the MikroTik.
In the Dratytek I added a route for 192.168.88.0/24 via 192.168.0.2
Now I can browse to 192.168.0.1 on my LAN
 
Bikonja
just joined
Topic Author
Posts: 13
Joined: Thu Apr 14, 2016 11:37 pm
Contact:

Re: Adding ether1-gateway to bridge

Sat Apr 16, 2016 7:43 pm

First of all, thank you for your answers.
its supposed ether1 isnt in the bridge and also u can access the modem with Firewall (if u are using default forward drop) and NAT rules
If I understood you correctly, ether1 shouldn't be in bridge, but using firewall and NAT rules I could access it? If so, which firewall and NAT rules?
When your modem is accessible with IP and also serves as a relay for PPPoE, you should configure some subnet
on ether1 which contains the modem address and an address for the router, and put a route in the modem that
routes your local network via the router address.
You can then browse/telnet to the modem address from your network, the router will do NAT to the subnet that
you put on ether1 and the modem will return the traffic via the route that you put in there.
So let's say my normal subnet is 192.168.88.0/24 and I want to access my modem via the address 192.168.0.1, what you're saying I need to do is:
  1. Set my modem address to 192.168.0.1
  2. Set my Mikrotik ether1 to have IP 192.168.0.2
  3. Set a subnet on ether1 on Mikrotik that contains the wanted modem address and the Mikrotik interface address, e.g. 192.168.0.0/24
  4. Add a route in the modem to route 192.168.88.0/24 via 192.168.0.2
If that's correct, what if my modem doesn't support adding routes?
Could I add some kind of route there that would allow me to access the modem at either the same or different subnet than my LAN?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Adding ether1-gateway to bridge

Sat Apr 16, 2016 9:00 pm

Well of course I made a mistake mentioning NAT in my solution, there is no NAT going on in this case, it is just routing.
But when your modem cannot do routing it should work when you do NAT.
I.e. you have 2 masquerade rules in the NAT table, one to ether1 and the other to your pppoe interface.
The part about setting an address like 192.168.0.2/24 on the ether1 interface remains.
 
Bikonja
just joined
Topic Author
Posts: 13
Joined: Thu Apr 14, 2016 11:37 pm
Contact:

Re: Adding ether1-gateway to bridge

Sat Apr 16, 2016 10:00 pm

Awesome, got it working, thanks!

Who is online

Users browsing this forum: jaclaz, kevinlukas1235, LukasL and 24 guests