{"id":5077,"date":"2026-03-21T16:19:31","date_gmt":"2026-03-21T16:19:31","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=5077"},"modified":"2026-03-21T16:19:31","modified_gmt":"2026-03-21T16:19:31","slug":"bgp-test-lab-part-15-autonomous-system-numbers-asn-explained","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=5077","title":{"rendered":"BGP Test Lab &#8211; Part 15 &#8211; Autonomous System Numbers (ASN) Explained"},"content":{"rendered":"\n<p>An&nbsp;<strong>Autonomous System (AS)<\/strong>&nbsp;is:&nbsp;A collection of IP networks and routers under a single administrative domain that presents a common routing policy to the Internet. These might be an ISP, a cloud provider, a large enterprise that is running external BGP, a content provider (such as Google or Meta), to identify each of these an&nbsp;<strong>Autonomous System Number (ASN)<\/strong>&nbsp;is used.<\/p>\n\n\n\n<p>BGP uses ASNs to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify routing domains, which belong to a particular organisation.<\/li>\n\n\n\n<li>Create the\u00a0<strong>AS_PATH\u00a0<\/strong>which is attached to routes within the Route Table.<\/li>\n\n\n\n<li>Prevent routing loops (by using the AS_PATH attribute)<\/li>\n\n\n\n<li>Apply routing policy between AS.<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-WhatisanAutonomousSystemNumber(ASN)?\">What is an Autonomous System Number (ASN)?<\/h1>\n\n\n\n<p>An Autonomous System Number (ASN) is a globally unique identifier assigned to an AS, in the case of a Public ASN. However, there also exists a Private ASN which is used within an organisation&#8217;s network and is not exposed to the public Internet.<\/p>\n\n\n\n<p>You&#8217;ll see these ASN referenced in various places in BGP, for example the AS_PATH attribute where you can see the Autonomous Systems (ASs) that a route has passed through.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AS_PATH: 3356 15169 13335<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AS3356 (Lumen)<\/li>\n\n\n\n<li>AS15169 (Google)<\/li>\n\n\n\n<li>AS13335 (Cloudflare)<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ASNumberRanges(Formats)\">AS Number Ranges (Formats)<\/h1>\n\n\n\n<p>There are two ASN number formats, the 16-bit ASN and 32-bit ASN.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Size<\/th><th>Range<\/th><\/tr><\/thead><tbody><tr><td>16-bit ASN<\/td><td>2 bytes<\/td><td>0 \u2013 65535<\/td><\/tr><tr><td>32-bit ASN<\/td><td>4 bytes<\/td><td>0 \u2013 4294967295<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Originally, ASNs were 16-bit only. But when the Internet grew and numbers started running out,&nbsp;<strong>32-bit ASNs<\/strong> were introduced (RFC 4893), as you can tell 0-65535 is not enough for today&#8217;s Internet. You may also see these expressed in dotted notation, we&#8217;ll cover this later in the article.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-PublicandPrivateASNumber\">Public and Private AS Number<\/h1>\n\n\n\n<p>ASNs,&nbsp;like with IPv4 and IPv6 IP Addresses (RFC1918) there are ranges of these ASNs that are reserved for &#8220;Private&#8221; usage, so you can use these within your internal network because they are never used on the public Internet, these are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>16-bit Private ASN Range: 64512 \u2013 65534<\/li>\n\n\n\n<li>32-bit Private ASN Range: 4200000000 \u2013 4294967294<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ASNumberNotationFormats\">AS Number Notation Formats<\/h1>\n\n\n\n<p>There are two main ways to represent ASNs, one is:&nbsp;<strong>ASPLAIN&nbsp;(Asplain Format)<\/strong>, the other is&nbsp;<strong>ASDOT&nbsp;(Dotted Format)<\/strong>.<\/p>\n\n\n\n<p>Originally there were 2 bytes AS numbers, in the range 1-65535, where 1024 of those 64512-65534 reserved for private AS numbers.<\/p>\n\n\n\n<p>After January 2009, the AS numbers were extended to 4 bytes, to increase the number of available AS Numbers from 65536 to 4294967295.<\/p>\n\n\n\n<p>There are three-ways to express these 4-byte AS numbers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Asplain<\/li>\n\n\n\n<li>Asdot<\/li>\n\n\n\n<li>Asdot+<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ASPLAIN(AsplainFormat)\">ASPLAIN&nbsp;(Asplain Format)<\/h2>\n\n\n\n<p>This would look like AS65551 (or AS 65551), and is just a decimal representation of the full 32-bit number.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ASDOT(DottedFormat)\">ASDOT&nbsp;(Dotted Format)<\/h2>\n\n\n\n<p>Asdot&nbsp;format, means that you represent any AS numbers less than 65535 using the ASPLAIN&nbsp;notation and any AS numbers above 65535 with the asdot+ notation.<\/p>\n\n\n\n<p>Note: its worth noting that 65535 can also be represented as ASDOT+ because in some cases it may need to be otherwise it may in some cases be ambiguous. In this case the high order bits (first 16 bits) will be 0, we&#8217;ll explain why in the next section, and the low order bits (second 16 bits) will be the value, so 65535 in this case, so we could represent this as&nbsp;<strong>0.65535<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ASDOT+(DottedPlusFormat)\">ASDOT+ (Dotted Plus Format)<\/h2>\n\n\n\n<p>With&nbsp;ASDOT&nbsp;you are representing a 32-bit ASN as two 16-bit values, why?&nbsp;When 32-bit ASNs were introduced, older routers only understood 16-bit numbers, To remain backward compatible, 32-bit ASNs were represented in dotted format.<\/p>\n\n\n\n<p>Most systems will use&nbsp;ASPLAIN, however using&nbsp;ASDOT&nbsp;can be useful to represent (like in our labs) certain configurations of BGP Confederations so they are easier to read, for example: 65001.0, 65001.1, 65001.2 it kinda shows how the AS .0, .1 and .2 are sub-AS within the AS 65001.<\/p>\n\n\n\n<p>There are some maths involved, but understanding this will be helpful for you to work out what is going on if you ever see these.<\/p>\n\n\n\n<p>ASDOT&nbsp;represents AS numbers less than 65536 using the&nbsp;ASPLAIN&nbsp;notation and AS numbers above 65536 with the&nbsp;ASDOT+&nbsp;notation, let&#8217;s work through some examples:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-Example1-ConvertfromASPlaintoASDOT+foranASNof:AS65530\">Example 1 &#8211; Convert from&nbsp;ASPlain&nbsp;to ASDOT+ for an ASN of: AS 65530<\/h3>\n\n\n\n<p>We take the AS 65530, because it is less than 65536, there is no calculation to be done. But, if we wanted to represent it as ASDOT+ notation, and being ASDOT+ splits the representation of the AS Number into two 16-bit parts (high and lower order values, with a dot in the middle), and being that all the older AS Numbers can fit in the low order value, it would be:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>AS 65530 becomes 0.65530<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Other examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AS 744 becomes 0.744<\/li>\n\n\n\n<li>AS 34563 becomes 0.34563<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-Example2-ConvertfromASPlaintoASDOT+foranASNof:AS70424\">Example 2 &#8211; Convert&nbsp;from ASPlain to&nbsp;ASDOT+ for an ASN of: AS 70424<\/h3>\n\n\n\n<p>Because the AS 70424 is greater than 65536, representing it in the ASDOT+ notation means we need to perform a calculation, but in reality what you are doing is continuing to count swapping over to the higher order bit values.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AS 65535 becomes 0.65535<\/li>\n\n\n\n<li>AS 65536 becomes 1.0<\/li>\n\n\n\n<li>AS 65537 becomes 1.1<\/li>\n\n\n\n<li>AS 65537 becomes 1.2<\/li>\n\n\n\n<li>And so on&#8230;.<\/li>\n<\/ul>\n\n\n\n<p>That&#8217;s fine, but counting like that isn&#8217;t ideal to get to your ASN, so instead you can perform a calculation.<\/p>\n\n\n\n<p>If you want to convert from&nbsp;ASPLAIN&nbsp;to ASDOT+ you need to&nbsp;<strong>see how many times you can divide the ASPLAIN number by 65536<\/strong>, the&nbsp;<strong>integer&nbsp;<\/strong>is then what is used for the&nbsp;<strong>high order value&nbsp;<\/strong>(the first 16 bits), i.e. you ignore any remainder.<\/p>\n\n\n\n<p>You then take your&nbsp;<strong>ASPLAIN number and<\/strong>&nbsp;<strong>subtract (65536 * integer)<\/strong>&nbsp;to get the&nbsp;<strong>low order value (second 16 bits)&nbsp;<\/strong>this is basically the Modulus (finding the remainder), so the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Integer (high order bits) = ASPLAIN \/ 65536\nRemainder (low order bits) = ASPLAIN - (Integer * 65536)\nASDOT+ Value = Integer.Remainder<\/code><\/pre>\n\n\n\n<p>So to convert AS 70424 from\u00a0ASPLAIN\u00a0to ASDOT+ would be the following, oh, and remember\u00a0BODMAS\u00a0when dealing with the brackets!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Integer (high order bits)\n70424 \/ 65536 = 1\n\nRemainder (low order bits)\n70424 - (1 * 65536) = 4888\n\nASDOT+ Value\n1.4888<\/code><\/pre>\n\n\n\n<p>So:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>AS 70424 becomes 1.4888<\/strong>\u00a0\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Another example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AS 1023484 becomes 15.40444<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>1023484\u00a0\/ 65536 = 15\n1023484 - (15 * 65536) = 40444\n15.40444<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-Example3-ConvertfromASDOT+toASPLAINforanASNof:13.2323\">Example 3 &#8211; Convert from ASDOT+ to&nbsp;ASPLAIN&nbsp;for an ASN of: 13.2323<\/h3>\n\n\n\n<p>What about converting the other way, i.e. from ASDOT+ to&nbsp;ASPLAIN?<\/p>\n\n\n\n<p>Well, if its any with a zero in the high order bit, its easy, you just take the low order bits and that is your&nbsp;ASPLAIN&nbsp;value, e.g. 0.65530 becomes 65530.<\/p>\n\n\n\n<p>But what about an ASN that larger than 65536 thus is written like our example: AS 13.2323? Let&#8217;s find out!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(High Order Bits x 65536) + Low Order Bits = ASPLAIN<\/code><\/pre>\n\n\n\n<p>So to convert AS 13.2323 it would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(13 x 65536) + 2323 = 854291<\/code><\/pre>\n\n\n\n<p>So:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>AS 13.2323 becomes 854291<\/strong>\u00a0<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-Special\/ReservedASNRanges\">Special\/Reserved ASN Ranges<\/h1>\n\n\n\n<p>There are a few AS Numbers that are reserved for special use, these are given below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0         \u2013 Invalid\n23456     \u2013 AS_TRANS\n65535     \u2013 Reserved\n4294967295 \u2013 Reserved<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-AS_TRANS(23456)\">AS_TRANS (23456)<\/h2>\n\n\n\n<p>The AS_TRANS AS Number is a special number that is used when a 32-Bit ASN passes through a router that only supports 16-Bit ASNs.&nbsp;<\/p>\n\n\n\n<p>Essentially if you have a BGP Router that only supports 16-Bit ASNs, something that is now increasingly rare; the router substitutes that ASN with AS 23456. Then the real ASN is stored within a special BGP attribute called AS4_PATH. Of course if in the path there were multiple 32-Bit ASNs, these would also be replaced with AS 23456 and stored within the AS4_PATH attribute &#8211; the router knows that although AS23456 is referenced, which of the ASNs within the attribute relates to what.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-WhoAssigns\/AllocatesAutonomousSystem(AS)Numbers?\">Who Assigns\/Allocates Autonomous System (AS) Numbers?<\/h1>\n\n\n\n<p>ASN allocation follows a global hierarchy, similar to IP address allocation.<\/p>\n\n\n\n<p>At the top level IANA (Internet Assigned Numbers Authority) manages the global ASN pool, they allocate large ASN blocks to the Regional Internet Registries (RIRs), it does not allocate ASNs direct to organisations or companies.<\/p>\n\n\n\n<p>Then you have the Regional Internet Registries (RIRs) that IANA allocate to, they manage ASNs for particular areas of the world. It&#8217;s these&nbsp;RIRs&nbsp;that actually allocate to organisations, ISPs, enterprises, content providers, cloud operators, Internet Exchanges (IX) etc.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Region<\/th><th>RIR<\/th><\/tr><\/thead><tbody><tr><td>Europe, Middle East<\/td><td>RIPE NCC<\/td><\/tr><tr><td>North America<\/td><td>ARIN<\/td><\/tr><tr><td>Asia Pacific<\/td><td>APNIC<\/td><\/tr><tr><td>Latin America<\/td><td>LACNIC<\/td><\/tr><tr><td>Africa<\/td><td>AFRINIC<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>So for the UK it would be RIPE NCC.<\/p>\n\n\n\n<p>However, most companies don&#8217;t actually apply directly to the RIR, they normally go via a Local Internet Registry (LIR), which is normally an ISP or hosting provider (who is a member of RIPE) and allocates you IP ranges (IPv4 and IPv6) as well as ASN(s) to their customers. Within this there are two approaches: Direct Assignment &#8211; You become a member of RIPE and receive your own ASN (which you can take with you between ISPs), or a Sponsored or Provider-Assigned allocation where your ISP sponsors your ASN allocation via RIPE.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-PrivateASNs\">Private ASNs<\/h2>\n\n\n\n<p>These are not allocated to organisations, by either of these bodies, it is up to the organisation to manage their own allocation of these themselves, no registration is required.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>64512\u201365534<\/li>\n\n\n\n<li>4200000000\u20134294967294<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ImportantDistinction:Ownership\">Important Distinction: Ownership<\/h2>\n\n\n\n<p>When you receive a public ASN:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You don\u2019t &#8220;own&#8221;\u00a0it permanently like\u00a0some\u00a0property.<\/li>\n\n\n\n<li>It is allocated to you as long as you meet RIR membership \/ policy requirements.<\/li>\n\n\n\n<li>If you cease operations, it returns to the registry pool.<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"BGPTestLabPart15AutonomousSystemNumbers(ASN)Explained-ExampleinExtremeNetworksXOSConfiguration\">Example in Extreme Networks&nbsp;XOS&nbsp;Configuration<\/h1>\n\n\n\n<p>To see this in action on Extreme Networks switches, the below example illustrates how the ASDOT+ and&nbsp;ASPLAIN&nbsp;formats are used on the actual configurations:<\/p>\n\n\n\n<p>Below is adding a BGP neighbour on a switch (which&nbsp;has the&nbsp;<strong>configure&nbsp;bgp&nbsp;as-display-format&nbsp;asdot&nbsp;<\/strong>set), you would add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create bgp neighbor 1.1.1.1 remote-AS-number 4200000001 multi-hop<\/code><\/pre>\n\n\n\n<p>Due to the command:\u00a0<strong>configure bgp\u00a0as-display-format\u00a0asdot<\/strong>, it actually shows up in the configuration as the\u00a0ASDOT\u00a0(ASDOT+) notation, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create bgp neighbor 1.1.1.1 remote-AS-number 64086.59905 multi-hop<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An&nbsp;Autonomous System (AS)&nbsp;is:&nbsp;A collection of IP networks and routers under a single administrative domain that presents a common routing policy to the Internet. These might be an ISP, a cloud provider, a large enterprise that is running external BGP, a content provider (such as Google or Meta), to identify each of these an&nbsp;Autonomous System Number &#8230; <a title=\"BGP Test Lab &#8211; Part 15 &#8211; Autonomous System Numbers (ASN) Explained\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=5077\" aria-label=\"Read more about BGP Test Lab &#8211; Part 15 &#8211; Autonomous System Numbers (ASN) Explained\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4783,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,41,17],"tags":[],"class_list":["post-5077","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bgp","category-extreme-networks","category-networking"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5077"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5077\/revisions"}],"predecessor-version":[{"id":5078,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5077\/revisions\/5078"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4783"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}