cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1655
Views
0
Helpful
6
Replies

BGP Single Router Dual-Homing

yeowtiongt
Level 1
Level 1

Hi everyone,

  I need some help!

 

Recently I have implemented a single router dual-homed to 2 different ISP. 

I wanted to perform load sharing by influencing incoming traffic from the 2 ISP.

a. I have for example a public subnet 197.103.204.0 /24.

b. I hope to have 197.103.204.0 /25 incoming traffic using ISP A while

c. 197.103.204.128 /25 incoming traffic using ISP B (maybe using prepending to achieve)

d. Of course when either ISP fails, they will take the other ISP.

e. 197.103.204.0 /24 is my network connected to my Ge interface.

d.  1.1.1.1/30 is the Public IP used from my router interface Ge 0/2 to ISP A Router whose IP is 1.1.1.2 /30.

f.  2.2.2.1/30 is the Public IP used from my router interface Ge 0/3 to ISP B Router whose IP is 2.2.2.2 /30.

g. My BGP AS no can be 1000, ISP A 2000 while ISP B 3000.

When I tried to advertised a /25 to both my ISP, it doesnt see the them as /25 but rather as a classful /24. 

As a result, we have 2 default routes in our router pointing to ISP A and B gateway respectively. 

It seems that outgoing traffic prefers to use ISP B whilst all incoming traffic are coming into ISP A.

Can someone advise me if I can split from /24 into 2 x /25 from my router and advertise them to my ISP routers?

 

 Internal Network <----> 197.103.204.0 /24 (Gi 0/1) <-------> My Router <------> 1.1.1.1 /30 <--------->ISP A Router <--------->1.1.1.2 /30

                                                                                                                        <------->2.2.2.1 /30 <--------->ISP B Router <--------->2.2.2.2 /30

 

 Thanks!

 

6 Replies 6

Ruben Cocheno
Spotlight
Spotlight

yes you can, using static routes/25 and ASPATH-Prepend on outgoing updates

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/

Hi rcochenos,

 

  can u give a sample out or example? 

 

Esp for advertising the /24 into 2 x /25 subnets. 

Check this, it's similar...

https://supportforums.cisco.com/pt/discussion/12157371

Be aware of probably the ISPs don't want be a transit path for ranges that doesn't belong them or split subnets like you want.

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/

Thanks rcochenos..

 

We have in fact requested that they allow us to add in /25 into their distribution list...

 

Now I have managed to add 2 static routes in my router 

say

ip static route 197.103.204.0 mask 255.255.255.128 Gi 0/1 

ip static route 197.103.204.128 mask 255.255.255.128 Gi 0/1 

I managed to advertised out these 2 subnets to my neigbour.

Next, I tried to use route-map to influence my incoming traffic.

Say on the Internet, I want traffic going to 197.103.204.0 to use ISP A whilst traffic going to 197.103.204.128 to use ISP B.

A section of my route map is as below:


ip prefix-list prep_2000 seq 5 permit 197.103.204.0/25
!
ip prefix-list prep_3000 seq 5 permit 197.103.204.128/25
!
route-map PREPEND_3000 permit 10
 match ip address prefix-list prep_3000
 set as-path prepend 1000 1000 1000
!
route-map PREPEND_2000 permit 10
 match ip address prefix-list prep_2000
 set as-path prepend 1000 1000 1000

neighbor 1.1.1.2 route-map PREPEND_2000 out

neighbor 2.2.2.2 route-map PREPEND_3000 out

All works well. However, when I simulated that ISP A goes down, my client on the Internet cannot reach my internal clients on 197.103.204.0 /24.

When I look at the advertised routes from my router after applying the route maps, I noticed this:


#show ip bgp neighbors 1.1.1.2 advertised-routes
BGP table version is 9, local router ID is 197.193.204.2 (My router interface)
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 197.193.204.0/25 0.0.0.0                  0         32768 i

Total number of prefixes 1

#show ip bgp neighbors 2.2.2.2 advertised-routes
BGP table version is 9, local router ID is 197.193.204.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 197.193.204.128/25
                    0.0.0.0                  0         32768 i

Total number of prefixes 1

How can I advertise my 2 subnets to both my ISP and at the same time influence traffic in such a way that traffic going to 193.197.204.0 /25 uses ISP A (1.1.1.0) and traffic going to 193.197.204.128 /25 uses ISP A (2.2.2.0).  When either ISP goes down, redundancy should be available to take the ISP whoever is available.

 

I am very new to BGP dual homing and prepending.. Appreciate the folks here can advice me...

Many Thanks!

 

 

 

What is happening is the route map's permit statement matches the prefix list and prepends the AS to that route. But if the route does not match the prefix list it is not advertised because you don't have a further permit statement.

So you need to add another permit statement to each route map. The second permit statement does not need any other configuration ie. you don't need to match anything with a prefix list and you don't need to set anything.

It just allows routes that are not matched in the first permit statement to be advertised.

Note after you modify the route maps you will need to reset the BGP session for it to take effect.

Jon

mvsheik123
Level 7
Level 7

Hi,

You may already aware but ISPs do not entertain advertising subnets with mask above /24. Unless you have another public subnet  or your ISPs agree to accept /25, Iam afraid that you may not be able to achieve what you are looking for. 

Thx

MS

Review Cisco Networking for a $25 gift card