2008 ndp lectures 7th semester - aalborg...

117
2008 NDP Lectures 7 th Semester Neeli R. Prasad, Associate Professor Head of Wireless Security and Sensor Networks Group Networking and Security Aalborg University Niels Jernes Vej 12, 9220 Aalborg East, Denmark Email: [email protected] Tel.: 9940 9835

Upload: others

Post on 26-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

2008 NDP Lectures 7th Semester

Neeli R. Prasad, Associate Professor Head of Wireless Security and Sensor Networks Group

Networking and SecurityAalborg UniversityNiels Jernes Vej 12, 9220 Aalborg East, DenmarkEmail: [email protected].: 9940 9835

Page 2: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

12:30 – 13:15 Guest lecture from Telia Sonera

13:15 – 13:25 Break

13:25 – 14:10 IP Routing

14:10 – 14:25 Break

14:25 – 16:00 Students assignments

October 20, 2008NDP Lectures 7th Semester

Page 3: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Outline

• Routing Overview

Page 4: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Determining IP Routes

Page 5: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives• Upon completing this lecture, you will be able to:

– Describe the features and operation of static routing– Describe the features and operation of dynamic routing

protocols, including RIP, IGRP, EIGRP, and OSPF

– Build a functional router configuration to support the specified network operational requirements, given a network design

– Use show commands to identify anomalies in routing operation, given an operational router

– Use debug commands to identify events and anomalies in routing operation, given an operational router

Page 6: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

6

Routing Overview

Page 7: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives• Upon completing this lesson, you will be able to:

– Explain the differences between static routing and dynamic routing

– Identify the classes of routing protocols– Use Cisco IOS commands to configure static routes

and default route forwarding, given a functioning router

– Use show commands to identify anomalies in static routing operation, given an operational router

– Describe the operation of “router on a stick”– Configure router on a stick for inter-VLAN routing

using ISL and 802.1Q trunking, given an operational switch and router

Page 8: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

To route, a router needs to do the following:• Know the destination address• Identify the sources it can learn from• Discover possible routes• Select the best route• Maintain and verify routing information

What Is Routing?

Page 9: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Routers must learn destinations that are not directly connected.

What Is Routing? (Cont.)

Page 10: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Static Route– Uses a route that a

network administrator enters into the router manually

•Dynamic Route–Uses a route that a

network routing protocol adjusts automatically for topology or traffic changes

Identifying Static and Dynamic Routes

Page 11: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Static Routes

• Configure unidirectional static routes to and from a stub network to allow communications to occur.

Page 12: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– Defines a path to an IP destination network or subnet or host

Router(config)#ip route network [mask] {address | interface}[distance] [permanent]

Static Route Configuration

Page 13: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Static Route Example

• This is a unidirectional route. You must have a route configured in the opposite direction.

Page 14: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Default Routes

• This route allows the stub network to reach all known networks beyond router A.

Page 15: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Verifying the Static Route Configuration

router#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

10.0.0.0/8 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Serial0S* 0.0.0.0/0 is directly connected, Serial0

Page 16: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Routing protocols are used between routers to determine paths and maintain routing tables.

• Once the path is determined, a router can route a routed protocol.

What Is a Routing Protocol?

Page 17: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• An autonomous system is a collection of networks under a common administrative domain.

• IGPs operate within an autonomous system.• EGPs connect different autonomous systems.

Autonomous Systems: Interior or Exterior Routing Protocols

Page 18: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Administrative Distance: Ranking Routes

Page 19: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Classes of Routing Protocols

Page 20: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Classful Routing Overview–Classful routing protocols do not include the

subnet mask with the route advertisement.–Within the same network, consistency of the

subnet masks is assumed.–Summary routes are exchanged between foreign

networks.–Examples of classful routing protocols:

• RIP Version 1 (RIPv1)• IGRP

Page 21: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Classless Routing Overview– Classless routing protocols include the subnet

mask with the route advertisement.– Classless routing protocols support variable-

length subnet masking (VLSM).– Summary routes can be manually controlled

within the network.– Examples of classless routing protocols:

• RIP Version 2 (RIPv2)• EIGRP• OSPF• IS-IS

Page 22: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Routing Protocol Comparison Chart

Page 23: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Using the ip classless Command

Page 24: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

VLAN-to-VLAN Overview

• Network layer devices combine multiple broadcast domains.

Page 25: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Dividing a Physical Interface into Subinterfaces

• Physical interfaces can be divided into multiple subinterfaces.

Page 26: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Routing Between VLANswith ISL Trunks

Page 27: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Routing Between VLANswith 802.1Q Trunks

Page 28: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

28

Distance Vector Routing

Page 29: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives

• Upon completing this lesson, you will be able to:– Describe the features offered by distance

vector routing protocols and give examples of each

– Describe the issues associated with distance vector routing and identify solutions to those issues

Page 30: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Routers pass periodic copies of routing table to neighbor routers and accumulate distance vectors.

Distance Vector Routing Protocols

Page 31: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Routers discover the best path to destinations from each neighbor.

Sources of Information and Discovering Routes

Page 32: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Selecting the Best Route with Metrics

Page 33: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Updates proceed step-by-step from router to router.

Maintaining Routing Information

Page 34: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Each node maintains the distance from itself to each possible destination network.

Inconsistent Routing Entries

Page 35: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Slow convergence produces inconsistent routing.

Inconsistent Routing Entries (Cont.)

Page 36: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Router C concludes that the best path to network 10.4.0.0 is through router B.

Inconsistent Routing Entries (Cont.)

Page 37: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Router A updates its table to reflect the new but erroneous hop count.

Inconsistent Routing Entries (Cont.)

Page 38: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Hop count for network 10.4.0.0 counts to infinity.

Count to Infinity

Page 39: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Define a limit on the number of hops to prevent infinite loops.

Defining a Maximum

Page 40: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Packets for network 10.4.0.0 bounce (loop) between routers B and C.

Routing Loops

Page 41: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• It is never useful to send information about a route back in the direction from which the original information came.

Split Horizon

Page 42: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Routers advertise the distance of routes that have gone down to infinity.

Route Poisoning

Page 43: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Poison reverse overrides split horizon.

Poison Reverse

Page 44: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• The router keeps an entry for the network’s possible downstate, allowing time for other routers to recompute for this topology change.

Holddown Timers

Page 45: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• The router sends updates when a change in its routing table occurs.

Triggered Updates

Page 46: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation

Page 47: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation (Cont.)

Page 48: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation (Cont.)

Page 49: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation (Cont.)

Page 50: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation (Cont.)

Page 51: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Distance Vector Operation (Cont.)

Page 52: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary– Distance vector-based routing algorithms

(also known as Bellman-Ford algorithms) pass periodic copies of a routing table from router to router.

– When the topology in a distance vector protocol internetwork changes, routing table updates must occur. As with the network discovery process, topology change updates proceed step-by-step from router to router.

– When maintaining the routing information, inconsistencies can occur if the internetwork’s slow convergence on a new configuration causes incorrect routing entries.

Page 53: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary (Cont.)– The condition called count to infinity arises when

routing table updates continue to increase the metric to a destination that cannot be reached, rather than marking the destination as unreachable.

– A routing loop occurs when two or more routers have incorrect routing information indicating that a valid path to an unreachable destination exists through the other routers.

– A number of techniques are available to eliminate routing loops including: split horizon, route poisoning, poison reverse, holddown timers, and triggered updates.

Page 54: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

54

Link-State and Balanced Hybrid Routing

Page 55: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives

• Upon completing this lesson, you will be able to:– Describe the issues associated with link-state

routing and identify solutions to those issues– Describe the features of balanced hybrid

routing protocols

Page 56: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• After initial flood, pass small event-triggered link-state updates to all other routers

Link-State Routing Protocols

Page 57: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Minimizes routing table entries• Localizes impact of a topology change within

an area

Link-State Network HierarchyExample

Page 58: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Link-State Routing Protocol Algorithms

Page 59: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Benefits of Link-State Routing – Fast convergence: changes are reported

immediately by the source affected.– Robustness against routing loops:

• Routers know the topology. • Link-state packets are sequenced and

acknowledged. – By careful (hierarchical) network design, you

can utilize resources optimally.

Page 60: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Caveats of Link-State Routing– Significant demands for resources:

• Memory (three tables: adjacency, topology, forwarding)• CPU (Dijkstra’s algorithm can be intensive, especially when a

lot of instabilities are present.)

– Requires very strict network design (when more areas—area routing)

– Problems with partitioning of areas– Configuration generally simple but can be complex

when tuning various parameters and when the design is complex

– Troubleshooting easier than in distance vector routing

Page 61: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Drawbacks to Link-State Routing Protocols

• Initial discovery may cause flooding.• Memory- and processor-intensive.

Page 62: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Shares attributes of both distance vector and link-state routing

Balanced Hybrid Routing

Page 63: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary– Link-state routing uses LSAs, a topological

database, the SPF algorithm, the resulting SPF tree, and a routing table of paths and ports to each network.

– Link-state routing algorithms maintain a complex database of the network's topology by exchanging LSAs with other routers in a network.

– Link-state routing may flood the network with LSAs during initial topology discovery and can be both memory- and processor-intensive.

– Balanced hybrid routing protocols combine aspects of both distance vector and link-state protocols.

Page 64: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

64

Enabling RIP

Page 65: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives• Upon completing this lesson, you will be

able to:– Describe the features and operation of RIP– Use Cisco IOS commands to configure

dynamic routing using RIP, given a functioning router

– Use show and debug commands to identify anomalies in dynamic routing operation using RIP, given an operational router

Page 66: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– Maximum is 6 paths (default = 4)– Hop-count metric selects the path– Routes update every 30 seconds

RIP Overview

Page 67: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

• Router configuration– Select routing protocols.– Specify networks or

interfaces.

IP Routing Configuration Tasks

Page 68: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– Defines an IP routing protocol

Router(config)#router protocol [keyword]

• Mandatory configuration command for each IP routing process

• Identifies the physically connected network that routing updates are forwarded to

Router(config-router)#network network-number

Dynamic Routing Configuration

Page 69: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– Starts the RIP routing process

Router(config)#router rip

Router(config-router)#network network-number

• Selects participating attached networks• Requires a major classful network number

RIP Configuration

Page 70: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

RIP Configuration Example

Page 71: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Verifying the RIP Configuration

Page 72: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Displaying the IP Routing Table

Page 73: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

debug ip rip Command

Page 74: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary– RIP is a distance vector routing protocol that uses

hop count as the metric for route selection and broadcasts routing updates every 30 seconds.

– To enable a dynamic routing protocol, you will select the routing protocol and then assign IP network numbers.

– The router rip command specifies RIP as the routing protocol. The network command identifies a participating attached network.

– The show ip commands display information about routing protocols and the routing table.

– Use the debug ip rip command to display information on RIP routing transactions.

Page 75: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

75

Enabling IGRP

Page 76: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives

• Upon completing this lesson, you will be able to:– Describe the features and operation of IGRP– Use Cisco IOS commands to configure

dynamic routing using IGRP, given a functioning router

– Use show and debug commands to identify anomalies in dynamic routing operation using IGRP, given an operational router

Page 77: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– More scalable than RIP– Sophisticated metric– Multiple-path support

Introducing IGRP

Page 78: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

–Bandwidth–Delay–Reliability–Loading–MTU

IGRP Composite Metric

Page 79: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

– Maximum 6 paths (default = 4)– Within metric variance– Next-hop router closer to destination

IGRP Unequal Multiple Paths

Page 80: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Configuring IGRP

Router(config-router)#network network-number

• Selects participating attached networks

Router(config)#router igrp autonomous-system

• Defines IGRP as the IP routing protocol

Page 81: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Configuring IGRP (cont.)

Router(config-router)#traffic-share {balanced | min}

• Controls how load-balanced traffic is distributed

Router(config-router)#variance multiplier

• Controls IGRP load balancing

Page 82: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

IGRP Configuration Example

Page 83: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Verifying the IGRP Configuration

Page 84: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Displaying the IP Routing Table

Page 85: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

debug ip igrp transaction Command

Page 86: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

debug ip igrp events Command

RouterA#debug ip igrp eventsIGRP event debugging is onRouterA#00:23:44: IGRP: sending update to 255.255.255.255 via Ethernet0 (172.16.1.1)00:23:44: IGRP: Update contains 0 interior, 2 system, and 0 exterior routes.00:23:44: IGRP: Total routes in update: 200:23:44: IGRP: sending update to 255.255.255.255 via Serial2 (10.1.1.1)00:23:45: IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.00:23:45: IGRP: Total routes in update: 100:23:48: IGRP: received update from 10.1.1.2 on Serial200:23:48: IGRP: Update contains 1 interior, 1 system, and 0 exterior routes.00:23:48: IGRP: Total routes in update: 2

Page 87: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Updating Routing Information Example

Page 88: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Updating Routing Information Example (Cont.)

Page 89: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Updating Routing Information Example (Cont.)

Page 90: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Updating Routing Information Example (Cont.)

Page 91: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary

– IGRP has several key features such as increased scalability, a sophisticated metric, and multiple paths.

– IGRP uses a composite routing metric that can include bandwidth, delay, reliability, loading, and MTU value.

– The IGRP composite routing metric supports multiple paths between source and destination.

– Use the router igrp and network commands to create an IGRP routing process. Use the variance and traffic-share commands to configure IGRP load balancing.

– Use the show ip protocols and show ip route commands to display information about your IGRP configuration.

– Use the debug ip igrp transaction command to display transaction information on IGRP routing transactions and the debug ip igrp events command to display a summary of the IGRP routing information.

Page 92: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

92

Enabling EIGRP

Page 93: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives

• Upon completing this lesson, you will be able to:– Describe the features and operation of EIGRP– Use Cisco IOS commands to configure

dynamic routing using EIGRP, given a functioning router

– Use show and debug commands to identify anomalies in dynamic routing operation using EIGRP, given an operational router

Page 94: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Introducing EIGRP

•EIGRP supports:– Rapid convergence– Reduced bandwidth usage– Multiple network-layer protocols

Page 95: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

EIGRP Terminology

Page 96: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Comparing EIGRP and IGRP– Similar metric– Same load balancing– Improved convergence time– Reduced network overhead

Page 97: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Configuring EIGRP

Router(config-router)#network network-number

• Selects participating attached networks

Router(config)#router eigrp autonomous-system

• Defines EIGRP as the IP routing protocol

Page 98: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

EIGRP Configuration Example

Page 99: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Verifying the EIGRP Configuration

Router#show ip protocols

Router#show ip route eigrp

Router#show ip eigrp traffic

Router#show ip eigrp neighbors

Router#show ip eigrp topology

• Displays the neighbors discovered by IP EIGRP

• Displays the IP EIGRP topology table

• Displays the number of IP EIGRP packets sent and received

• Displays current EIGRP entries in the routing table

• Displays the parameters and current state of the active routing protocol process

Page 100: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

debug ip eigrp Command

Router#debug ip eigrpIP-EIGRP: Processing incoming UPDATE packetIP-EIGRP: Ext 192.168.3.0 255.255.255.0 M 386560 - 256000 130560 SM 360960 -256000 104960IP-EIGRP: Ext 192.168.0.0 255.255.255.0 M 386560 - 256000 130560 SM 360960 -256000 104960IP-EIGRP: Ext 192.168.3.0 255.255.255.0 M 386560 - 256000 130560 SM 360960 -256000 104960IP-EIGRP: 172.69.43.0 255.255.255.0, - do advertise out Ethernet0/1IP-EIGRP: Ext 172.69.43.0 255.255.255.0 metric 371200 - 256000 115200IP-EIGRP: 192.135.246.0 255.255.255.0, - do advertise out Ethernet0/1IP-EIGRP: Ext 192.135.246.0 255.255.255.0 metric 46310656 - 45714176 596480IP-EIGRP: 172.69.40.0 255.255.255.0, - do advertise out Ethernet0/1IP-EIGRP: Ext 172.69.40.0 255.255.255.0 metric 2272256 - 1657856 614400IP-EIGRP: 192.135.245.0 255.255.255.0, - do advertise out Ethernet0/1IP-EIGRP: Ext 192.135.245.0 255.255.255.0 metric 40622080 - 40000000 622080IP-EIGRP: 192.135.244.0 255.255.255.0, - do advertise out Ethernet0/1

Page 101: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary

– EIGRP is an interior gateway protocol suited for many different topologies and media.

– EIGRP is an enhanced version of the IGRP developed by Cisco, with improved convergence properties and operating efficiency over IGRP.

– Use the router eigrp and network commands to create an EIGRP routing process.

– Use the show ip eigrp commands to display information about your EIGRP configuration.

– To display information on EIGRP packets, use the debug ip eigrp privileged EXEC command.

Page 102: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

102

Enabling OSPF

Page 103: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Objectives• Upon completing this lesson, you will be

able to:– Describe the features and operation of OSPF– Use Cisco IOS commands to configure

dynamic routing for a single area OSPF network, given a functioning router

– Use show and debug commands to identify anomalies in dynamic routing operation using OSPF, given an operational router

Page 104: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Introducing OSPF

• Open standard• Shortest path first (SPF) algorithm• Link-state routing protocol (vs. distance vector)

Page 105: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

OSPF as a Link-State Protocol– OSPF propagates link-state advertisements rather than

routing table updates.– LSAs are flooded to all OSPF routers in the area.– The OSPF link-state database is pieced together from the

LSAs generated by the OSPF routers. – OSPF uses the SPF algorithm to calculate the shortest path

to a destination.• Link = router interface• State = description of an interface and its relationship to

neighboring routers

Page 106: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

OSPF Hierarchical Routing

– Consists of areas and autonomous systems– Minimizes routing update traffic

Page 107: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Shortest Path First Algorithm

• Places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost

• Cost = 108/bandwidth (bps)

Page 108: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Configuring Single Area OSPF

Router(config-router)#network address mask area area-id

• Assigns networks to a specific OSPF area

Router(config)#router ospf process-id

• Defines OSPF as the IP routing protocol

Page 109: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

OSPF Configuration Example

Page 110: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Configuring LoopbackInterfaces

• Router ID: – Number by which the router is known to OSPF– Default: The highest IP address on an active interface at

the moment of OSPF process startup– Can be overridden by a loopback interface: Highest IP

address of any active loopback interface

Page 111: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Router#show ip ospf interface

• Displays area-ID and adjacency information

Verifying the OSPF Configuration

Router#show ip protocols

• Verifies that OSPF is configured

Router#show ip route

• Displays all the routes learned by the router

Router#show ip ospf neighbor

• Displays OSPF-neighbor information on a per-interface basis

Page 112: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

OSPF debug commands

Router#debug ip ospf events

OSPF:hello with invalid timers on interface Ethernet0hello interval received 10 configured 10net mask received 255.255.255.0 configured 255.255.255.0dead interval received 40 configured 30Router# debug ip ospf packet

OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.117aid:0.0.0.0 chk:6AB2 aut:0 auk:

Router#debug ip ospf packet

OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.116aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x0

Page 113: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary– OSPF is an interior gateway protocol similar

to IGRP, but based on link states rather than distance vectors.

– OSPF advertises information about each of its links rather than sending routing table updates like a distance vector protocol.

– The SPF algorithm places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost required to reach that destination.

Page 114: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary (Cont.)– Use the router ospf command to start an

OSPF routing process and the network command to associate addresses to an OSPF area.

– You can use any one of a number of show commands to display information about an OSPF configuration.

– To display information on OSPF-related events, such as adjacencies, flooding information, designated router selection, and SPF calculation, use the debug ip ospf events privileged EXEC command.

Page 115: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary– Routing is the process by which an item gets from

one location to another. In networking, a router is the device used to route traffic.

– Routers can forward packets over static routes or dynamic routes, based on the router configuration.

– Static routes can be important if the Cisco IOS software cannot build a route to a particular destination. Static routes are also useful for specifying a “gateway of last resort” to which all unroutablepackets will be sent.

– A default route is a special type of static route used for situations when the route from a source to a destination is not known or when it is unfeasible for the routing table to store sufficient information about the route.

Page 116: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Summary (Cont.)– When the static routing configuration is complete, use

the show ip route command to verify the configuration.

– Dynamic routing relies on a routing protocol to disseminate knowledge. A routing protocol defines the set of rules used by a router when it communicates with neighboring routers.

– The ip classless command prevents a router from dropping a packet destined for an unknown subnet.

– In a VLAN environment, frames are only switched between ports within the same broadcast domain so a Layer 3 device is required to enable inter-VLAN communication. Use ISL or 802.1q to enable trunkingon a router’s subinterface.

Page 117: 2008 NDP Lectures 7th Semester - Aalborg Universitetkom.aau.dk/project/wssn_group/docs/MM7_IP_Routing.pdf · – Explain the differences between static routing and dynamic routing

Thank you!!