cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2326
Views
0
Helpful
8
Replies

eBGP update-source loopback and using local preference values

James_niel1
Level 1
Level 1

Hi,

Havea question about BGP local preference values and how it can be used indual-homed scenario. In a case scenario where customer is peering to a singleISP using primary (s0/0 to s0/0) and back up (s0/1 to s0/1) lines and useloopback interfaces for stability, by using Cisco 2600 12(4) kit. Questionwould be is possible to use local-preference parameters to specify values forone link over another?

Iknow that by applying weight values to static routes BGP will choose the onewith higher value, however is possible to create a route-map where I can put mymetrics, local preference values etc… or do I have to set up two neighboringconnections and when use route maps? I tried to create Ip policy route-mapprimary under s0/0 but with not luck, BGP can not recognize it. Tried to usematch interface but BGP does not support this either.

If it is possible can me show or at least explain how would be solve this kind of example? I would prefer to use one peer between R1 and ISP instead of two?

It is not a load sharing example

R1:

S0/0

Ip add 192.168.1.1 255.255.255.252

S0/1

Ip add 192.168.2.1 255.255.255.252

int loopback 1
ip add 1.1.1.1 255.255.255.255
exit

router bgp AS_1
neighbor 2.2.2.2 remote-as AS_2
neighbor 2.2.2.2 update-source loopback 1
neighbor 2.2.2.2 ebgp-multihop 2

ip route 2.2.2.2 255.255.255.255 192.168.1.2
ip route 2.2.2.2 255.255.255.255 192.168.2.2

ISP:

S0/0

Ip add 192.168.1.2 255.255.255.252

S0/1

Ip add 192.168.2.2 255.255.255.252

int loopback 1
ip add 1.1.1.1 255.255.255.255
exit

router bgp AS_2
neighbor 1.1.1.1 remote-as AS_1
neighbor 1.1.1.1 update-source loopback 1
neighbor 1.1.1.1 ebgp-multihop 2

ip route 2.2.2.2 255.255.255.255 192.168.1.1
ip route 2.2.2.2 255.255.255.255 192.168.2.1

3 Accepted Solutions

Accepted Solutions

vdadlaney
Level 1
Level 1

Hi James,

I will try and answer your questions. First of can you please explain what problem you are trying to solve with this scenario. Weight, Local Preference etc are attributes that you can use to manipulate your outbound traffic flow. So essentially you can use these attributes to direct your traffic towards a particular BGP peer over another peer (prefer 1 ISP over another for simplicity sake). In your case if I understand your scenario correctly you have only 1 Peer and hence am not sure what you would gain by using Local Preference. Actually what you are doing is optimal because since you are using the loopback interface to peer with your ISP you now have the ability to Load Balance at least as per my understanding of the terms load sharing and load balancing. You might want to refer to this article for more details which applies to your scenario. HTH

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml#conf1

Regards,

Vikram

View solution in original post

Mahesh Gohil
Level 7
Level 7

Hello James,

The result you want to achieve is posssible when you create two bgp session with provider. With loopback

you will have only one bgp session so your traffic will be load balanced by default.

FYI:

> Local preference / Weight is used for outgoing traffic from customer towards ISP when it is defined at customer end. ISP will not have

any visibility of LP because it is local to AS. SO you can create route-map and attach it to in direction.

> Metric/As-path prepend is for incoming traffic. You can set these values in route-map attach it to out direction

But all this is meaningful when you have two peering, for loopback it doesn't make any sense

Hope this is useful

Regards

Mahesh

View solution in original post

Lei Tian
Cisco Employee
Cisco Employee

Hi James,

If you want use 1 link instead of load sharing across 2 links, then you can config your static route with differnt AD. Configure higher AD for the static route point to backup link. Also I would consider use reliable static route (static route with track) feaure, so that the primary static route can be removed in case the link is down but the interface still up/up.

HTHs,

Lei Tian

View solution in original post

8 Replies 8

vdadlaney
Level 1
Level 1

Hi James,

I will try and answer your questions. First of can you please explain what problem you are trying to solve with this scenario. Weight, Local Preference etc are attributes that you can use to manipulate your outbound traffic flow. So essentially you can use these attributes to direct your traffic towards a particular BGP peer over another peer (prefer 1 ISP over another for simplicity sake). In your case if I understand your scenario correctly you have only 1 Peer and hence am not sure what you would gain by using Local Preference. Actually what you are doing is optimal because since you are using the loopback interface to peer with your ISP you now have the ability to Load Balance at least as per my understanding of the terms load sharing and load balancing. You might want to refer to this article for more details which applies to your scenario. HTH

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml#conf1

Regards,

Vikram

Mahesh Gohil
Level 7
Level 7

Hello James,

The result you want to achieve is posssible when you create two bgp session with provider. With loopback

you will have only one bgp session so your traffic will be load balanced by default.

FYI:

> Local preference / Weight is used for outgoing traffic from customer towards ISP when it is defined at customer end. ISP will not have

any visibility of LP because it is local to AS. SO you can create route-map and attach it to in direction.

> Metric/As-path prepend is for incoming traffic. You can set these values in route-map attach it to out direction

But all this is meaningful when you have two peering, for loopback it doesn't make any sense

Hope this is useful

Regards

Mahesh

Lei Tian
Cisco Employee
Cisco Employee

Hi James,

If you want use 1 link instead of load sharing across 2 links, then you can config your static route with differnt AD. Configure higher AD for the static route point to backup link. Also I would consider use reliable static route (static route with track) feaure, so that the primary static route can be removed in case the link is down but the interface still up/up.

HTHs,

Lei Tian

James_niel1
Level 1
Level 1

Thanks guys for a rapid responds. Actually all of you just confirmed that I was thinking.  I'll need to change some lines in my case scenario example test. As it follows I ll create two peers and use route map to specify the parameters instead of using static routes with weights.

The idea of using loopback addresses was to have a stable link at all times, however if only one peer exists you can not add metrics or Local preference / Weigh to control outgoing or incoming traffic to and from ISP.

Need to check static route with track have never used before.

Thanks for your help

Hi James,

James_niel1 wrote:

The idea of using loopback addresses was to have a stable link at all times, however if only one peer exists you can not add metrics or Local preference / Weigh to control outgoing or incoming traffic to and from ISP.


If you create 2 eBGP peers you are going to use up a lot more memory on your router and I am still not sure what you intend to achieve because in your present scenario you are utilizing both links towards your ISP and should one of the links fail you will utilize the other link for all your traffic. (Assuming that on link failure you still maintain the BGP neighbor relationship). Maybe someone else can provide more insight but per my understanding you have your particular configured in the most optimal way. Using 2 x eBGP neighbor relationships to the same ISP and also to the same ISP router from my perspective would be a waste of resources. HTH. Thx

Regards,

Vikram

Thanks vdadlaney for this.

Provided code is example I am playing with. In my code I I use weight commands to prioritize one line against another. However correct me if I am wrong, but in this case scenario is it possible for me to control incoming traffic from ISP? If ISP decides to forward all traffic via my back up line and not primary,  is it a way on my side to control it somehow? By using metric values I might have some control, but not when you use static routes, right?

Thanks

Hi James,

I do apologize but I am still not quite sure what you are trying to achieve. In your initial post you mentioned you wanted to control outbound traffic (Which means you want to control how or on which link you receive a particular prefix from your ISP).

You control outbound traffic with Weight, Local Preference etc therby influencing how traffic leaves your AS. However in your scenario it is more optimal IMHO the way you have it configured which is to form the eBGP neighbor relationship with the loopback.

In your last post you mention that you want to control Inbound Traffic (Which means how you advertise routes to your ISP).

For this you can use AS-Path, MED or ideally break your prefix into 2 halves and advertise a more specific prefix via 1 path and the other specific prefix via the other path.

In your case however you have the ideal situation of when traffic leaves your AS towards a destination reachable via your ISP to load balance across both your links. I really do feel that is the ideal situation where you want traffic leaving your AS to utilize both links.

With regards to return traffic if you have worked with your ISP in setting this up than they should also do the same when they direct traffic towards your AS they should utilize both links as well.

HTH and please do post if what I am trying to explain above is not what you are expecting. Thx

Regards,

Vikram

Thanks to everyone who corrected and advised me of solutions. I think yesterday was one of these moments when

more you read and look at the same code the more confusing it becomes.

Ta

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: