Dear all,
Pls suggest me how to do conditional bgp with 2 instances and 2 peer in single Rb1000.
My setup
i have x.x.x.x/22 ip pool .
x.x.x.x/24 - upload/download through peer1
y.y.y.y/24 - upload/download through peer2
(of course, when peer1 go down, traffic must go through peer2)
i m receiving default route from all the peers. I m able to advertise ip pool on desired
peer and download is coming from same peer but i m unable to upload the traffic to desired peer where i adversied the pool.
How can i run BGP with single router with default route from peer and handle
upload/download.
Thanx
Chupaka
September 24, 2009, 11:37am
2
upload? you should use policy routing on your side - bgp has nothing to do with upload.
for example, just create two routing tables with default routes of each uplink, then something like
/ip route rules
add src-address=x.x.x.x/24 action=lookup table=uplink1
add src-address=x.x.x.x/24 action=lookup table=uplink2
add src-address=y.y.y.y/24 action=lookup table=uplink1
add src-address=y.y.y.y/24 action=lookup table=uplink2
now x.x.x.x will go through uplink1, y.y.y.y - uplink2. if one of uplinks will fail, traffic will be routed through another one
Thanx Mr. Chupaka for reply
But when i add these rules to RB1000 it become red(invalid)
I have allthe live ip’s to my customer and how can i create routing mark.
Chupaka
September 29, 2009, 8:20am
4
do you have ‘uplink1’ and ‘uplink2’ routing tables? they should contain default routes to corresponding providers
I have tow static route set for both the peer. but i am getting two default routes from my peers. i have only main routing table. i m using RouterOSv 3.22
Following are my filter routes for BGP
0 chain=ISP1IN prefix=xx.xx.xx.0/22 prefix-length=22-32 invert-match=yes action=discard
1 chain=ISP2IN prefix=xx.xx.xx.0/22 prefix-length=22-32 invert-match=yes action=discard
2 chain=ISP2OUT prefix=xx.xx.x0.0/24 invert-match=no action=reject set-in-nexthop=ISP2
3 chain=ISP1OUT prefix=xx.xx.x0.0/24 invert-match=no action=accept set-out-nexthop=ISP1
4 chain=ISP2OUT prefix=xx.xx.x1.0/24 invert-match=no action=accept set-in-nexthop=ISP2
5 chain=ISP1OUT prefix=xx.xx.x1.0/24 invert-match=no action=reject set-out-nexthop=ISP1
6 chain=ISP1OUT prefix=xx.xx.x2.0/24 invert-match=no action=reject set-out-nexthop=ISP1
7 chain=ISP2OUT prefix=xx.xx.x2.0/24 invert-match=no action=accept set-out-nexthop=ISP2
8 chain=ISP2OUT prefix=xx.xx.x3.0/24 invert-match=no action=reject set-out-nexthop=ISP2
9 chain=ISP1OUT prefix=xx.xx.x3.0/24 invert-match=no action=accept set-in-nexthop=ISP1
with default route :-
0 A S 0.0.0.0/0 reachable ISP1 1 ether1
reachable ISP2 ether2
I m unable to add route rule table in RB1000.
Plz help .
Thanx
Chupaka
September 30, 2009, 8:36am
6
just add two static default routes for each provider with routing marks ‘uplink1’ and ‘uplink2’ respectively
that is ok i add that routes , but if one peer down then how the download and upload shift on second peer with one RB. Can u suggest me.
Chupaka
September 30, 2009, 1:58pm
8
look again at http://forum.mikrotik.com/t/bgp-upload-download/31643/2
first you lookup ‘uplink1’ table, and if lookup has failed (route is inactive) - then lookup ‘uplink2’ table. failover =)
don’t forget to announce each of your subnets to both your peers, backup links being announced with higher bgp-prepend
thanx Sir,
But as i already explain you that i am unable to add route rule tables :-
/ip route rules
add src-address=x.x.x.x/24 action=lookup table=uplink1
add src-address=x.x.x.x/24 action=lookup table=uplink2
add src-address=y.y.y.y/24 action=lookup table=uplink1
add src-address=y.y.y.y/24 action=lookup table=uplink2
after adding these rule they become red( invalid) then how can i do that.
where i m making mistake.
Chupaka
September 30, 2009, 2:10pm
10
omg!..
do you have those routing tables when you add those rules?..
i have only main routing table. nothing else.
Chupaka
September 30, 2009, 2:19pm
12
Sorry Sir,
but can u plz tell me how to create new routing tables with default routes of each uplink
Chupaka
September 30, 2009, 5:08pm
14
/ip route add gateway=x.y.z.a routing-mark=uplink1
how can i do failover on this configuration.
means how can i advertise my networks on both
the ISP’s so that if one link goes down automatically
shift network on other ISP.(download)
mrz
October 5, 2009, 12:37pm
16
Advertise your network to one peer with higher prepend.
I have a similar problem and therefore I want to ask you a question too. I have two providers sending me only default route 0.0.0.0/0. Do I need to recieve a full routing table from both upstream providers to make my BGP works o.k. or not ?
Flags: X - disabled
0 chain=ISP1_out prefix=X.X.X.X/21 invert-match=no action=accept
1 chain=ISP1_out prefix=X.X.X.Y/22 invert-match=no action=accept
2 chain=ISP1_out prefix=X.X.X.Z/22 invert-match=no action=accept
3 chain=ISP1_out prefix=Y.Y.Y.Y/24 invert-match=no action=discard
4 chain=ISP1_out prefix=Y.Y.Y.X/24 invert-match=no action=discard
5 chain=ISP1_out prefix=0.0.0.0/0 prefix-length=0-32 invert-match=no action=discard
6 chain=ISP1_in prefix=0.0.0.0/0 invert-match=no action=accept set-bgp-local-pref=300
7 chain=ISP2_out prefix=X.X.X.X/21 invert-match=no action=accept set-bgp-prepend=4
8 chain=ISP2_out prefix=Y.Y.Y.Y/24 invert-match=no action=accept
9 chain=ISP2_out prefix=Y.Y.Y.X/24 invert-match=no action=accept
10 chain=ISP2_out prefix=X.X.X.Y/22 invert-match=no action=discard
11 chain=ISP2_out prefix=X.X.X.Z/22 invert-match=no action=discard
12 chain=ISP2_out prefix=0.0.0.0/0 prefix-length=0-32 invert-match=no action=discard
13 chain=ISP2_in prefix=0.0.0.0/0 invert-match=no action=accept set-bgp-local-pref=150
This way I wan to do next:
By advertising prefix /21 to both providers in case if one of them fails whole traffic will go through other ISP
By advertising prefix /22 to ISP1 I want to make it my primary ISP
By advertising prefix /24 to ISP 2 I want to do load balancing and make these networks traffic go through ISP2
My questions in this case are:
Will the upstream and downstream for /24 prefix go through ISP 2 or just downstream ?
If I use ISP1 for upstream and advertise /24 prefix through ISP2 will that make a problem ?
Any suggestions ?!