Community discussions

MikroTik App
 
CristianD
just joined
Topic Author
Posts: 18
Joined: Tue Dec 15, 2020 9:48 am

Vyos to Mikrotik v7 Help ?

Thu Jan 19, 2023 10:06 pm

Hello Guys,

I was using Vyos for the last 3-4 years and now i whant to migrate to Mikrotik.
I buyet an CCR2116-12G-4S+ and i configure it tha way i read on website..etc Mikrotik Wiki dont get nothink, no propa examples like on Vyos Documentation or Cisco, is like missing examples.

My first time i setup an Vyos server in 30 minutes, and was my first time dealing with BGP, was complet easy to setup, but in Mikrotik is complicated :) even commands, and some terms i dont understand. On the mikrotik i have 2 days now :) still figure out if is ok or not.

I`m not a pro, i`m complet Beginner so please dont judge. I know sompting i miss

This is my Mikrotik configuration, at this moment 1 ISP is ok to figure out after i manage to make secand one.
ISP1 - SFP+ 1 = My Main ISP With 2 Vlans, they provide 3 BGP Sessions
Switch - SFP+ 3 = Is my CRS354-48G-4S+2Q+ RouterOS v6.48 Switch
XXX11 = My AS Number
XXX.34.24.0/23 = Is my /23 Public ips from Ripe.
# jan/19/2023 21:42:48 by RouterOS 7.7
# software id = ZZRB-LW7Y
#
# model = CCR2116-12G-4S+
# serial number = HDJ08QXXXXX
/interface ethernet
set [ find default-name=sfp-sfpplus1 ] name="ISP1 - SFP+ 1"
set [ find default-name=ether1 ] disabled=yes name="ISP2 - Port 1"
set [ find default-name=sfp-sfpplus3 ] name="Switch - SFP+ 3"
set [ find default-name=ether2 ] disabled=yes
set [ find default-name=ether3 ] disabled=yes
set [ find default-name=ether4 ] disabled=yes
set [ find default-name=ether5 ] disabled=yes
set [ find default-name=ether6 ] disabled=yes
set [ find default-name=ether7 ] disabled=yes
set [ find default-name=ether8 ] disabled=yes
set [ find default-name=ether9 ] disabled=yes
set [ find default-name=ether10 ] disabled=yes
set [ find default-name=ether11 ] disabled=yes
set [ find default-name=sfp-sfpplus2 ] disabled=yes name=sfpplus2
set [ find default-name=sfp-sfpplus4 ] disabled=yes name=sfpplus4
/interface vlan
add interface="ISP1 - SFP+ 1" name="ISP1 - Vlan 2138" vlan-id=2138
add interface="ISP1 - SFP+ 1" name="ISP1 - Vlan 2139" vlan-id=2139
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/port
set 0 name=serial0
/routing bgp template
add as=XXX11 disabled=no name=ROUTER routing-table=main
/interface list member
add comment=ISP2 interface="ISP2 - Port 1" list=WAN
add comment=ISP1 interface="ISP1 - SFP+ 1" list=WAN
/ip address
add address=192.168.100.100/24 comment=defconf interface=ether13 network=192.168.100.0
add address=192.168.3.171/24 interface=ether12 network=192.168.3.0
add address=XXX.18.2.98/30 interface="ISP1 - Vlan 2138" network=XXX.18.2.96
add address=XXX.18.2.102/30 interface="ISP1 - Vlan 2139" network=XXX.18.2.100
add address=XXX.34.24.1/23 interface="Switch - SFP+ 3" network=XXX.34.24.0

/ip dns
set servers=8.8.8.8
/ip service
set telnet disabled=yes
set ftp disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/routing bgp connection
add as=XXX11 connect=yes disabled=no input.filter=in listen=yes local.address=XXX.18.2.98 .role=ebgp name="ISP1 1" output.filter-chain=\
    out remote.address=XXX.18.2.97 .as=XXX3 routing-table=main templates=ROUTER
add as=XXX11 connect=yes disabled=no input.filter=in listen=yes local.address=XXX.18.2.102 .role=ebgp name="ISP1 2" \
    output.filter-chain=out remote.address=XXX.18.2.101 .as=XXX3 routing-table=main templates=ROUTER
add as=XXX11 connect=yes disabled=no listen=yes local.address=XXX.18.2.98 .role=ebgp name="ISP1 - Global" output.filter-chain=out \
    remote.address=XX .as=XXX3 routing-table=main templates=ROUTER
/routing filter rule
add chain=in disabled=no rule="if ( afi ipv4 && dst in 0.0.0.0/0 ) { accept }"
add chain=out disabled=no rule="if ( afi ipv4 && dst in XXX.34.24.0/23 ) { accept }"

set name="Router 1"
and this is my Vyos config.
vyos@router.100:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth3             -                                 u/u
eth3.2138        XXX.18.2.98/30                    u/u  ISP1
eth3.2139        XXX.18.2.102/30                   u/u  ISP1
---------
eth5          XX.34.24.1/23                    u/u  Port > Switch
---------


set interfaces ethernet eth3 hw-id 'b8:ac:6f:14:c2:1c'
set interfaces ethernet eth3 vif 2138 address 'XXX.18.2.98/30'
set interfaces ethernet eth3 vif 2138 description 'ISP1'
set interfaces ethernet eth3 vif 2139 address 'XXX.18.2.102/30'
set interfaces ethernet eth3 vif 2139 description 'ISP1'

set interfaces ethernet eth5 address 'XXX.34.24.1/23'
set interfaces ethernet eth5 description 'Port > Switch'

set interfaces loopback lo

set policy prefix-list IPv4-ISP1-OUT rule 140 action 'permit'
set policy prefix-list IPv4-ISP1-OUT rule 140 prefix 'XX.34.24.0/23'
set policy route-map EXPORT
set policy route-map IPv4-NET-ISP1 rule 140 action 'permit'
set policy route-map IPv4-NET-ISP1 rule 140 match ip address prefix-list 'IPv4-ISP1-OUT'

set protocols bgp address-family ipv4-unicast network XXX.34.24.0/23
set protocols bgp local-as 'XXX11'

set protocols bgp neighbor XXX.18.2.97 address-family ipv4-unicast route-map export 'IPv4-NET-ISP1'
set protocols bgp neighbor XXX.18.2.97 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor XXX.18.2.97 address-family ipv4-unicast weight '150'
set protocols bgp neighbor XXX.18.2.97 description 'ISP1 1'
set protocols bgp neighbor XXX.18.2.97 remote-as 'XXX3'
set protocols bgp neighbor XXX.18.2.97 update-source 'XXX.18.2.98'
set protocols bgp neighbor XXX.18.2.101 address-family ipv4-unicast route-map export 'IPv4-NET-ISP1'
set protocols bgp neighbor XXX.18.2.101 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor XXX.18.2.101 address-family ipv4-unicast weight '200'
set protocols bgp neighbor XXX.18.2.101 description 'ISP1 2'
set protocols bgp neighbor XXX.18.2.101 remote-as 'XXX3'
set protocols bgp neighbor XXX.18.2.101 update-source 'XXX.18.2.102'
set protocols bgp neighbor XXX.230.200.12 address-family ipv4-unicast route-map export 'IPv4-NET-ISP1'
set protocols bgp neighbor XXX.230.200.12 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor XXX.230.200.12 address-family ipv4-unicast weight '50'
set protocols bgp neighbor XXX.230.200.12 description 'ISP1 International'
set protocols bgp neighbor XXX.230.200.12 ebgp-multihop '255'
set protocols bgp neighbor XXX.230.200.12 remote-as 'XXX3'
set protocols bgp neighbor XXX.230.200.12 update-source 'XXX.18.2.98'
set protocols ospf area 0 network 'XXX.34.24.0/23'
set protocols static route XXX.230.200.12/32 next-hop XXX.18.2.97
set protocols ospf area 0.0.0.0 area-type normal
set protocols static route XXX.34.24.0/23 blackhole distance '254'
Thank you and i hope someone can give me a hand
 
CristianD
just joined
Topic Author
Posts: 18
Joined: Tue Dec 15, 2020 9:48 am

Re: Vyos to Mikrotik v7 Help ?

Fri Jan 20, 2023 11:16 am

I manage to make it connects to ISP and BGP sessions, the think is i dont understand why i have Prefix Count 0 on the sessions, traffic works all ok but 0 prefix shows on the router

And i dont fiind how to make this on mikrotik.

set protocols static route XXX.230.200.12/32 next-hop XXX.18.2.97

Who is online

Users browsing this forum: Amazon [Bot], derolf, GoogleOther [Bot] and 33 guests