53
Rolf Augstein © 2006 All rights reserved Page 1 Routing Architecture Module 2 Routing Fundamentals Basic Problems Principles, Classification Operation Author: Rolf Augstein [email protected] January 2006 Feel free to use this publication for private, non-commercial purposes. Objectives 1. Basic understanding of routing graphs 2. Describe the process of routing through a given network 3. Identify problems with Distance-Vector and Link-State protocols 4. Understand the solution for different routing problems 5. Outline different routing classifications 6. Describe the process of route summarization 7. Understand the relationship IP addressing scheme - routing functionality

Routing primer

Embed Size (px)

DESCRIPTION

Introduction into routing principles, methods and protocols

Citation preview

Page 1: Routing primer

Rolf Augstein © 2006 All rights reserved Page 1

Routing Architecture

Module 2Routing Fundamentals

Basic ProblemsPrinciples, ClassificationOperation

Author: Rolf Augstein

[email protected] January 2006

Feel free to use this publication for private, non-commercial purposes.

Objectives

1. Basic understanding of routing graphs 2. Describe the process of routing through a given network 3. Identify problems with Distance-Vector and Link-State protocols 4. Understand the solution for different routing problems 5. Outline different routing classifications 6. Describe the process of route summarization 7. Understand the relationship IP addressing scheme - routing functionality

Page 2: Routing primer

Rolf Augstein © 2006 All rights reserved Page 2

Key terms:

• Aggregate Route • Classless Inter-Domain Routing (CIDR) • Classless Routing • Convergence • Count-to-Infinity • Distance Vector (DV) • Exterior Routing Protocol EGP) • Flapping Route • Floating Static • Fixed Length Subnet Mask (FLSM) • Interior Routing Protocol (IGP) • Link State (LS) • Metric • Poison Reverse • Preference Value • Prefix Routing • Route Summarization • Routing Hierarchy • Routing Loops • Smart Router • Split Horizon • Variable Length Subnet Mask (VLSM)

Page 3: Routing primer

Rolf Augstein © 2006 All rights reserved Page 3

Routing Principles Routing in general is a method of finding the best way through a given network of roads or rail-tracks, for example. The term “best way” depends on individual parameters. It could mean the fastest, cheapest, or most comfortable one. Mathematical algorithms like “Dijkstra”, are used to find out the “best” way through a given network. The discipline dealing with this kind of problems is called the graph theory.

Graph Graphs are used to show all possible ways from a source to a destination. Not all combinations of ways are possible in the typical graph below. Example:

• It is not possible to go directly from node C to node B • You can go from node B to node F, but not same way back

Theory of graphs

6 5

11

13

2

2

3

41

3

3

8

7

3

A

D

C

B

E

F

G

H

- Where are the possible paths ?

- What´s the cost for each path ?

- What´s the best path ?

From A to H:

Find the best way

Page 4: Routing primer

Rolf Augstein © 2006 All rights reserved Page 4

Further, there are different metric values through certain paths between two nodes. The metric value from node A to node C is 6. The opposite direction, node C to node A has a metric value of 5 only. Different elements are used to draw relations between certain nodes.

Elements of Graphs

3

10

3

5

- both directions, equal cost

- one direction

- both directions, unequal cost

Examples:

Serial Links, Shared Medium, etc.

Special Links (Satellite)

ADSL

Page 5: Routing primer

Rolf Augstein © 2006 All rights reserved Page 5

Important Terms A graph consists of vertices (nodes) and edges. Two vertices are adjacent, if they are connected by an edge.

Example: This is a graph with 6 vertices (nodes) and 7 edges. A graph is called a complete graph, if each edge is connected to each of the others in the graph. Below are the first 5 complete graphs.

In data networking, this kind of graph is often called a “fully meshed network”. The number of edges in a complete graph is increasing dramatically with each new node. The formula to calculate the number of edges (possible ways) in a fully meshed network is:

n * ( n-1) 2

One more important term is directed graph. A digraph (directed graph) is a graph where edges are directed. This means that there are only certain possible ways through the graph.

The arrows mark the direction from which the graph is determined. In this example, we have a complete graph but there is no direct path from C to B.

Page 6: Routing primer

Rolf Augstein © 2006 All rights reserved Page 6

Basic Routing Topologies Because of the size of modern data networks, it is not possible to connect each node with all other nodes. So, fully meshed networks are normally not subject of a network design.

Figures

Fully meshed

Partially meshed

Partially meshed, Hub-and-Spoke

Fully meshed networks can be found in parts of Wide Area Networks like ATM, Frame Relay or X.25. On the other hand a meshed network is more reliable because of the redundancy. But the routing becomes very complex. In IP data networks each node is represented by an IP Router or a Switch with Layer 3 capabilities. From this point of view, the graphs draw the network topology from the IP layer. In most cases the design is based on partially meshed networks. This means not all nodes are connected to each other. The design is more based on geographic issues or available bandwidth etc. The Hub-and-Spoke architecture is often used where smaller locations like SOHO or ROBO are connected to a centralized node.

Page 7: Routing primer

Rolf Augstein © 2006 All rights reserved Page 7

Metric

Criteria for finding the best way

Metric

Path length

Cost factor

Bandwidth

??

Reliability

. . . .

The value metric is used in all routing procedures or protocols. In most cases the metric represents nothing more than an abstract value. Depending on the routing procedures, the metric has different meanings. Sometimes the metric counts the number of hops between two nodes. In other cases the metric is calculated out of the available bandwidths on the path, the delay, the MTU, the load, or the communication cost. Note The smaller the calculated metric, the better the way is. This is true for all dynamic and static routing procedures. Different routing protocols use different metric calculations. For this reason there is no compatibility between the metric values of dynamic routing protocols. To overcome this problem, it is possible to use route redistribution. This is covered later in this module.

Page 8: Routing primer

Rolf Augstein © 2006 All rights reserved Page 8

Each routing protocol uses a default method to calculate the metric between the nodes. For the network administrator it is possible to influence and manipulate the metric calculation and the way these information are passed between neighbours. It is possible to alter the entire routing behaviour in a given network disregard of real physical structure and cabling. Note Therefore the administrator must clearly understand all aspects of the routing protocol and it’s behaviour. Do not change metric values in a complex network structure just to “find out”. You can the force the entire data flow through a network to take different paths for special settings. Example: Asymmetric Routing Packets to the destination use a different path than the packets back from the destination. This is called asymmetric routing. With manipulation of the routing metrics, a router becomes an altered directed graph, a new logical topology of the data network.

Page 9: Routing primer

Rolf Augstein © 2006 All rights reserved Page 9

Routing Classification There are some different ways to make a routing classification. Three are covered in the following.

Static Routing vs. dynamic Routing

2-8Developed by Media-Learning.com © 2005 All rights reserved

Static vs. Dynamic

Defined by Administrator Learned from Network

Tell me, which networks are

available

Hmm. Which networks do I need

to reach ?

Mr. Administrator

Static Routing With static routing all destination networks and useable paths must be defined in the router. These definitions are a big administrative challenge. All routers at the remote side must have a route back the originating network. The router does not learn which data packets of a session were routed earlier. The return packet within a session must be routed back – therefore a back route has to be defined as well. Nevertheless, static routing still plays a role even in big networks.

Page 10: Routing primer

Rolf Augstein © 2006 All rights reserved Page 10

Table: Static Routing

Advantage Disadvantage No routing updates, less traffic No adaptation when links change Compatible with each router-system Complexity in bigger networks No flapping routes

Dynamic Routing Dynamic routing or adaptive routing uses protocol updates to propagate all known networks to all adjacent nodes. All possible paths through the data network are explored and learned. So the routers can take advantage of redundant links and react automatically whenever a link between two nodes is lost. Even the back routes are learned through this dynamic mechanism. There are various dynamic routing protocols with different level of complexity. Table: Dynamic Routing

Advantage Disadvantage All paths are propagated dynamically Routing Updates cause traffic Adaptation when links change Convergence, “ugly” route effects* More administrative knowledge

An administrator must have enough knowledge regarding the update behavior between the routing nodes. They are quite different and come with tricky problems and solutions. Examples are “Count-to-Infinity”, Split Horizon etc.* * Problems and effects with Routing Protocols are covered later in detail.

Page 11: Routing primer

Rolf Augstein © 2006 All rights reserved Page 11

Destination Routing vs. Source Routing

Routing: Destination vs. Source

Destination IP Source IP Data

Destination Routing Source Routing

Routing decision based on IP Network to go

Routing decision based on the Source of the IP packet

Examples: RIP, OSPF Examples: Policy Routing

Arriving IP Packet

Whenever a data packet arrives at the router, the destination IP address is checked against the routing table. If the destination network address is not defined in the routing table, the packet will be dropped. When working with static routing or dynamic routing protocols, this is the default procedure for the IP router in most cases. Routing protocols like RIP, OSPF etc. are based on destination routing. It is also possible to use the source part of an IP data packet to make a routing decision. For this to make work, an administrator must define special route maps. Example: A route map defines to forward all data packets from the network 10.12.5.0/24 to the Ethernet interface 3, and all data packets from 10.12.6.0/24 to the next hop gateway 10.10.45.1.

Page 12: Routing primer

Rolf Augstein © 2006 All rights reserved Page 12

The example shows no use of any destination IP addresses to make the routing decision. Routing decisions are not longer based on best paths with low metric. Routing becomes a matter of local policies. Note This is also called policy based routing. An administrative policy rules how routing decisions have to be made. When using this kind of routing, all rules for routing data traffic are defined statically in route maps. When the network becomes bigger, it can be very difficult to avoid “loosing routes somewhere in the network”. It is possible to combine destination routing with source routing within a routing node. Source routing is often used in conjunction with Quality of Service (QoS).

Page 13: Routing primer

Rolf Augstein © 2006 All rights reserved Page 13

Interior Routing vs. Exterior Routing

Interior vs. Exterior Routing Protocols

AS 56

AS 53

IGP

IGP

EGP

In larger networks it is necessary to use special routing protocols to handle the huge amount of routing information. Interior Gateway Protocols These protocols are used within an administrative area called Autonomous System (AS). Within an AS an administrator can decide with routing policy to use. Two or more Autonomous Systems can be linked together with the help of border routers. Typical routing protocols are:

RIP Version 1/ 2 Routing Information Protocol OSPF Open Shortest Path First IS – IS Intermediate State – Intermediate State Cisco IGRP Interior Gateway Routing Protocol Cisco EIGRP Enhanced EIGRP

Page 14: Routing primer

Rolf Augstein © 2006 All rights reserved Page 14

Note Autonomous Systems are identified by a 16 Bit number. This number is administrated from the Internet Assigned Numbers Authority (IANA). Two Internet RFCs discuss autonomous systems: RFC 1930 (Guidelines for creation, selection, and registration of an Autonomous System, March 1996) and RFC 0975 (Autonomous confederations, February 1986) According to RFC 1930 , "Without exception, an AS must have only one routing policy. Here routing policy refers to how the rest of the Internet makes routing decisions based on information from your AS." Exterior Gateway Protocols With an Exterior Gateway Protocol capsulated routing information within one Autonomous System is send to a second AS. The EGP connects Autonomous Systems by delivering dynamic procedures to propagate routing changes in a controlled manner. Typical routing protocols are:

EGP Exterior Gateway Protocol (Old, barely used) BGP Border Gateway Protocol

BGP design and configuration can be very complex. It is mostly used in some internet areas where carriers and internet providers are working together.

Page 15: Routing primer

Rolf Augstein © 2006 All rights reserved Page 15

Routing Operation

Finding the Way

Routing Tables

Net Gateway1 Direct 2 Direct 3 2b 4 2b

Net Gateway1 3b 2 3b 3 Direct 4 Direct

Net Gateway 1 2a 2 Direct 3 Direct 4 3c

1

2

3

4

1a

2a

2b

3b

3c

4c

a

b

c

The basic idea behind routing protocols is, to send local routing information to adjacent routing nodes. All connected interfaces with a configured IP address, cause an entry in the local routing table. The routing table consists of information to reachable destination networks. Local networks are marked as “direct connected” or “local”. With routing update packets send in a given time interval, neighbor routers using the same routing protocol learn possible ways to IP networks. In the next step, all learned routes from adjacent routing nodes are sent again in the next update cycle.

Page 16: Routing primer

Rolf Augstein © 2006 All rights reserved Page 16

If a routing node learns routes via OSPF routing, these routes are not updated by a different routing protocol like RIP. To make these protocols to interact, route redistribution is necessary.

Next Hop

1

2

3

4

1a

2a

2b

3b

3c

4c

a

b

c

I can reach network 3 and4 through my “Next Hop”, router 2b

Interface IP Address of the directly connected neighbor router

Next Hop:

All reachable IP destination networks are learned in the routing table. But the router has only a limited number of information sources. Example: Router “a” has only one information source, which is the adjacent router “b”. There is no information, telling router “a” that there is a third router “c”. But router “a” can reach the network “4” through router “b” as well. This information source is called the “next-hop gateway”. So after some time, a router learns all reachable networks, but is not aware of all other routers in the network. This is sometimes referred to as “routers have a flat view of the network”. Routers must have a valid route to the next-hop gateway. So always use the directly connected interface of the next-hop gateway as IP address.

Page 17: Routing primer

Rolf Augstein © 2006 All rights reserved Page 17

Bellman Ford Algorithm The Bellman Ford algorithm is used to find the shortest way in a graph and is the basis of distance-vector routing protocols.

Distance Vector Routing Protocol

RT RTRTRT

Broadcast Load

Metric Restrictions

Convergence Problem

Interval nInterval n+1Interval n+2

Distance Vector (DV) Routing The principle of DV routing is to send routing updates in a defined interval through all interfaces. These update packets use broadcast addresses, and contain information about all the reachable networks. The vector consists of the source address of the sending router. By this address receiving routers learn the address of the next-hop gateway over which the propagated networks can be reached. The distance describes the metric. In most cases this is simply the number of hops to a destination network. This number is restricted to a maximum of 15 hops. A typical DV protocol is the Routing Information Protocol (RIP). It is widely used and implemented in all UNIX and Windows Servers.

Page 18: Routing primer

Rolf Augstein © 2006 All rights reserved Page 18

By depending on a fixed time interval to send the routing updates to all neighbors, routing information need a certain amount of time to travel through the network. This effect is called “convergence”. The use of broadcast addresses causes in the WAN part of large network some problems. The advantage of DV routing is the simple implementation and the easy way to use it in networks.

Link State Algorithm Link-State algorithms are the solution for modern routing protocols. But they operate in a totally different way than the DV protocols.

Link-State Routing Protocol

LSA

RT..............................................................................................

Shortest Path First Tree

TopologyDatabase

SPF Algorithm

CPU

Memory

Page 19: Routing primer

Rolf Augstein © 2006 All rights reserved Page 19

Link State (LS) Routing The basic concept of link-state routing is that every node receives a connectivity map of the network, in the form of a graph showing which nodes are connected to which other nodes. Each node independently calculates the best next hop from it for every possible destination in the network Each router builds a relationship with all other routers using a link-state protocol. Different roles like designated router, area router, border router etc. are assigned. Each node periodically makes up a short message, the link-state advertisement, (LSA). The LSA´s are used to identify other nodes which are directly connected and keep track of changes in routing. All information concerning other routing nodes and reachable networks are stored in the topology database. Compared to DV routing, a LS router holds more information about the entire network and does not have a flat view only. To find the best way through all the reachable destination networks, LS routing uses the algorithm SPF. Shortest Path First (SPF) A routing node uses the stored graph to calculate all paths to each other routing nodes. The paths with the best metric values are used to forward IP data packets. The result is a spanned tree with best paths to all destination networks instead of a flat view compared to DV routing. The advantage of LS routing is quick reaction to any changes in the network topology.

Page 20: Routing primer

Rolf Augstein © 2006 All rights reserved Page 20

Process Topology Changes

Link Up-Down

router% Line protocol down......or

router% Line protocol up...... Keepalive Timer

..........C 194.123.123.16 is directly connected, Ethernet0R network 123.123.0.0 via Ethernet 0R network 34.23.0.0 via Ethernet 0

C 193.141.147.0 is directly connected, BRI0..........

All routes associated with interface Ethernet 0 are not valid any longer

Entries in Routing Table

How does a routing node realize changes in the network topology? Usually, topology changes cause error states on the connected router interface. The line protocol goes down or the interface hardware fails. To control the functionality of the interfaces, the Operating System generates control packets which are sent through the interface. If the interface signals a problem, the operation state changes and all corresponding routes are effected in the routing table.

Page 21: Routing primer

Rolf Augstein © 2006 All rights reserved Page 21

Routing Timer

Update

Flushing

Invalid

Time between Updates

Time after the entry is marked as “invalid”

network unreachable ....network possibly down .....

network 13.2.3.0Route is erased from Routing table

To avoid flapping interfaces and flapping routes the entire state change process uses a delay mechanism. Note The term “flapping” is often used to describe a failure condition, where i.e. an interface changes the state between up and down very often in small time intervals. This can cause a lot of problems and effect the entire network routing. An invalid timer controls when a route is marked as possibly unreachable or down. This timer is set 2 – 3 times higher than the update timer. At least two missed updates are necessary to cause a change in routing. An additionally flushing timer determines when a routing entry marked as possibly down is erased out of the routing table.

Page 22: Routing primer

Rolf Augstein © 2006 All rights reserved Page 22

Using multiple Paths

Load Balancing

Packets are “balanced” through multiple ways

Advantage:More Bandwidth

Higher Availability

Route A

Route B

When the routing process has two or more paths with equal metric to a destination network, it is possible to send the data packets along these routes. The data load is balanced. Some routing protocols can perform unequal cost load balancing with up to 5 different routes.

Page 23: Routing primer

Rolf Augstein © 2006 All rights reserved Page 23

Load Balancing (cont.)

Problem:

Different Trip TimesRoute A114 ms

Route B262 ms

- Per Destination Load Balancing

- Per Packet Load Balancing

One of the main problems when performing load balancing exists in the different trip times of particular routes. This can cause problems for data application when the packets arrive in a different order then actually sent. Special care must be taken. Different techniques are available to solve the negative effects. Example A gateway has 2 two different paths to the headquarter network. The first session initiated is sent through the first known path, the second session is sent through the second path. The third session must use the first path and so on. This called “Per Destination Load Balancing”. When using “Per Packet Load Balancing” all packets regardless of the session ID are balanced over both paths. In this case the load on the different paths is balanced in a optimized manner. But the risk of packet delays with a higher rate of retransmissions is more likely.

Page 24: Routing primer

Rolf Augstein © 2006 All rights reserved Page 24

Control Packet Lifetime

Time-to-Live

Decreasing Time-To-Live Counterwhen passing through router

TTL 23TTL 23 TTL 22TTL 22

IP-Version 4 Header

In the header of the IP packet, the field TTL takes care of data packets not travelling in the network for ever. Whenever a routing node forwards an IP packet, the TTL counter is decreased by one. A packet with TTL set to 0 is discarded by the router.

Page 25: Routing primer

Rolf Augstein © 2006 All rights reserved Page 25

Routing Problems Each routing protocol has advantages and also disadvantages. There is no perfect routing protocol. An administrator must deal with the pros and the cons trying to find the best solution for his needs.

Convergence

Convergence Problem

Worse case scenario

New Route to 194.200.1.0

Next Update in 60 secs

120 secs180 secs240 secs300 secs

194.200.1.0194.200.1.0194.200.1.0194.200.1.0194.200.1.0

A major problem with DV routing is the convergence problem. New information like changes in routing take quite some time to get to all members of the routing process. The negative effect is increasing when networks become bigger and the changes occur much more often.

Page 26: Routing primer

Rolf Augstein © 2006 All rights reserved Page 26

Count to Infinity

Count to Infinity

194.200.1.0

Worse case scenario

No Route to 194.200.1.0

?Don´t worry ! I have a route to 194.200.1.0

194.200.1.0194.200.1.0194.200.1.0

Slow convergence causes additional problems. Routers update routing information to neighbours, even if they are the source of this information. This phenomenon is called count-to-infinity, because it leads to a ping-pong effect until the maximum value for the metric is reached. So how can one overcome this kind of effects?

Page 27: Routing primer

Rolf Augstein © 2006 All rights reserved Page 27

Triggered Updates

Solution: Triggered Updates

Network unreachableMetric <max. Value>

OvercomeConvergence Problem !

Neighbor receives Update with max. Metric

Any other Changes aretransmitted immediately

interface down

The flow of negative information must be accelerated. Whenever a change in routing occurs, these changes are transmitted immediately to all adjacencies. If an entire network is unreachable, the update packets contain the metric value set to the maximum. Poison Reverse This technical term is used to indicate, that a packet with a higher metric or the maximum metric is set and sent along the reverse path trough the network to overcome problems like routing loops or count-to-infinity. Poison reverse is a triggered update to speed up the convergence of the routing protocol.

Page 28: Routing primer

Rolf Augstein © 2006 All rights reserved Page 28

Interface Hold-down

>entering hold-down for network 154.34.23.0

Flush network 154.34.23.0 via E0

Route Table

Network 154.34.23.0 down

• Accept no further Information for Network 154.34.23.0for a certain amount of time

• Avoidance of Routing-Loops

Timer

Update from neighbor

A router should not rely on information arriving on an interface that was sent out earlier over that interface. When a route is flushed out of the routing table, new update packets for a particular route from any neighbour are not accepted for some time. A router should realize which routes were propagated through the interfaces and should not accept some routes backward. Again these kinds of problems occur mainly on DV routing protocols on networks with high convergence.

Page 29: Routing primer

Rolf Augstein © 2006 All rights reserved Page 29

Loops

Routing Loops

Mr. Theory

Mrs. Easy

Mr. Brainbox

200.200.45.0

195.22.5.0

198.210.25.0

Default Route to …

Def

ault

Rou

te to

Default Route to …

Company Intranet with different Administrators

Another problem coming up sometimes is a loop in the routing information table. A routing loop can be caused by a lack of communication between different routing administrators, for example. This is a very tricky problem. It looks ridicules – but it is configured very quickly. Another source for routing loops is the way DV-protocols like RIP are working as seen in previous chapter. The solution to avoid loops is the Split Horizon.

Page 30: Routing primer

Rolf Augstein © 2006 All rights reserved Page 30

Split Horizon Split-horizon is a common solution to avoid routing loops. A cause for the route loop is that the router propagates routing information learned from a neighbour to that neighbour back. The idea of the split-horizon is not to send the routing information over the interface that has received this routing information.

Split Horizon

Hub and Spoke

Network 173.25.0.0

Dynamic Routingwith RIP

Propagated by RIP

Is not propagated by RIP

Problem: Point-to-Multipoint Interfaces

Can not access network 173.25.0.0 !

The Split Horizon problem comes up in switched wide area networks. In a switched network, one physical interface is configured with several instances of logical interfaces. The logical interfaces deal with the different IP networks. The routing process deals with the physical interface. So information learned from the way in on this physical interface is not sent out over the same physical interface. This is to avoid routing loops. So something that was designed to solve a problem now causes another problem. Administrators must be aware of the split horizon effect in point-to-multipoint interfaces to avoid routing misconfiguration.

Page 31: Routing primer

Rolf Augstein © 2006 All rights reserved Page 31

Routing Interoperability Many administrators use more than one routing protocol in their network to manage various needs. This chapter covers how different routing protocols can configured to interact with each other.

The Routing Order

The Routing Preference

OSPF

Static

RIPPriority ?

OSPF 2Static 1RIP 3

Choice: Which routing methodshould be used ?

Different routing protocols can be configured and activated in parallel on a router. But there is no interaction between each other. This means RIP gets all routing information for the network and a second routing protocol like OSPF calculates the best path through the some network as well. Question: So what routing paths are preferred by a data packet ? Each routing protocol including static routing methods do have an assigned priority value by default. This value is called the preference.

Page 32: Routing primer

Rolf Augstein © 2006 All rights reserved Page 32

Note: Cisco uses the same mechanism for routing interaction. This priority value is called Administrative Distance.

Working with Preference

Entries in Routing-Table

100.0.0.0

103RIPRoute to 100.0.0.0

81StaticRoute to 100.0.0.0

53OSPFRoute to 100.0.0.0

PreferenceMetricByNetwork

Route with best preference value

If there are several routes to a destination network, the first value checked is the preference value. This means the routing procedure with the highest priority is checked first. A lower preference value means more trust for the routing source. Again, within a routing procedure like OSPF, RIP, or Static, the metric value is used to define the best path. For customization purposes the preferences can be manually configured. If an administrator wants to trust a RIP derivate route more than an OSPF route, the default preference must be changed. Different manufacturers have different specifications on the preferences/ administrative distance of the routing protocols.

Page 33: Routing primer

Rolf Augstein © 2006 All rights reserved Page 33

The following table shows the default preferences of the routers of Quidway series produced by Huawei. In the table, a value of “0" denotes the direct route, and a value of "255" denotes any route from an untrustworthy source. Table: Default Preference Values for Quidway Series

Routing Protocol Preference

DIRECT 0

OSPF 10

STATIC 60

RIP 100

Internal BGP 130

OSPF AS External 150

External BGP 170

UNKNOWN 255 Except the direct route, preferences of all dynamic routing protocols can be configured manually according to the users' requirement.

Page 34: Routing primer

Rolf Augstein © 2006 All rights reserved Page 34

Floating Static

Floating Static Route

Use preference values to make static routes “interactive”

Serial Link, 128 KB

ISDN Link, Backup

Entries in Routing-Table

ISDN

Serial Link

Via

201StaticRoute to 100.0.0.0

103RIPRoute to 100.0.0.0

PreferenceMetricByNetwork

100.0.0.0

If serial links goes down, ISDN backup is triggered by static route

With the help of the preference one can make a static route more “dynamic”. By default, a static route has higher priority than all other dynamic routing procedures. One can change the behaviour, so as long as a dynamic route is present in the routing table, these routes are preferred. When for some reason the dynamic route disappears, the defined static route takes precedence. Floating static routes are often used as part of routing concepts with ISDN backup links.

Page 35: Routing primer

Rolf Augstein © 2006 All rights reserved Page 35

Route Redistribution

Route Redistribution

Routing with OSPF

Metric 117Metric 139

Metric 2Metric 5

?

Routing with RIP

not compatible

As mentioned earlier, each routing procedure uses proprietary metric calculations. To make them working together and exchange routing information, Route Redistribution can be used. With Route Redistribution, basically each routing procedure can be transferred in each other. There are a lot of considerations to make, when using redistribution. This entire technique is covered in detail in a later chapter. Administrators should have deeper understanding of the single routing procedures before using redistribution between them.

Page 36: Routing primer

Rolf Augstein © 2006 All rights reserved Page 36

Redistribution Policy

Convert OSPF Routes toRIP: Starting Metric 4

Convert RIP Routes toOSPF: Starting Metric 9

Define rules for redistribution

The basic principle with route redistribution consists in the choice for special routing nodes in the network, where redistribution should be established. Example: A set of definitions rule the way, a RIP route is converted and transferred in an OSPF route and vice versa. OSPF Metric 230 is converted to RIP Metric 4 RIP Metric 3 is converted to OSPF Metric 9 All metric conversions must be set with care, so the entire routing information context makes sense. Also, the choice of the position of the router in the network redistributing routes is relevant.

Page 37: Routing primer

Rolf Augstein © 2006 All rights reserved Page 37

Routing Design A structured network design is the fundament for implementing a useful routing strategy. Without a proper IP addressing, there is no way for scalable and stable networks.

Routing Hierarchy

Building Areas, Domains, AS

Core

Edge/ Convergence

Access

Internet

In larger networks with structured network design, some routers will take special control and handling of routing updates. To take advantage of different routing mechanisms it is very important to have a well administrated IP address scheme. Smart Router: From the routing perspective, some routers are smarter than others. Because of the routing information they hold in their routing table, some routers may have a more detailed knowledge about the network. This is common technique to control the amount of routing information. Small routers in the access zone do not need all information about the entire network.

Page 38: Routing primer

Rolf Augstein © 2006 All rights reserved Page 38

A good IP address plan implemented in a well-designed network has the following characteristics: • Scalability

Allows for large increases in the number of supported sites

• Predictability

Exhibits predictable behavior and performance

• Flexibility

Minimizes the impact of routers, additions, changes, or removals

Page 39: Routing primer

Rolf Augstein © 2006 All rights reserved Page 39

The Prefix

Prefix

Prefix Host

“Classfull” Routes

Class A 10.0.0.0/8

Class B 129.12.0.0/16

Class C 201.12.23.0/24

10.0.0.0 255.0.0.0

129.12.0.0 255.255.0.0

201.12.23.0 255.255.255.0

“Classless” Routes

Class C 201.12.112.0/21 201.12.112.0 255.255.248.0

For routing purposes, an IP address without a given subnet mask is “worthless”. To make routing decisions the subnet mask must always be considered. Instead of using the subnet mask in the dotted decimal format, a more convenient format is used. The Prefix points out, how many bits within the 32 bits of the IP address are used as the network part. So a prefix of 20 bits for an IP address like 144.37.99.34 means, you deal with a class B network 144.37.0.0 performing 4 bit subnetting.

Page 40: Routing primer

Rolf Augstein © 2006 All rights reserved Page 40

Summarize Routes

Route Summarization

Prefix Host

Prefix Host

Subnetting

Summarization

- Gain more routable networks

- Search common network bits for summarization

The process of divide a network in smaller sub-networks is done by shifting the network bits to the right. (see TCP/IP fundamentals). When dealing with large networks, it is important to minimize the amount of routing information. Less routing information means less routing update traffic and less RAM (memory) needed in the router. So the process of summarize many sub-networks to one network is called Route Summarization. This is done by shifting the network bits to the left.

Page 41: Routing primer

Rolf Augstein © 2006 All rights reserved Page 41

IP Address Management

132.17.25.0

132.17.26.0

132.17.29.0

132.17.27.0

132.17.28.0

132.17.0.0/16

Route SummarizationRoute Aggregation

IP subnetworks are auto-summarizedbased on Class A, B, C addresses

Only 1 update necessary

By default, most routers perform auto summarization for class A, B, or C networks. Instead of propagating up to 254 subnets of the network 132.17.0.0 (132.17.1.0 to 132.17.254.0) the summarized route 132.17.0.0/16 is used. This means an enormous improvement for the amount of routing traffic sent to the neighbour router. Note: Sometimes the term Route Aggregation is used. An aggregate route includes different sub-networks by using appropriate subnet masks.

Page 42: Routing primer

Rolf Augstein © 2006 All rights reserved Page 42

Relevant Bits

0000010100100011000101000000100110.20.35.5

IP Address: 10.20.35.5/ 16

16 Bits Prefix: Marks the relevant bits for all routing decisions

00000000000000000001010000001001Network:

00000000000000001111111111111111255.255.0.0

“AND”Logical

0000010100100011000101000000100110.20.35.5

What the Router does !

Bits to care Don´t care

Routing nodes need the IP address and the corresponding subnet mask to make routing decisions. Each interface needs this information as part of the configuration. With the help of the subnet mask and the logical “AND” operation, it is a simple process to read out the network part of the IP address. The prefix bits define the network relevant bits within an IP address. This is the reason for sending the prefix in each routing update when using routing protocols like OSPF or RIP version 2, so different subnet masks can be used within a single IP network. The older RIP version 1 is not capable of using different subnet masks in one class A, B, or C network. RIP updates are not aware of network prefix.

Page 43: Routing primer

Rolf Augstein © 2006 All rights reserved Page 43

Sub-Subnet

IP Address: 10.20.35.5/ 16

0000010100100011000101000000100110.20.35.5/16

Host A

0010 000001010011000101000000100110.20.35.5/19

IP Address: 10.20.35.5/ 19Host B

Subnet 10.20

Subnet 10.20.32

Without the subnet mask information, it is not possible to determine the location of a given host in the network. VLSM is like using an additional subnet for a “main subnet”. A “sub subnet” describes how many subnets are used within a defined subnet. Working with VLSM is simple math, but can be complex in real live. Interesting: Only routing nodes with appropriate routing procedures must be “aware” of VLSM. So, not all routing protocols can be used. End systems like hosts or servers do not have to deal with VLSM. They just have to be configured with a proper IP address and mask.

Page 44: Routing primer

Rolf Augstein © 2006 All rights reserved Page 44

VLSM Routing

172.16.11.0/24

172.16.13.4/30

172.16.0.0/16

172.16.13.8/30

Optimization with use of various prefix subnets

VLSM

172.16.56.0/24

Variable Length Subnet Mask is often used, to optimize the address space for a given class A, B, or C network. There are lots of small networks with few hosts. Using large subnets like 8 bits prefix actually wastes a lot of address space. Worse case is a PPP link with the need of two valid IP addresses only. With a 8 bits subnet, there are 252 wasted IP addresses !

Page 45: Routing primer

Rolf Augstein © 2006 All rights reserved Page 45

Variable-Length Subnet Mask

172.16.0.0/24

172.16.14.0/30

172.16.1.0172.16.2.0. . . .172.16.14.0. . . .172.16.254.0 172.16.14.4

172.16.14.8. . . .

172.16.14.252

Use one subnet to split into smaller VLSM subnets

254Subnets

62Subnets

Aggregate Route

A proven way of using VLSM is, to take a certain subnet out of the group of available subnets. Apply the new subnet mask i.e. 30 bits, so 62 new subnets are addressable. Each new subnet can address two hosts. The benefit is the gain of new smaller routable networks, which can be used to address PPP links. Note: VLSM does not mean an increasing of IP addresses at all. As a matter of fact, lots of addresses are lost because of broadcasts and network addresses.

Page 46: Routing primer

Rolf Augstein © 2006 All rights reserved Page 46

Table: Prefix Calculation

CIDR Netmask Hosts / subnet

Class Typical usage

/8 255.0.0.0 16777216 A Largest block allocation made by IANA

/9 255.128.0.0 8388608 /10 255.192.0.0 4194304 /11 255.224.0.0 2097152 /12 255.240.0.0 1048576 /13 255.248.0.0 524288 /14 255.252.0.0 262144 /15 255.254.0.0 131072 /16 255.255.0.0 65536 B /17 255.255.128.0 32768 ISP / large business /18 255.255.192.0 16384 ISP / large business /19 255.255.224.0 8192 ISP / large business /20 255.255.240.0 4096 Small ISP / large

business /21 255.255.248.0 2048 Small ISP / large

business /22 255.255.252.0 1024 /23 255.255.254.0 512 /24 255.255.255.0 256 C Large LAN /25 255.255.255.128 128 Large LAN /26 255.255.255.192 64 Small LAN /27 255.255.255.224 32 Small LAN /28 255.255.255.240 16 Small LAN /29 255.255.255.248 8 /30 255.255.255.252 4 "Glue network" (point to

point links) /31 255.255.255.254 2 "Useless Network",

proposed for point to point links (RFC 3021)

/32 255.255.255.255 1 Host route

Page 47: Routing primer

Rolf Augstein © 2006 All rights reserved Page 47

Classless Routing

200.16.168.0200.16.169.0200.16.170.0200.16.171.0200.16.172.0200.16.173.0200.16.174.0200.16.175.0

Defined Summary Route:200.16.168.0/21

CIDR: Classless Inter-Domain Routing

Contains block of:

The IP address space was divided into three main network classes, where each class had a fixed network size. The class, the length of the subnet mask and the number of hosts on the network, could always be determined from the most significant bits of the IP address. Without any other way of specifying the length of a subnet mask, routing protocols necessarily used the class of the IP address specified in route advertisements to determine the size of the routing prefixes to be set up in the routing tables. CIDR uses VLSM to allocate IP addresses to subnets according to individual needs. Thus the network/host division can occur at any bit boundary in the address. The process can be recursive, with a portion of the address space being further divided into even smaller portions, through the use of masks which cover more bits. Because the normal class distinctions are ignored, the new system is called classless routing.

Page 48: Routing primer

Rolf Augstein © 2006 All rights reserved Page 48

Prefix aggregation Another benefit of CIDR is the possibility of routing prefix aggregation. For example, sixteen contiguous /24 networks could now be aggregated together, and advertised to the outside world as a single /20 route (if the first 20 bits of their network addresses match). Two contiguous /20s could then be aggregated to a /19, and so forth. This allows a significant reduction in the number of routes that had to be advertised over the Internet, preventing 'routing table explosion' from overwhelming routers, and stopping the Internet from expanding further. When dealing with aggregate routes within the internet the term “Supernet” is used sometimes. These kinds of routing mechanisms are part of BGP routing. The Border Gateway Protocol is discussed more detailed in a later module. CIDR is described in: RFC 1519 (http://www.ietf.org/rfc/rfc1519.txt) Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy. RFC 1518 (http://www.ietf.org/rfc/rfc1518.txt) Architecture for IP Address Allocation with CIDR

Page 49: Routing primer

Rolf Augstein © 2006 All rights reserved Page 49

Discontinuous Use of Subnets

155.10.34.0/24 155.10.35.0/24

Oh fine: I have two routesby RIP to 155.10.0.0

198.23.24.0/24

?

Routing with RIP, Auto-summarization

Another interesting effect comes up with the discontinuous use of a class A, B, or C network, which is important to understand for routing administrators. Because routers perform auto-summarization on IP network address borders, the above situation arises for a router between two networks using discontinuous IP address spaces. From the routing perspective, there are two paths to the network 155.10.0.0 – with fatal consequences ! It is not recommended to split IP networks and use them on different discontinuous locations. To solve the above problem, auto-summary must be disabled on both routers. But then, too many routes are propagated through the network cloud, which could lead to additional problems.

Page 50: Routing primer

Rolf Augstein © 2006 All rights reserved Page 50

Prefix Matching

192.16.3.33 / 32 Host192.16.3.32 / 27 Subnet192.16.3.0 / 24 Net192.16.0.0 / 16 Block Network0.0.0.0 / 0 Default

Priority

Rule: “best prefix matches”

When using subnetting and VLSM in a network, the routing table has various entries for a network with different prefix lengths. Longest prefix match or best prefix match refers to an algorithm used to decide for the best routing entry. Because each entry of a routing table may specify a range of addresses, one destination address may match more than another routing table entry. The most specific table entry, this means the one with smallest host address range, is called the longest prefix match.

Page 51: Routing primer

Rolf Augstein © 2006 All rights reserved Page 51

Module Review

Summary

Static routing is still as important as adaptive routing protocols. Adaptive routing protocols are divided in Distance-Vector and Link-State protocols. Routing decisions are based on preferences and metric calculations. Network administrators must be aware of different routing problems like Split Horizon, Convergence, Loops, or other effects depending on the routing protocol. Different routing protocols can interact with the help of routing redistribution. Network design and appropriate IP addressing schemes are important for fast and stable routing. The ability for route summarization and aggregation is the key for adaptive routing in larger networks.

Page 52: Routing primer

Rolf Augstein © 2006 All rights reserved Page 52

Review Question

1. Outline the difference between metric and preference?

2. What are common problems of D-V routing protocols?

3. Build a small table and outline the advantages and disadvantages of L-S routing protocols.

4. What is the meaning of an adjacent router?

Page 53: Routing primer

Rolf Augstein © 2006 All rights reserved Page 53

5. What is meant by a “Floating Static Route” ?

6. Describe the rule “best prefix matches” and the relevancy to routing protocols.

7. What kind of topology is Hub-and-Spoke?

8. Describe the problems arising with a slow convergence.

9. What is the preference for a direct connected network ? Why ?

10. What is the meaning of asymmetric routing ?