I've setup BGP in RouterOS v6 like this:
Code: Select all
/routing bgp instance set default as=64999 ignore-as-path-len=yes router-id=10.9.0.10/32
/routing bgp peer add hold-time=4m in-filter=bgp_in keepalive-time=1m multihop=yes name=antifilter remote-address=10.9.0.1/32 remote-as=64998 ttl=default
/routing filter add action=accept chain=bgp_in comment="Set nexthop to VPN" set-in-nexthop-direct=*12
Current config is:
Code: Select all
/routing bgp template
set default as=64999 disabled=yes input.ignore-as-path-len=yes name=default output.filter-chain=dynamic-in .network=bgp-networks .no-client-to-client-reflection=yes router-id=\
172.30.1.2
add as=64999 disabled=no input.ignore-as-path-len=yes name=my output.network=bgp-networks router-id=10.9.0.10 routing-table=main
/routing ospf instance
add name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/routing table
add fib name=HTTP
add fib name=DNS
add fib name=DNS-Router
/routing bgp connection
add cisco-vpls-nlri-len-fmt=auto-bits connect=yes disabled=yes hold-time=4m input.filter=bgp_in keepalive-time=600ms listen=yes local.role=ebgp multihop=yes name=antifilter \
remote.address=163.172.210.8 .as=65432 .port=179 routing-table=main templates=default
add as=64999 cisco-vpls-nlri-len-fmt=auto-bits connect=yes disabled=no hold-time=4m input.filter=bgp_in .ignore-as-path-len=yes listen=yes local.role=ebgp multihop=yes name=VPS \
output.network=bgp-networks remote.address=10.9.0.1/32 .as=64998 .port=179 router-id=10.9.0.10 routing-table=main templates=my
/routing filter rule
add chain=bgp_in comment="Set nexthop" disabled=no rule="if (protocol bgp) { set gw-interface *12; accept; }"