Friday, July 22, 2011

Routing Guide - Concept and Guidelines


In large-sized business networks with many remote branch offices, connecting each business units / branch offices typically implemented using any types of available WAN technology servicesA router connects two networks or branch offices. A network is s segment with a unique network address. With regards to IP, the term network can be used to define two different things. Firstly, a segment with a unique IP address – typically refers to a subnet. Secondly, an IP address assigned to an organization. Speaking about connecting two different networks (typically via WAN cloud) you should understand about IP routing. The following section will discuss IP routing guide. See also basic knowledge about static route and alsoconcept of link state routing protocols
A subnet in IP routing guide is a summary address representing a group of adjacent hosts. In a very large network, such as the public Internet or a large corporate network, it is impractical to keep track of every individual device. Instead, the IP protocol groups devices together into subnets. And, similarly, you can summarize adjacent groups of subnet addresses. The result is an extremely efficient hierarchical addressing system. See also calculating the subnet networks.
In IP routing guide you should also be familiar with two different sets of rules for how groups of subnets can be summarized together. The older method uses a concept called class, while the newer method is classless and is often referred to by the acronym CIDR, for Classless Inter-Domain Routing which is extensively used in internet. To enable the CIDR, you can use the ip classless command in global configuration mode, and to disable it you can use no ip classless.
The biggest difference between classful and classless addressing is that classful addressing assumes that the first few bits of the address can tell you how big the network is. The previous article we have discussed about the IP address design and we know that there are 3 main IP address classes as in the following table.
Class TypeStart AddressEnd Address
Class A10.0.0.010.255.255.254
Class B172.16.0.0172.31.255.254
Class C192.168.0.0192.168.255.254
Several subnets within a Class A, B, or C network can be created. But for larger network structure, you can use CIDR that groups the networks into a single entire network which is called supernet. For example with the networks 192.168.100.0/24; 192.168.101.0/24; 192.168.102.0/24; and 192.168.103.0/24 can be summarized into 192.168.100.0/22 or in general writing as 192.168.100.0 255.255.252.0 in netmask notation.
Classless routing can use a mask of any length when looking for the best route to a destination, but classful routing cannot. For example on the above supernet 192.168.100.0/22, a router using classful routing would not consider the destination address 192.168.105.15 to be a part of 192.168.104.0/22 because it knows that anything beginning with 192 must be a Class C network. Instead, if there was no specific route for 192.168.105.0/24 or a subnet containing this destination, the router would skip straight to the default route. If you mix classless and classful routing, this could be the wrong path, and in the worst case, it could even cause a routing loop.
This is why it is so important to make sure that you are consistent about which type of routing and addressing you want to use. In general, it is better to use CIDR because of the improved flexibility it offers. Also, since CIDR allows more levels of route summarization, you can often simplify your routing tables so that they take up less memory in the routers. This, in turn, can improve network performance.
Before we need to discuss deeper about IP routing guide, we should understanding the concept about IP routing protocols. IP routing protocols fill the IP routing table with valid routes and (hopefully) loop-free routes. Each route includes a subnet number, the interface out which to forward packets so that they are delivered to that subnet, and the IP address of the next router that should receive packets destined for that subnet (if needed).
Before examining the underlying logic in this IP routing guide, considering the goals of a routing protocol is needed. The goals described in the following list are common for any IP routing protocol, regardless of its underlying logic type:
  • To dynamically learn and fill the routing table with a route to all subnets in the network.
  • If more than one route to a subnet is available, to place the best route in the routing table.
  • To notice when routes in the table are no longer valid, and to remove those routes from the routing table.
  • If a route is removed from the routing table and another route through another neighboring router is available, to add the route to the routing table. (Many people view this goal and the preceding one as a single goal.)
  • To add new routes, or to replace lost routes with the best currently available route as quickly as possible. The time between losing the route and finding a working replacement route is called convergence time.
  • To prevent routing loops.
Routing protocols in this routing guide basically is simple logic but can become rather complicated. Routing protocols take the routes in a routing table and send a message to their neighbors telling them about the routes. After a while, everyone has heard about all the routes.
Figure below shows a sample network for IP routing guide explanation, with routing updates shown. Table A lists Router B’s routing table before receiving the routing updates; and table B lists Router B’s routing table after receiving the routing updates.
IP Routing guide
Table A – Router B Routing table before receiving the update shown in the above networking diagram.
GroupOutgoing InterfaceNext-hop routerMetricDescription
162.11.7.0E0-0This is a directly connected route
162.11.8.0S0-0This is a directly connected route
Table B – Router B Routing Table After Receiving the Update Shown in the above networking diagram.
GroupOutgoing InterfaceNext-hop routerMetricDescription
162.11.5.0S0162.11.8.11Learned from Router A, so next-hop
is Router A.
162.11.7.0E0-0This is a directly connected route
162.11.8.0S0-0This is a directly connected route
162.11.9.0S0162.11.8.11Learned from Router A, so next-hop is Router A.
162.11.10.0S0162.11.8.12This one was learned from Router A,
which learned it from Router C.
Router B adds routes for directly connected subnets when the interfaces first initialize. In fact, no routing protocols are needed for a router to learn routes to the directly connected subnets. So, before Router B receives any routing updates, it knows about only two routes—the two connected routes—as listed in Table A. After receiving the update from Router A, Router B has learned three more routes. Because Router B learned those routes from Router A, all three of B’s routes point back to Router A as the next hop router. That makes sense because it is obvious from the figure that B’s only path to the other subnets lies through Router A.
Router A learned about subnets 162.11.5.0 and 162.11.9.0 because A is connected directly to those subnets. Router A, in turn, learned about subnet 162.11.10.0, the subnet off Router C’s Ethernet, from routing updates sent by Router C.