Static IP Routing and Aggregation Exercises



Similar documents
Layer 3 Routing User s Manual

How To Understand Bg

Using the Border Gateway Protocol for Interdomain Routing

LAB THREE STATIC ROUTING

Instructor Notes for Lab 3

How Subnets Work in Practice. Fred Marshall Coastal Computers & Networks

Border Gateway Protocol (BGP)

Chapter 4. Distance Vector Routing Protocols

Router and Routing Basics

APNIC elearning: BGP Basics. Contact: erou03_v1.0

co Characterizing and Tracing Packet Floods Using Cisco R

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Configuring NetFlow Switching

WAN Wide Area Networks. Packet Switch Operation. Packet Switches. COMP476 Networked Computer Systems. WANs are made of store and forward switches.

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Internetworking and Internet-1. Global Addresses

Routing with OSPF. Introduction

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Computer Networks By Bahaa Q. Al-Mussawi Subnetting Basics Reduced network traffic Optimized network performance Simplified management

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

IP Addressing A Simplified Tutorial

Chapter 10 Link-State Routing Protocols

IP Routing Configuring Static Routes

APNIC elearning: BGP Attributes

Introduction to LAN/WAN. Network Layer

Module 2: Assigning IP Addresses in a Multiple Subnet Network

SUBNETS, CIDR, AND CLASSLESS ADDRESSING

(Refer Slide Time: 02:17)

Configuration of Cisco Routers. Mario Baldi

Exterior Gateway Protocols (BGP)

Routing Protocols and Concepts Chapter 2 Conceitos de protocolos de Encaminhamento Cap 2

Table of Contents. Cisco How Does Load Balancing Work?

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

Finding Fault Location: Combining network topology and end-to-end measurments to locate network problems?

Teldat Router. ARP Proxy

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Level 2 Routing: LAN Bridges and Switches

Border Gateway Protocol BGP4 (2)

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Fast Re-Route in IP/MPLS networks using Ericsson s IP Operating System

IP Multicasting. Applications with multiple receivers

BGP Best Path Selection Algorithm

Computer Networks Administration Help Manual Sana Saadaoui Jemai Oliver Wellnitz

CCNP SWITCH: Implementing High Availability and Redundancy in a Campus Network

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Redundancy and load balancing at L3 in Local Area Networks. Fulvio Risso Politecnico di Torino

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines

Using OSPF in an MPLS VPN Environment

Redundancy and load balancing at L3 in Local Area Networks. Fulvio Risso Politecnico di Torino

PRASAD ATHUKURI Sreekavitha engineering info technology,kammam

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Route Discovery Protocols

Troubleshooting Tools

Lecture 8. IP Fundamentals

Fast Reroute Techniques in MPLS Networks. George Swallow

TORA : Temporally Ordered Routing Algorithm

ETHEL THE AARDVARK GOES BGP ROUTING

Sampled NetFlow. Feature Overview. Benefits

CCNA Exploration 4.0: (II) Routing Protocols and Concepts. Chapter 1: Introduction to Routing and Packet Forwarding

Faculty of Engineering Computer Engineering Department Islamic University of Gaza Network Chapter# 19 INTERNETWORK OPERATION

Software Defined Networking & Openflow

Software Defined Networking (SDN) - Open Flow

04 Internet Protocol (IP)

Chapter 3. Enterprise Campus Network Design

Understanding Virtual Router and Virtual Systems

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Wide Area Networks. Learning Objectives. LAN and WAN. School of Business Eastern Illinois University. (Week 11, Thursday 3/22/2007)

Modeling and Simulation of Routing Protocols in the Cloud

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

The ABCs of Spanning Tree Protocol

One of the most important topics in any discussion of TCP/IP is IP. IP Addressing

AS/400e. TCP/IP routing and workload balancing

Introduction to Dynamic Routing Protocols

CS335 Sample Questions for Exam #2

Lab a Basic Subnetting

DEMYSTIFYING ROUTING SERVICES IN SOFTWAREDEFINED NETWORKING

Advanced BGP Policy. Advanced Topics

Routing Protocols (RIP, OSPF, BGP)

Internet Layer. Routing Tables. Routing in the Internet. Routing Protocols

COURSE AGENDA. Lessons - CCNA. CCNA & CCNP - Online Course Agenda. Lesson 1: Internetworking. Lesson 2: Fundamentals of Networking

ICS 351: Today's plan

What is VLAN Routing?

Disaster Recovery Design Ehab Ashary University of Colorado at Colorado Springs

How To Understand and Configure Your Network for IntraVUE

Mitigation of Breaking Connections. (a.k.a. OLSRd v1 Multi-Gateway & BRDP)

Configuring a Load-Balancing Scheme

Interconnecting Cisco Networking Devices Part 2

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

Customer Specific Wireless Network Solutions Based on Standard IEEE

6.02 Practice Problems: Routing

Internet inter-as routing: BGP

Redundancy and load balancing at L3 in Local. Fulvio Risso Politecnico di Torino

GregSowell.com. Mikrotik Routing

Infrastructure Components: Hub & Repeater. Network Infrastructure. Switch: Realization. Infrastructure Components: Switch

Introduction. Internet Address Depletion and CIDR. Introduction. Introduction

Transcription:

Politecnico di Torino Static IP Routing and Aggregation xercises Fulvio Risso August 0, 0

Contents I. Methodology 4. Static routing and routes aggregation 5.. Main concepts........................................ 5... Routing table..................................... 5... irectly connected IP networks........................... 6..3. Remote IP networks................................. 6..4. Costs......................................... 7..5. Aggregated routes.................................. 8..6. Mainly specific route................................. 9..7. efault route.......................................8. ifferent costs routes................................... Routing table definition procedure............................. 3... List and typology of the IP networks........................ 3... efinition of the routing tree............................ 4..3. etermination of the routing table......................... 6..4. etermination of the possible routes aggregations................. 8 II. xercises 0. xercises.. xercise n............................................ xercise n...........................................3. xercise n 3...........................................4. xercise n 4...........................................5. xercise n 5.......................................... 3.6. xercise n 6.......................................... 4.7. xercise n 7.......................................... 5.8. xercise n 8.......................................... 6.9. xercise n 9.......................................... 7.0. xercise n 0......................................... 8.. xercise n......................................... 9.. xercise n......................................... 30.3. xercise n 3......................................... 3.4. xercise n 4......................................... 3

III. Solutions 33 3. Solutions 34 3.. Solution of exercise n................................... 34 3.. Solution of exercise n................................... 36 3.3. Solution of exercise n 3................................... 37 3.3.. Routes with equivalent addressing space...................... 37 3.3.. Routes with maximal aggregation.......................... 38 3.4. Solution of exercise n 4................................... 39 3.4.. Routes with equivalent addressing space...................... 39 3.4.. Routes with maximal aggregation.......................... 39 3.5. Solution of exercise n 5................................... 40 3.5.. Routes with equivalent addressing space...................... 40 3.5.. Routes with maximal aggregation.......................... 40 3.6. Solution of exercise n 6................................... 4 3.7. Solution of exercise n 7................................... 4 3.7.. Addressing done trying to maximize routes aggregation on R......... 4 3.7.. Addressing done trying to minimize the number of allocated addresses..... 43 3.8. Solution of exercise n 8................................... 44 3.9. Solution of exercise n 9................................... 46 3.0. Solution of exercise n 0................................... 48 3.. Solution of exercise n................................... 5 3.. Solution of exercise n................................... 55 3.3. Solution of exercise n 3................................... 58 3.4. Solution of exercise n 4................................... 60 3.4.. Case......................................... 60 3.4.. Case......................................... 60 3.4.3. Case 3......................................... 60 3.4.4. LAN realized with a switching technology.................... 60 3

Part I. Methodology 4

. Static routing and routes aggregation The biggest difficulty of this set of exercises is to be found in the definition of the routing inside an IP network. Suppose that the network has been previously configured at IP level, that is to say that the addressing plane has been defined and that the various entities present in the network (hosts, routers) have been correctly configured at address/netmask level. Remember that the concepts that are pointed out in the exercises do not depend on the implemented topology of routing of the network (static or dynamic) because, with the same typology and the same costs, all algorithms converge to the same result. The difference is to be found in the fact that the static routing has to be configured completely by hand in every router and is not able to evolve autonomously to the topological variations of the network. Thus the concepts presented here are perfectly general and independent of the way the routing is computed. To help solving the presented exercises of this set, in the first part, the main concepts of the definition of the routing tables are summarized, giving a methodology to solve these exercises... Main concepts... Routing table The routing table is a local table belonging to a router whose principle is to list the destinations in the network. In the IP world, the destinations are all the existing networks in the studied topology. For instance, in the topology of next figure, 5 IP networks are present, that are each corresponding to a line in the routing table. Notice that if the number of lines in the routing table depends on the number of IP destinations in the studied topology, it is then the same for all routers belonging to this topology. Obviously, being the destination corresponding to the existing IP networks, all the routers will have the same list of reachable destination, even though the paths realized to reach these destinations will be different. For each destination in the routing table, the following information is usually present: Network typology: indicate how the router has learned this network. Adopting the convention used by Cisco routers, the networks directly connected are indicated by the letter C, the routers known through the static routing are indicated by the letter S, and so on. Network/Netmask: indicate the network address and the associated netmask, that is the address range (the destination ) of this route. Next Hop: address of the interface that will be used to forward packets to the destination. The meaning of this field is different when the IP network is directly connected or not and it will be detailed more farther. Cost: gives, using a numeric value, the distance from the studied router to this network. For instance, a network reachable with cost 4 is farther away than a network reachable with cost. More details about costs will be given in the section..4. You can see an example of routing table on the next figure. 5

Routing table Type Network NextHop Cost C 0.0..0/5 0.0.. 0 C 0.0..8/30 0.0..9 0 S 0.0..3/30 0.0..30 S 0.0.0.0/4 0.0..30 S 0.0..0/4 0.0..30. R.9 Network 0.0..8/30.30 R Network 0.0..3/30 R3 Network 0.0..0/5 Network 0.0.0.0/4 Network 0.0..0/4 ven though, at the level of the number if present destinations in the routing table there is no difference between a IP network directly connected to the router and a remote (reachable through other routers) network, there are differences related to how are obtained the networks and how they are indicated in the routing table.... irectly connected IP networks The directly connected IP networks are those reachable with direct IP routing. For example, the networks 0.0..0/5 and 0.0..8/30 for the router R of previous figure are directly connected (and shown in yellow on the figure). Notice that the directly connected networks are not the ones that are physically connected to the studied router (e.g., all the thernet networks linked to the router), but the IP networks reachable with direct routing. Notice also that on a LAN physically connected to the router there may be IP networks not directly reachable. The knowledge of the directly connected networks by a router is automatic ans is determined by the fact that the router has an interface belonging to that IP network. For instance, the router R of the previous figure will automatically insert the networks 0.0..0/5 and 0.0..8/30 in its routing table, without any intervention of the administrator of the apparel and even without dynamic routing. In the case of the directly connected IP networks, the value of next hop in the routing table identifies the address of the interface of the local router that will be used to reach this destination. For example, in the network of the figure the router R will reach reach all destinations 0.0..0/5 through its interface with address 0.0../5: the value of the field next hop will then be 0.0.....3. Remote IP networks The remote IP networks (that is to say not directly connected) are those reachable with indirect IP routing, that is the packets directed to these destinations must be sent to a router that will forward them to this destination. For example, the networks 0.0.0.0/4, 0.0..0/4 and 0.0..3/30 for the router R of the previous figure are remote networks (and shown in green in the figure). The remote IP networks are not automatically known by the router. An explicit configuration operation of the router is needed that can be realized by the administrator (who will configure a static route for this destination) or through the configuration of dynamic routing protocol (that will deal with the automatic communication of the list of the remote destinations). Only following one of these two actions, the remote destination will appear in the routing table. For instance, the remote networks are indicated in figure by the letter S in the corresponding entry of the routing table because they are defined using static routing. 6

For these networks, the value of next hop in the routing table identifies the address of the interface of the next router that will be used to reach this destination. For example, in the network of the figure the router R will reach all the destinations 0.0.0.0/4 through the left interface of the router R, that has address 0.0..30/30: the value of the field next hop of this route will then be 0.0..30. The choice of identifying as next hop the interface of the next router and not the exiting interface of the current router is due to the fact that the two values would be equivalent only in the case of point-to-point links. Actually, in the figure it is obvious that a packet exiting from the interface.9 of R can not be received by the interface.30 of R. This is not true in the case of networks with broadcast ability: for instance, a router may generate two packets exiting from one of its thernet interfaces, the first one heading to the router R and the second one heading to the router R3, both linked to the same thernet network (and with IP addresses belonging to the same network). if the indication of the exiting interface is not always sufficient to determine the next hop to the destination, the indication of the next interface of entry is not ambiguous. Finlay notice that the address of the next hop must always be reachable through direct routing by the studied IP machine. As long as this is not true, the student is sure to be wrong...4. Costs The cost of a route is mandatory to favor a path (of minor cost) instead of another one (of major cost). Actually, this information is present in the table mainly for debugging, because it is not used by the router, there is not more than one route for each destination with diverse costs (the process of creation of the routing table select only one path to each destination and it is the best path, thus the alternative routes with an higher cost are never shown). The cost of a route depends, unfortunately, strongly on the used operative system. For example, some operative systems, as Windows, assigned costs > 0 to both connected and static routes; others, as Cisco IOS, assume that both static and connected routes have cost 0. In addition, some of them (e.g. Windows) allow only one cost metric (a true number), while others (e.g. Cisco IOS) handle the cost for a couple administrative distance/metric, where the first number gives the goodness of the protocol used to learn that route (for instance, a static route could be considered better that a dynamic one) and the second one is the actual cost, knowing that the administrative distance has precedence over the choice of the best route (that is to say, a route of cost 0/ will always be worse than one of cost / but a route of cost /0 is better than a route of cost /). In actual systems both the cost of connected and static routes is fixed and established beforehand. The first can not be changed even by the administrator even though the second can be changed manually by changing the costs of the various routes. The reason of this imposed beforehand cost in the case of static routes can be found in the impossibility, for the apparel, to know the effective distance from itself to the network and this the cost is imposed beforehand to a default value. In this set of exercise, one will try to get free of real particular device and will adopt the following convention: the cost is a single number (not a couple administrative distance/cost) when not specified otherwise, the connected routes have cost 0 (no possible modification) while static routes have a cost that depends on the effective distance between the studied router, obtained summing the costs of going through each link (and set conventionally to ), and the destination (for instance, the previous picture shows some static routes of cost and others of Actually, for example for the system Cisco IOS, it is possible to change only the administrative distance but not the true cost. In this case, it is possible to define a static route with a cost such as it is chosen only if the dynamic protocol can not find any route to destination, letting the precedence to the dynamic protocol when possible. 7

cost ). Anyway, the cost may be changed if the administrator of the network has particular needs. The student should also remember to control the convention used on the real device regarding costs and proceed to the needed adaptations to the theory presented here...5. Aggregated routes The IP routing model foresees that two or more routes can be replaced by an aggregated equivalent route. The basic idea is that if a destination is reached through a given next hop NH and a destination is reached through the same next hop NH, the destinations and can be melted together in an equivalent destination -. The advantage of aggregation is that the number of routes in the routing table decreases, making the forwarding of IP packets to destination by the routers easier. There are two conditions for having the right to melt together two (or more) routes and replace them with an equivalent aggregated route: (Mandatory) the studied routes must share the same next hop; (partially mandatory) the studied routes must be aggregable, that s to say there must exist an address range that includes exactly the original address ranges. Next figure contains an example of aggregation: the six green networks share the same next hop for the router R and thus may potentially be aggregated. Nevertheless it is important that the second condition also is respected : the new addressing space must be equivalent to the original ones. It is now possible to aggregate the due point-to-point networks with an equivalent route to the network 0.0.4.0/9, while the four /4 networks may be aggregated together in a network 0.0.0.0/. Later on, we will show that this request can be partially relaxed 8

For the aggregation operation, it is no problem if the routes have different costs: the cost is actually never used by the router during the routing, it is used previously to determine the best path among many routes heading to the same destination. That s why it is possible to aggregate together routes with diverse costs giving the route a conventional cost (decided by the operator), with the single condition that in case of multiple routes to the destination they have cost values such as the best path is the one that is chosen. Notice that the aggregation of the network 0.0.4.0/9 has been made possible by the particular disposition of the IP networks in the studied topology: if the networks had been assigned in increasing order from left to right (0.0.4.0/30 between R and R, 0.0.4.4/30 between R and R3, 0.0.4.8/30 between R3 and R4), it would not have been possible to aggregate them. Actually, the remote networks 4.4/30 and 4.8/30 can not be aggregated is a single addressing /9 range the valid ranges are 4.0/9, that does not include the network 4.8/30, and 4.8/9, that does not include the network 4.4/30). In consequence, the way the address are assigned inside the network is of instrumental importance in the allowing (or the preventing) of the aggregation. The fact that the concept of aggregation changes the semantic of the information included in each route is noteworthy. While the original definition of the routes foreseen that each route was assigned to a network, by now each route is associated an address range. In other words, the indication network/netmask present in each route does no longer identify a n IP network but may identify a set of aggregated IP networks, that is to say an address range. In addition, an address that in the original network was not available for an host (for instance because it is the network address or the broadcast address) becomes seemingly usable when one considers the aggregated address ranges (this can be seen for example with the address 0.0..55 that is a broadcast address in the original network of the figure but that becomes seemingly an host address in the aggregated route 0.0.0.0/). Nevertheless, this creates particular problems because it is true that an eventual packet heading to this (presumed) host is forwarded to the destination, but it is also true that this packet will sooner or later be discarded by one of the next routers that, due to their proximity to the destination network, will not be able to aggregate such addresses and will thus be more precise, following the principle saying that the aggregation is decreasing when going from the center to the fringes of the network.. Finlay, one must remember that the aggregation is useless for directly connected networks. In principle, they are made of routes like others and they may be aggregated; in reality, otherwise, they automatically configured by the router because they originate from directly connected IP networks and they can not be canceled in the routing tables. That s why, contrary to the other types of routes (for example static ones), it is not possible to replace directly connected routes by other routes due to the impossibility of cancel them in the routing tables...6. Mainly specific route The IP routing also supports the concept of mainly specific route. Practically, it is possible ti define two routes whose addressing space are partially superimposed and, in case of match on both routes, the most specific one has priority; that is to say the one with biggest prefix length (a route to an addressing space /30 is more specific than a route to a /4 space). The following figure may help to clarify this concept. 9

Type Network NextHop Cost S 0.0.3.0/4 0.0.4. R Type Network NextHop Cost S 0.0.0.0/ 0.0.4.6 R 0.0.4.0/30 0.0.4.4/30 R3 Network 0.0..0/4...5.6 Network 0.0.3.0/4 Network 0.0.0.0/4 Network 0.0..0/4 The router R in figure in figure has two routes: one for the address range 0.0.0.0/ to R3 and one for the address range 0.0.3.0/4 to R. Assume that the router R has an IP packet that has to be forwarded to the host 0.0..: this address is included in the address range 0.0.0.0/ so it will be sent to the right. Now assume that R must forward a packet to the host 0.0.3.3: this host belongs to both the address range of the first route (0.0.3.0/4) and to the one of the second route (0.0.0.0/). As the routes may refer to different paths (actual, the first one is pointing left and the second one right) it is mandatory to have an unequivocal criterion to determine the best route. In the IP world, the rule is that the most specific route wins. In this case, thus, the packet will be forwarded to R. This concept makes possible the aggregation of routes in a far more efficient way compared to what has been shown previously because the aggregation of IP routes may actually use an address range bigger than the simple union of the involved routes. Once again, a figure is useful to make this clearer. In this example it is possible to directly aggregate in a single route all the destination sharing their next hop router (shown in figure), for example, replacing them with a single route to the address range 0

0.0.0.0/. This addressing space includes the addresses from 0.0.0.0 to 0.0.7.55 and so gathers all the destinations that were previously known inside the single route. This address range includes also the destinations 0.0.4.8/30 that instead do not belong to the routes whose next hop is 0.0.4.0: this is not a problem because to these destinations there is a more specific route. It is interesting to notice that the new address range 0.0.0.0/ actually includes other destinations that would not be part of the simple union of the addressing spaces of the single routes, that is to say that the range of addresses from 0.0.4. to 0.0.7.55. This is normally not a problem because the destination are not in any way reachable in the network and thus what happens is that the packets heading to these destinations are forwarded in a direction but sooner or later a router in this path will notice that these destinations can not be reached and will discard the packets. Referring to the example of the previous figure, the behaviors of the network receiving three hypothetical packets can be studied: Packet heading to the host 0.0..: the destination address is included in the route 0.0.0.0/ and it is thus correctly forwarded to R. Packet heading to the host 0.0.4.0: the destination address is included in both the addressing space of the route 0.0.0/ and the one of the route 0.0.4.8/30. In this case the most specific route is chosen and the packet is thus correctly forwarded by direct routing to the destination 0.0.4.0. Packet heading to the host 0.0.7.7: the destination is included in the route 0.0.0.0/ and it will thus be forwarded to R. Obviously, this destination does not exist in this network but this is of no importance: the router R may realize this (even though it could also have a route containing the address 0.0.7.7) but probably sooner or later a router will realize the non-existence of the host and discard the packet. One of the problems that can appear using the aggregation technique with more extended routes (often indicate as supernet routes) compared with the original addressing space is the creation of loops in the forwarding of packets. Assume for instance that R in figure had a default route to the right, while R had a default route to the left. In this case a packet heading to the host 0... does not belong to any specific route and must thus be forwarding along the default route. At this point, then, R will send the packet to R that will send it back to R and so on as long as its life span has not been exceeded. Generally, the loop problem can emerge when supernets are used: it is the duty of the network administrator to project the routing in a way that prevents that kind of behavior. Finally, remember that the routing table is different for each router. Thus the way the aggregations can be handled depends from router to router on the way the various networks addressing spaces can be aggregated...7. efault route xtending the concept of aggregation, it is possible it is possible to examine how the router R lay also choose other address ranges to aggregate its routes: instead of specifying the address range 0.0.0.0/ it may specify a default route that would be used to handle all the destinations that can be reached through a given next hop. In this case, the routing table of R would become: Type Network Next Hop Cost C 0.0.4.8/30 0.0.4.9 0 S 0.0.0.0/0 0.0.4.0

The choice of an option instead of another is determined by the context and the preferences of the operator. Generally, with a default route it is possible to aggregate all the routes to a given direction, replacing N routes that converge to the same next hop by a single one. Nevertheless it can be used only once (obviously, it is not possible to have two default routes on the same router). Practicaly, the default route is commonly used when an user network is connected to Internet because it allows to reach all destinations on Internet without having to explicitly name each one of them...8. ifferent costs routes It is possible in a routing table to indicate two alternative routes with different cost, as in this example 3 : Type Network Next Hop Cost S 0...0/4 30.3.3.3 S 0...0/4 40.4.4.4 3 In this case, the router will select the first route to the network 0...0/4 because its cost is smaller and the second one will be ignored. Nevertheless, in the case in which the first route becomes unavailable (for example the interface to the next hop 30.3.3.3 fails), the first route becomes useless and the second one will be used to have an alternative path to the same destination. This king of configuration is commonly named backup route. The use of such a configuration is however much limited. As seen in the theory, the static backup routes often do not function because the router is not able to notice failures of the non-directly connected networks (in some cases, no of these failures is noticed ; for example, the studied router may not notice that the interface 30.3.3.3 has been shut down.) and this may cause loops for packets. Actually, the custom is to use with much parsimony this function in case of static routing; in case of dynamic routing, this no longer necessary as the routing protocol foresees to recompute the addressing without the need for a backup route. Secondly, with this configuration topology, a additional level of ambiguity in the routes is introduced after the use of the aggregated routes because a packet can match more than one route with diverse costs. In case of ambiguity, the route choice algorithm will select first () the most specific route, then () the one will the smallest cost. This is equivalent to say that the routes with a bigger cost must have the same prefix length as the one with smaller cost else either they will never be selected if they refer to supernets) or they will always be selected (if they are more specific). For instance, with the following routing table: Type Network Next Hop Cost S 0...0/4 30.3.3.3 S 0...0/3 40.4.4.4 3 the second route will never be selected for the destinations 0...0/4 because the first one is more specific. Vice-versa, with this configuration: Type Network Next Hop Cost S 0...0/4 30.3.3.3 S 0...0/5 40.4.4.4 3 3 Notice that this example has nothing to do with the topology used up to now. Actually, alternative routes with different costs have a meaning only when there are alternative paths to a given destination, which is not possible if the topology does not include any mesh.

Network: 0.0..0/4 the second route will always be selected for the destinations 0...0/5 because it is more specific for these destinations, independently of the cost. The one case in which the cost is taken into account in the choice of the route is thus when both destination networks are identical but the routes differ by the cost... Routing table definition procedure Having pointed out the basic concepts of routing and of route aggregation, we can now propose a methodology for the definition of the routing table. ven though this methodology only aim is to create the routing table for each router, it can be used also to define an addressing plan that has a better aggregation capacity. Actually, as seen previously, the route aggregation is strongly dependent on how the IP networks have been assigned in the studied topology and thus the administrator will have to assign the addresses, as much as possible, in a way that favors the aggregability during routing. The proposed methodology includes the following steps: etermination of the list of the IP networks present in the studied topology and typology of the networks themselves ( directly connected networks/ remote networks) efinition of the routing tree to each IP network found during previous operation. etermination of the routing table with a route for each destination etermination of possible route aggregations The explanations will use the example in following figure.. R.9 0.0.0.8/30.30 R.33 0.0.0.3/30.34 R3.. Network: 0.0..0/5 Network: 0.0.0.0/4 It is important to notice that the computing procedure of the routing table must be repeated for each router; for instance, in the previous network it will have to be done three times (because there are 3 routers). Actually, even if the chosen path by a router to a destination is not completely independent of the path that the other routers will do to reach (in other words, if R reaches the network 0.0.0.0/4 by sending the packets to R, R can not reach the same destination by sending back the packets to R), the routing tree defines the best paths from one point to all the possible destinations. In consequence, changing the initial point from which the paths are computed (or the router whose routing table is being computed) will change the routing table and thus each router has to compute autonomously its own routing table.... List and typology of the IP networks uring this step it is needed to simply point out which are the IP networks present in the studied topology, distinguishing between the directly connected IP networks (that is to say the ones reachable 3

through direct routing by the studied router) and the remote networks (that is to say the ones reachable through indirect routing, which means that the packet is sent to the next router in the direction of the destination). The result of the first step applied to the example is shown in figure.... efinition of the routing tree Given the list of the reachable destinations it is needed to compute the routing tree, that is to say the followed paths by the packets from a given router to all destinations. In the case of a simple topology (as the one in figure) it is possible to use the innate human ability to determine the shortest paths. When confronted to more complex topologies it is possible to use algorithms for the computation of the shortest path, for example the algorithm of ijkstra. The result of this step will be the modeling of the topology in term of an acyclic graph (or a tree), representing the paths to reach all destinations in the network. The result in the case of the example is shown in figure; in this case the result is particularly common due ti the lack of cycles in the original network that prevent the formation of multiple paths to a single destination. 4

Notice how import the costs of reaching the various networks are in this result. They are determined bi the cost of going through the links (assumed unitary in the example network and shown with the value in the routing tree). For instance, the network Net5 will be reachable with cost 3 from the router R. Knowing the costs is mandatory in order to favor a path compared to an other one (and choose the best cost one) when multiple paths to the same destination exist. Notice also that the routers are not part of the topology graph: the goal is to determine the best path to each destination and the intermediate routers does not give any additional information in the routing tree. That is why they can be omitted without loss...3. etermination of the routing table Once the routing tree produced, the writing of the routing table is a purely mechanical operation. ach destination (or each IP network) must be written inside the routing table along the requested information (typology of the route, network/netmask, next hop, cost). The one caution to take is related to the difference between connected and remote networks due mainly to the diverse value of the next hop in each case. Thus, for instance, for the network Net (directly connected) the routing table entry will be: Type Network Next Hop Cost C 0.0..0/5 0.0.. 0 where the typology of the route is C ( connected ) and the next hop is the interface of the router itself that is used to reach these destinations in direct routing. On the other hand, for the network Net5 (remote) the entry in the routing table will be: Type Network Next Hop Cost S 0.0.0.0/4 0.0..30 where the typology of the route is S ( static ) and the next hop is the interface of the next router that is used to reach these destinations in indirect routing. 5

The result when applied to the example network is shown in figure. There is also the routing tables of all the routers in the studied topology. ven if, as said previously, the cost is not particularly meaningful in the routing table, it is instrumental in the computation of the best path to reach this destination. Therefore notice that the cost of going through to reach the network Net is equal to zero, the one to reach the network Net3 is equal to and the one to reach the network Net4 is equal to. The cost S of the neighbor of the Net 4 is thus irrelevant for the solution of the exercise and would be used only if they would be other reachable destinations than Net4...4. etermination of the possible routes aggregations The last step refers to the determination of route aggregations and is, in a way, subjective. The criterion that surely has to be satisfied is that the aggregable routes share the same next hop and these routes must be related to networks not directly connected (because the directly connected routes can not be canceled from the routing table). The non-objectivity of this operation stands in the number of routes that are aggregated in a given address range and in the used address range. The operator can make different choices depending on if he wants to favor the aggregation capability and thus uses supernets even really big (up to the default route), or if he wants to minimize the possible side effects limiting himself to the replacing if a given number of routes with a new address range that is exactly equivalent (that is to say the union of the original address ranges must be equal to the new address range). The following figure shows both solutions: in the case of the routers R and R two networks /4 are aggregated with the equivalent /3 while in the case of the router R3 two remote networks (belonging to two non exactly aggregable with a new address range address ranges) are replaced by a default route. The resulting routing table is shown in next figure. 6

7

Part II. xercises 8

. xercises.. xercise n efine the routing tree of each node of the network in figure. In addition, write the routing table of each router in the format (destination router - next hop router). A 3 B C 5 4.. xercise n efine the routing tree of each node of the network in figure. In addition, write the routing table of each router in the format (destination router - next hop router). A 3 B C G 4 4 F H 9

.3. xercise n 3 Given the network in figure, produce the routing table of R by aggregating the routes in a way such as: the addressing spaces are exactly equivalent to the original ones (or) there are the fewest possible entries in the routing table The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Address range 30.9.0.0/../7..37/30..4/30 R 5 R.0.54/4+..6/5..33/30 R3..54/5.4. xercise n 4 Given the network in figure, produce the routing table of R by aggregating the routes in a way such as: the addressing spaces are exactly equivalent to the original ones (or) there are the fewest possible entries in the routing table The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Address range 30.9.0.0/../7..37/30..4/30 R R.0.54/4+..6/5..33/30 3 R3..54/5 0

.5. xercise n 5 Given the network in figure, produce the routing table of R by aggregating the routes in a way such as: the addressing spaces are exactly equivalent to the original ones (or) there are the fewest possible entries in the routing table The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Internet Address range 30.9.0.0/ 3.05.4.5/30 3 R.54/3 3.86/30 R3 3.58/7 4.54/4 R 3.89/30 R4 3.97/30 3.94/30 3.74/8 3.8/9 3.6/5

.6. xercise n 6 Given the network of the previous exercise (indicated in figure), produce the routing table of R4 obtained when looking for the fewest possible entries in the routing table. Point out if the number of route is bigger or smaller than the one of routes in the routing table of the router R and explain why. Internet Address range 30.9.0.0/ 3.05.4.5/30 3 R.54/3 3.86/30 R3 3.58/7 4.54/4 R 3.89/30 R4 3.97/30 3.94/30 3.74/8 3.8/9 3.6/5

7 hosts 0 hosts.7. xercise n 7 Given the network in figure, define an addressing plan that: maximizes the aggregation of the routes on R (or) minimize the number of addresses allocated to manage the network. The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Address range 30.9.0.0/3 R R R3 0 hosts 60 hosts 3

5 hosts 4 hosts.8. xercise n 8 Given the network in figure, define an addressing plan that: maximizes the aggregation of the routes on R (either in the case in which the addressing spaces are exactly equivalent to the original ones or in the case in which routes are managed through supernets) (or) minimize the number of addresses allocated to manage the network. The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Address range 30.9.0.0/4 R R R3 80 hosts 70 hosts 4

5 hosts 4 hosts.9. xercise n 9 Basing yourself on the previous exercise and given the network in figure (identical to the previous one except for the costs assigned to the links), define an addressing plan that maximizes the aggregation of the routes on R, either in the case in which the addressing spaces are exactly equivalent to the original ones or in the case in which routes are managed through supernets. The cursive numbers on the network represent the going through cost of the link; assume unitary the costs not explicitly indicated in figure. Address range 30.9.0.0/4 R R R3 80 hosts 70 hosts 5

60 hosts*.0. xercise n 0 Realize an addressing plan for the network in figure that maximizes the route aggregation on the router R. In addition, write the routing table of each router, assuming that the aim is to maximize the route aggregation (supernets are accepted but not default routes). Notice that the networks indicated with an asterisk in figure are foreseen to receive the addition of hosts in the future. 0 hosts* 0 hosts R R Address range: 30.9.0.0/ R3 3 R4 48 hosts 7 hosts 6

33 hosts 00 hosts*.. xercise n Realize an addressing plan for the network in figure that maximizes the route aggregation on the router R. In addition, write the routing table of each router, assuming that the aim is to maximize the route aggregation (supernets are accepted but not default routes). Notice that the networks indicated with an asterisk in figure are foreseen to receive the addition of hosts in the future. 50 hosts* 500 hosts 500 hosts Internet Address range: 30.9.0.0/ R R 4 R3 R4 0 hosts 5 hosts 0 hosts 0 hosts 7

33 hosts 00 hosts*.. xercise n Given the same topology as in the previous exercise (but with different link costs), realize an addressing plan for the network in figure that maximizes the route aggregation on router R. In addition, write the routing table of each router, assuming that the goal is to maximize the route aggregation (supernets are authorized) Notice that the networks indicated with an asterisk in figure are foreseen to receive the addition of hosts in the future. 50 hosts* 500 hosts 500 hosts Internet Address range: 30.9.0.0/ R R R3 R4 0 hosts 5 hosts 0 hosts 0 hosts 8

33 hosts 30.9.7.8/6 30.9.4.0/4 00 hosts*.3. xercise n 3 Given the topology of the previous exercise and the related routing tables of the apparels, the manager of the network has decided to configure some additional static backup routes in order to be able to react automatically to some failures that may occur. Particularly, the manager wants to warrant the router R the reachability of the LAN connected to R4 (reachable preferably through R3) even if the link R3-R4 fails (in this case, the path should go through R). That is why the manager has modified the routing tables of R and R3 as shown in next figure (the directly connected routes are omitted for clarity): 50 hosts* 500 hosts 500 hosts Internet 30.9.5.0/4 30.9.0.0/3 30.9..0/3 30.9.7.4/30 7.5/30 5./4 7.7/30 R 30.9.7.6/30 0./3./3 R 4./4 7./30 30.9.7.8/30 30.9.7.0/30 7.30/30 7.9/6 6./4 R3 7.33/30 7.09/9 30.9.7.3/30 R4 7./5 7.93/8 30.9.6.0/4 30.9.7.08/9 30.9.7.0/5 30.9.7.9/8 0 hosts 5 hosts 0 hosts 0 hosts R (only static routes) ==================================== S 30.9.0.0/ 30.9.7.8 S 30.9.6.0/3 30.9.7.30 S 30.9.7.0/30 30.9.7.8 S 0.0.0.0/0 30.9.7.4 0 S 30.9.7.0/5 30.9.7.8 S 30.9.7.9/8 30.9.7.8 R3 (only static routes) ================================== S 30.9.7.0/5 30.9.7.34 S 30.9.7.9/8 30.9.7.34 S 30.9.7.0/30 30.9.7.34 S 0.0.0.0/0 30.9.7.9 etermine if the modifications introduced by the manager are efficient; if not point out its problems and propose a way to improve it. 9

.4. xercise n 4 Given the network in figure, the host H generates an IP packet for the host H. The packet is correctly received by R which has to forward it to the destination. Given the different configurations of the router R at the routing table and ARP cache levels indicated in figure, determine the path followed by the packet in all three cases. Finlay indicate if the solution would have been different if the network LAN had been realized using level switches instead of a shared thernet infrastructure. LAN IP: 9.68.3.54/4 MAC:00:00:00::: IP: 9.68.4.54/4 MAC:00:00:00::: R IP: 9.68.0./4 IP: 9.68.0./4 R IP: 39.68..54/4 MAC:00:00:00:AA:AA:AA MAC:00:00:00:BB:BB:BB IP: 9.68..54/4 MAC:00:00:00:CC:CC:CC H IP: 9.68../4 MAC: 00:00:00::: G: 9.68..54 H IP: 9.68../4 MAC: 00:00:00::: G: 9.68..54 R config (case ) Routing table (R) ================================= Type Network Next Hop Cost S 0.0.0.0/0 9.68.0. [... directly connected...] R config (case ) R config (case 3) Routing table (R) ================================= Type Network Next Hop Cost S 0.0.0.0/0 9.68.. [... directly connected...] Routing table (R) ================================= Type Network Next Hop Cost S 0.0.0.0/0 9.68.4. [... directly connected...] ARP cache (R) ================================== Type Address MAC S 9.68.0. 00:00:00::: ARP cache (R) ================================== Type Address MAC S 9.68.. 00:00:00:AA:AA:AA ARP cache (R) ================================== Type Address MAC S 9.68.4. 00:00:00::: 30

Part III. Solutions 3

3. Solutions 3.. Solution of exercise n The routing trees of th e various nodes is reported in figure. A C B 3 4 5 A C B 3 4 5 A C B 3 4 5 A C B 3 4 5 A C B 3 4 5 The one ambiguity is linked to the destinations that have more than one way with same cost (for instance the router A has two equivalent ways to the destination ). The schema chows only one of these solutions to be clearer, but both are reported on the following routing tables. To be more precise, in case of equivalent paths, the choice of one or the other (in a purely routing-oriented view) is completely arbitrary. The tables for each router are the following: Node A estination Next-hop B B C C B/C C Node B estination Next-hop A A C 3

Node C Node estination Next-hop estination Next-hop A A A B/C B B B C C Node estination A B C Next-hop C C 33

3.. Solution of exercise n The solution of this exercise is similar ton the one of previous exercise. The routing trees are reported for a subset of the present routers but all the routing tables are written down. A B C G H F 3 4 4 A B C G H F 3 4 4 A B C G H F 3 4 4 A B C G H F 3 4 4 Notice that some router have multiple equivalent paths to a given destination (for example C has two equivalent paths with cost 6 to A), but this does not appear in the routing table because both use the same next hop router (). Node A estination Next-hop B B C B/ B/ F G H Node B estination Next-hop A A C A F A G H 34

Node C Node estination Next-hop estination Next-hop A A B/G B B B C C G F F G G G G H H G Node Node F estination Next-hop estination Next-hop A A A B A B C G C G F F G G G H G H /H Node G Node H estination Next-hop estination Next-hop A A G B B G C C G G G F F G/F H H G G 3.3. Solution of exercise n 3 The routing tables of the router R are indicated in the next tables, depending on the criterion chosen to do the aggregations. 3.3.. Routes with equivalent addressing space Type estination network Next hop Cost 30.9..0/7 30.9.. 0 30.9..36/30 30.9..37 0 30.9..40/30 30.9..4 0 35

3.3.. Routes with maximal aggregation S 30.9.0.0/3 30.9..38 S 30.9..3/30 30.9..38 Type estination network Next hop Cost 30.9..0/7 30.9.. 0 30.9..36/30 30.9..37 0 30.9..40/30 30.9..4 0 S 0.0.0.0/0 30.9..38 36

3.4. Solution of exercise n 4 The routing tables of the router R are indicated in the next tables, depending on the criterion chosen to do the aggregations. 3.4.. Routes with equivalent addressing space Type estination network Next hop Cost 30.9..0/7 30.9.. 0 30.9..36/30 30.9..37 0 30.9..40/30 30.9..4 0 S 30.9.0.0/3 30.9..38 S 30.9..3/30 30.9..38 S 30.9..8/5 30.9..4 In this case, it is not possible to do much aggregation because the paths to reach the various networks are different (some go through R and others go through R3) and because of the restriction on the use of an equivalent addressing space. 3.4.. Routes with maximal aggregation Type estination network Next hop Cost 30.9..0/7 30.9.. 0 30.9..36/30 30.9..37 0 30.9..40/30 30.9..4 0 S 0.0.0.0/0 30.9..38 S 30.9..8/5 30.9..4 In this case, a default route is used in one direction (the one with the biggest number of single routes) to minimize the number of routes. 37

3.5. Solution of exercise n 5 The routing tables of the router R are indicated in the next tables, depending on the criterion chosen to do the aggregations. 3.5.. Routes with equivalent addressing space Type estination network Next hop Cost 3.05.4.4/30 3.05.4.5 0 30.9.3.88/30 30.9.3.90 0 30.9.3.84/30 30.9.3.85 0 S 0.0.0.0/0 3.05.4.6 S 30.9..0/4 30.9.3.89 S 30.9.3.60/7 30.9.3.89 S 30.9.3.9/9 30.9.3.89 S 30.9.0.0/3 30.9.3.86 3 S 30.9.3.8/7 30.9.3.86 3 Notice that in this case the studied topology is connected to the Internet and thus it is consented to use a default route even in the case of an equivalent addressing space. Actually, one must assume that all the addresses not present in the studied topology are present in the Internet; the default route will thus be a route to these destinations. 3.5.. Routes with maximal aggregation Type estination network Next hop Cost 3.05.4.4/30 3.05.4.5 0 30.9.3.88/30 30.9.3.90 0 30.9.3.84/30 30.9.3.85 0 S 0.0.0.0/0 3.05.4.6 S 30.9..0/3 30.9.3.89 S 30.9.0.0/3 30.9.3.86 3 S 30.9.3.8/7 30.9.3.86 3 Notice that, the studied topology being connected to the Internet, the default route is basically used to reach these destinations and can not be used to aggregate the internal networks. 38

3.6. Solution of exercise n 6 This exercise is not really different from the previous ones. Notice that the default route is more useful for the router R4 than for the router R because this router reaches several internal destinations with the same next hop used to reach the Internet. In this case, these internal networks will be gathered directly inside the default route without the use of an explicit route. The routing table of R4, created in order to maximize the efficiency of the aggregation, will be smaller than the one of R and will thus be: Type estination network Next hop Cost 30.9.3.96/30 30.9.3.97 0 30.9.3.60/8 30.9.3.74 0 30.9.3.9/30 30.9.3.94 0 30.9.3.0/5 30.9.3.6 0 S 0.0.0.0/0 30.9.3.93 S 30.9.0.0/3 30.9.3.98 4 S 30.9.3.8/7 30.9.3.98 4 Notice that in this case the number of static routes decreases by two units (due to the better aggregation) while the number of routes related to directly connected networks, that can not be aggregated, is incremented (due to the bigger number of directly connected networks). The total sum is thus smaller: the total number of routes in the routing table of R4 is decreased by one unit compared to the one present in the router R. 39

30.9.0.8/7 30.9..64/8 7 hosts 0 hosts 3.7. Solution of exercise n 7 3.7.. Addressing done trying to maximize routes aggregation on R The first step to solve the exercise is to compute the required addresses to make the addressing plan. As the networks directly connected to R have no influence in the aggregability on this router, they are momentarily left out of the total computation of the necessary addresses for the two defined areas. In the computation of the requested addresses, one can distinguish between the remote networks reachable from R through R (gathered in Area ) and those reachable through R3 (gathered in Area ) because, being reachable in diverse directions, they are obviously not aggregable. One gets then: Area : 7 (+3) + 0 (+3) requested addresses= 3 + 8 allocated addresses= 60 addresses Area : 60 (+3) + 0 (+3) requested addresses= 64 + 6 allocated addresses= 80 addresses To maximize the aggregation, it is mandatory that the addressing space comprehensively allocated to the networks in Area is disjoint from the addressing space comprehensively allocated to Area. In other words, to maximize routes aggregability it is appropriate to define some addressing spaces to the areas and inside them to recover then the address of the single networks. The addressing spaces of the areas will then be the equivalent address ranges that will be used to define the destinations of the aggregated routes. The following address ranges are thus chosen: Area : 30.9.0.0/4 Area : 30.9..0/5 The addressing space of the networks directly connected to R can be obtained either inside the address range of Area or inside the address range of Area (neither of them uses the whole address range that it has been allocated). In this exercise, it has been chosen to use part of the unused address range of Area for these networks. The resulting addressing plan is: R 0.6/30 0.66/30 30.9.0.60/30 30.9.0.64/30 0.9/7 R 0./5 0.6/30 0.65/30./6 R3.65/8 0 hosts 30.9.0.0/5 30.9..0/6 60 hosts Area Area The corresponding routing table of R (without the use of a default route) is: 40

30.9.0.9/7 30.9.0.4/8 7 hosts 0 hosts Type estination network Next hop Cost 30.9.0.60/30 30.9.0.6 0 30.9.0.65/30 30.9.0.66 0 S 30.9.0.0/4 30.9.0.6 S 30.9..0/5 30.9.0.65 3.7.. Addressing done trying to minimize the number of allocated addresses If the aim is however the minimization of the allocated address, the addressing plan is done in a more traditional way and may be the following: R 0.4/30 0.46/30 30.9.0.40/30 30.9.0.44/30 0.93/7 R 0./5 0.4/30 0.45/30 0.9/6 R3 0.5/8 0 hosts 30.9.0.0/5 30.9.0.8/6 60 hosts Area Area Notice that in this case a /4 addressing space is enough to handle the whole topology, while in the previous case a /3 space was necessary. The corresponding routing table of R (without the use of a default route) is: Type estination network Next hop Cost 30.9.0.40/30 30.9.0.4 0 30.9.0.44/30 30.9.0.46 0 S 30.9.0.0/4 30.9.0.4 S 30.9.0.8/6 30.9.0.45 S 30.9.0.4/8 30.9.0.45 4

30.9.0.60/7 30.9.0.9/7 5 hosts 4 hosts 3.8. Solution of exercise n 8 In this case both solutions, the one trying to maximize the aggregation and the one trying to minimize the allocated addresses, coincide. Actually, the addressing space is so reduced (30.9.0.0/4) that it is in any case mandatory to minimize the allocated addresses to be able to handle the studied topology. Hence, some physical networks (LAN) must be partitioned in more IP networks ti make the management possible. The resulting addressing is shown in figure: R 0.4/30 0.50/30 30.9.0.40/30 30.9.0.48/30 0.4/30 0.6/7 R 0./6+ 0.9/7 30.9.0.44/30 0.45/30 0.46/30 0.65/6+ 0.5/8 0.49/30 0.93/7 R3 80 hosts 30.9.0.0/6+ 30.9.0.8/7 30.9.0.64/6+ 30.9.0.4/8 70 hosts To write the table it is possible to use the fact that the destination connected to R3 may be reached with the same cost through the direct link R-R3 or through the path R-R-R3. The second way is chosen because, with equal cost, it decreases the number of static routes present on the routing table. In the case in which the aggregated addressing space is exactly equivalent to the original one, it is necessary to take into account that the network 30.9.0.5/30 is allocated to no one and thus it can not be part of the aggregation. That is why it is mandatory to write a set of lines in the routing table in a way not to include this space. The resulting routing table will then be: Type estination network Next hop Cost 30.9.0.40/30 30.9.0.4 0 30.9.0.48/30 30.9.0.50 0 S 30.9.0.0/5 30.9.0.4 S 30.9.0.8/6 30.9.0.4 S 30.9.0.9/7 30.9.0.4 S 30.9.0.4/8 30.9.0.4 S 30.9.0.44/30 30.9.0.4 In the case in which the aggregated addressing space may include even destinations not originally part of the studied topology, it is possible to aggregate all remote destinations in the route 30.9.0.0/4, obtaining an aggregation clearly more efficient than the previous one. The resulting routing table will then be: Type estination network Next hop Cost 4

30.9.0.40/30 30.9.0.4 0 30.9.0.48/30 30.9.0.50 0 S 30.9.0.0/4 30.9.0.4 Notice that, in practice, it will be better to choose the second routing table, all the more because the network 30.9.5.0/30 is not physically used in the studied topology but it has been assigned to the network manager (the addressing space attributed to the manager is 30.9.0.0/4) and reasonably thus this network is nowhere else to be found. 43

30.9.0.96/7 30.9.0.9/7 5 hosts 4 hosts 3.9. Solution of exercise n 9 As the network is identical to the one of the previous exercise, there is no apparent difference at addressing level. Nevertheless, the fact that the networks connected to R and R3 are reached through diverse next hop from R (due to different link costs) makes the situation much more complex because the networks are less aggregable. That is why the possibility to position the contiguous IP addressing spaces in the same area is of instrumental importance for the aggregability. For instance, using the addressing level proposed in the previous solution the networks 30.9.0.0/6 and 30.9.0.64/6 will no longer be aggregable in a single route 30.9.0.0/5 because they would have diverse next hops (one to Area and the other to Area ). A possible new addressing level is indicated in figure: R 0.4/30 0.50/30 30.9.0.40/30 30.9.0.48/30 0.4/30 0.97/7 R 0./6+ 0.65/7 30.9.0.44/30 0.45/30 0.46/30 0.9/6+ 0.5/8 0.49/30 0.93/7 R3 80 hosts 30.9.0.0/6+ 30.9.0.64/7 30.9.0.8/6+ 30.9.0.4/8 70 hosts Area Area In this case, the resulting routing tables will respectively be: Addressing space equivalent to the one present in the topology: Type estination network Next hop Cost 30.9.0.40/30 30.9.0.4 0 30.9.0.48/30 30.9.0.50 0 S 30.9.0.0/5 30.9.0.4 S 30.9.0.8/6 30.9.0.49 S 30.9.0.9/7 30.9.0.49 S 30.9.0.4/8 30.9.0.49 S 30.9.0.44/30 30.9.0.49 Maximization of the aggregation: Type estination network Next hop Cost 30.9.0.40/30 30.9.0.4 0 44

30.9.0.48/30 30.9.0.50 0 S 30.9.0.0/5 30.9.0.4 S 30.9.0.8/5 30.9.0.49 45

3.0. Solution of exercise n 0 To determine the addressing level, the requested addresses to manage each network are computed first of all considering that the router R will see every remote destination through two next hops: Remote destinations through R (Area ): Network with 0 hosts*: 56 addresses are reserved (for future expansions) Network with 60 hosts*: 56 addresses are reserved (for future expansions) Remote destinations through R4 (Area ): Network with 48 hosts: 56 addresses are reserved Network with 7 hosts: 3 addresses are reserved networks directly connected to R: Network with 0 hosts: 8 addresses are reserved Point-to-point network (R-R): 4 addresses are reserved Point-to-point network (R-R3): 4 addresses are reserved Trying to assign addresses in a way that favor the aggregability on R, one can proceed as follow: Network in Area : addressing space /3, completely used Network in Area : addressing space /3, not completely used (5-56 - 3-4 = 0 are still free) irectly connected networks: 8+4+4 = 36 addresses are necessary. They can be obtained from the /3 addressing space free addresses in the Area. Next figure shows the allocation of the addresses in the assigned addressing space 30.9.0.0/, with reference to the belonging area (seen from R): 46

30.9.0.0-30.9.0.55 30.9..0-30.9..3 30.9..3-30.9..35 30.9..36-30.9..39 30.9..40-30.9..43 30.9..44-30.9..7 Address range Area 30.9..8-30.9..55 30.9..0-30.9..55 Address range Area 30.9.3.0-30.9.3.55 The resulting addressing level is thus: The routing tables, obtained by maximization of routes aggregation, consequently are: R Type estination network Next hop Cost 47

30.9..36/30 30.9..37 0 30.9..0/4 30.9.. 0 30.9.3.0/4 30.9.3. 0 S 30.9.0.0/3 30.9..38 R Type estination network Next hop Cost 30.9..36/30 30.9..38 0 30.9..40/30 30.9..4 0 30.9..8/5 30.9..9 0 S 30.9.0.0/3 30.9..4 S 30.9..0/3 30.9..37 R3 Type estination network Next hop Cost 30.9..3/30 30.9..33 0 30.9.0.0/4 30.9.0. 0 S 30.9.0.0/ 30.9..34 3 R4 Type estination network Next hop Cost 30.9..3/30 30.9..34 0 30.9..40/30 30.9..4 0 30.9..0/7 30.9.. 0 S 30.9.0.0/4 30.9..33 3 S 30.9.0.0/ 30.9..4 48

3.. Solution of exercise n To determine the addressing plan, one has to compute the addresses required to handle each network considering that the router R will see each remote destination through two next hops: Remote destinations through R (Area ): Network with 500 hosts: 5 required addresses Network with 500 hosts: 5 required addresses Network with 00 hosts*: 56 required addresses (foreseen expansions) Point-to-point network (R-R4): 4 required addresses Remote destinations through R3 (Area ): Network with 33 hosts: 64 required addresses Network with 0 hosts: 56 required addresses Network with 5 hosts: 8 required addresses Network with 0 hosts: 8 required addresses Network with 0 hosts: 6 required addresses Network with 500 hosts: 5 required addresses Point-to-point network (R3-R4): 4 required addresses Networks directly connected to R: Network with 50 hosts*: 8 required addresses (foreseen expansions) Point-to-point network (R-R): 4 required addresses Point-to-point network (R-R3): 4 required addresses Point-to-point network (R-Internet): 4 required addresses It is obvious from that analysis that the number of requested addresses is enough given the assigned addressing space (84 addresses in Area, 476 in Area and 40 for the directly connected networks). Nevertheless, contrary to the previous exercise, the addressing space is not easy to partition into distinct address ranges for the two areas. The following figure shows the distribution of the addressing spaces allocated inside the assigned address range 30.9.0.0/, with reference to the areas they belong to (seen from R): Remember that the addresses related to directly connected networks never are aggregable and thus always appear as explicit networks inside the routing table. This nevertheless makes possible, when the supernets are allowed (which is the case here), that these addresses are obtained inside an addressing space unused by the other areas, because they are reachable through a more specific route. 49

33 hosts 30.9.7.8/6 30.9.4.0/4 00 hosts* A possible solution of this exercise is to handle the aggregation using supernets: in this case one can imagine to address all the networks in Area with the address 30.9.0.0/, using the the more specific route 30.9.6.0/3 for all the destinations in Area. Obviously this is possible if the addresses assigned in Area are aggregable (that is to say if the addresses 30.9.6.0/4 and 30.9.7.0/4 and not, for instance, 30.9.5.0/4 and 30.9.6.0/4 that are not aggregable together). The resulting addressing level may thus be: 50 hosts* 500 hosts 500 hosts Internet 30.9.5.0/4 30.9.0.0/3 30.9..0/3 Address range: 30.9.0.0/ 30.9.7.4/30 7.5/30 7.9/30 5./4 0./3./3 7.7/30 7.8/30 R 30.9.7.6/30 R 4./4 7./30 30.9.7.8/30 30.9.7.0/30 4 7.9/6 7.30/30 6./4 R3 R4 7./30 7.33/30 7.34/30 30.9.7.3/30 7.09/9 7./5 7.93/8 30.9.6.0/4 30.9.7.08/9 30.9.7.0/5 30.9.7.9/8 0 hosts 5 hosts 0 hosts 0 hosts The routing tables, produced by maximizing the route aggregation (remember the use of the default route to reach all destinations on the Internet), are consequently: R Type estination network Next hop Cost 50

30.9.7.6/30 30.9.7.7 0 30.9.7.4/30 30.9.7.5 0 30.9.7.8/30 30.9.7.9 0 30.9.5.0/4 30.9.5. 0 S 30.9.0.0/ 30.9.7.8 S 30.9.6.0/3 30.9.7.30 S 30.9.7.0/30 30.9.7.8 S 0.0.0.0/0 30.9.7.4 Be careful about the point-to-point network between R and R4: the best path is through the router R but unfortunately it falls in the addressing space of the more specific route 30.9.6.0/3 that points in the wrong direction. That is why in this case it is required to address it alone with a more specific route. R Type estination network Next hop Cost 30.9.7.6/30 30.9.7.8 0 30.9.7.0/30 30.9.7. 0 30.9.0.0/3 30.9.0. 0 30.9..0/3 30.9.. 0 30.9.4.0/4 30.9.4. 0 S 0.0.0.0/0 30.9.7.7 The routing table of R is much more compressed than before because, due to the costs if the links in the studied topology, all destinations not directly connected are reached through the router R. R3 Type estination network Next hop Cost 30.9.7.8/30 30.9.7.9 0 30.9.7.3/30 30.9.7.33 0 30.9.7.08/9 30.9.7.09 0 30.9.7.8/6 30.9.7.9 0 30.9.6.0/4 30.9.6. 0 S 30.9.7.0/5 30.9.7.34 S 30.9.7.9/8 30.9.7.34 S 30.9.7.0/30 30.9.7.34 S 0.0.0.0/0 30.9.7.9 R4 Type estination network Next hop Cost 30.9.7.0/30 30.9.7. 0 5

30.9.7.3/30 30.9.7.34 0 30.9.7.0/5 30.9.7. 0 30.9.7.9/8 30.9.7.93 0 S 0.0.0.0/0 30.9.7.33 5

3.. Solution of exercise n The exercise is clearly similar to the previous one. The difference is to be found in the fact that, by changing the weights of the links, the best paths to reach the various destinations may be different compared to the previous case. Particularly, concerning the LAN connected to R4, there exist two equivalent ways that can be used to best the aggregation from R, as shown in next figure: Unfortunately, this peculiar displacement of the IP networks does not allow a better aggregation compared to the one pointed out in the previous exercise and thus the addressing plan will be identical to the previous one: 53

33 hosts 30.9.7.8/6 30.9.4.0/4 00 hosts* 50 hosts* 500 hosts 500 hosts Internet 30.9.5.0/4 30.9.0.0/3 30.9..0/3 Address range: 30.9.0.0/ 30.9.7.4/30 7.5/30 7.9/30 5./4 0./3./3 7.7/30 7.8/30 R 30.9.7.6/30 R 4./4 7./30 30.9.7.8/30 30.9.7.0/30 7.9/6 7.30/30 6./4 R3 R4 7./30 7.33/30 7.34/30 30.9.7.3/30 7.09/9 7./5 7.93/8 30.9.6.0/4 30.9.7.08/9 30.9.7.0/5 30.9.7.9/8 0 hosts 5 hosts 0 hosts 0 hosts In consequence, the routing tables, obtained by maximizing the route aggregation, are the following. Notice that in mean they are bigger that the ones of the previous exercise because there is no longer a link R-R4 with a huge cost that, actually, prevented the emission of packets in that direction which allowed to aggregate a bigger number of destinations in the routes that were going the other ways. R Type estination network Next hop Cost 30.9.7.6/30 30.9.7.7 0 30.9.7.4/30 30.9.7.5 0 30.9.7.8/30 30.9.7.9 0 30.9.5.0/4 30.9.5. 0 S 30.9.0.0/ 30.9.7.8 S 30.9.6.0/3 30.9.7.30 S 30.9.7.0/30 30.9.7.8 S 0.0.0.0/0 30.9.7.4 R Type estination network Next hop Cost 30.9.7.6/30 30.9.7.8 0 30.9.7.0/30 30.9.7. 0 30.9.0.0/3 30.9.0. 0 30.9..0/3 30.9.. 0 30.9.4.0/4 30.9.4. 0 S 30.9.7.3/30 30.9.7. S 30.9.7.9/8 30.9.7. S 30.9.7.0/5 30.9.7. 54

S 0.0.0.0/0 30.9.7.7 R3 Type estination network Next hop Cost 30.9.7.8/30 30.9.7.9 0 30.9.7.3/30 30.9.7.33 0 30.9.7.08/9 30.9.7.09 0 30.9.7.8/6 30.9.7.9 0 30.9.6.0/4 30.9.6. 0 S 30.9.7.0/5 30.9.7.34 S 30.9.7.9/8 30.9.7.34 S 30.9.7.0/30 30.9.7.34 S 0.0.0.0/0 30.9.7.9 R4 Type estination network Next hop Cost 30.9.7.0/30 30.9.7. 0 30.9.7.3/30 30.9.7.34 0 30.9.7.0/5 30.9.7. 0 30.9.7.9/8 30.9.7.93 0 S 30.9.7.6/30 30.9.7. S 30.9.0.0/ 30.9.7. S 30.9.4.0/4 30.9.7. S 0.0.0.0/0 30.9.7.33 55

3.3. Solution of exercise n 3 The solution proposed by the network manager raises a lot of problems. efault route with cost 0 on the router R Probably the manager has increased the cost of the default route in order to make it chosen only in last resort when all other routes are not fit. Nevertheless, such a huge cost is absolutely useless because the cost of a route is a choice parameter only in presence of two routes that point to the same destination. When the routes point to different destinations (for example because they refer to diverse addressing spaces), the most specific wins. Routes with an higher cost for the networks 7.0/5 and 7.9/8 The intent of the network manager was probably to define some backup routes for the networks 7.0/5 and 7.9/8 when the aggregated route 6.0/3 is unavailable. Nevertheless, for the same reason pointed out in the previous point, these routes will always be chosen as the path to follow to reach the studied destinations. That is why, if one really wants to create backup routes, the configuration of the router R should be at least modified in a way that allows to define explicit routes for the networks 30.9.7.0/5 and 30.9.7.9/8, in a way such that these destinations will not be routed through the aggregated route 30.9.6.0/3, thus abound these two routes with likewise routes that should be used in case of backup. The routing table of R would become (omitting the direct routes): Type estination network Next hop Cost S 30.9.0.0/ 30.9.7.8 S 30.9.6.0/3 30.9.7.30 S 30.9.7.0/30 30.9.7.8 S 30.9.7.0/5 30.9.7.30 S 30.9.7.9/8 30.9.7.30 S 30.9.7.0/5 30.9.7.8 S 30.9.7.9/8 30.9.7.8 S 0.0.0.0/0 30.9.7.4 Robustness to the failure of R3-R4 The biggest problem of the solution is yet the fact that the backup routes for the networks 7.0/5 and 7.9/8 are not absolutely efficient because R is not absolutely able to react correctly to the failure of the link R3-R4. Actually, even if R3 realizes that there is a failure and that its routing table becomes the one indicated in next figure (all the routes that depend on the next hop 30.9.7.34 become invalid and this all the traffic heading to networks not directly connected would follow the default route that is the only one remaining), no one communicates to R the existence of this failure so the router can not know that it is required to use the route with higher cost to reach these destinations. The result, shown in figure, would be that at reception of a packet destined to an host in one of these two networks the router R would continue to use the route with cost to R3 but R3 would use the default route and send the packet back to R (the used routes are indicated in figure in italic). The packet would enter a loop and stay in it, going back and forth between R and R3, until its lifespan ends (the value of the field TTL in the IP header would become zero). 56

33 hosts 30.9.7.8/6 30.9.4.0/4 00 hosts* 50 hosts* 500 hosts 500 hosts Internet 30.9.5.0/4 30.9.0.0/3 30.9..0/3 30.9.7.4/30 7.5/30 5./4 7.7/30 R 30.9.7.6/30 0./3./3 R 4./4 7./30 30.9.7.8/30 30.9.7.0/30 7.30/30 7.9/6 6./4 R3 7.33/30 7.09/9 30.9.7.3/30 R4 7./5 7.93/8 30.9.6.0/4 30.9.7.08/9 30.9.7.0/5 30.9.7.9/8 0 hosts 5 hosts 0 hosts 0 hosts R (only static routes) =================================== S 30.9.0.0/ 30.9.7.8 S 30.9.6.0/3 30.9.7.30 S 30.9.7.0/30 30.9.7.8 S 0.0.0.0/0 30.9.7.4 0 S 30.9.7.0/5 30.9.7.8 S 30.9.7.9/8 30.9.7.8 R3 (only static routes) ================================== S 30.9.7.0/5 30.9.7.34 S 30.9.7.9/8 30.9.7.34 S 30.9.7.0/30 30.9.7.34 S 0.0.0.0/0 30.9.7.9 Unfortunately there exists no solution to this problem because it is intrinsic to the use of backup routes with static routing. So it is not possible to propose better solutions to the manager, except to use a dynamic routing protocol inside his network. 57

3.4. Solution of exercise n 4 3.4.. Case The router R detect that the packet must follow the default route and thus must be sent ti the next hop 9.68.0.. This address is directly reachable through its right interface; besides the associated MAC address (address to which the frame at data-link level must be sent) is already known because it is in the ARP cache. So the router R will send the packet to the router R, however inserting the address 00:00:00::: as destination thernet address. This frame will however be discarded because the MAC address present does not coincide with the one present in the interface. Consequently, the packet generated by H will never reach destination and will be discarded by R. 3.4.. Case The router R detect that the packet should follow the default route and thus must be sent to the next hop 9.68... Nevertheless, this address is not part if the IP networks directly connected to R and thus R has no idea of how to forward the packet to the next hop indicated in the routing table. The fact that the MAC address related to this IP address is present in the ARP cache is no help because the router R will abort the sending of the packet before consulting the ARP cache. This table is actually consulted when it wants to discover the MAC address of a directly reachable host, condition that is not valid for the address 9.68... Consequently, in this case again the packet generated by H will never reach destination and it will be discarded by R. 3.4.3. Case 3 The router R detects that the packet should follow the default route and thus must be sent to the next hop 9.68.4.. This address is directly reachable through its thernet interface with address 9.68.4.54; moreover its associated MAC address (address to which the frame at level data-link must be sent) is already known because it is in the ARP cache. So the router R will forward the packet to LAN, inserting the address 00:00:00::: as destination thernet address. This frame will then be received by the router R itself but in the interface 9.68.3.54, because the present destination MAC address coincide with the one present in the interface. At this point, the packet will be examined by R again that will retake the same decision already applied previously. Consequently, in this case again the packet generated by H will never reach destination but will cycle on the LAN until its lifespan (IP TTL) will end and will finally be discarded by R. 3.4.4. LAN realized with a switching technology The technology used to realize LAN ( shared or switched ) has no influence in the solution of the exercise. Notice that the next hop address contained in the routing table (that is 9.68.4.) is absolutely unlinked to the effective address of the interface that receive that packet in the LAN (that is 9.68.3.54). 58