Sunday, November 11, 2012

Comparing RIP v1 and v2

Comparing RIP v1 and v2
1.2.3 This page will provide some more information about how RIP works. It will also describe the differences between RIP v1 and RIP v2. RIP uses distance vector algorithms to determine the direction and distance to any link in the internetwork. If there are multiple paths to a destination, RIP selects the path with the least number of hops. However, because hop count is the only routing metric used by RIP, it does not necessarily select the fastest path to a destination.
RIP v1 allows routers to update their routing tables at programmable intervals. The default interval is 30 seconds. The continual sending of routing updates by RIP v1 means that network traffic builds up quickly.  To prevent a packet from looping infinitely, RIP allows a maximum hop count of 15. If the destination network is more than 15 routers away, the network is considered unreachable and the packet is dropped. This situation creates a scalability issue when routing in large heterogeneous networks. RIP v1 uses split horizon to prevent loops. This means that RIP v1 advertises routes out an interface only if the routes were not learned from updates entering that interface. It uses holddown timers to prevent routing loops. Holddowns ignore any new information about a subnet indicating a poorer metric for a time equal to the holddown timer.
Figure summarizes the behavior of RIP v1 when used by a router.
RIP v2 is an improved version of RIP v1. It has many of the same features of RIP v1. RIP v2 is also a distance vector protocol that uses hop count, holddown timers, and split horizon. Figure compares and contrasts RIP v1 and RIP v2. The TTL field in the IP packet forces the packet to be dropped. When the hop count reaches 15 routers, the network is considered unreachable, and the packet is dropped because the router doesn't have a route to the destination network.
The first Lab Activity on this page will show students how to set up and configure RIP on routers. The second Lab Activity will review the basic configuration of routers. The Interactive Media Activity will help students understand the differences between RIP v1 and RIP v2.
The next page will explain how RIP v2 is configured.

RIP v2 feature

RIP v2 feature
1.2.2 This page will discuss RIP v2, which is an improved version of RIP v1. Both versions of RIP share the following features:
  • It is a distance vector protocol that uses a hop count metric.
  • It uses holddown timers to prevent routing loops – default is 180 seconds.
  • It uses split horizon to prevent routing loops.
  • It uses 16 hops as a metric for infinite distance.
RIP v2 provides prefix routing, which allows it to send out subnet mask information with the route update. Therefore, RIP v2 supports the use of classless routing in which different subnets within the same network can use different subnet masks, as in VLSM.
RIP v2 provides for authentication in its updates. A set of keys can be used on an interface as an authentication check. RIP v2 allows for a choice of the type of authentication to be used in RIP v2 packets. The choice can be either clear text or Message-Digest 5 (MD5) encryption. Clear text is the default. MD5 can be used to authenticate the source of a routing update. MD5 is typically used to encrypt enable secret passwords and it has no known reversal.
RIP v2 multicasts routing updates using the Class D address 224.0.0.9, which provides for better efficiency.
The next page will discuss RIP in greater detail.

RIP Version 2 (RIP history)



RIP Version 2

RIP history
1.2.1 

This page will explain the functions and limitations of RIP. The Internet is a collection of autonomous systems (AS). Each AS is generally administered by a single entity. Each AS has a routing technology which can differ from other autonomous systems. The routing protocol used within an AS is referred to as an Interior Gateway Protocol (IGP). A separate protocol used to transfer routing information between autonomous systems is referred to as an Exterior Gateway Protocol (EGP). RIP is designed to work as an IGP in a moderate-sized AS. It is not intended for use in more complex environments.
RIP v1 is considered a classful IGP. RIP v1 is a distance vector protocol that broadcasts the entire routing table to each neighbor router at predetermined intervals. The default interval is 30 seconds. RIP uses hop count as a metric, with 15 as the maximum number of hops.
If the router receives information about a network, and the receiving interface belongs to the same network but is on a different subnet, the router applies the one subnet mask that is configured on the receiving interface:
  • For Class A addresses, the default classful mask is 255.0.0.0.
  • For Class B addresses, the default classful mask is 255.255.0.0.
  • For Class C addresses, the default classful mask is 255.255.255.0.
RIP v1 is a popular routing protocol because virtually all IP routers support it. The popularity of RIP v1 is based on the simplicity and the universal compatibility it demonstrates. RIP v1 is capable of load balancing over as many as six equal-cost paths, with four paths as the default.
RIP v1 has the following limitations:
  • It does not send subnet mask information in its updates.
  • It sends updates as broadcasts on 255.255.255.255.
  • It does not support authentication.
  • It is not able to support VLSM or classless interdomain routing (CIDR).
RIP v1 is simple to configure, as shown in Figure .
The next page will introduce RIP v2.

RIP Version 2 (


Saturday, November 10, 2012

Configuring VLSM


Configuring VLSM
1.1.6 This page will teach students how to calculate and configure VLSM. If VLSM is the scheme chosen, it must then be calculated and configured correctly. 
The following are VLSM calculations for the LAN connections in Figure :
  • Network address: 192.168.10.0
  • The Perth router has to support 60 hosts. That means a minimum of six bits are needed in the host portion of the address. Six bits will yield 26 – 2, or 62 possible host addresses. The LAN connection for the Perth router is assigned the 192.168.10.0/26 subnet.
  • The Sydney and Singapore routers have to support 12 hosts each. That means a minimum of four bits are needed in the host portion of the address. Four bits will yield 24 – 2, or 14 possible host addresses. The LAN connection for the Sydney router is assigned the 192.168.10.96/28 subnet and the LAN connection for the Singapore router is assigned the 192.168.10.112/28 subnet.
  • The KL router has to support 28 hosts. That means a minimum of five bits are needed in the host portion of the address. Five bits will yield 25 – 2, or 30 possible host addresses. The LAN connection for the KL router is assigned the 192.168.10.64/27 subnet.
The following are VLSM calculations for the point-to-point connections in Figure :
  • Perth to KL
The connection from Perth to KL requires only two host addresses. That means a minimum of two bits are needed in the host portion of the address. Two bits will yield 22 – 2, or 2 possible host addresses. The Perth to KL connection is assigned the 192.168.10.128/30 subnet.
  • Sydney to KL
The connection from Sydney to KL requires only two host addresses. That means a minimum of two bits are needed in the host portion of the address. Two bits will yield 22 – 2, or 2 possible host addresses. The Sydney to KL connection is assigned the 192.168.10.132/30 subnet.
  • Singapore to KL
The connection from Singapore to KL requires only two host addresses. That means a minimum of two bits are needed in the host portion of the address. Two bits will yield 22 – 2, or 2 possible host addresses. The Singapore to KL connection is assigned the 192.168.10.136/30 subnet.
The following configuration is for the Singapore to KL point-to-point connection: 
Singapore(config)#interface serial 0
Singapore(config-if)#ip address 192.168.10.137 255.255.255.252
KualaLumpur(config)#interface serial 1
KualaLumpur(config-if)#ip address 192.168.10.138 255.255.255.252
This page concludes this lesson. The next lesson will discuss RIP. The first page describes RIP v1.

Route aggregation with VLSM



Route aggregation with VLSM

1.1.5 This page will explain the benefits of route aggregation with VLSM.
When VLSM is used, it is important to keep the subnetwork numbers grouped together in the network to allow for aggregation. For example, networks like 172.16.14.0 and 172.16.15.0 should be near one another so that the routers only carry a route for 172.16.14.0/23. 
The use of classless interdomain routing (CIDR) and VLSM prevents address waste and promotes route aggregation, or summarization. Without route summarization, Internet backbone routing would likely have collapsed sometime before 1997. 
Figure illustrates how route summarization reduces the burden on upstream routers. This complex hierarchy of variable-sized networks and subnetworks is summarized at various points with a prefix address, until the entire network is advertised as a single aggregate route of 200.199.48.0/20. Route summarization, or supernetting, is only possible if the routers of a network use a classless routing protocol, such as OSPF or EIGRP. Classless routing protocols carry a prefix that consists of a 32-bit IP address and bit mask in the routing updates. In Figure , the summary route that eventually reaches the provider contains a 20-bit prefix common to all of the addresses in the organization. That address is 200.199.48.0/22 or 11001000.11000111.0011. For summarization to work, addresses should be carefully assigned in a hierarchical fashion so that summarized addresses will share the same high-order bits.
The following are important rules to remember:
  • A router must know in detail the subnet numbers attached to it.
  • A router does not need to inform other routers about each subnet if the router can send one aggregate route for a set of routes.
  • A router that uses aggregate routes has fewer entries in its routing table.
VLSM increases route summarization flexibility because it uses the higher-order bits shared on the left, even if the networks are not contiguous. 
Figure shows that the addresses share the first 20 bits. These bits are colored red. The 21st bit is not the same for all the routes. Therefore the prefix for the summary route will be 20 bits long. This is used to calculate the network number of the summary route.
Figure shows that the addresses share the first 21 bits. These bits are colored red. The 22nd bit is not the same for all the routes. Therefore the prefix for the summary route will be 21 bits long. This is used to calculate the network number of the summary route.
The next page will teach students how to configure VLSM.

Calculating subnets with VLSM

Calculating subnets with VLSM

1.1.4 VLSM helps to manage IP addresses. This page will explain how to use VLSM to set subnet masks that fit the link or segment requirements. A subnet mask should satisfy the requirements of a LAN with one subnet mask and the requirements of a point-to-point WAN with another. 
The example in Figure shows a network that requires an address scheme.
The example contains a Class B address of 172.16.0.0 and two LANs that require at least 250 hosts each. If the routers use a classful routing protocol, the WAN link must be a subnet of the same Class B network. Classful routing protocols such as RIP v1, IGRP, and EGP do not support VLSM. Without VLSM, the WAN link would need the same subnet mask as the LAN segments. A 24-bit mask of 255.255.255.0 can support 250 hosts.  
The WAN link only needs two addresses, one for each router. That means that 252 addresses would be wasted.
If VLSM was used, a 24-bit mask would still be applied on the LAN segments for the 250 hosts. A 30-bit mask could be used for the WAN link because only two host addresses are needed.
Figure shows where the subnet addresses can be applied based on the number of host requirements. The WAN links use subnet addresses with a prefix of /30. This prefix allows for only two host addresses which is just enough for a point-to-point connection between a pair of routers.
In Figure , the subnet addresses used are generated when the 172.16.32.0/20 subnet is divided into /26 subnets.
To calculate the subnet addresses used on the WAN links, further subnet one of the unused /26 subnets. In this example, 172.16.33.0/26 is further subnetted with a prefix of /30. This provides four more subnet bits and therefore 16 (24) subnets for the WANs. Figure illustrates how to work through a VLSM system.
VLSM can be used to subnet an already subnetted address. For example, consider the subnet address 172.16.32.0/20 and a network that needs ten host addresses. With this subnet address, there are 212 – 2, or 4094 host addresses, most of which will be wasted. With VLSM it is possible to subnet 172.16.32.0/20 to create more network addresses with fewer hosts per network. When 172.16.32.0/20 is subnetted to 172.16.32.0/26, there is a gain of 26, or 64 subnets. Each subnet can support 26 – 2, or 62 hosts.
Use the following steps to apply VLSM to 172.16.32.0/20:
  1. Write 172.16.32.0 in binary form.
  2. Draw a vertical line between the 20th and 21st bits, as shown in Figure . The original subnet boundary was /20.
  3. Draw a vertical line between the 26th and 27th bits, as shown in Figure . The original /20 subnet boundary is extended six bits to the right, which becomes /26.
  4. Calculate the 64 subnet addresses with the bits between the two vertical lines, from lowest to highest in value. The figure shows the first five subnets available.
It is important to remember that only unused subnets can be further subnetted. If any address from a subnet is used, that subnet cannot be further subnetted. In Figure , four subnet numbers are used on the LANs. The unused 172.16.33.0/26 subnet is further subnetted for use on the WAN links.
The Lab Activity will help students calculate VLSM subnets.
The next page will describe route aggregation.