Community discussions

MikroTik App
 
usbano
just joined
Topic Author
Posts: 5
Joined: Sun Jun 13, 2010 11:47 pm

help for configure BGP filter and prefixes on RB1000

Sun Oct 31, 2010 2:53 pm

Hi,

I would like to get some help to convert this working CIsco configuration, in the corresponding Mikrotik (RouterOS) config.
This configuration establishes a BGP peer with my provider and announce with single static route, the network directly connected to vlan 10 (2.2.2.0)
This BGP configuration is not with the full route table, but use a private ASN only for communication local networks to the provider:

CISCO CONFIGURATION:

interface GigabitEthernet0/1
description LINK point-to-point eBGP to ISP provider
ip address 10.1.1.1 255.255.255.252
!
interface Vlan10
description My_Router_IP
ip address 2.2.2.254 255.255.255.0
!
router bgp 65534
no synchronization
bgp router-id 10.1.1.1
bgp log-neighbor-changes
timers bgp 10 20
redistribute connected route-map BGP-EXPORT
redistribute static route-map BGP-EXPORT
redistribute ospf 1 metric 30 route-map OSPF-TO-BGP
neighbor 10.1.1.2 remote-as 2233
neighbor 10.1.1.2 transport path-mtu-discovery
neighbor 10.1.1.2 description eBGP to Interoute
neighbor 10.1.1.2 soft-reconfiguration inbound
neighbor 10.1.1.2 route-map SET-MED-IN in
neighbor 10.1.1.2 route-map BGP-EXPORT out
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.1.1.2
ip route 2.2.2.0 255.255.255.0 Vlan10
!
ip prefix-list BGP-EXPORT seq 5 deny 0.0.0.0/0
ip prefix-list BGP-EXPORT seq 20 permit 2.2.2.0/24
route-map SET-MED-IN permit 10
set metric 10
!
route-map BGP-EXPORT permit 10
match ip address prefix-list BGP-EXPORT
set metric 10


I have already converted part of the BGP configuration, but I was able to advertise all the networks directly connected without filters.

CONVERTED MIKROTIK CONFIGURATION:

/routing bgp instance
set default as=2233 client-to-client-reflection=yes comment="" disabled=no ignore-as-path-len=no name=default out-filter="" redistribute-connected=yes redistribute-ospf=yes redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes router-id=10.1.1.1 routing-table=""
/routing bgp peer
add address-families=ip allow-as-in=1 as-override=no comment="" default-originate=never disabled=no hold-time=3m in-filter="" instance=default multihop=no name=BGP_TO_ISP nexthop-choice=default out-filter="" passive=no remote-address=10.1.1.2 remote-as=2233 remove-private-as=no route-reflect=no tcp-md5-key="" ttl=default use-bfd=no


Everything works fine until I try to divide (subnetting) the network directly (2.2.2.0), because my ISP claims that this is always announced summarized
I do not understand how to configure RouterOS filters and prefixes BGP to announce only my summarized net (2.2.2.0/24), but allowing to subnetting the network in my router.

Thanks Umberto
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: help for configure BGP filter and prefixes on RB1000

Sun Oct 31, 2010 3:46 pm

# do not distribute routes from your routing table
/routing bgp instance
set default redistribute-connected=no redistribute-ospf=no redistribute-static=no

# advertise only your network
/routing bgp network
add network=2.2.2.0/24 synchronize=no
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: help for configure BGP filter and prefixes on RB1000

Mon Nov 01, 2010 3:39 am

Which, incidentally, is also all that is required in the Cisco config. The static route out the Vlan10 interface is pointless because the network is directly connected. There is no need to redistribute static and connected, a simple "network 2.2.2.0 255.255.255.0" router bgp configuration command is sufficient if you're going to filter with a route map. Even if you want to redistribute doing both static and connected is completely unnecessary. There certainly is no need to apply the route map to the redistribution if you're going to apply it outbound to the neighbor - either prevent the route from being redistributed in the first place (no that you need to redistribute at all, as mentioned previously), or prevent it from being announced to the neighbor. If you only have one neighbor the former is more efficient than the latter.

With only one neighbor setting weights doesn't make sense, either. Particularly given that you have a static default route out and will never use any of the BGP routes the neighbor gives you (unless you've gone completely crazy with administrative distances and aren't showing that part of the configuration).
 
usbano
just joined
Topic Author
Posts: 5
Joined: Sun Jun 13, 2010 11:47 pm

Re: help for configure BGP filter and prefixes on RB1000

Mon Nov 01, 2010 12:17 pm

Yes, confirm. Is sufficient to do not distribute routes from my routing table ans add network=2.2.2.0/24 on bgp networks. All works !!

Thanks!!

Who is online

Users browsing this forum: No registered users and 70 guests