cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2056
Views
0
Helpful
5
Replies

BGP set as prepend

beta_admin66
Level 1
Level 1

I'm currently studying BGP in the Cisco book. It's about the command: set as-Path prepend 222 221

Where does 222 221 come from?

In the network diagram I only see AS 100, AS 200, AS 300, AS 400.

Can you help?

5 Replies 5

Gopinath_Pigili
Spotlight
Spotlight

Hello beta_admin66,

AS-Path prepending is a way to manipulate the AS-Path attribute of a BGP route. It allows prepending multiple entries of AS to a BGP route. This can come as a workaround if a specific path is required to be followed, and other means like Multi-Exit Discriminator (MED) is not supported.

In your scenario...AS 222 221 are additional or dummy Autonomous systems  we can add to the path with set as prepend command to control the bestpath selection besed on as-path.

To better understand...BGP set as prepend, I suggest go throgh the below link:

https://community.cisco.com/t5/networking-blogs/bgp-as-path-prepending-configuration/ba-p/3819334

Best regards
******* If This Helps, Please Rate *******

 

Hi,

I read the link.

Why 4 x 650014?
R4(config-route-map)#set as-path prepend 650014 650014 650014 650014

I don't understand.

I think... only lab  purpose You can use public AS or private AS to  prepend(Add)...for example 6500014. 

Traditinal AS Number is 16 bits ( 0 to 65535)

1 -64511 is public AS number and 64512 to 65535 is private as number.

Current IOS versions use AS number as 32 bits 0 to 4,294,967,295

1 to 4199999999 is Public AS range

4200000000 to 4294967294 is Private range

Best regards
******* If This Helps, Please Rate *******

 

Ruben Cocheno
Spotlight
Spotlight

@beta_admin66 

AS-Path Prepend influence the ingress traffic, assuming that you are peering with two ISPs and you want to prefer ISP1, so you do as-prepath prepending of usual 2 x your ASN with the second ISP. On your example you are doing adding others ASNs as a way to manipulate as if they passthrough others ASNs already.

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/

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @beta_admin66 ,

in real world you should prepend only your own public AS number  to avoid to create issues with the AS# that you use in prepending. ( AS appearing in prepending would not accept your adertisement seeing their AS number already in the AS path, this is the eBGP loop avoidance rule)

Clearly the book refers to a lab scenario.

Prepending your own AS three times will make your AS to appear four times in the receiving BGP router as one is added as the result of eBGP session.

Prepending multiple times is used to attempt to make the path less preferred for incoming traffic in comparison to another path.

This does not ensure that no traffic will be received on the prepended link, but at least most of the traffic should come back on the other link.

Direct customers of the ISP that receives the prepended AS path can still use it for incoming traffic.

Hope to help

Giuseppe

 

Review Cisco Networking for a $25 gift card