Community discussions

MikroTik App
 
avee
just joined
Topic Author
Posts: 4
Joined: Sat Mar 03, 2012 4:50 am

2 PPPoE Client Routed to Two Different Networks w/ DHCP

Sat Mar 03, 2012 5:24 am

Hi all, my first post here..

I have just received a RB1100AHx2 for our office. We want to configure it as the core router for our users and servers. The general configuration is as follows:

Image

Although currently we only have WAN 1 and WAN 2 active and consequently only LAN 1 & LAN 2 are active. We are still waiting for the FTTP coverage to get to our office location, hopefully in a few weeks. Previously we used ClearOS inside a PC our router, but decided to switch to RouterOS & RouterBoard combo for better hardware support.

What we have so far is the basic configuration running:
  • - eth1 is used for configuration
    - eth2 is used for dialing the WAN/DSL 1 connection (PPPoE Client)
    - eth3 is used for DHCP server for LAN 1 that will be using WAN 1 for internet connection
    - eth4 is used for dialing the WAN/DSL 2 connection (PPPoE Client)
    - eth5 is used for DHCP server for LAN 2 that will be using WAN 2 for internet connection
We don't have the routing rules yet. WAN 1 and WAN 2 will not be shared/load balanced between the two LANs, at least for now. I figured that this setup should not be difficult to setup.

Can anybody help me or give pointers? :D

Thank you in advance.
Last edited by avee on Sun Mar 04, 2012 8:52 am, edited 1 time in total.
 
User avatar
perspetolis
Member Candidate
Member Candidate
Posts: 101
Joined: Tue Aug 02, 2011 9:08 pm
Location: Tehran
Contact:

Re: 2 PPPoE Client Routed to Two Different Networks w/ DHCP

Sat Mar 03, 2012 12:25 pm

hi
you can't run more one dhcp server on one interface.
but if you want to service on ether 5 you can do this:
--------------------------------------------------------
/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=ether2 max-mru=1480 max-mtu=1480 \
mrru=disabled name=pppoe-out1 password=123 profile=default service-name=\
"" use-peer-dns=no user=123

/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=ether4 max-mru=1480 max-mtu=1480 \
mrru=disabled name=pppoe-out2 password=123 profile=default service-name=\
"" use-peer-dns=no user=123

/ip pool
add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether3 lease-time=3d name=dhcp1

/ip pool
add name=dhcp_pool2 ranges=192.168.2.2-192.168.2.254
/ip dhcp-server
add address-pool=dhcp_pool2 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether5 lease-time=3d name=dhcp2

/ip address
add address=192.168.1.1/24 disabled=no interface=ether3 network=192.168.1.0
add address=192.168.2.1/24 disabled=no interface=ether5 network=192.168.2.0

/ip firewall mangle
add action=mark-packet chain=prerouting disabled=no new-packet-routing=LAN1 \
passthrough=yes src-address=192.168.1.0/24
add action=mark-packet chain=prerouting disabled=no new-packet-routing=LAN2 \
passthrough=yes src-address=192.168.2.0/24


/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 \
routing-mark=LAN1 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 \
routing-mark=LAN2 scope=30 target-scope=10
 
avee
just joined
Topic Author
Posts: 4
Joined: Sat Mar 03, 2012 4:50 am

Re: 2 PPPoE Client Routed to Two Different Networks w/ DHCP

Sun Mar 04, 2012 8:54 am

Hi perspetolis! Thanks for your complete post!

Yes actually I want to add the second DHCP server on ether5, fixed my initial post :).

I'm going to try it out on the router right now.

By the way, can a new user like me give karma to other helpful users? :)
 
choulylinh
just joined
Posts: 1
Joined: Wed Sep 26, 2012 4:31 am

Re: 2 PPPoE Client Routed to Two Different Networks w/ DHCP

Fri Apr 19, 2013 12:44 pm

Hi perspetolis,

What version of router are you using? because I have tried your configuration as well with v5.24 but it's not recognized with the command "new-packet-routing"
Anyway, I cannot make router to access to Internet without add default-route of pppoe-out1 or pppoe-out2

Much appreciated if you can clarify.

Who is online

Users browsing this forum: No registered users and 58 guests