amity2kare,
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
as-set: AS-GOOGLE
descr: Google, Inc.
members: AS1406
members: AS1424
members: AS6432
members: AS11344
members: AS13949
members: AS15169
members: AS15276
members: AS19425
members: AS22244
members: AS22577
members: AS26910
members: AS36040
members: AS36492
members: AS36561
members: AS40873
members: AS43515
members: AS55023
members: AS-GOOGLE-IT
admin-c: AS15169 Network Operations
tech-c: AS15169 Network Operations
remarks: For network issues, mail:
nst@google.com
remarks: For peering questions, mail:
peering@google.com
notify:
noc@google.com
mnt-by: MAINT-AS15169
changed:
noc@google.com 20160808 #15:31:00Z
source: RADB
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 and
https://en.wikipedia.org/wiki/Internet_Routing_Registry 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 159.148.147.201
route: 159.148.147.0/24
descr: MIKROTIKLS
origin: AS51894
mnt-by: AS2588-MNT
changed:
unread@ripe.net 20000101
source: RIPE
remarks: ****************************
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
remarks: ****************************
This route route-object tells us that prefix 159.148.147.0/24 is a valid prefix advertised by AS51894 (i.e. origin: AS51894). Thus the BGP prefix filters will also be built accordingly.