Sunday, October 1, 2017

Mikrotik Users Base Routing (PPPoE Users)

10 comments
/ip address
add address=192.168.1.10/24 interface=ether1 network=192.168.1.0
add address=192.168.2.10/24 interface=ether2 network=192.168.2.0
add address=10.10.0.1/24 interface=ether5 network=10.10.0.0
/ip dns
set servers=8.8.8.8,8.8.8.4.4

/ip pool
add name=ISP-1 ranges=172.16.1.1-172.16.1.254
add name=ISP-2 ranges=172.16.2.1-172.16.2.254

/ip firewall address-list
add address=172.16.1.0/24 list=ISP-1
add address=172.16.2.0/24 list=ISP-2
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=isp1routing \
    passthrough=no src-address-list=ISP-1
add action=mark-routing chain=prerouting new-routing-mark=isp2routing \
    passthrough=no src-address-list=ISP-2

/ip route
add comment="ISP-1 Routing" distance=1 gateway=192.168.1.1 routing-mark=\
    isp1routing
add comment="ISP-2 Routing" distance=1 gateway=192.168.2.1 routing-mark=\
    isp2routing

/interface pppoe-server server
add authentication=pap,chap disabled=no interface=ether5 one-session-per-host=\
    yes service-name=service1

/ppp profile
add local-address=10.10.0.1 name=2/2MbISP-2 only-one=yes rate-limit=2M/2M \
    remote-address=ISP-2
add local-address=10.10.0.1 name=2/2MbISP-1 only-one=yes rate-limit=2M/2M \
    remote-address=ISP-1