SmartSwitch Router User Reference Manual 77Chapter 6: BGP Configuration GuideTo import all routes (.* matches all AS paths) with the default preference:To export all active routes from 284 or 813 or 814 or 815 or 816 or 3369 or 3561 toautonomous system 64800.Using the AS Path Prepend FeatureWhen BGP compares two advertisements of the same prefix that have differing AS paths,the default action is to prefer the path with the lowest number of transit AS hops; in otherwords, the preference is for the shorter AS path length. The AS path prepend feature is away to manipulate AS path attributes to influence downstream route selection. AS pathprepend involves inserting the originating AS into the beginning of the AS prior toannouncing the route to the exterior neighbor.Lengthening the AS path makes the path less desirable than would otherwise be the case.However, this method of influencing downstream path selection is feasible only whencomparing prefixes of the same length because an instance of a more specific prefixalways is preferable.On the SSR, the number of instances of an AS that are put in the route advertisement iscontrolled by the as-count option of the bgp set peer-host command.The following is an example:ip-router policy create bgp-import-source allOthers aspath-regular-expression "(.*)" origin any sequence-number 20ip-router policy import source allOthers network allip-router policy create bgp-export-destination to-64800 autonomous-system 64800ip-router policy create aspath-export-source allRoutes aspath-regular-expression "(.*(284|813|814|815|816|3369|3561) .*)" origin anyprotocol allip-router policy export destination to-64800 source allRoutes networkall## insert two instances of the AS when advertising the route to this peer#bgp set peer-host 194.178.244.33 group nlnet as-count 2## insert three instances of the AS when advertising the route to this# peer#bgp set peer-host 194.109.86.5 group webnet as-count 3