AS-SETs are not router commands, but are route-object records, which are created in any registered Internet Routing Registry (IRR), e.g. RADB, REACH or NTTCOM. All Tier-1 (global) and Tier-2 (regional) upstream providers build their BGP filters by querying created route-objects (e.g. aut-num, as-set, route, route6) in registered IRR servers (e.g. whois.radb.net or rr.ntt.net).
An as-set record is a type of record which lists members (downstream peers and itself) of a particular as-number. Below is an example of an as-set record for google:
~$ whois -h whois.radb.net as-google
descr: Google, Inc.
admin-c: AS15169 Network Operations
tech-c: AS15169 Network Operations
remarks: For network issues, mail: email@example.com
remarks: For peering questions, mail: firstname.lastname@example.org
Tier1/Tier2 providers use as-set records to build BGP as-path filters towards all their peers. Thus any as-number which has a downstream BGP peer, must create an as-set record to notify the internet who their members are (downstream members and itself), so that the providers' BGP as-path filters are built correctly.
You can refer to http://www.irr.net
to know more.
However, Tier1/2 providers' BGP filters are also built with prefix filters, not just as-path filters. Thus a route/route6 route-object for the actual prefix to be advertised must also be created by the originating as-number. An example is as below:
~$ whois -h rr.ntt.net 126.96.36.199
remarks: * THIS OBJECT IS MODIFIED
remarks: * Please note that all data that is generally regarded as personal
remarks: * data has been removed from this object.
remarks: * To view the original object, please query the RIPE Database at:
remarks: * http://www.ripe.net/whois
This route route-object tells us that prefix 188.8.131.52/24 is a valid prefix advertised by AS51894 (i.e. origin: AS51894). Thus the BGP prefix filters will also be built accordingly.