Professional Documents
Culture Documents
Routing Architecture: Objectives
Routing Architecture: Objectives
Routing Architecture: Objectives
Objectives
1. 2. 3. 4. 5. 6. 7. Basic understanding of routing graphs Describe the process of routing through a given network Identify problems with Distance-Vector and Link-State protocols Understand the solution for different routing problems Outline different routing classifications Describe the process of route summarization Understand the relationship IP addressing scheme - routing functionality
Rolf Augstein
Page 1
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)
Rolf Augstein
Page 2
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
D
3 3 13 11 8
H E
3
F
6 5 3 2
1 4
From A to H: - Whats the cost for each path ? Find the best way - Whats the best path ?
Rolf Augstein
Page 3
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.
Elements of Graphs
Examples:
3
- one direction
10 3
ADSL
Rolf Augstein
Page 4
Important Terms A graph consists of vertices (nodes) and edges. Two vertices are adjacent, if they are connected by an edge.
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.
Rolf Augstein
Page 5
Figures
Partially meshed
Fully meshed
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.
Rolf Augstein
Page 6
Metric
?
Path length Metric 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.
Rolf Augstein
Page 7
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 its 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.
Rolf Augstein
Page 8
Routing Classification
There are some different ways to make a routing classification. Three are covered in the following.
Hmm. Which networks do I need to reach ? Tell me, which networks are available
Mr. Administrator
Defined by Administrator
2-8
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.
Rolf Augstein
Page 9
Advantage No routing updates, less traffic Compatible with each router-system 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.
Advantage All paths are propagated dynamically Adaptation when links change
Disadvantage Routing Updates cause traffic 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.
Rolf Augstein
Page 10
Destination Routing
Source Routing
Arriving IP Packet
Destination IP
Source IP
Data
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.
Rolf Augstein
Page 11
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).
Rolf Augstein
Page 12
IGP
AS 56
EGP
AS 53
IGP
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 OSPF IS IS Cisco IGRP Cisco EIGRP Routing Information Protocol Open Shortest Path First Intermediate State Intermediate State Interior Gateway Routing Protocol Enhanced EIGRP
Rolf Augstein
Page 13
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."
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 BGP Exterior Gateway Protocol (Old, barely used) 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.
Rolf Augstein
Page 14
Routing Operation
Finding the Way
Routing Tables
1a
a
2a
Net 1 2 3 4
2
2b
Net 1 2 3 4 Gateway 2a Direct Direct 3c
b
3b
Net 1 2 3 4 Gateway 3b 3b Direct Direct
3
3c
c
4c
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.
Rolf Augstein
Page 15
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
1a
2a
2
2b
b
3b
3
3c
Next Hop:
4c
c 4
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.
Rolf Augstein
Page 16
RT
RT
RT
RT
Interval n+2
Interval n+1
Interval n
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.
Rolf Augstein
Page 17
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.
CPU
Memory
RT
.................. ................. ................. ................. .......... ...............
SPF Algorithm
Rolf Augstein
Page 18
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 LSAs 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.
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.
Rolf Augstein
Page 19
Link Up-Down
Keepalive Timer
Entries in Routing Table .......... C 194.123.123.16 is directly connected, Ethernet0 R network 123.123.0.0 via Ethernet 0 R network 34.23.0.0 via Ethernet 0 All routes associated with interface Ethernet 0 are not valid any longer C 193.141.147.0 is directly connected, BRI0 ..........
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.
Rolf Augstein
Page 20
Routing Timer
Update
Time between Updates
Invalid
Flushing
network 13.2.3.0
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.
Rolf Augstein
Page 21
Load Balancing
Route A
Route B
Packets are balanced through multiple ways More Bandwidth Advantage: Higher Availability
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.
Rolf Augstein
Page 22
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.
Rolf Augstein
Page 23
TTL 23 TTL 23
TTL 22 TTL 22
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.
Rolf Augstein
Page 24
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
New Route to 194.200.1.0
194.200.1.0
194.200.1.0
194.200.1.0
194.200.1.0
194.200.1.0
300 secs
240 secs
180 secs
120 secs
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.
Rolf Augstein
Page 25
Count to Infinity
Count to Infinity
?
194.200.1.0
No Route to 194.200.1.0
194.200.1.0
194.200.1.0
194.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.
Rolf Augstein
Page 26
Triggered Updates
interface down
Network unreachable
Metric <max. Value>
Neighbor receives Update with max. Metric Any other Changes are transmitted immediately
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.
Rolf Augstein
Page 27
Interface Hold-down
Update from neighbor
Network 154.34 .23.0 d own
er im T
Route Table
Flush network 154.34.23.0 via E0
Accept no further Information for Network 154.34.23.0 for a certain amount of time Avoidance of Routing-Loops
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.
Rolf Augstein
Page 28
Loops
Routing Loops
Mrs. Easy
198.210.25.0
ute to
to
ult R o
Def a
200.200.45.0
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.
Rolf Augstein
Page 29
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
Is not propagated by RIP
Propagated by RIP
Dynamic Routing with RIP Can not access network 173.25.0.0 ! 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.
Rolf Augstein
Page 30
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.
RIP
Choice:
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.
Each routing protocol including static routing methods do have an assigned priority value by default. This value is called the preference.
Rolf Augstein
Page 31
Note: Cisco uses the same mechanism for routing interaction. This priority value is called Administrative Distance.
Entries in Routing-Table
Network Route to 100.0.0.0 Route to 100.0.0.0 Route to 100.0.0.0 By OSPF Static RIP Metric 3 1 3 Preference 5 8 10
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.
Rolf Augstein
Page 32
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.
Routing Protocol DIRECT OSPF STATIC RIP Internal BGP OSPF AS External External BGP UNKNOWN
Except the direct route, preferences of all dynamic routing protocols can be configured manually according to the users' requirement.
Rolf Augstein
Page 33
Floating Static
Entries in Routing-Table
Network Route to 100.0.0.0 Route to 100.0.0.0 By RIP Static Metric 3 1 Preference 10 20 Via Serial Link ISDN
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.
Rolf Augstein
Page 34
Route Redistribution
Route Redistribution
?
not compatible
Metric 2 Metric 5
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.
Rolf Augstein
Page 35
Redistribution Policy
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.
Rolf Augstein
Page 36
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
Internet
Core
Edge/ Convergence
Access
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.
Rolf Augstein
Page 37
A good IP address plan implemented in a well-designed network has the following characteristics:
Rolf Augstein
Page 38
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.
Rolf Augstein
Page 39
Summarize Routes
Route Summarization
Prefix
Host
Subnetting
Prefix
Host
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.
Rolf Augstein
Page 40
IP Address Management
Route Summarization Route Aggregation
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.
Rolf Augstein
Page 41
Relevant Bits
IP Address: 10.20.35.5/ 16
10.20.35.5 00001001 00010100 00100011 00000101
16 Bits Prefix: Marks the relevant bits for all routing decisions
10.20.35.5
00001001
00010100 Logical
00000101
11111111
11111111
00000000
00001001
00010100
00000000
00000000
Bits to care
Dont 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.
Rolf Augstein
Page 42
Sub-Subnet
Host A
IP Address: 10.20.35.5/ 16
10.20.35.5/16
00001001
00010100
00100011
00000101
Subnet 10.20
10.20.35.5/19
00001001
00010100
0010
0011
00000101
Subnet 10.20.32
Host B
IP Address: 10.20.35.5/ 19
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.
Rolf Augstein
Page 43
VLSM Routing
VLSM
172.16.56.0/24 172.16.13.4/30
172.16.11.0/24
172.16.13.8/30
172.16.0.0/16
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 !
Rolf Augstein
Page 44
172.16.0.0/24
172.16.1.0 172.16.2.0 . . . . Aggregate Route
254 Subnets
172.16.14.0/30
172.16.14.4 172.16.14.8 . . . . 172.16.14.252
172.16.14.0
. . . .
172.16.254.0
62
Subnets
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.
Rolf Augstein
Page 45
Table: Prefix Calculation CIDR /8 /9 /10 /11 /12 /13 /14 /15 /16 /17 /18 /19 /20 /21 /22 /23 /24 /25 /26 /27 /28 /29 /30 /31 Netmask 255.0.0.0 255.128.0.0 255.192.0.0 255.224.0.0 255.240.0.0 255.248.0.0 255.252.0.0 255.254.0.0 255.255.0.0 255.255.128.0 255.255.192.0 255.255.224.0 255.255.240.0 255.255.248.0 255.255.252.0 255.255.254.0 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224 255.255.255.240 255.255.255.248 255.255.255.252 255.255.255.254 Hosts / subnet 16777216 8388608 4194304 2097152 1048576 524288 262144 131072 65536 32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 Class A Typical usage Largest block allocation made by IANA
B ISP / large business ISP / large business ISP / large business Small ISP / large business Small ISP / large business
Large LAN Large LAN Small LAN Small LAN Small LAN "Glue network" (point to point links) "Useless Network", proposed for point to point links (RFC 3021) Host route
/32
255.255.255.255
Rolf Augstein
Page 46
Classless Routing
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.
Rolf Augstein
Page 47
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
Rolf Augstein
Page 48
198.23.24.0/24
155.10.35.0/24
?
Oh fine: I have two routes by RIP to 155.10.0.0
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.
Rolf Augstein
Page 49
Prefix Matching
Priority
192.16.3.33 / 32 Host 192.16.3.32 / 27 Subnet 192.16.3.0 / 24 Net 192.16.0.0 / 16 Block Network 0.0.0.0 / 0 Default
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.
Rolf Augstein
Page 50
Module Review
Summary
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.
Rolf Augstein
Page 51
Review Question
3. Build a small table and outline the advantages and disadvantages of L-S routing protocols.
Rolf Augstein
Page 52
6. Describe the rule best prefix matches and the relevancy to routing protocols.
Rolf Augstein
Page 53