What is routing?

Routing is the process of path selection in any network. A computer network is made of many machines, called nodes, and paths or links that connect those nodes. Communication between two nodes in an interconnected network can take place through many different paths. Routing is the process of selecting the best path using some predetermined rules.

Why is routing important?

Routing creates efficiency in network communication. Network communication failures result in long wait times for website pages to load for users. It can also cause website servers to crash because they can't handle a large number of users. Routing helps minimize network failure by managing data traffic so that a network can use as much of its capacity as possible without creating congestion.

What is a router?

A router is a networking device that connects computing devices and networks to other networks. Routers primarily serve three main functions.

Path determination

A router determines the path data takes when it moves from a source to a destination. It tries to find the best path by analyzing network metrics such as delay, capacity, and speed.

Data forwarding

A router forwards data to the next device on the selected path to eventually reach its destination. The device and router may be on the same network or on different networks.

Load balancing

Sometimes the router may send copies of the same data packet by using multiple different paths. It does this to reduce errors due to data losses, create redundancy, and manage traffic volume. 

How does routing work?

Data moves along any network in the form of data packets. Each data packet has a header that contains information about the packet’s intended destination. As a packet travels to its destination, several routers might route it multiple times. Routers perform this process millions of times each second with millions of packets.

When a data packet arrives, the router first looks up its address in a routing table. This is similar to a passenger consulting a bus timetable to find the best bus route to their destination. Then the router forwards or moves the packet onward to the next point in the network.

For example, when you visit a website from a computer in your office network, data packets first go to the office network router. The router looks up the header packet and determines the packet destination. It then looks up its internal table and forwards the packet—either to the next router or to another device, such as a printer—within the network itself.

What are the types of routing?

There are two different types of routing, which are based on how the router creates its routing tables:

Static routing

In static routing, a network administrator uses static tables to manually configure and select network routes. Static routing is helpful in situations where the network design or parameters are expected to remain constant.

The static nature of this routing technique comes with expected drawbacks, such as network congestion. While administrators can configure fallback paths in case a link fails, static routing generally decreases the adaptability and flexibility of networks, resulting in limited network performance.

Dynamic routing

In dynamic routing, routers create and update routing tables at runtime based on actual network conditions. They attempt to find the fastest path from the source to the destination by using a dynamic routing protocol, which is a set of rules that create, maintain, and update the dynamic routing table.

The biggest advantage of dynamic routing is that it adapts to changing network conditions, including traffic volume, bandwidth, and network failure.

What are the main routing protocols?

A routing protocol is a set of rules that specify how routers identify and forward packets along a network path. Routing protocols are grouped into two distinct categories: interior gateway protocols and exterior gateway protocols.

Interior gateway protocols work best within an autonomous system—a network administratively controlled by a single organization. External gateway protocols better manage the transfer of information between two autonomous systems.

Interior gateway protocols

These protocols assess the autonomous system and make routing decisions based on different metrics, such as the following:

  • Hop counts, or the number of routers between the source and the destination
  • Delay, or the time taken to send the data from the source to the destination
  • Bandwidth, or the link capacity between the source and the destination

The following are some examples of interior gateway protocols.

Routing Information Protocol

The Routing Information Protocol (RIP) relies on hop counts to determine the shortest path between networks. RIP is a legacy protocol that no one uses today because it does not scale well for larger network implementation.

Open Shortest Path First protocol

The Open Shortest Path First protocol (OSPF) collects information from all other routers in the autonomous system to identify the shortest and fastest route to a data packet’s destination. You can implement OSPF using various routing algorithms or computer processes.

External gateway protocols

The Border Gateway Protocol (BGP) is the only external gateway protocol.

Border Gateway Protocol

BGP defines communication over the internet. The internet is a large collection of autonomous systems all connected together. Every autonomous system has autonomous system number (ASN) that it obtains by registering with the Internet Assigned Numbers Authority.

BGP works by keeping track of the closest ASNs and mapping destination addresses to their respective ASNs.

What are routing algorithms?

Routing algorithms are software programs that implement different routing protocols. They work by assigning a cost number to each link; the cost number is calculated using various network metrics. Every router tries to forward the data packet to the next best link with the lowest cost.

The following are some example algorithms.

Distance Vector Routing

The Distance Vector Routing algorithm requires all routers to periodically update each other about the best path information they have found. Each router sends information about the current assessment of the total cost to all known destinations.

Eventually, every router in the network discovers the best path information for all possible destinations.

Link State Routing

In Link State Routing, every router discovers all other routers in the network. Using this information, a router creates a map of the complete network and then calculates the shortest path for any data packet.

How has routing evolved?

Routing has evolved to meet the requirements of advances in network technology. Routing is no longer just about switching data packets between autonomous systems and the internet.

We now have cloud infrastructure with computing resources and hardware hosted by third-party cloud providers. These cloud resources are connected virtually to create a virtual network of resources that businesses can use to host and run applications. Many organizations now have hybrid networks that consist of both on-premises networks with internal hardware and cloud networks. Routers must route traffic between these internal networks, the internet, and the cloud.

What is cloud routing?

Cloud routing dynamically manages connections between two virtual cloud networks or between a cloud network and an on-premises network using the Border Gateway Protocol (BGP). Cloud routing adapts automatically to changing network conditions in the cloud.  A cloud router—software that virtualizes the functions of a router—facilitates cloud routing.

What is DNS routing?

DNS, or the Domain Name System, translates human-readable domain names (for example, www.amazon.com) to machine-readable IP addresses (for example, 192.0.2.44). The data that maps this name information to machine information is stored separately on DNS servers. Before sending data to any website, routers must communicate with the DNS server to identify the exact machine address for the data packets.

DNS server communication can become a bottleneck, especially when many users want to visit a website at the same time. DNS routing refers to the various routing strategies and algorithms that manage communication with the DNS server. Various strategies, such as latency-based routing and geographic location–based routing, help manage the DNS server communication load.

How can AWS help with routing?

AWS Transit Gateway acts as a cloud router and connects VPCs and on-premises networks through a central hub. As your network grows, the complexity of managing incremental connections doesn’t slow you down. When building global applications, you can connect multiple AWS Transit Gateways by using inter-Region peering.

Amazon Route 53 is a highly available and scalable cloud DNS web service. It provides a reliable and cost-effective way for businesses and developers to route their end users to internet applications. Amazon Route 53 Traffic Flow makes it easy for you to manage traffic globally through a variety of routing types to create low-latency, fault-tolerant architectures.

Amazon Virtual Private Cloud (Amazon VPC) provides a logically isolated virtual network for AWS resources. You can use Amazon VPC route tables to define how resources running your VPC can access or communicate with resources running in other VPCs, on premises, or over the internet. You can use VPC route tables in combination with security groups and AWS Identity and Access Management (IAM) policies to granularly control how your VPCs connect to other resources in your environment.

Get started with cloud routing by creating an AWS account today.          

Next steps on AWS

Check out additional product-related resources
Learn more about Networking & Content Delivery 
Sign up for a free account

Instant get access to the AWS Free Tier.

Sign up 
Start building in the console

Get started building in the AWS management console.

Sign in