cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
83124
Views
78
Helpful
13
Replies

BGP inbound and outbound traffic

acbennyma
Level 1
Level 1

According to the BGP best route decision, best route will be chosed base on the the the sequence

attributes ( Weight, Local preference, AS-Path, ). But I want to know do that attributes

control the flow of inbound traffic or outbound traffic or both directions?

13 Replies 13

a.awan
Level 4
Level 4

1. Local Preference is used to manipulate traffic going out of your Autonomous System. This attribute is only exchanged with IBGP peers and therefore has local significance to your Autonomous System.

2. The Weight attribute is also used to manipulate traffic going out of your Autonomous System but this attribute is local to the router on which it is configured and is not exchanged with any IBGP or EBGP peers.

3. A router uses the AS_PATH attribute in case of ties between the weight and local preference attributes and the route not being locally originated. When this attribute is used to select a particular route you are basically controlling traffic going out of your Autonomous System.

When you are multi homed to two different providers it is sometimes required to prefer one provider's link for some incoming traffic. In such cases a normal practise is to manipulate the AS_PATH attribute thereby making one path seem more attractive than the other (shorter AS_PATH). So in such circumstances you are using AS_PATH to manipulate traffic coming into your AS.

4. Another attribute that is used to manipulate incoming traffic is called MED (Multi-Exit Discriminator). However, an EBGP peer receiving it will only share it with IBGP peers and will not forward it to another AS. This means that you can basically use this attribute for influencing traffic between two directly connected autonomous systems.

Dear a.awan

Could u explain more on point 3, i still don't understand it.

For the last point, if my AS haven't iBGP, then I no need to to consider MED to control the inbound traffic. Right ?

Thanks !!!

With point number 3 i was trying to convey the message that AS_PATH attribute can influence both traffic coming into and going out of your autonomous system. Lets consider two situations:

Situation 1:

You have two edge routers each talking EBGP to a different service provider and talking IBGP to each other. You are receiving full internet routes from both providers. In this situation each edge router will have to decide on which route to install (for each internet destination), one available via an EBGP peer and the other via an IBGP peer. Assuming Local Preference and Weights are left at default the decision will come down to AS_PATH attribute. The routers will choose the route with the shortest AS_PATH and this will influence traffic leaving outside your autonomous system.

Situation 2:

In this scenario we again have two edge routers speaking EBGP to two different providers and talking IBGP to eachother. The routers are configured to advertise the prefix assigned to your AS. Without any special configuration traffic destined to your AS will take the best route (shortest AS_PATH). So there is really no way of knowing how your inbound traffic flow will be. However, you might want to force all inbound traffic through one link and use the other as a backup. For this to work across two different providers you can manipulate the AS_PATH attribute in updates from one of your edge routers so that to the outside world it seems that this path is longer than the one through the other link.

MED is useful when you have two or more links to the same provider and you want to control how traffic coming in should behave. You advertise MED to your EBGP peers so your internal IBGP configuration is more or less independent of this attribute unless you are a provider and are receiving MED but in that case I do not see why you will not have IBGP configured.

Hope that makes things clearer.

But, in situation 1 Why the edge router will never go to IBGP router as it already have EBGP peering with internet router. and E is preferred over IBGP. 

It is true that EBGP is preferred over IBGP. But that comparison comes later than the comparison of the AS path length. If one advertisement has a shorter AS path length then it will be preferred no matter whether it is IBGP or EBGP.

 

HTH

 

Rick

HTH

Rick

Harold Ritter
Level 12
Level 12

The best path decision you make locally only influences the outbound traffic path.

To influence the inbound traffic path, you can use attributes (such as MED, AS-PATH, communities) in the updates you send to you peers.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

marikakis
Level 7
Level 7

Every AS can control its outbound traffic pretty well.

What is inbound for an AS, is simultaneously outbound for other ASs,

and naturally these other ASs have more control over it.

As a result, an AS has more control on its outbound traffic flow than the inbound.

Usually you need cooperation with your upstreams to control your inbound,

and even that may not suffice to achieve the traffic distribution that you desire.

Of course, you can at least try with the methods already

mentioned by the fellows here.

M.

Hello,

dear i have two routers and two providers with iBGP betwen two routers

i want to understant how can i manage incoming traffic and outgoing traffic .

 

now i have only one provider link that have incoming and outgoing traffic but the second nothing , the bgp still UP and i have already advertised prefix to the second provider

 

so i want to have traffic on two links incoming and outgoing

 

thanks!

 

Abdallah

Abdallah

 

You have given us only a general description of your environment. But not enough detail for us to understand what is happening or to make good suggestions. As a start please provide a diagram showing your routers and the ISP routers with AS numbers and IP addressing. Also please post the BGP configuration of both of your routers.

HTH

Rick

this is the config on first router  toward my fisrt provider

neighbor X.X.X.X remote-as 8837
neighbor X.X.X.X ebgp-multihop 255
neighbor X.X.X.X update-source Loopback10

neighbor X.X.X.X activate
neighbor X.X.X.X soft-reconfiguration inbound
neighbor X.X.X.X route-map AS-Prepend1 out

##############################################

the config on my second router toward my second provider

neighbor X.X.X.X remote-as 3085
neighbor X.X.X.X description eBGP to NIGER Telecom
neighbor X.X.X.X soft-reconfiguration inbound
neighbor X.X.X.X route-map NT_LP in
neighbor X.X.X.X route-map NT_out out

 

############ iBGP  ####################

R1

neighbor x.x.x.x2 remote-as 2233
neighbor x.x.X.x2 description iBGP
neighbor x.x.x.x2 next-hop-self
neighbor x.x.x.x2 soft-reconfiguration inbound

R2

neighbor x.x.x.x1 remote-as 2233

neighbor x.x.x.x1 activate
neighbor X.X.X.X1 next-hop-self
neighbor x.x.x.X1 soft-reconfiguration inbound
neighbor 41.78.118.254 description iBGP

This is a beginning but it still does not provide enough information for us to understand what is going on or to give good suggestions. I do not see any network statements, or any redistribute statements. So how are you advertising anything to your neighbors? 

 

What you post shows 3 route maps, but nothing of the logic of the route maps, or what they might be changing, or of the access lists that they might be using.

HTH

Rick

ezaj.ahmed
Level 1
Level 1

Weight = is for outbound traffic. Significant to a local router. Hight value wins.  The default value for learned routes is 0 and the default value for a locally originated route is 32768. It is cisco propiratory attribute. If you have only one border router for eBGP peering you can use it.

LP= significant within the AS. Used to influnce outbound traffic. Each router shares its LP value for defined prefix via iBGP to let other know the value. Default value is 100. If u have multiple eBGP border router, u must use it. It is non propiratory. 

AS Path= used to select inbound traffic path.

When u advertising ur own prefix u can set length of ur own AS. To inform peer AS about distance/ASpath. The peer AS will select the shortest AS path to push u traffic. So ur download path will be controlled by AS path prepending.

Paul George
Level 1
Level 1

We can influence the inbound routes using BGP community attribute as well other than AS-Path & MED . This method, however requires additional configuration on the provider’s side. The ISP needs to configure its PE routers to match different BGP communities that are tagging the customer’s routes and set a different local preference (LOCAL_PREF) values to the routes based on the matched communities.

Review Cisco Networking for a $25 gift card