Community discussions

MikroTik App
 
hadjieff508
just joined
Topic Author
Posts: 9
Joined: Wed Jan 17, 2024 7:48 am

Router OS v7

Mon Feb 12, 2024 1:41 pm

Hi,
ether4- internet connection ISP-2 and access servers network.
vlan's- internet connection ISP-1
# RouterOS 7.13.4
# model = CCR2116-12G-4S+

/interface ethernet
set [ find default-name=ether1 ] comment=ISP-1 l2mtu=1598
set [ find default-name=ether2 ] comment=ISP-2 l2mtu=1598
set [ find default-name=ether3 ] comment=Trunk-1 l2mtu=1598
set [ find default-name=ether4 ] comment=Trunk-2 l2mtu=1598
set [ find default-name=ether5 ] comment=Trunk-3 l2mtu=1598
set [ find default-name=ether10 ] comment="Old Network" l2mtu=1598

/interface vlan
add interface=ether3 name="Network1" vlan-id=100
add interface=ether5 name="Network3" vlan-id=102
add interface=ether5 name="Network2" vlan-id=103

/ip pool
add name=Network1 ranges=10.10.10.200-10.10.10.254
add name=LAN-Pool ranges=10.10.12.100-10.10.13.254
add name=Network2 ranges=10.10.9.2-10.10.9.254
add name=Network3 ranges=10.0.0.2-10.0.1.254

/ip dhcp-server
add address-pool=Network1 interface="Network1" lease-time=8h name=Network1
add address-pool=LAN-Pool interface=ether4 lease-time=8h name=LAN-DHCP
add address-pool=Network2 interface="Network2" lease-time=8h name=Network2
add address-pool=Network3 interface="Network3" lease-time=8h name=Network3

/routing table
add disabled=no fib name=ISP-2
add disabled=no fib name=ISP-1

/ip address
add address=172.16.0.4/29 interface=ether1 network=172.16.0.0
add address=172.16.1.4/29 interface=ether2 network=172.16.1.0
add address=10.0.0.1/23 interface="Network3" network=10.0.0.0
add address=10.10.9.1/24 interface="Network2" network=10.10.9.0
add address=10.10.10.1/24 interface="Network1" network=10.10.10.0
add address=10.10.12.1/23 interface=ether4 network=10.10.12.0
add address=192.168.0.253/16 interface=ether11 network=192.168.0.0


/ip dhcp-server network
add address=10.0.0.0/23 dns-server=8.8.8.8,8.8.4.4 gateway=10.0.0.1
add address=10.10.9.0/24 dns-server=192.168.1.105,192.168.1.101,192.168.1.102 gateway=10.10.9.1
add address=10.10.10.0/24 dns-server=192.168.1.105,192.168.1.101,192.168.1.102 gateway=10.10.10.1
add address=10.10.12.0/23 dns-server=192.168.1.105,192.168.1.101,192.168.1.102 gateway=10.10.12.1

/ip dns
set servers=8.8.8.8,8.8.4.4

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether2
add action=masquerade chain=srcnat out-interface=ether1

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.16.1.1 routing-table=ISP-2 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.16.0.1 routing-table=ISP-1 scope=30 target-scope=10
You do not have the required permissions to view the files attached to this post.
 
User avatar
Kanzler
newbie
Posts: 40
Joined: Wed Oct 05, 2022 6:55 pm
Location: Ukraine

Re: Router OS v7

Mon Feb 12, 2024 1:56 pm

And?
 
User avatar
baragoon
Member
Member
Posts: 310
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Router OS v7

Mon Feb 12, 2024 2:18 pm

good job mate :D
 
hadjieff508
just joined
Topic Author
Posts: 9
Joined: Wed Jan 17, 2024 7:48 am

Re: Router OS v7

Mon Feb 12, 2024 3:10 pm

How to add internet access?
 
jaclaz
Long time Member
Long time Member
Posts: 666
Joined: Tue Oct 03, 2023 4:21 pm

Re: Router OS v7

Mon Feb 12, 2024 3:19 pm

How to add internet access?
You seem like having made two (non-main) routing tables, ISP-1 and ISP-2, you then should have some setting to mark traffic to use those tables, something *like*:

/ip firewall mangle
add action=mark-routing chain=prerouting src-address=192.168.1.0/24 new-routing-mark=first
add action=mark-routing chain=prerouting src-address=192.168.2.0/24 new-routing-mark=other
from:
https://help.mikrotik.com/docs/display/ ... ll+Marking
 
hadjieff508
just joined
Topic Author
Posts: 9
Joined: Wed Jan 17, 2024 7:48 am

Re: Router OS v7

Tue Feb 13, 2024 8:59 am

You seem like having made two (non-main) routing tables, ISP-1 and ISP-2, you then should have some setting to mark traffic to use those tables, something *like*:

/ip firewall mangle
add action=mark-routing chain=prerouting src-address=192.168.1.0/24 new-routing-mark=first
add action=mark-routing chain=prerouting src-address=192.168.2.0/24 new-routing-mark=other
from:
https://help.mikrotik.com/docs/display/ ... ll+Marking
[/quote]

After this internet acces worked. But no connection to servers.
chain=prerouting action=mark-routing new-routing-mark=ISP-2 passthrough=yes src-address=10.10.12.0/23 log=no log-prefix=""
 
hadjieff508
just joined
Topic Author
Posts: 9
Joined: Wed Jan 17, 2024 7:48 am

Re: Router OS v7

Tue Feb 13, 2024 10:17 am

and not ping 10.10.12.1

Who is online

Users browsing this forum: Bing [Bot], mongobongo, span and 17 guests