CCDA Notes IP Addressing and Routing Protocols
Efficiently assigning IP addresses to your network is a critical design decision, impacting the scalability of the network and the routing protocol that can be used. This section reviews IP Version 4 addressing, introduces IP Version 6 addressing, and analyzes characteristics of various routing protocols.
IP Addressing
Before discussing design decisions surrounding IP addressing, first review the following characteristics of Internet Protocol Version 4 (IPv4) addressing:
- IPv4 addresses are 32 bits in length.
- IPv4 addresses are divided into various classes (for example, Class A networks accommodate more than 16 million unique IP addresses, Class B networks support more than 65 thousand IP addresses, and Class C networks permit 254 usable IP addresses). Originally, organizations applied for an entire network in one of these classes. Today, however, subnetting allows a service provider to give a customer just a portion of a network address space, in an attempt to conserve the depleting pool of IP addresses. Conversely, service providers can use supernetting (also known as classless interdomain routing [CIDR]) to aggregate the multiple network address spaces that they have. Aggregating multiple network address spaces into one reduces the amount of route entries a router must maintain.
- Devices, such as PCs, can be assigned a static IP address, by hardcoding the IP address in the device’s configuration. Alternatively, devices can dynamically obtain an address from, for example, a DHCP server.
- Because names are easier to remember than IP addresses, most publicly accessible web resources are reachable by their name. However, routers must determine the IP address with which the name is associated to route traffic to that destination. Therefore, a Domain Name System (DNS) server can perform the translation between domain names and their corresponding IP addresses.
- Some IP addresses are routable through the public Internet, whereas other IP addresses are considered private and are intended for use within an organization. Because these private IP addresses might need to communicate outside the local network, Network Address Translation (NAT) can translate a private IP address into a public IP address. In fact, multiple private IP addresses can be represented with a single public IP address using NAT. This type of NAT is called Port Address Translation (PAT) because the various communication flows are identified by the port numbers they use to communicate with outside resources.
When beginning to design the IP addressing for a network, determine the following:
- The number of network locations that need IP addressing
- The number of devices requiring an IP address at each location
- Customer-specific IP addressing requirements (for example, static IP addressing versus dynamic IP addressing)
- The number of IP addresses that need to be contained in each subnet (for example, a 48 port switch in a wiring closet might belong to a subnet that supports 64 IP addresses)
Proper address planning can minimize the number of entries in a routing table through the use of aggregation. For example, suppose that Building 1 has a network address space of 10.1.1.0/24 (that is, 10.1.1.0 with a 24-bit subnet mask) and Building 2 has a network address space of 10.1.2.0/24. Instead of advertising both of those networks separately to the core layer, a distribution layer switch or router could aggregate those two addresses into a single route advertisement of 10.1.0.0/16 (that is, 10.1.0.0 with a 16-bit subnet mask). This approach to aggregating routes is called route summarization
Illustrates how subnets within individual buildings can be summarized by distribution layer switches before the routes are advertised to a core switch. In the figure, even though there are a total of four building subnets, the core switch maintains only two entries in its routing table for those four networks.
NOTE
In the preceding example, the summarized route of 10.1.0.0/16 encompassed more networks than the two being discussed. Therefore, a more appropriate subnet mask might have been chosen for a real-world design. However, the actual calculation of variable-length subnet masks (VLSM) is
beyond the scope of the DESGN course, and as a result, only classful subnet masks (that is, 8-bit, 16-bit, or 24-bit subnet masks) are used for the examples in these Quick Reference Sheets.
A major challenge with IPv4 is the limited number of available addresses. A newer version of IP, specifically IPv6, fixes this concern.An IPv6 address is 128 bits long, compared to the 32-bit length of an IPv4 address.
To make such a large address more readable, an IPv6 address uses hexadecimal numbers, and the 128-bit address is divided into eight fields. Each field is separated by a colon, as opposed to the four fields in an IPv4 address, which are separated by a period.
As an example, consider the following IPv6 address:
4071:0000:130F:0000:0000:09C0:D76A:9801
Notice the use of hexadecimal numbers and the eight colon-separated fields.
To further reduce the complexity of the IPv6 address, leading 0s in a field are optional, and if one or more consecutive fields contain all 0s, those fields can be represented by a double colon (that is, ::). A double colon can be used only once in an address; otherwise, it would not be possible to know how many 0s are present between each pair of colons.
To illustrate these techniques, consider the IPv6 address presented in the previous example. There are three fields consisting of all 0s:
4071:0000:130F:0000:0000:09C0:D76A:9801
Because a double colon can be used only one time, you want to replace the two consecutive all 0s fields with the double colon:
4071:0000:130F 09C0:D76A:9801
Next, the remaining field that contains all 0s can be represented with a single 0, because leading 0s are optional:
4071: :130F 09C0:D76A:9801
By the same reasoning, the leading 0 in the 09C0 field can be removed, leaving a resulting IPv6 address of
4071: :130F 9C0:D76A:9801
Consider some of the benefits offered by IPv6:
- IPv6 dramatically increases the number of available addresses (that is, approximately 3.4 * 10 addresses).
- Hosts can have multiple IPv6 addresses, allowing those hosts to multihome to multiple Internet service providers.
- Other benefits include enhancements relating to quality of service (QoS), security, mobility, and multicast technologies.
Unlike IPv4, IPv6 does not use broadcasts. Instead, IPv6 uses the following methods of sending traffic from a source to one or more destinations:
- Unicast (one-to-one)—Unicast support in IPv6 allows a single source to send traffic to a single destination, just as unicast functions in IPv4.
- Anycast (one-to-nearest)—A group of interfaces belonging to nodes with similar characteristics (for example, interfaces in replicated FTP servers) can be assigned an anycast address. When a host wants to reach one of those nodes, the host can send traffic to
the anycast address, and the node belonging to the anycast group that is closest to the sender will respond. For example, imagine a company has replicated FTP servers in countries throughout the world. A host in the United States can send a packet out to the anycast address (which all the FTP servers are associated with), and an FTP server in the United States will respond, rather than an FTP server in Japan, for example, because the United States FTP server is the closest server.
- Multicast (one-to-many)—Like IPv4, IPv6 supports multicast addressing, where multiple nodes can join a multicast group. The sender sends traffic to the multicast IP address, and all members of the multicast group receive the traffic.
Migrating an IPv4 network to an IPv6 network can take years because of the expenditures of upgrading equipment. Therefore, during the transition, IPv4-speaking devices and IPv6-speaking devices need to peacefully coexist on the same network. Consider three popular solutions for maintaining both IPv4 and IPv6 devices in the network:
- Dual stack—Some systems (including Cisco routers) can simultaneously run both IPv4 and IPv6, allowing communication to both IPv4 and IPv6 devices.
- Tunneling—To send an IPv6 packet across a network that only uses IPv4, the IPv6 packet can be encapsulated and tunneled through the IPv4 network
- Translation—A device, such as a Cisco router, could sit between an IPv4 network and an IPv6 network and translate between the two addressing formats.
Enterprise Routing Protocols
Routing protocols fall under one of two major categories:
- Distance vector—Distance vector routing protocols, such as Routing Information Protocol (RIP), RIPv2, and Interior Gateway Routing Protocol (IGRP), make routing decisions based on information learned from neighbors. Therefore, distance vector routing protocols are said to use “routing by rumor.” Most distance vector routing protocols advertise their entire routing table to their neighbors on a periodic basis (with the exception of RIPv2 which uses triggered updates). Slow convergence is another common characteristic of these protocols. Therefore, distance vector routing protocols are not appropriate for large enterprise networks.
- Link state—Link-state routing protocols cause a router to flood information about itself (that is, the state of its links) to all the other routers in a network, or routers in part of a network (for example, an area). Based on the information received, each router can independently calculate what it believes to be the shortest path to a given destination network. Examples of link state routing protocols include Open Shortest Path First Protocol (OSPF) and Integrated Intermediate System-to-Intermediate System Protocol (IS-IS).
A network under a single administrative control is said to be an autonomous system. Routing protocols running within an autonomous system are called interior gateway protocols (IGP). However, routing protocols are also needed to connect autonomous systems. For example,
you might use OSPF as your IGP within an enterprise network, but you might need a separate routing protocol to connect your enterprise network to your service providers. This type of routing protocol that connects different autonomous systems is called an exterior gateway
protocol (EGP). The only EGP in widespread use today is the Border Gateway Protocol (BGP).
The most popular routing protocols found in today’s enterprise networks are as follows:
- Enhanced IGRP (EIGRP)—EIGRP is a Cisco-developed routing protocol that is considered to be an advanced distance vector protocol, because it is based on IGRP but also has link-state characteristics. Unlike some distance vector routing protocols, EIGRP uses triggered updates (as opposed to periodic updates). EIGRP uses a topology table to keep track of all the routes received from its neighbors. VLSM is supported, in addition to multiple network layer protocols, including IPv4, IPv6, AppleTalk, and IPX. EIGRP also offers fast convergence times if a router or link fails.
- OSPF—Like EIGRP, OSPF is well suited for enterprise networks due to its fast convergence and VLSM support. OSPF also uses the concept of areas to limit the number of route advertisements sent through the network. Specifically, OSPF has a backbone area (that is, Area 0), and all other areas must connect to Area 0. If you allocate IP addresses appropriately, the routers sitting at the borders between the Area 0 and the nonbackbone areas can summarize the routes within their area and send summary route information into Area 0. shows an example of an OSPF network. Notice that an Autonomous System Boundary Router (ASBR) connects the OSPF network with an external autonomous
system.
- IS-IS—Similar to OSPF, the IS-IS routing protocol is a link-state routing protocol that uses the concept of network areas. With ISIS, the backbone area is called a Level 2 area and a nonbackbone area is called a Level 1 area. Routers that sit at the border between the backbone and a nonbackbone area are called Level 1/Level 2 (L1/L2) routers. IS-IS offers support for VLSM. However, IS-IS usually is deployed in service provider networks rather than enterprise networks.
- BGP—BGP is the routing protocol used on the Internet to connect different autonomous systems (for example, connecting an enterprise network’s autonomous system to a service provider’s autonomous system). However, some large enterprises use BGP to connect their network locations.BGP is highly tunable, allowing network administrators to influence BGP’s path selection. For example, if your enterprise network connects to two service providers, each at different speeds, BGP could be manipulated to prefer the higher speed route. shows an example of a BGP network.
Notice that the enterprise network contains routers R1 and R2. Within the enterprise network, OSPF is used as the IGP. The enterprise network connects with two service providers (that is, to routers BB1 and BB2) via BGP. The enterprise has an autonomous system number of 65001. The autonomous system numbers of the service providers are 65002 and 65003.
Routing Protocol Deployment
Enterprise network design requires quick convergence. Therefore, network designers often choose either OSPF or EIGRP, as previously described, for their IGP. Before selecting one routing protocol over the other, consider the following limitations:
- OSPF requires a hierarchical design, with all areas connecting to the backbone area. OSPF areas should map to a hierarchical addressing scheme. These requirements might not be practical or possible in all circumstances.
- EIGRP is a Cisco proprietary protocol. Therefore, EIGRP might not be appropriate in a mixed-vendor environment.
In addition to routing protocol selection, network designers should evaluate the following route manipulation techniques for their networks:
- Route redistribution—Route redistribution allows one routing protocol (for example, OSPF) to communicate its route information to another routing protocol (for example, EIGRP). As an example, this approach could support a mixed-vendor environment with Cisco routers using EIGRP and third-party routers using OSPF.
- Route filtering—Cisco routers support the filtering of selected routes in their routing updates. In some circumstances, route filtering can prevent routing loops and help provide optimal routing. In addition, a design might require that specific routes not enter a certain area of the network.
- Route summarization—The more routes a router must maintain in its routing table, the more router resources are consumed. Fortunately, route summarization can combine (that is, aggregate) multiple network addresses into a single network advertisement.For example, instead of advertising the individual networks 10.1.1.0/24, 10.1.2.0/24, and 10.1.3.0/24, these routes could be summarized as a single advertisement for network 10.1.0.0/16, which encompasses all the individually listed networks.
More Resources