OSPF

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

command to restart the ospf process

#clear ip(v6) ospf process

adjust interface bandwidth

#int s0/0/0 #bandwidth [kb]

To maintain routing information, OSPF routers complete the following generic link-state routing process to reach a state of convergence:

1. Establish Neighbor Adjacencies - OSPF-enabled routers must recognize each other on the network before they can share information. An OSPF-enabled router sends Hello packets out all OSPF-enabled interfaces to determine if neighbors are present on those links. If a neighbor is present, the OSPF-enabled router attempts to establish a neighbor adjacency with that neighbor. 2. Exchange Link-State Advertisements - After adjacencies are established, routers then exchange link-state advertisements (LSAs). LSAs contain the state and cost of each directly connected link. Routers flood their LSAs to adjacent neighbors. Adjacent neighbors receiving the LSA immediately flood the LSA to other directly connected neighbors, until all routers in the area have all LSAs. 3. Build the Topology Table - After LSAs are received, OSPF-enabled routers build the topology table (LSDB) based on the received LSAs. This database eventually holds all the information about the topology of the network. 4. Execute the SPF Algorithm - Routers then execute the SPF algorithm. The gears in the figure are used to indicate the execution of the SPF algorithm. The SPF algorithm creates the SPF tree. From the SPF tree, the best paths are inserted into the routing table. Routing decisions are made based on the entries in the routing table.

router-id priority

1st: Manual input 2nd: highest ipv4 loopback address 3rd: highest ipv4 interface address

The three main components of the OSPF routing protocol include:

Adjacency database - Creates the neighbor table Link-state database (LSDB) - Creates the topology table Forwarding database - Creates the routing table These tables contain a list of neighboring routers to exchange routing information with and are kept and maintained in RAM. The CPU processes the neighbor and topology tables using Dijkstra's SPF algorithm. The SPF algorithm is based on the cumulative cost to reach a destination.

Note on the synchronizing OSPF databases

After all LSRs have been satisfied for a given router, the adjacent routers are considered synchronized and in a full state. As long as the neighboring routers continue receiving Hello packets, the network in the transmitted LSAs remain in the topology database. After the topological databases are synchronized, updates (LSUs) are sent only to neighbors when: A change is perceived (incremental updates) Every 30 minutes

multiarea OSPF

All areas must connect to the backbone area (area 0). Routers interconnecting the areas are referred to as Area Border Routers (ABR). It can divide one large autonomous system (AS) into smaller areas, to support hierarchical routing. With hierarchical routing, routing still occurs between the areas (interarea routing), while many of the processor intensive routing operations, such as recalculating the database, are kept within an area. For instance, any time a router receives new information about a topology change within the area (including the addition, deletion, or modification of a link) the router must rerun the SPF algorithm, create a new SPF tree, and update the routing table. The SPF algorithm is CPU-intensive and the time it takes for calculation depends on the size of the area. Note: Topology changes are distributed to routers in other areas in a distance vector format. In other words, these routers only update their routing tables and do not need to rerun the SPF algorithm.

When an OSPF router is initially connected to a network, it attempts to (8.1.3.1):

Create adjacencies with neighbors Exchange routing information Calculate the best routes Reach convergence

Why is a DR and BDR election necessary? Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs:

Creation of multiple adjacencies - Ethernet networks could potentially interconnect many OSPF routers over a common link. Creating adjacencies with every router is unnecessary and undesirable. It 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.

OSPF messages transmitted over an Ethernet link contain the following information:

Data Link Ethernet Frame Header - Identifies the destination multicast MAC addresses 01-00-5E-00-00-05 or 01-00-5E-00-00-06. IP Packet Header - Identifies the IPv4 protocol field 89 which indicates that this is an OSPF packet. It also identifies one of two OSPF multicast addresses, 224.0.0.5 or 224.0.0.6. OSPF Packet Header - Identifies the OSPF packet type, the router ID and the area ID. OSPF Packet Type Specific Data - Contains the OSPF packet type information. The content differs depending on the packet type. In this case, it is an IPv4 Header.

Hello packets are used to:

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 and Frame Relay. Point-to-point links do not require DR or BDR.

OSPF progresses through several states while attempting to reach convergence (8.1.3.1):

Down state Init state Two-Way state ExStart state Exchange state Loading state Full state

adjacencies formula

For any number of routers (designated as n) on a multiaccess network, there are n (n - 1) / 2 adjacencies.

Neighbor Adjacencies: The action performed in Two-Way state depends on the type of inter-connection between the adjacent routers:

If the two adjacent neighbors are interconnected over a point-to-point link, then they immediately transition from the Two-Way state to the database synchronization phase. If the routers are interconnected over a common Ethernet network, then a designated router DR and a BDR must be elected.

Hello packet intervals

OSPF Hello packets are transmitted to multicast address 224.0.0.5 in IPv4 and FF02::5 in IPv6 (all OSPF routers) every: 10 seconds (default on multiaccess and point-to-point networks) 30 seconds (default on nonbroadcast multiaccess [NBMA] networks; for example, Frame Relay) Dead Interval: Cisco uses a default of 4 times the Hello interval: 40 seconds (default on multiaccess and point-to-point networks) 120 seconds (default on NBMA networks; for example, Frame Relay)

LSUs

Routers initially exchange Type 2 DBD packets, which is an abbreviated list of the sending router's LSDB and is used by receiving routers to check against the local LSDB. A Type 3 LSR packet is used by the receiving routers to request more information about an entry in the DBD. The Type 4 LSU packet is used to reply to an LSR packet. LSUs are also used to forward OSPF routing updates, such as link changes. Specifically, an LSU packet can contain 11 different types of OSPFv2 LSAs, as shown in the figure. OSPFv3 renamed several of these LSAs and also contains two additional LSAs. LSA types: 1: Router LSAs 2: Network LSAs 3 or 4: Summary LSAs 5: Autonomous System External LSAs 6: Multicast OSPF LSAs 7: Defined for Not-So-Stubby areas 8: External Attributes LSA for BGP 9, 10, 11: Opaque LSAs

OSPFv2 vs. OSPFv3

SIMILARITIES: Link-State Protocols Routing algorithm Metric - The RFCs for both OSPFv2 and OSPFv3 define the metric as the cost of sending packets out the interface. OSPFv2 and OSPFv3 can be modified using the #auto-cost reference-bandwidth [ref-bw] router configuration mode command. The command only influences the OSPF metric where it was configured. For example, if this command was entered for OSPFv3, it does not affect the OSPFv2 routing metrics. Areas OSPF packet types Neighbor Discovery Mechanism DR/DBR election process Router ID DIFFERENCES: Advertising addresses (IPv4 and IPv6) Source address - OSPFv2 messages are sourced from the IPv4 address of the exit interface. In OSPFv3, OSPF messages are sourced using the link-local address of the exit interface. All OSPF router multicast addresses - OSPFv2 uses 224.0.0.5; whereas, OSPFv3 uses FF02::5. DR/BDR multicast address - OSPFv2 uses 224.0.0.6; whereas, OSPFv3 uses FF02::6. Advertise networks - OSPFv2 advertises networks using the network router configuration command; whereas, OSPFv3 uses the ipv6 ospf process-id area area-id interface configuration command. IP unicast routing - Enabled, by default, in IPv4; whereas, the ipv6 unicast-routing global configuration command must be configured. Authentication - OSPFv2 uses either plaintext authentication or MD5 authentication. OSPFv3 uses IPv6 authentication.

The hierarchical-topology possibilities of multiarea OSPF have these advantages:

Smaller routing tables - Fewer routing table entries because network addresses can be summarized between areas. Route summarization is not enabled by default. Reduced link-state update overhead - Minimizes processing and memory requirements. Reduced frequency of SPF calculations - Localizes the impact of a topology change within an area. For instance, it minimizes routing update impact because LSA flooding stops at the area boundary.

verify ospf process info

The #show ip(v6) ospf command can also be used to examine the OSPF process ID and router ID. This command displays the OSPF area information and the last time the SPF algorithm was calculated.

verify ospf protocol settings

The #show ip(v6) protocols command is a quick way to verify vital OSPF configuration information. This includes the OSPF process ID, the router ID, networks the router is advertising, the neighbors the router is receiving updates from, and the default administrative distance, which is 110 for OSPF.

verify ospf interface settings

The quickest way to verify OSPF interface settings is to use the #show ip(v6) ospf interface command. This command provides a detailed list for every OSPF-enabled interface. The command is useful to determine whether the network statements were correctly composed. To get a summary of OSPF-enabled interfaces, use the #show ip(v6) ospf interface brief command.

Hello packet fields

Type - Identifies the type of packet. A one (1) indicates a Hello packet. A value 2 identifies a DBD packet, 3 an LSR packet, 4 an LSU packet, and 5 an LSAck packet. Router ID - A 32-bit value expressed in dotted decimal notation (an IPv4 address) used to uniquely identifying the originating router. Area ID - Area from which the packet originated. Network Mask - Subnet mask associated with the sending interface. Hello Interval - Specifies the frequency, in seconds, at which a router sends Hello packets. The default Hello interval on multiaccess networks is 10 seconds. This timer must be the same on neighboring routers; otherwise, an adjacency is not established. Router Priority - Used in a DR/BDR election. The default priority for all OSPF routers is 1, but can be manually altered from 0 to 255. The higher the value, the more likely the router becomes the DR on the link. Dead Interval - Is the time in seconds that a router waits to hear from a neighbor before declaring the neighboring router out of service. By default, the router Dead Interval is four times the Hello interval. This timer must be the same on neighboring routers; otherwise, an adjacency is not established. Designated Router (DR) - Router ID of the DR. Backup Designated Router (BDR) - Router ID of the BDR. List of Neighbors - List that identifies the router IDs of all adjacent routers.

OSPF exchanges messages to convey routing information using five types of packets.

Type 1: Hello packet - Used to establish and maintain adjacency with other OSPF routers. Type 2: Database Description (DBD) packet - Contains an abbreviated list of the sending router's LSDB and is used by receiving routers to check against the local LSDB. The LSDB must be identical on all link-state routers within an area to construct an accurate SPF tree. Type 3: Link-State Request (LSR) packet - Receiving routers can then request more information about any entry in the DBD by sending an LSR. Type 4: Link-State Update (LSU) packet - Used to reply to LSRs and to announce new information. LSUs contain seven different types of LSAs. Type 5: Link-State Acknowledgment (LSAck) packet - When an LSU is received, the router sends an LSAck to confirm receipt of the LSU. The LSAck data field is empty.

verify ospf neighbors

Use the #show ip(v6) ospf neighbor command to verify that the router has formed an adjacency with its neighboring routers. If the router ID of the neighboring router is not displayed, or if it does not show as being in a state of FULL, the two routers have not formed an OSPF adjacency.

Advertising and enabling OSPF

V2: (config)# router ospf [process-id] # network [network ip] [wildcard mask] area {0} # passive-interface {g0/0} # default-information originate (used with default route) # auto-cost reference-bandwidth [Mb] V3: (conofig)# ipv6 router ospf [process-id] #passive-interface {g0/0} #auto-cost reference-bandwidth [Mb] # default-information originate (used with default route ) #int s0/0/0 #ipv6 ospf {1} area {0} #int g0/0 #ipv6 ospf {1} area {0}

OSPF operational states

When an OSPF router is initially connected to a network, it attempts to: Create adjacencies with neighbors Exchange routing information Calculate the best routes Reach convergence OSPF progresses through several states while attempting to reach convergence: *ESTABLISH NEIGHBOR ADJACENCIES* 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 sending router's Router ID. Transition to Two-Way state. Two-Way state: On Ethernet links, elect a DR, and a BDR. Transition to ExStart state. *SYNC OSPF DATABASES* ExStart state: Negotiate master / slave relationship and DBD packet sequence number. The master initiates the DBD packet exchange. Exchange state: Routers exchange DBD packets. If additional router information is required then transition to Loading; otherwise, transition to Full. 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: Routers have converged.


Kaugnay na mga set ng pag-aaral

Review questions for: compare and contrast Mitosis and Meiosis

View Set

Alg Des Ch08: Dynamic Programming

View Set

New York State Auto Damage and Theft quiz 17-71

View Set

Errors and Statistical Significance

View Set

Test 2 - The Legal Environment: EEO & Safety (8)

View Set