This article covers routing, BGP and the resources that make up the internet.

TL;DR

  • BGP is the routing protocol that ensures data gets to the right place on the internet.
  • It works by exchanging information between routers in different Autonomous Systems (AS).
  • Each AS is assigned a unique number called an ASN.
  • Companies can get their own ASN and IP addresses through a regional internet registry.
  • The minimum size of a route announced to the internet and that can be acquired (and protected) is a /24 block.
  • The cost of protecting a customers announcement (/24+) will be higher than that of a single /32

During this article we will use CIDR suffixes to represent the size of a route. For example, a /24 is a route that can hold 256 IP addresses. A /32 is a single IP address. For more information on CIDR please see this article.

Border Gateway Protocol (BGP)

BGP is the routing protocol used to exchange routing information between routers in different autonomous systems (AS) on the Internet. It is the backbone of the Internet, responsible for making sure that data gets from one place to another in the most efficient and reliable way possible.

Traffic is moved from one network to another via Peers and Transits. Transit providers are companies who are paid to move traffic between two networks and possibly to other transit providers in order to reach networks that are not directly connected. Peers are companies who are connected to each other and move traffic between their networks or the networks of paying customers.

An IXP (or IX) is a company that operates a physical location where networks can connect to each other via peering. IXPs are often used by transit providers to connect to other transit providers and by peers to connect to other peers. IXPs are also used by ISPs to connect to other ISPs.

Outgoing routes (egress traffic)

BGP is used for detirminging the route traffic will take on its way to a network according to specific rules and the configuration of the route source.

Most of the time transit's and peers do not apply filtering or adjustments on outgoing traffic. This means that the route that is announced to the internet is the route that will be used by the internet to send traffic to your network. Some cheap ISPs however may apply a degree of filtering to lower costs (encouraging traffic away from more expensive transit providers or links).

Because BGP is not applied for filtering outoging routes (e.g as a route policy) with most transit providers it is generally possible to receive spoofed IP packets. For information on IP spoofing see this article.

BGP traffic engineering (for route optimization)

BGP traffic engineering is the process of manipulating BGP routing information to influence the path that traffic takes through the Internet. This can be done for various reasons such as load balancing, redundancy, and avoiding congestion.

The most common method of improving routes is to use BGP communities. These are a way of tagging routes with additional information that can be used by the BGP speaker to make routing decisions. For example, a community can be used to indicate that a route should be preferred over others, or to indicate that a route should only be used as a backup.

Not all BGP speakers support communities, and not all BGP speakers (transits and peers) support communities. Some AS's support very little optimization and some AS's perform their own optimization either for quality of service or for cost reduction.

How routes are optimized

Route optimization is complex, expecially in regards to the internet. There are many factors that can influence the path that traffic takes. Routes are generally pretty good (99.99% are more than acceptable) with little adjustment. Most optimization tends to be required in developing or budget constrained regions.

Who optimizes routes

When routing changes are possible on our end and when working with a customer willing and able to provide sufficient information to support the process we are happy to engage in route optimization work. Please note this may take some time both on our end and depending on the situation in contacting (waiting on) 3rd parties.

Consumer Large Internet service providers (ISPs) are generally responsible for optimizing routes between the different AS's they are connected to, they can do this by providing route filtering policies, traffic engineering and load balancing mechanisms that ensure the best performance for the traffic traversing their network. Most do not respond to external requests for optimization from either non business customers or other ASNs (except perhaps those of large content producers), We are happy to contact any ASN for changes within their network when we have sufficient backing information to support the request.

What we need to optimze routes

In order to optimize routes we need to know the following: - The IP address of the server you are connecting to and the source address - Traceroutes showing the issue in text format. These are best provided in both resolved and unresolved form. Unresolved IP address form is required. - Patience. Optimizing routes can take time and we may need to contact 3rd parties to get the issue resolved. - A willingness to work with us to get the issue resolved. We are happy to work with you to get the issue resolved but we will probably need your help to do so.

IP Resources

For /32 services we own the IP resources. For large business usage you may wish to use your own IP resources. This of course comes at an additional cost and unless you are utilizing a large percentage of a /24 is likely not cost effective.

Depending on your needs we may also be able to rent you dedicated IP blocks if desired. With options like this we may be able to meet most of your needs with reduced cost and hastle.

Autonomous Systems (AS)

An autonomous system (AS) is a collection of interconnected networks that are controlled by a single administrative entity. Each AS is assigned a unique number called an AS number (ASN) by the Internet Assigned Numbers Authority (IANA). This allows routers in different ASs to identify the path that data should take through the Internet.

Generally there is no need to have an ASN for a single network. However, if you have multiple networks that you want to be able to route between, you will need to get an ASN. You can get an ASN from a regional internet registry (RIR). There are three RIRs: ARIN, RIPE NCC, and APNIC. Each RIR is responsible for a different part of the world. You can find out which RIR is responsible for your region by looking up your IP address on this website.

Obtaining an ASN and IP Addresses

Companies and organizations can obtain their own ASN and IP addresses by becoming a member of a regional Internet registry (RIR) such as ARIN, RIPE, APNIC, etc. Once you are a member, you can apply for your own ASN and IP addresses. Which RIR/LIR you use will depend on your location (company) and the cost will likewise vary.

IPv4 exhaustion / shortage

IPv4 was designed in the 1970s and it has a limited capacity of about 4.3 billion unique addresses. As a result IPv4 address space is quickly running out due to the rapid growth of the Internet. The Internet Assigned Numbers Authority (IANA) allocated the last blocks of IPv4 addresses to the regional Internet registries (RIRs) in 2011 and the RIRs have been allocating the remaining addresses to their customers. As a result, many organizations are finding it difficult to obtain new IPv4 addresses and an expensive resale market exists for IP blocks.

Depending on your RIR/LIR policies you may not be able to get new addresses from them. You may be required to pay a membership fee regardless (be sure to check the policies).

Minimum Route Announcement and IP Address Block

The minimum size of a route that can be announced to the Internet is a /24 (256 IP addresses) block. In addition, the minimum size of an IP address block that can be allocated to a customer is a /24 (256 IP addresses) block. This is because smaller blocks are not efficient for routing and can cause fragmentation on the Internet.

In summary, BGP is the backbone routing protocol of the Internet, responsible for making sure data gets to the right place. Each autonomous system is assigned a unique number called an ASN and companies can obtain their own IP addresses and ASN by becoming a member of a RIR. The minimum size of a route announced to the internet and the minimum size of an IP address block that can be allocated is a /24 (256 IP addresses) block.

Because the minimum size of a route is /24 configuration can only be performed at the level of a /24. This includes route optimization and many third party services such as GeoIP also many function only on blocks of this size.