计算机代写 ID 10.10.1.1

Lecture 01: OSPF
HKUSPACE CCIT ENA
Syllabus inspired by Cisco Networking Academy CCNA v7.0 (ENSA)
Module Objectives

Copyright By PowCoder代写 加微信 powcoder

Topic Title
Topic Objective
OSPF Features and Characteristics
Describe basic OSPF features and characteristics.
OSPF Packets
Describe the OSPF packet types used in single-area OSPF.
TOoSpPi cF TOi tpl e e r a t i o n
TEoxpliacinOhbojewctsiivnegle-area OSPF operates.
OSPF Router ID
Configure an OSPFv2 router ID.
Point-to-Point OSPF Networks
Configure single-area OSPFv2 in a point-to-point network.
Multiaccess OSPF Networks
Configure the OSPF interface priority to influence the DR/BDR election in a multiaccess network.
Modify Single-Area OSPFv2
Implement modifications to change the operation of single- area OSPFv2.
Default Route Propagation
Configure OSPF to propagate a default route.
Verify Single-Area OSPFv2
Verify a single-area OSPFv2 implementation.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2

OSPF Features and Characteristics Introduction to OSPF
OSPF is a link-state routing protocol that was developed as an alternative for the distance vector Routing Information Protocol (RIP). OSPF has significant advantages over RIP in that it offers faster convergence and scales to much larger network implementations.
OSPF is a link-state routing protocol that uses the concept of areas. A network administrator can divide the routing domain into distinct areas that help control routing update traffic.
A link is an interface on a router, a network segment that connects two routers, or a stub network such as an Ethernet LAN that is connected to a single router.
Information about the state of a link is known as a link-state. All link-state information includes the network prefix, prefix length, and cost.
This module covers basic, single-area OSPF implementations and configurations.
OSPF Features and Characteristics Components of OSPF
All routing protocols share similar components. They all use routing protocol messages to exchange route information. The messages help build data structures, which are then processed using a routing algorithm.
Routers running OSPF exchange messages to convey routing information using five types of packets:
Hello packet
Database description packet Link-state request packet Link-state update packet Link-state acknowledgment packet
These packets are used to discover neighboring routers and also to exchange routing information to maintain accurate information about the network.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3

OSPF Features and Characteristics Components of OSPF (Cont.)
OSPF messages are used to create and maintain three OSPF databases, as follows:
Description
Adjacency Database
Neighbor Table
•List of all neighbor routers to which a router has established bi-directional communication. •This table is unique for each router.
•Can be viewed using the show ip ospf neighbor command.
Link-state Database (LSDB)
Topology Table
•Lists information about all other routers in the network.
•The database represents the network LSDB.
•All routers within an area have identical LSDB.
•Can be viewed using the show ip ospf database command.
Forwarding Database
Routing Table
•List of routes generated when an algorithm is run on the link-state database.
•Each router’s routing table is unique and contains information on how and where to send packets to other routers.
•Can be viewed using the show ip route command.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
OSPF Features and Characteristics Components of OSPF (Cont.)
• The router builds the topology table using results of calculations based on the Dijkstra shortest-path first (SPF) algorithm. The SPF algorithm is based on the cumulative cost to reach a destination.
• The SPF algorithm creates an SPF tree by placing each router at the root of the tree and calculating the shortest path to each node. The SPF tree is then used to calculate the best routes. OSPF places the best routes into the forwarding database, which is used to make the routing table.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6

OSPF Features and Characteristics Link-State Operation
To maintain routing information, OSPF routers complete a generic link-state routing process to reach a state of convergence. The following are the link-state routing steps that are completed by a router:
1. Establish Neighbor Adjacencies
2. Exchange Link-State Advertisements
3. Build the Link State Database
4. Execute the SPF Algorithm
5. Choose the
OSPF Features and Characteristics Single-Area and Multiarea OSPF
To make OSPF more efficient and scalable, OSPF supports hierarchical routing using areas. An OSPF area is a group of routers that share the same link-state information in their LSDBs. OSPF can be implemented in one of two ways, as follows:
• Single-Area OSPF – All routers are in one area. Best practice is to use area 0.
• Multiarea OSPF – OSPF is implemented using multiple areas, in a hierarchical fashion. All areas must connect to the backbone area (area 0). Routers interconnecting the areas are referred to as Area Border Routers (ABRs).
The focus of this module is on single-area OSPFv2.
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 7
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8

OSPF Features and Characteristics Multiarea OSPF
The hierarchical-topology design options with multiarea OSPF can offer the following advantages.
Smaller routing tables – Tables are smaller because there are fewer routing table entries. This is because network addresses can be summarized between areas. Route summarization is not enabled by default.
Reduced link-state update overhead – Designing multiarea OSPF with smaller areas minimizes processing and memory requirements.
Reduced frequency of SPF calculations -– Multiarea OSPF localize the impact of a topology change within an area. For instance, it minimizes routing update impact because LSA flooding stops at the area boundary.
OSPF Features and Characteristics OSPFv3
OSPFv3 is the OSPFv2 equivalent for exchanging IPv6 prefixes. OSPFv3 exchanges routing information to populate the IPv6 routing table with remote prefixes.
Note: With the OSPFv3 Address Families feature, OSPFv3 includes support for both IPv4 and IPv6. OSPF Address Families is beyond the scope of this curriculum.
OSPFv3 has the same functionality as OSPFv2, but uses IPv6 as the network layer transport, communicating with OSPFv3 peers and advertising IPv6 routes. OSPFv3 also uses the SPF algorithm as the computation engine to determine the best paths throughout the routing domain.
OSPFv3 has separate processes from its IPv4 counterpart. The processes and operations are basically the same as in the IPv4 routing protocol, but run independently.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9

OSPF Packets
Video – OSPF Packets
This video will cover the following packet types:
• Database Description (DBD)
• Link-State Request (LSR)
• Link-State Update (LSU)
• Link-State Acknowledgment (LSAck)
OSPF Packets
Types of OSPF Packets
The table summarizes the five different types of Link State Packets (LSPs) used by OSPFv2. OSPFv3 has similar packet types.
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 11
Packet Name
Description
Discovers neighbors and builds adjacencies between them
Database Description (DBD)
Checks for database synchronization between routers
Link-State Request (LSR)
Requests specific link-state records from router to router
Link-State Update (LSU)
Sends specifically requested link-state records
Link-State Acknowledgment (LSAck)
Acknowledges the other packet types
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12

OSPF Packets Link-State Updates
• LSUs are also used to forward OSPF routing updates. An LSU packet can contain 11 different types of OSPFv2 LSAs. OSPFv3 renamed several of these LSAs and also contains two additional LSAs.
• LSU and LSA are often used interchangeably, but the correct hierarchy is LSU packets contain LSA messages.
OSPF Packets
Hello Packet (Supplementary)
The OSPF Type 1 packet is the Hello packet. Hello packets are used to do the following:
• Discover OSPF neighbors and establish neighbor adjacencies.
• Advertise parameters on which two routers must agree to become neighbors.
• Elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks like Ethernet. Point-to- point links do not require DR or BDR.
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 13
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 14

OSPF Operation
OSPF Operational States (Supplementary)
Description
Down State
•No Hello packets received = Down. •Router sends Hello packets. •Transition to Init state.
Init State
•Hello packets are received from the neighbor. •They contain the Router ID of the sending router. •Transition to Two-Way state.
Two-Way State
•In this state, communication between the two routers is bidirectional. •On multiaccess links, the routers elect a DR and a BDR.
•Transition to ExStart state.
ExStart State
On point-to-point networks, the two routers decide which router will initiate the DBD packet exchange and decide upon the initial DBD packet sequence number.
Exchange State
•Routers exchange DBD packets.
•If additional router information is required then transition to Loading; otherwise, transition to the Full state.
Loading State
•LSRs and LSUs are used to gain additional route information. •Routes are processed using the SPF algorithm.
•Transition to the Full state.
Full State
The link-state database of the router is fully synchronized.
OSPF Operation
The Need for a DR
Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs, as follows:
• Creation of multiple adjacencies – Ethernet networks could potentially interconnect many OSPF routers over a common link. Creating adjacencies with every router would lead to an excessive number of LSAs exchanged between routers on the same network.
• Extensive flooding of LSAs – Link-state routers flood their LSAs any time OSPF is initialized, or when there is a change in the topology. This flooding can become excessive.
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 15
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 16

OSPF Operation
LSA Flooding with a DR
An increase in the number of routers on a multiaccess network also increases the number of LSAs exchanged between the routers. This flooding of LSAs significantly impacts the operation of OSPF.
If every router in a multiaccess network had to flood and acknowledge all received LSAs to all other routers on that same multiaccess network, the network traffic would become quite chaotic.
On multiaccess networks, OSPF elects a DR to be the collection and distribution point for LSAs sent and received. A BDR is also elected in case the DR fails. All other routers become DROTHERs. A DROTHER is a router that is neither the DR nor the BDR.
Note: The DR is only used for the dissemination of LSAs. The router will still use the best next- hop router indicated in the routing table for the forwarding of all other packets.
OSPF Router ID
OSPF Reference Topology
The figure shows the topology used for configuring OSPFv2 in this module. The routers in the topology have a starting configuration, including interface addresses. There is currently no static routing or dynamic routing configured on any of the routers. All interfaces on R1, R2, and R3 (except the loopback 1 on R2) are within the OSPF backbone area. The ISP router is used as the gateway to the internet of the routing domain.
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 17
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 18

OSPF Router ID
Router Configuration Mode for OSPF
OSPFv2 is enabled using the router ospf process-id global configuration mode command. The process-id value represents a number between 1 and 65,535 and is selected by the network administrator. The process-id value is locally significant. It is considered best practice to use the same process-id on all OSPF routers.
R1(config)# router ospf 10 R1(config-router)# ?
auto-cost default-information distance
exit log-adjacency-changes neighbor
passive-interface redistribute router-id
R1(config-router)#
OSPF area parameters
Calculate OSPF interface cost according to bandwidth Control distribution of default information
Define an administrative distance
Exit from routing protocol configuration mode
Log changes in adjacency state
Specify a neighbor router
Enable routing on an IP network
Negate a command or set its defaults
Suppress routing updates on an interface
Redistribute information from another routing protocol
router-id for this OSPF process
OSPF Router ID Router IDs
An OSPF router ID is a 32-bit value, represented as an IPv4 address. It is used to uniquely identify an OSPF router, and all OSPF packets include the router ID of the originating router.
Every router requires a router ID to participate in an OSPF domain. It can be defined by an administrator or automatically assigned by the router. The router ID is used by an OSPF-enabled router to do the following:
Participate in the synchronization of OSPF databases – During the Exchange State, the router with the highest router ID will send their database descriptor (DBD) packets first.
Participate in the election of the designated router (DR) – In a multiaccess LAN environment, the router with the highest router ID is elected the DR. The routing device with the second highest router ID is elected the backup designated router (BDR).
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19

OSPF Router ID
Router ID Order of Precedence
Cisco routers derive the router ID based on one of three criteria, in the following preferential order:
1. The router ID is explicitly configured using the OSPF router-id rid router configuration mode command. This is the recommended method to assign a router ID.
2. The router chooses the highest IPv4 address of any of configured loopback interfaces.
3. The router chooses the highest active IPv4 address of any of its physical interfaces.
OSPF Router ID
Configure a Loopback Interface as the Router ID
Instead of relying on physical interface, the router ID can be assigned to a loopback interface. Typically, the IPv4 address for this type of loopback interface should be configured using a 32-bit subnet mask (255.255.255.255). This effectively creates a host route. A 32-bit host route would not get advertised as a route to other OSPF routers.
OSPF does not need to be enabled on an interface for that interface to be chosen as the router ID.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
© 2016 Cisco and/or its affiliates. All rights reserved.
Cisco Confidential 21

OSPF Router ID
Explicitly Configure a Router ID
In our reference topology the router ID for each router is assigned as follows:
• R1 uses router ID 1.1.1.1
• R2 uses router ID 2.2.2.2
• R3 uses router ID 3.3.3.3
Use the router-id rid router configuration mode command to manually assign a router ID. In the example, the router ID 1.1.1.1 is assigned to R1. Use the show ip
protocols command to verify the router ID.
R1(config)# router ospf 10
R1(config-router)# router-id 1.1.1.1
R1(config-router)# end
*May 23 19:33:42.689: %SYS-5-CONFIG_I: Configured from console by console R1# show ip protocols | include Router ID
Router ID 1.1.1.1
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
OSPF Router ID
Modify a Router ID
• After a router selects a router ID, an active OSPF router does not allow the router ID to be changed until the router is reloaded or the OSPF process is reset.
• Clearing the OSPF process is the preferred method to reset the router ID.
R1# show ip protocols | include Router ID
Router ID 10.10.1.1
R1# conf t
Enter configuration commands, one per line. End with CNTL/Z. R1(config)# router ospf 10
R1(config-router)# router-id 1.1.1.1
% OSPF: Reload or use “clear ip ospf process” command, for this to take effect
R1(config-router)# end
R1# clear ip ospf process
Reset ALL OSPF processes? [no]: y
*Jun 6 01:09:46.975: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on GigabitEthernet0/0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Jun 6 01:09:46.981: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on GigabitEthernet0/0/1 from LOADING to FULL, Loading Done *
R1# show ip protocols | include Router ID
Router ID 1.1.1.1
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24

Point-to-Point OSPF Networks
The network Command Syntax
• You can specify the interfaces that belong to a point-to-point network by configuring the network command. You can also configure OSPF directly on the interface with the ip ospf command.
• The basic syntax for the network command is as follows:
Router(config-router)# network network-address wildcard-mask area area-id
• The network-address wildcard-mask syntax is used to enable OSPF on interfaces. Any interfaces on a router that match this part of the command are enabled to send and receive OSPF packets.
• The area area-id syntax refers to the OSPF area. When configuring single-area OSPFv2, the network command must be configured with the same area-id value on all routers. Although any area ID can be used, it is good practice to use an area ID of 0 with single-area OSPFv2. This convention makes it easier if the network is later altered to support multiarea OSPFv2.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
Point-to-Point OSPF Networks The Wildcard Mask
• The wildcard mask is typically the inverse of the subnet mask configured on that interface.
• The easiest method for calculating a wildcard mask is to subtract the network subnet mask from 255.255.255.255, as shown for /24 and /26 subnet masks in the figure.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26

Point-to-Point OSPF Networks
Configure OSPF Using the network Command
Within routing configuration mode, there are two ways to identify the interfaces that will participate in the OSPFv2 routing process.
• In the first example, the wildcard mask identifies the interface based on the network addresses. Any active interface that is configured with an IPv4 address belonging to that network will participate in the OSPFv2 routing process.
• Note: Some IOS versions allow the subnet mask to be entered instead of the wildcard mask. The IOS then converts the subnet mask to the wildcard mask format.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Point-to-Point OSPF Networks
Configure OSPF Using the network Command (Cont.)
R1(config)# router ospf 10
R1(config-router)# network 10.10.1.0 0.0.0.255 area 0 R1(config-router)# network 10.1.1.4 0.0.0.3 area 0 R1(config-router)# network 10.1.1.12 0.0.0.3 area 0 R1(config-router)#
As an alternative, OSPFv2 can be enabled by specifying the exact interface IPv4 address using a quad zero wildcard mask. Entering network 10.1.1.5 0.0.0.0 area 0 on R1 tells the router to enable interface Gigabit Ethernet 0/0/0 for the routing proces

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com