Q:

What is the expected behavior of set-prepend-local-as in BGP?

I have a situation as below:
Consider my local AS value is 65002 and the neighbor AS has value 333. If my AS path shows the value as AS_PATH:65002 333, then on using set-prepend-local-as as 2, what is the expected behavior in AS_PATH value?
Should it be AS_PATH: 65002 65002 333 or AS_PATH: 65002 65002 65002 333 ?
In other words, if set-prepend-local-as is set, then the value of local AS must prepend the number of times specified(result = number of times*AS + existing AS)?
Note: The local AS number is present already in AS path before prepending(I think by default while exporting it adds local AS once).
Please specify if there is any document that specifies the expected behavior.

A:

I believe you are not using Cisco/Juniper devices. They do NOT support the command set-prepend-local-as but Datacom does.
To asnwer your question, as you have AS_PATH:65002 333, with the command set-prepend-local-as 2 you will get AS_PATH:65002 65002 333, that means the result = number_of_times*Local_AS.
You can check the sample configuration on Datacom device at here 

