IP Routing - Concepts and Protocols
This portal offers a variety of tutorials on topics in IP routing. IP routing consists of a logic and a set of protocols by which IP datagrams (which contain the data that you want to send or receive on a computer network) are routed to their destination, whether on a private IP-based network, or over the Internet.
Very simply put, every IP datagram contains a destination IP address, which identifies the network to which the recipient host belongs as well as the host itself. Every host (that's what the IP world calls stations or devices attached to a network) and every router (originally called "gateway" in the IP world), when faced with a decision about how to forward a datagram (that's what the IP world calls what you might call "packets"), determines if the destination IP address is on a network that the host or router is connected to, in which case the destination is a neighbor, or if it is not a neighbor. If it is a neighbor, then the datagram can be transmitted directly, over the common infrastructure that the neighbors are connected to. (It makes no sense to define addresses such that logically two hosts are neighbors if they are not really physically neighbors!!) If the destination is not a neighbor, then, using information contained in its routing table, the host or router would forward the datagram to the "next hop" router. The routing table contains a mapping of destination networks to their respective next-hop routers, or, if a destination network is not listed in the routing table, then there is always the default router. The default router is the router that a host or router forwards a datagram to when no more specific information is available from the routing table.
To help you understand the concepts of routing and see how it works, I highly recommend the IP Routing Interactive Construction Kit, one of my all-time favorite tutorials, featuring a super applet. You do need some basic background on IP, such as IP addressing, subnetting, CIDR, some of the IP header fields (like TTL), and some of the very basic terminology. I've linked you to some helpful links to gain that background, or you might have already learned it in a class that you've attended. Most of the basic terminology is defined in the RIP tutorial. There is also an introduction to routing and explanation of important terminology in the OSPF tutorial (but unfortunately it does not open properly in all browsers). You can also take a look on the reference page for some suggestions of additional reference literature. The concepts are basically the same whether (the original) IPv4 or IPv6 datagrams are being routed. The point of the applet is to bring these concepts to life and have fun, too.
In the IP Construction Kit applet, you don't see how the routers build their routing tables. That's what IP routing protocols are for. IP routing protocols - the languages with which routers "speak" to each other to share routing information - can be categorized as intra-domain and inter-domain. (This has nothing to do with DNS, the Domain Name System, other than the fact that the common word might confuse the novice.) When we say intra-domain routing, we mean routing within a network that is under the control and administration of one organization. When such a network is part of the Internet (it could be a private network, not connected to the Internet), it is called an Autonomous System (AS), and it is assigned an AS number (ASN).
In that last link, you should take note that for each range of ASNs, there is a whois server that is listed as responsible. Basically, it tells which Regional Registry (I love that tutorial, too!) is responsible for assigning that range of ASNs. The whois application (available on loads of websites) allows you to find out information about an IP address, an ASN, and more. (The tutorial on RIRs has a whois client that you can use in "Free Query" mode to query about ASNs.) This website provides you with an up-to-date list of allocated ASNs.
Getting back to routing, there are two standard routing protocols that are used within an autonomous system (or within a routing domain), sometimes called IGPs (Interior Gateway Protocols): RIP (Routing Information Protocol) and OSPF (Open Shortest Path First). RIP is one of those protocols that has managed to survive for a long time. It had a bad reputation for a while (they used to say that "RIP" stood for "rest in peace"), because, for lack of a better choice, people used it inappropriately. But it really is simple and very appropriate for small networks. RIP Version 2 is the current version, and there is also a specification for using RIP on IPv6 networks. When reading the RIP tutorial, make sure to try the RIP Interactive Applet!
The other standard IGP, OSPF, is the more complex, more robust protocol, which is used for larger, more complex networks. It, too, has a specification for IPv6. There is also a popular proprietary protocol (notice the alliteration), EIGRP (Enhanced Interior Gateway Protocol), which is the revised version of IGRP (now obsolete), which was developed by Cisco to overcome some of RIP's limitations, before OSPF was on the scene. We'll leave it to the developers of the proprietary protocol to explain it.
The Internet is made up of many, many ASs, and the routing protocol used to exchange routing information between ASs (inter-domain) by their routers is BGP (Border Gateway Protocol), and it also supports IPv6.
For completeness, I should mention that some routers, in simple situations, don't use a routing protocol to build their routing tables. Rather, they use static routing - which means they are manually configured. Or, they might learn just their default route, automatically (such as from DHCP or with a PPP options), as hosts and your home routers do.
Thank you for visiting RAD University. We hope that these routing tutorials will be helpful.
Debby Koren, "Dean" RAD University
