To understand something in the networking world, you have to understand the problem it's trying to solve. Memorizing the configuration options for a certain routing protocol won't help you until you understand what it's really doing. This article is designed to be a gentle introduction into the world of routing issues and concepts, arguably the most interesting and important part of networking, explaining the problems routing protocols address so you can understand why they do what they do.
Routing Details and Clarification
Before we get into the details, a clarification. When you hear people refer to "non-routable addresses," they are talking about RFC 1918 IP addresses (i.e. private addresses). Despite the misleading label, they certainly are routable. You can and should have some 10.x.x.x networks for local access and management. They can even be co-mingled with your real routers. They are called "non-routable" because the Internet routers will drop them. You should drop these packets at your border . this is a point of confusion for a lot of people.
On to the topic at hand.
Finding a Path
Routing, in essence, is the act of finding a path from one place to another on which a packet can travel. To find this path, we need algorithms. They will generally be distributed among many routers, allowing them to jointly share information. Routing is said to contain three elements:
- Routing protocols, the things that allow information to be gathered and distributed
- Routing algorithms, to determine paths
- Routing databases to store information that the algorithm has discovered. The routing database sometimes corresponds directly to routing table entries, sometimes not.
Our installment on layers actually introduces a bit of routing by talking about the paths an IP packet takes through operating systems and routers. What may not have been clear, though, is how the routing table lookup step works.
Remember subnetting? Most routers will simply find the shortest prefix in the routing table when it looks for a path for your packet. If there's a "host route," or /32 entry, that is always preferred. Any more specific routes, like the one that says what subnet you're on, will also be preferred before the default route is chosen.
We also need to understand some really basic problems with routing. Just like in Layer 2, routers need to be redundant. Redundancy always introduces the possibility of a loop, and every routing protocol has to deal with this. The idea of a network topology is pretty absurd in the context most people picture it. VLANs turned the world up side down in that regard. But in routing, topology is actually important, if you zoom out a bit.
Routers Pass It On
The whole idea behind routers is that they will "pass it on," either in the correct direction, or on to their smarter peers. If your network core has a bunch of stubs connected, many of the stub routers will know nothing about each other. But they know "the way to everything" is through the core, and they simply forward packets that way. Hesitantly, we'll call this a star topology. Of course, I'm insulting your intelligence, because this is the concept of a default route. But pay attention here: This is how many dynamic routing protocols work. It isn't always the case that you'll pass a packet onto the all-knowing default router, instead sometimes you'll be passing the packet to the router that you know handles a certain subnet. The point is that you know nothing about the other routers behind the one that tells you "I am network X."
The previous paragraph really embodies what routing is. You get packets closer to the destination. Of course, you have to know what's at each destination, and that's what routing protocols tell you. It's really easy to jump back and fourth when talking about routing, so take note that all of the above was with the picture of a single network in mind. This is also known as a routing domain. A routing domain is a set of routers that are all under the same administrative control, presumably all running the same routing protocols.
Using Dynamic Routing Protocols
When routing packets, we have a few paradigms to choose from. The telco world sets up a circuit for your telephone call as soon as you dial. The path is always the same, and it's very reliable. The IP world does not work that way, and it can handle much more traffic. The tradeoff is that you can get congestion, and sometimes fail to reach certain Web sites, whereas your telephone call will never drop because of congestion. The IP world can almost do this, through a mechanism called loose source routing. This is how it started: Each end node knew what hops it needed to take to reach its destination. Source-based routing doesn't scale, and introduces security problems. So we use dynamic routing protocols to figure out the paths for us. Take note that each direction can take a different path!
Routing protocols are broken up into a few different categories, in two senses. First, we have IGP, or Interior Gateway Protocols. RIP, OSPF, and IS-IS are a few IGP's you may have heard about. These are routing protocols that deal with intra-domain routing. EGP, Exterior Gateway Protocols, deal with inter-domain routing, between enterprises. Now defunct, EGP was actually a protocol, but BGP is now the standard inter-domain protocol.
Second, routing protocols are said to be of two categories in another sense: link-state, or vector-distance. The vector-distance approach is: "tell your neighbors about the world." This means that you will broadcast your entire routing table, to all your neighbors. The "vector" is the destination, and the "distance" is really a metric, or hop count. Link-state routing protocols "tell the world about your neighbors." The idea is to figure out who is "up" and broadcast that information about their link's state to all other routers. Link-state is very computationally intensive, but it provides an entire view of the network to all routers.
Most people prefer link-state protocols because they converge faster, which means that all of the routers have the same information. Link-state calculations take a long time, though, and happen every time we get an update, so they can't be used Internet-wide.
Did You Know...
- Routers send packets toward their destination, normally by shipping it toward a router that knows a bit more about the destination topology.
- Routing is two one-way problems; it is very common for your packets to take asymmetric routes.
- Link-state: fast convergence, eats CPU. Vector-distance: slow convergence, easier on the silicon.
This article originally appeared on Enterprise Networking Planet as a part of the Networking 101 series.
Key Terms To Understanding Routing
A device that forwards data packets along networks. A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP.s network. Routers are located at gateways, the places where two or more networks connect.
Keeping track of big data trends, research and statistics gives IT professionals a solid foundation to plan big data projects. Here are 15... Read More »Enterprise Storage Vendors
There's a number of vendors that sell enterprise storage hardware or offer cloud-based enterprise storage. View Webopedia's Enterprise storage... Read More »50 Cloud Computing Terms Defined
From planning a private cloud project to finding an online cloud storage provider, Webopedia's A-Z Cloud Computing Glossary will help you... Read More »
- Enterprise Mobility Exchange results show continued growth and emphasis on mobility. CIOInsight breaks down the numbers here. »
- Watch Datamation's editor James Maguire moderate roundtable discussions with tech experts from companies such as Accenture, Dell, Blue Jeans Network, Microsoft and more »
From the widest view, everything that we include under the heading of mobile has irrevocably changed IT's relationship with the rest of the... Read More »Choosing an Enterprise Storage Implementation
When you deploy a new enterprise storage system, you must decide whether to design and build your own storage system or to utilize a cloud-based... Read More »Big Data Analytics Expert Predictions
In this Webopedia Did You Know...? article we look at three big data expert predictions for 2014. Read More »