What is the range of BGP 4 byte private ASN?

How to hide BGP AS a number?

I have an old-style configuration that looks like this: router eigrp 500.

no shutdown. no auto-sum. no shutdown auto-sum. no bgp-border. no bgp-med. exit. group-policy "BGPASHIDE" threshold -1. What I want to do is to hide the local AS number (ie 500) of the router. How can I do this? Thanks. You need to set the bgp-community attribute. Bgp-community 200. If you do not want to expose the community in the routes that are sent to other peered routers then you need to set the local-as-path-attribute to 64512 which will cause your router to not send the community in the route.

What is the range of a private ASN?

ASN ranges are an implementation detail of each ASN. Each implementation has their own ranges, and sometimes even their own definition of what range is (ie in some cases the "high" of a range may be interpreted as "low"). I've been told that the range of a private ASN is 0 - 65535 on Cisco devices and 0 - 32K on Juniper devices. However this document from the Linux network team states that the range of a private ASN is 0 - 49152 for FreeBSD and 0 - 32768 for IOS, in line with previous releases of IOS. So if you look at the range map here: you'll see a value of 12, indicating that they define the range of ASN's to be 0 - 65512. I also found that, although not a definitive source, here on Stack Overflow someone is suggesting that the range of private ASN's is 0 - 32K, and 0 - 64K when running IOS on Cisco devices, and 0 - 16K when running IOS on Juniper devices.

What is the private AS number for BGP?

If the private AS is the subnet address from which BGP is learnt in the backbone then it can be assumed that the private AS is 1.

But what if the private AS has an IP address as well?

In some scenarios, it's fine to use the private AS as the subnet, and in others it isn't. The following example illustrates both approaches.

In the scenario below we want to have BGP sessions over paths connecting our PE routers 172.16.0.50/30 and 172.100/24. Since the private AS number is 172.2 (and is not used by any other address), there is no problem with using this number for BGP.

On the other hand, with no more than 10 peers on the 172.0/24, it may best to use the private AS number 0. Using the private AS may mean that more BGP traffic has to pass the PE to keep the local table up to date - this is likely to become a problem for routing and performance if the number of BGP peers is too large.

As you've correctly identified, there are many factors that can influence the choice of private AS for a given service: There is no reason that BGP will ever be required to use the default path when routing in a given AS, so any path that avoids the use of that AS for peer addresses is a logical solution to use when considering the performance impact of BGP. It is a good practice to use BGP where possible, regardless of the service type (unicast, multicast, VPN) since it will significantly reduce the overall cost of routing and can potentially improve link utilization and performance. There are always exceptions, of course.

Wherever possible, use the lowest level of granularity (private AS/AS 65535/65535 and IP subnet mask prefix /24). However, it is not always possible to do this and where this is the case, at least ensure that the private AS is as small as reasonably practical. The smaller the private AS the fewer routes will need to be held locally by the PE router, therefore requiring less memory resources and potentially less bandwidth used.

BGP is a general-purpose protocol with a number of different requirements for service types and subnets.

Related Answers

What is an AS number in networking?

Do public numbers have any restrictions on use? I don't know...

What is the as number in BGP?

An ASN number (autonomous system number) is a standard way to identify...

What is autonomous system in BGP?

My thinking is that with IP a router can pass traffic off, if yo...