Common IPv4 and IPv6 Routing Protocols
As two devices communicate with each other, there are many packets of data being transmitted back and forth. As you read this tutorial hosted in Texas, there are packets being transmitted from your computer to our server, then our server communicates back. The packet contains addressing information of where it is going. But how does it get there? How do all of the networking devices between your computer and our server know where to transmit that packet of data and receive a response?
The answer is in the routing protocols. A routing protocol is a process of selecting the paths in a network to send and receive data. Let’s say in our example above that an AT&T router along the path between your machine and our server goes down. Are you out of luck? Most likely not, as you will find a different route to transmit that packet to our server.
The routing process between a series of networking devices takes place with the help of routing tables which maintain records of routes to various destinations.
Classless Inter-Domain Routing
In the previous section, we briefly mentioned Classless Inter-Domain Routing (CIDR), a method of categorizing IP addresses for the purposes of allocating IP addresses and for efficient routing of IP packets.
CIDR can be thought of as a method of breaking down classes of IP addresses into manageable and assignable chunks. An organization manages IP addresses for a geographic region. An ISP obtains CIDR blocks from these organizations, and then divides the block into smaller CIDR blocks for its subscribers.
Border Gateway Protocol
The Border Gateway Protocol (BGP) is the core routing protocol of the Internet. BGP maintains tables of IP networks to determine the path packets use to move data. BGP is used by large ISPs to ensure traffic flows properly and through efficient paths.
BGP communicates on port 179 using TCP.
Routing and Routing Tables
Routing is the process of selecting paths along a network to send data. Routing directs a packet through network devices along the path – typically this includes switches, routers, bridges, gateways, and firewalls.
Typically, routing using routing tables to establish and record paths along the network. A routing table is an electronic table stored on a router (or networked computer) which maintains routes to particular network destinations.
If you think of a packet of data as a letter being mailed, the IP address of the destination is like the address on the letter.
The letter is picked up at its source (the source computer) and sent through a series of mail sorting machines (switches and routers) which determine which trucks and planes the letter should travel by. Once it leaves the source post office, it is sent by truck and possibly plane (sent along Internet pipes) to the destination post office. Once there, it goes through mail sorting machines and is delivered to the correct address.
Routing is what makes the Internet almost indestructible – if one router or switch fails, traffic can be re-routed around it to the destination (as long as there are multiple paths to the destination).