I would like to know about the usage of the command "neighbor allowas-in". We using the command on CE for the neighbour to PE.
What does this command do the prefixes learned from PE?
What is the reason to use this command ?
Have a look at this doc for explanation and example:
By default, BGP will drop a route if it sees it's own AS in the advertisement. Allowas-in allows this to happen. You'll see this mainly when MPLS LSP is between you and another site you own. If you want to run BGP between the 2 locations, your location will not allow the traffic inbound. Some providers will override your AS and put theirs in its place so you will get the update. If you know for a fact that you won't get a routing loop, you can use the "allowas-in" with no worries, but it pretty much disables BGP's protection that I stated above.