[AusNOG] Preferencing Peering BGP over Transit BGP session on Mikrotik

Andrew Jones aj at jonesy.com.au
Thu Jan 29 10:30:38 EST 2015


Setting next-hop self on routes coming in on your edge is very common, 
and I wouldn't consider it a hack. For many it's better than polluting 
your IGP with all those external networks.

Since Daniel said that he was using eBGP, I had assumed that he is 
running separate AS numbers on his peering and edge routers. As you say, 
iBGP is used between routers in the same AS, while eBGP is used between 
routers in different ASes.

It's worth digging into the differences (I can recommend this book, 
which has really helped me 
http://www.ciscopress.com/store/bgp-design-and-implementation-9781587051098), 
because there are a number, including things like that routers won't 
send routes to iBGP peers that they've learned from other iBGP peers, 
there's an underlying assumption that iBGP peers will be fully meshed 
(or you use route reflectors).

I can recommend this book, which has really helped me:
http://www.ciscopress.com/store/bgp-design-and-implementation-9781587051098


On 29.01.2015 09:37, Joseph Goldman wrote:
> The problem in case others face in future was using 'iBGP' in
> routeros, if the 2 routers are the same AS it assumes each router is
> aware of the next-hop IP. In this case the edge router was expected 
> to
> have a route to the Megaport IP Peering range that is actually known
> on the peering router, by telling the peering router to force itself
> as the next-hop choice on the BGP session to his edge router, it
> allowed the edge router to route the traffic correctly. This is still
> a 'hack-around' to an extent, and this is where a good IGP comes in
> handy to distribute the connected routes, so you dont have to
> 'force-self'. (OSPF usually a winner underneath).
>
>  Given your comments - is there a programmable difference between
> eBGP and iBGP on any platform? I always thought they are simply terms
> to put into context of use, 2 routers BGP peering with the same AS is
> automatically iBGP by context, vs another AS which is eBGP by 
> context.
> I know platforms (such as RouterOS) treat them differently, but there
> is no 'option' to specify eBGP/iBGP behavior.
>
> On 29/01/15 09:23, Damien Gardner Jnr wrote:
>
>> Ahh, I assumed that was a typo, as I knew he was running iBGP ;)
>>
>> On 29 January 2015 at 09:21, Andrew Jones <aj at jonesy.com.au> wrote:
>>
>>> Localpref is non-transitive between ASes, so I'm not sure that this 
>>> would work if Daniel is using eBGP between his peering and edge 
>>> routers.
>>> Daniel,
>>> Is there a reason you're running eBGP between your peering and edge 
>>> routers, rather than iBGP?
>>>
>>> On 29.01.2015 08:25, Damien Gardner Jnr wrote:
>>>
>>>> Just modify the input filter for the peering session on your 
>>>> peering
>>>> router to increase the localpref of the received prefixes (BGP 
>>>> Actions
>>>> - >Set BGP Local Pref - set it to something higher than what 
>>>> you're
>>>> setting for transit, but lower than what you are setting for 
>>>> prefixes
>>>> received from your customers). As long as you're not modifying the
>>>> localpref of prefixes received from the peering router on your 
>>>> edge
>>>> router, then it'll accept that, and you'll see traffic go to 
>>>> peering
>>>> rather than transit. 
>>>>
>>>> On 29 January 2015 at 08:21, Daniel <daniel at dwatson.me> wrote:
>>>>
>>>>> Hi Guys
>>>>>
>>>>> As some people on-list may be aware ive switched from Vyatta/VyOS 
>>>>> to
>>>>> Mikrotik as its much easier for me to manage then all the issues 
>>>>> i
>>>>> previously had with Vyatta/VyOS,
>>>>>
>>>>> Since switching across to Mikrotik ive not had any issues what so 
>>>>> ever
>>>>> except until now,
>>>>>
>>>>> We have MegaPort terminated to our peering router, in which I 
>>>>> have a ebgp
>>>>> session configured between the peering router and our edge 
>>>>> router,
>>>>>
>>>>> However when i traceroute 8.8.8.8 it still seems to be going over 
>>>>> transit
>>>>> than peering,
>>>>>
>>>>> I was wondering if somebody on-list whom might have 10 - 
>>>>> 15minutes spare
>>>>> could give me a hand to resolve this issue?
>>>>>
>>>>> Please let me know and ill be more then happy to provide further
>>>>> information on request.
>>>>>
>>>>> TIA
>>>>>
>>>>> Daniel
>>>>>
>>>>> _______________________________________________
>>>>> AusNOG mailing list
>>>>> AusNOG at lists.ausnog.net
>>>>> http://lists.ausnog.net/mailman/listinfo/ausnog [1] [1]
>>>>
>>>> --
>>>>
>>>> Damien Gardner Jnr
>>>> VK2TDG. Dip EE. GradIEAust
>>>> rendrag at rendrag.net -  http://www.rendrag.net/ [2] [2]
>>>> --
>>>> We rode on the winds of the rising storm,
>>>>  We ran to the sounds of thunder.
>>>> We danced among the lightning bolts,
>>>>  and tore the world asunder
>>>>
>>>> Links:
>>>> ------
>>>> [1] http://lists.ausnog.net/mailman/listinfo/ausnog [1]
>>>> [2] http://www.rendrag.net/ [2]
>>>>
>>>> _______________________________________________
>>>> AusNOG mailing list
>>>> AusNOG at lists.ausnog.net
>>>> http://lists.ausnog.net/mailman/listinfo/ausnog [1]
>>>
>>> _______________________________________________
>>> AusNOG mailing list
>>> AusNOG at lists.ausnog.net
>>> http://lists.ausnog.net/mailman/listinfo/ausnog [1]
>>
>> --
>>
>> Damien Gardner Jnr
>> VK2TDG. Dip EE. GradIEAust
>> rendrag at rendrag.net -  http://www.rendrag.net/ [2]
>> --
>> We rode on the winds of the rising storm,
>>  We ran to the sounds of thunder.
>> We danced among the lightning bolts,
>>  and tore the world asunder
>>
>> _______________________________________________
>> AusNOG mailing list
>> AusNOG at lists.ausnog.net
>> http://lists.ausnog.net/mailman/listinfo/ausnog [1]
>
>
>
> Links:
> ------
> [1] http://lists.ausnog.net/mailman/listinfo/ausnog
> [2] http://www.rendrag.net/
>
> _______________________________________________
> AusNOG mailing list
> AusNOG at lists.ausnog.net
> http://lists.ausnog.net/mailman/listinfo/ausnog



More information about the AusNOG mailing list