02-03-2024 01:53 AM
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?
02-03-2024 02:09 AM - edited 02-03-2024 02:13 AM
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 *******
02-03-2024 02:31 AM
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.
02-03-2024 03:27 AM - edited 02-03-2024 04:20 AM
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 *******
02-03-2024 09:32 AM
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.
02-03-2024 09:44 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide