Community discussions

MikroTik App
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

BGP peer not picking up my routes

Tue Oct 15, 2013 3:56 pm

Hi Guys,
Only recently I have acquired my /22 from Ripe and have been assigned my AS number also.

I have a BGP session established with my upstream provider, and I have ospf running between my BGP router (1200) and a remote router (2011).
On the 2011, I created a bridge and put a public ip on it, 185.xx.xx.1/30. I can ping this IP now from anywhere on my network.
But outside of my network I can not and my provider is not picking up my routes either.
Under BGP networks I put in 185.xx.xx.0/22.
Under BGP instances I put in redistribute ospf
Under BGP advertisements I can see the 185.xx.xx.0/30 coming up. I can also see the private range...is this right?

I have tried everything but can not get these routes out. What else should I be doing?
 
User avatar
webpagetech
newbie
Posts: 42
Joined: Fri Mar 01, 2013 8:42 pm
Location: TX, United States
Contact:

Re: BGP peer not picking up my routes

Tue Oct 15, 2013 5:21 pm

You want to make sure that you are advertising your public subnet(s) and that is it.

In /routing filter you need to make sure that your BGP out chain accepts your public subnet(s) and drops all other subnets.
/routing filter
add action=accept chain=ISP1_Out prefix=185.xx.xx.0/22
add action=discard chain=ISP1_Out prefix=0.0.0.0/0 prefix-length=0-32
add action=discard chain=ospf-out prefix=185.xx.xx.0/30
"/routing bgp advertisements print" will show you what you are advertising to you provider. You should only see your public subnet(s) advertised to your provider.

note: you should probable add filtering on the BGP-in chain as well depending on what you want your provider to share with you.
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Tue Oct 15, 2013 5:40 pm

Ok I have populated the routing/filter rules exactly as you said. Nothing has changed.
But under routing bgp advertisements I can see all my privates, but no publics.
 
User avatar
webpagetech
newbie
Posts: 42
Joined: Fri Mar 01, 2013 8:42 pm
Location: TX, United States
Contact:

Re: BGP peer not picking up my routes

Tue Oct 15, 2013 8:00 pm

OK, If you privates are still being advertised then the filters are not working quite yet.

We need to know what your filter chains are called. In /routing bgp peer, what are the in and out filters? ... /routing bgp peer export
also in /routing ospf instances there are the other in and out filters that are in question. /routing ospf instance export

what the current advertisements? "/routing bgp advertisements print" Is it all your ospf private subnets that are being advertised and no public's at all or?

Also are you sure your upstream provider is accepting your public subnet(s) in there filter?

Wait... the 185.xx.xx.0/30 is the gateway to your upstream provider right? not the /30 on your internal network...
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Tue Oct 15, 2013 11:32 pm

I have nothing set up in in/out filters at all. Never came across anything in the wiki about that.

My current advertisements show all the privates I am using between both routers and subnets connected to those routers also all accept my publics, 185.xx.xx.0/22

My gateway to my upstream is not anything in 185.xx.xx.0/22, but rather their own ips.
 
User avatar
webpagetech
newbie
Posts: 42
Joined: Fri Mar 01, 2013 8:42 pm
Location: TX, United States
Contact:

Re: BGP peer not picking up my routes

Wed Oct 16, 2013 11:30 pm

you should only be concerned with your barrier router and the /30 that you share with your provider on that router. I believe this is your rb1200. It is the one that connects to your provider right?

You need to figure out what chains you need to be working with here. You need to find the outgoing bgp chain that I referenced as ISP1_Out above.

On our outgoing BGP chain you need only two rules.
first accept your /22.
then drop all other routes.

This is because your provider only cares what public networks you have.

The only other thing you should need to do is make sure that your OSPF is not sharing internal routes over you bgp session. This is the third rule from above.

on the ospf-out chain you need to discard everything across the /30 that you share with your provider. (the /30 that the bgp session is on)

To find wich chains you are using for your ospf and bgp out you can run...
We need to know what your filter chains are called. In /routing bgp peer, what are the in and out filters? ... /routing bgp peer export
also in /routing ospf instances there are the other in and out filters that are in question. /routing ospf instance export
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Wed Oct 16, 2013 11:35 pm

I don't have any filters set up :?
I have not a clue about filters......
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Wed Oct 16, 2013 11:40 pm

Is this any help?


/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 \
    in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
    metric-other-ospf=auto metric-rip=20 metric-static=20 name=default \
    out-filter=ospf-out redistribute-bgp=no redistribute-connected=as-type-1 \
    redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
    router-id=0.0.0.0
/routing bgp instance
set default as=xxx174 client-to-client-reflection=yes disabled=no \
    ignore-as-path-len=no name=default out-filter="" redistribute-connected=yes \
    redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
    redistribute-static=no router-id=87.xxx.xxx.18 routing-table=""
 
User avatar
webpagetech
newbie
Posts: 42
Joined: Fri Mar 01, 2013 8:42 pm
Location: TX, United States
Contact:

Re: BGP peer not picking up my routes

Fri Oct 18, 2013 10:00 pm

Is this any help?
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 \
    in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
    metric-other-ospf=auto metric-rip=20 metric-static=20 name=default \
    out-filter=ospf-out redistribute-bgp=no redistribute-connected=as-type-1 \
    redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
    router-id=0.0.0.0
Yep, So you have the default OSPF chains...

in-filter=ospf-in
and...
out-filter=ospf-out
/routing bgp instance
set default as=xxx174 client-to-client-reflection=yes disabled=no \
ignore-as-path-len=no name=default out-filter="" redistribute-connected=yes \
redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
redistribute-static=no router-id=87.xxx.xxx.18 routing-table=""
change
redistribute-connected=yes
to
redistribute-connected=no

We don't want to redistribute all the connected routes on the router because you might have some private addresses on the router at some point. As long as you have your public /22 in your bgp networks then we should be able to use the routing filters to advertise just your public /22 to your provider.


The bgp chains we are interested in are in BGP peers.
It will look like this
/routing bgp peer
add in-filter=<name of the in filter to be used in /routing filter for this peer> name="<providers name>" \
    out-filter=<name of the out filter to be used in /routing filter for this peer> remote-address=<peers IP>\
    remote-as=<your peers as number> ttl=default update-source=<interface name>
Try to set up your filters as follows. For now we will just go though your out filters because that is what is necessary for your provider to recognize your public subnet.
/routing filter
add action=accept chain=<the out filter in bgp peer> prefix=<your public /22>
add action=discard chain=<the out filter in bgp peer> prefix=0.0.0.0/0 prefix-length=0-32
add action=discard chain=ospf-out prefix=<the /30 that you share with your provider... it is the /30 that the remote-address of your bgp peer is within >
Then run...
/routing bgp advertisements pr 
Hopefully the only thing that you will see advertised is your public /22.
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Sun Oct 20, 2013 1:18 am

ok I have followed all that and this is now what I am getting.......

PEER     PREFIX               NEXTHOP          AS-PATH      ORIGIN     LOCAL-PREF
to Ma... 185.xx.xx.0/22       87.xxx.xxx.18                 igp 
Does this look ok?
 
samsung172
Forum Guru
Forum Guru
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: BGP peer not picking up my routes

Sun Oct 20, 2013 2:57 am

Yep.
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Sun Oct 20, 2013 12:12 pm

Yep.
I have tried to ping and winbox into the public ip I have given to the remote router but am unable to establish a connection.
using the online traceroute to trace the ip does not know where to go.

Should the AS-PATH area not be populated under advertisements?

Could it be possible my isp is not advertising my /22 correctly?
 
samsung172
Forum Guru
Forum Guru
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: BGP peer not picking up my routes

Sun Oct 20, 2013 2:33 pm

Well. is the setup in RIPE database etc correct? Does the worl know about your your AS?
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Sun Oct 20, 2013 7:48 pm

Well. is the setup in RIPE database etc correct? Does the worl know about your your AS?

just done a quick BGP search on our AS number and this is what came back...





Prefixes Originated (all): 0
Prefixes Originated (v4): 0
Prefixes Originated (v6): 0


Prefixes Announced (all): 0
Prefixes Announced (v4): 0
Prefixes Announced (v6): 0




BGP Peers Observed (all): 0
BGP Peers Observed (v4): 0
BGP Peers Observed (v6): 0


IPs Originated (v4): 0
AS Paths Observed (v4): 0
AS Paths Observed (v6): 0




Average AS Path Length (all): 0.000
Average AS Path Length (v4): 0.000
Average AS Path Length (v6): 0.000

it knows our as number, but I don't like all those 0's.
 
samsung172
Forum Guru
Forum Guru
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: BGP peer not picking up my routes

Mon Oct 21, 2013 1:04 am

Du you have a setup like:

aut-num: AS31018
as-name: VikenKomTek
descr: Viken KomTek AS
org: ORG-VKA6-RIPE
import: from AS41572 accept ANY
import: from AS2116 accept ANY
export: to AS41572 announce ANY
export: to AS2116 announce ANY
admin-c: TA3394-RIPE
tech-c: TA3394-RIPE
mnt-by: RIPE-NCC-END-MNT
mnt-by: MNT-WISP24
mnt-routes: MNT-WISP24
 
Bigpaddy_irl
newbie
Topic Author
Posts: 34
Joined: Sat Jan 14, 2006 12:40 pm
Location: ireland

Re: BGP peer not picking up my routes

Wed Oct 23, 2013 12:20 am

hi Guys,
I have this working now. problem turned out to be our ISP no announcing our IP's globally.

Thanks for all your help.

Who is online

Users browsing this forum: Reaper32 and 19 guests