Community discussions

MikroTik App
 
dhvu1990
just joined
Topic Author
Posts: 7
Joined: Fri Jan 04, 2019 6:03 am

Config 8 IP Route of ISP

Sun Jan 06, 2019 6:06 am

Hello everyone,
This is my example topo, Load balancing 2 Wan and 1 Bridge Lan. I had config already to work ok.
Image
This is my example config:
/interface bridge
add comment=LAN name=bridge1-LAN
/interface ethernet
set [ find default-name=ether1 ] comment=WAN1-7Mbps speed=100Mbps
set [ find default-name=ether2 ] comment=WAN2-3Mbps speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
set [ find default-name=ether4 ] speed=100Mbps
set [ find default-name=ether5 ] comment=bridge1-LAN speed=100Mbps
set [ find default-name=ether6 ] comment=bridge1-LAN speed=100Mbps
set [ find default-name=ether7 ] speed=100Mbps
set [ find default-name=ether8 ] speed=100Mbps
set [ find default-name=ether9 ] speed=100Mbps
set [ find default-name=ether10 ] speed=100Mbps
set [ find default-name=ether11 ] comment=Manage speed=100Mbps
set [ find default-name=ether12 ] speed=100Mbps
set [ find default-name=sfp1 ] advertise=10M-full,100M-full,1000M-full
set [ find default-name=sfp2 ] advertise=10M-full,100M-full,1000M-full
set [ find default-name=sfp3 ] advertise=10M-full,100M-full,1000M-full
set [ find default-name=sfp4 ] advertise=10M-full,100M-full,1000M-full
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.88.2-192.168.88.254
add name=dhcp_pool1 ranges=192.168.50.2-192.168.50.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether11 lease-time=1h name=\
    dhcp1
add address-pool=dhcp_pool1 disabled=no interface=bridge1-LAN lease-time=12h \
    name=dhcp2
/interface bridge port
add bridge=bridge1-LAN hw=no interface=ether5
add bridge=bridge1-LAN hw=no interface=ether6
/ip address
add address=192.168.88.1/24 comment=defconf interface=ether11 network=\
    192.168.88.0
add address=1.1.1.2/30 interface=ether1 network=1.1.1.0
add address=192.168.0.2/24 interface=ether2 network=192.168.0.0
add address=192.168.50.1/24 interface=bridge1-LAN network=192.168.50.0
/ip dhcp-server network
add address=192.168.50.0/24 gateway=192.168.50.1
add address=192.168.88.0/24 dns-server=192.168.88.1,8.8.8.8 gateway=\
    192.168.88.1
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark \
    dst-address-type=!local in-interface=bridge1-LAN new-connection-mark=\
    mark01 passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark \
    dst-address-type=!local in-interface=bridge1-LAN new-connection-mark=\
    mark02 passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:2/1
add action=mark-connection chain=prerouting connection-mark=no-mark \
    in-interface=ether1 new-connection-mark=mark01 passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
    in-interface=ether2 new-connection-mark=mark02 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=mark01 in-interface=\
    bridge1-LAN new-routing-mark=route01 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=mark02 in-interface=\
    bridge1-LAN new-routing-mark=route02 passthrough=yes
add action=mark-routing chain=output connection-mark=mark01 new-routing-mark=\
    route01 passthrough=yes
add action=mark-routing chain=output connection-mark=mark02 new-routing-mark=\
    route02 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether2
/ip route
add check-gateway=ping distance=5 gateway=1.1.1.1 routing-mark=route01
add check-gateway=ping distance=5 gateway=192.168.0.1 routing-mark=route02
add check-gateway=ping distance=5 gateway=1.1.1.1
add check-gateway=ping distance=10 gateway=192.168.0.1
It had worked ok.
And now, I want to use 2 Block IP Route of ISP to config the Servers.
I don't know how to config. Please help me! Thank a lot.
Image
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Config 8 IP Route of ISP

Sun Jan 06, 2019 2:40 pm

hey

What do you mean by "And now, I want to use 2 Block IP Route of ISP to config the Servers." ?
 
dhvu1990
just joined
Topic Author
Posts: 7
Joined: Fri Jan 04, 2019 6:03 am

Re: Config 8 IP Route of ISP

Sun Jan 06, 2019 3:11 pm

It means I want to config my servers use those IPs, and I don't know how to do :)
 
krasi9220
newbie
Posts: 29
Joined: Sat Feb 19, 2011 5:45 pm

Re: Config 8 IP Route of ISP

Sat Jan 12, 2019 7:32 am

I think one idea is you can create two bridges. The first one will be interface ether1 and the interface where is server1. The second bridge is ether2 and the interface where is server2. The same is for server3.
Another idea is use vlans - tag anad untagg.

Who is online

Users browsing this forum: miks and 42 guests