2008 ndp lectures 7th semester - aalborg...
TRANSCRIPT
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
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
Outline
• Routing Overview
Determining IP Routes
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
6
Routing Overview
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
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?
• Routers must learn destinations that are not directly connected.
What Is Routing? (Cont.)
• 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
Static Routes
• Configure unidirectional static routes to and from a stub network to allow communications to occur.
– 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
Static Route Example
• This is a unidirectional route. You must have a route configured in the opposite direction.
Default Routes
• This route allows the stub network to reach all known networks beyond router A.
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
• 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?
• 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
Administrative Distance: Ranking Routes
Classes of Routing Protocols
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
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
Routing Protocol Comparison Chart
Using the ip classless Command
VLAN-to-VLAN Overview
• Network layer devices combine multiple broadcast domains.
Dividing a Physical Interface into Subinterfaces
• Physical interfaces can be divided into multiple subinterfaces.
Routing Between VLANswith ISL Trunks
Routing Between VLANswith 802.1Q Trunks
28
Distance Vector 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
• Routers pass periodic copies of routing table to neighbor routers and accumulate distance vectors.
Distance Vector Routing Protocols
• Routers discover the best path to destinations from each neighbor.
Sources of Information and Discovering Routes
Selecting the Best Route with Metrics
• Updates proceed step-by-step from router to router.
Maintaining Routing Information
• Each node maintains the distance from itself to each possible destination network.
Inconsistent Routing Entries
• Slow convergence produces inconsistent routing.
Inconsistent Routing Entries (Cont.)
• Router C concludes that the best path to network 10.4.0.0 is through router B.
Inconsistent Routing Entries (Cont.)
• Router A updates its table to reflect the new but erroneous hop count.
Inconsistent Routing Entries (Cont.)
• Hop count for network 10.4.0.0 counts to infinity.
Count to Infinity
• Define a limit on the number of hops to prevent infinite loops.
Defining a Maximum
• Packets for network 10.4.0.0 bounce (loop) between routers B and C.
Routing Loops
• It is never useful to send information about a route back in the direction from which the original information came.
Split Horizon
• Routers advertise the distance of routes that have gone down to infinity.
Route Poisoning
• Poison reverse overrides split horizon.
Poison Reverse
• The router keeps an entry for the network’s possible downstate, allowing time for other routers to recompute for this topology change.
Holddown Timers
• The router sends updates when a change in its routing table occurs.
Triggered Updates
Distance Vector Operation
Distance Vector Operation (Cont.)
Distance Vector Operation (Cont.)
Distance Vector Operation (Cont.)
Distance Vector Operation (Cont.)
Distance Vector Operation (Cont.)
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.
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.
54
Link-State and Balanced Hybrid 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
• After initial flood, pass small event-triggered link-state updates to all other routers
Link-State Routing Protocols
• Minimizes routing table entries• Localizes impact of a topology change within
an area
Link-State Network HierarchyExample
Link-State Routing Protocol Algorithms
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.
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
Drawbacks to Link-State Routing Protocols
• Initial discovery may cause flooding.• Memory- and processor-intensive.
• Shares attributes of both distance vector and link-state routing
Balanced Hybrid 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.
64
Enabling RIP
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
– Maximum is 6 paths (default = 4)– Hop-count metric selects the path– Routes update every 30 seconds
RIP Overview
• Router configuration– Select routing protocols.– Specify networks or
interfaces.
IP Routing Configuration Tasks
– 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
– 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
RIP Configuration Example
Verifying the RIP Configuration
Displaying the IP Routing Table
debug ip rip Command
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.
75
Enabling IGRP
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
– More scalable than RIP– Sophisticated metric– Multiple-path support
Introducing IGRP
–Bandwidth–Delay–Reliability–Loading–MTU
IGRP Composite Metric
– Maximum 6 paths (default = 4)– Within metric variance– Next-hop router closer to destination
IGRP Unequal Multiple Paths
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
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
IGRP Configuration Example
Verifying the IGRP Configuration
Displaying the IP Routing Table
debug ip igrp transaction Command
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
Updating Routing Information Example
Updating Routing Information Example (Cont.)
Updating Routing Information Example (Cont.)
Updating Routing Information Example (Cont.)
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.
92
Enabling EIGRP
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
Introducing EIGRP
•EIGRP supports:– Rapid convergence– Reduced bandwidth usage– Multiple network-layer protocols
EIGRP Terminology
Comparing EIGRP and IGRP– Similar metric– Same load balancing– Improved convergence time– Reduced network overhead
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
EIGRP Configuration Example
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
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
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.
102
Enabling OSPF
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
Introducing OSPF
• Open standard• Shortest path first (SPF) algorithm• Link-state routing protocol (vs. distance vector)
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
OSPF Hierarchical Routing
– Consists of areas and autonomous systems– Minimizes routing update traffic
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)
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
OSPF Configuration Example
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
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
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
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.
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.
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.
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.
Thank you!!