i am very new to mikrotik and networking stuff, i followed a tutorial on youtube for the initial setup it works great.
now the issue that i have is that the ip address 172.127.100.100 is only accessible via pppoe_provider_1
sometimes connecting to 172.127.100.100 gives a network timeout which is probably due to packet being routed through pppoe_provider_2 ?
so i need some help in configuring the router so that when any user on LAN port tries to access 172.127.100.100, connection will always go through pppoe_provider_1
here is the current configuration
Code: Select all
/interface ethernet
set [ find default-name=ether1 ] name=ether1-WAN1
set [ find default-name=ether2 ] mac-address=B0:A7:B9:C8:31:A9 name= ether2-WAN2
set [ find default-name=ether3 ] name=ether3-LAN
/interface pppoe-client
add disabled=no interface=ether1-WAN1 name=pppoe_provider_1 password=123456 user=siple@home
add disabled=no interface=ether2-WAN2 name=pppoe_provider_2 password=123456 user=arba1@fse.com
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip kid-control
add name=kid1
/ip pool
add name=dhcp_pool0 ranges=192.168.5.2-192.168.5.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether3-LAN name=dhcp1
/ip address
add address=192.168.5.1/24 interface=ether3-LAN network=192.168.5.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether3-LAN
/ip dhcp-server network
add address=192.168.5.0/24 dns-server=8.8.8.8 gateway=192.168.5.1
/ip dns
set servers=8.8.8.8
/ip firewall filter
add action=log chain=forward connection-state=new dst-port=80,443 log-prefix= WebRequests protocol=tcp src-port=""
/ip firewall mangle
add action=accept chain=prerouting in-interface=pppoe_provider_1
add action=accept chain=prerouting in-interface=pppoe_provider_2
add action=mark-connection chain=prerouting dst-address-type=!local new-connection-mark=wan1_conn passthrough=yes per-connection-classifier= both-addresses-and-ports:2/0 src-address=192.168.5.0/24
add action=mark-connection chain=prerouting dst-address-type=!local new-connection-mark=wan2_conn passthrough=yes per-connection-classifier= both-addresses-and-ports:2/1 src-address=192.168.5.0/24
add action=mark-routing chain=prerouting connection-mark=wan1_conn new-routing-mark=to_wan1 passthrough=yes src-address=192.168.5.0/24
add action=mark-routing chain=prerouting connection-mark=wan2_conn new-routing-mark=to_wan2 passthrough=yes src-address=192.168.5.0/24
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe_provider_1 src-address=192.168.5.0/24
add action=masquerade chain=srcnat dst-address-type="" out-interface= pppoe_provider_2 src-address=192.168.5.0/24 src-address-type=""
/ip route
add check-gateway=ping distance=1 gateway=pppoe_provider_1 routing-mark= to_wan1
add check-gateway=ping distance=1 gateway=pppoe_provider_2 routing-mark= to_wan2
add check-gateway=ping distance=1 gateway=pppoe_provider_2
add check-gateway=ping distance=2 gateway=pppoe_provider_1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-autodetect=no
/system clock manual
set time-zone=+06:00
/system logging
add topics=pppoe
add topics=firewall
/tool graphing interface
add allow-address=192.168.5.0/24 interface=ether1-WAN1
add allow-address=192.168.5.0/24 interface=ether2-WAN2
/tool netwatch
add
/tool traffic-monitor
add interface=ether1-WAN1 name=tmon1 traffic=received
thanks in advance.