Page 1 of 1

mikrotik as a manageable switch

Posted: Sun Mar 03, 2019 9:35 am
by nosharwan
i am a isp i have 300mbps i want to deliver it to my users with live ip world wide access able ip my internet service provider gave me 24 live ips i want to gave it to my users with bound speed like one user want 50mbps with 4 static ips one user need 100mbps with 2 live ips how to configure miktoik to get these setting.

Re: mikrotik as a manageable switch

Posted: Mon Mar 04, 2019 1:53 pm
by Sarel0092
Did you have a specific MikroTik router in mind?

Re: mikrotik as a manageable switch

Posted: Mon Mar 04, 2019 1:59 pm
by nosharwan
I have mikrotik 750 Gr3

Re: mikrotik as a manageable switch

Posted: Mon Mar 04, 2019 3:27 pm
by Sarel0092
You should be able to just bridge the ports and set queues with the bandwidth limits on each interface going to the customers router.

Re: mikrotik as a manageable switch

Posted: Tue Mar 05, 2019 8:07 am
by nosharwan
i want to give them live ips public ips to my customers how its possible to bound interfaces on limited bandwidth i knew the queues to bound speed but i want to give them public ip can you share the configuration?

Re: mikrotik as a manageable switch

Posted: Tue Mar 05, 2019 12:45 pm
by Sarel0092
Your config should look something like this:

Note: Before you can use this config you'll have to reset the router to factory default with no config.

You can use the following command:
system reset-configuration no-defaults=yes skip-backup=yes

Config after resetting the router:
/interface ethernet
set [ find default-name=ether1 ] name=ether1_wan
set [ find default-name=ether2 ] name=ether2_client1
set [ find default-name=ether3 ] name=ether3_client2
set [ find default-name=ether4 ] name=ether4_spare
set [ find default-name=ether5 ] name=ether5_spare
/
/ip neighbor discovery
set [find name ~ "ether"] discover=no
set [find name ~ "sfp"] discover=no
set [find name ~ "wlan"] discover=no
/ip neighbor discovery settings
set default=no
/
/interface bridge
add name=bridge_wan
/interface bridge port
add bridge=bridge_wan interface=ether1_wan
add bridge=bridge_wan interface=ether2_client1
add bridge=bridge_wan interface=ether3_client2
add bridge=bridge_wan interface=ether4_spare
add bridge=bridge_wan interface=ether5_spare
/
# You'll have to add a public IP address on the router.
/ip address
add address=<public ip>/<subnet mask> comment=WAN interface=bridge_wan
/
# DNS servers IP address. Can be Google's DNS server 8.8.8.8
/ip dns
set servers=<dns server ip address>
/
/ip firewall service-port
set dccp disabled=yes
set ftp disabled=yes
set tftp disabled=yes
set h323 disabled=yes
set irc disabled=yes
set pptp disabled=yes
set sctp disabled=yes
set sip disabled=yes
set udplite disabled=yes
/
/ip firewall mangle
add action=mark-connection chain=prerouting in-interface=ether2_client1 new-connection-mark=client1 passthrough=yes
add action=mark-connection chain=postrouting new-connection-mark=client1 out-interface=ether2_client1 passthrough=yes
add action=mark-connection chain=prerouting in-interface=ether3_client2 new-connection-mark=client2 passthrough=yes
add action=mark-connection chain=postrouting new-connection-mark=client2 out-interface=ether3_client2 passthrough=yes
/
/queue simple
add max-limit=50M/50M name=client1_50M target="0.0.0.0/0" packet-marks=client1
add max-limit=100M/100M name=client2_100M target="0.0.0.0/0" packet-marks=client2
/

Re: mikrotik as a manageable switch

Posted: Wed Mar 06, 2019 4:57 pm
by anav

/ip firewall mangle
add action=mark-connection chain=prerouting in-interface=ether2_client1 new-connection-mark=client1 passthrough=yes
add action=mark-connection chain=postrouting new-connection-mark=client1 out-interface=ether2_client1 passthrough=yes
add action=mark-connection chain=prerouting in-interface=ether3_client2 new-connection-mark=client2 passthrough=yes
add action=mark-connection chain=postrouting new-connection-mark=client2 out-interface=ether3_client2 passthrough=yes
....
This is the first time 9(albeit in my very limited experience) that I have seen mangle rules do the following two things.
a. go from mark-connection chain to a subsequent mark connection chain (I guess it must be possible when using passthrough=yes)??
b. use THE SAME new-connection-mark name (client1) in two mangle rules that are both mark connection chain rules ???

Is this legal LOL???
In terms of functionality (words not solution) what is being done to the packets here......... and how is there no conflict??

Re: mikrotik as a manageable switch

Posted: Wed Mar 06, 2019 6:28 pm
by nosharwan
i dont know how to do it but i need script to do this thanks for your posts

Re: mikrotik as a manageable switch

Posted: Mon Apr 15, 2019 9:15 pm
by nosharwan
is there anyone else who help me to configure mikrotik as manageable switch