CCNA 3 Chapter 8 Single-Area OSPF
Configuring OSPFv3 (cont.)
Branch(config)#interface GigabitEthernet0/0 Branch(config-if)#ipv6 ospf 1 area 0 Branch(config-if)#exit Branch(config)#interface GigabitEthernet0/1 Branch(config-if)#ipv6 ospf 1 area 0 Branch(config-if)#exit Branch(config)#ipv6 router ospf 1 Branch(config-rtr)#router-id 0.0.0.2 Branch#show ipv6 route ospf
Summary 2
By default, OSPF Hello packets are sent every 10 seconds on multi-access and point-to-point segments and every 30 seconds on NBMA segments (Frame Relay, X.25, ATM), and are used by OSPF to establish neighbor adjacencies. The Dead interval is four times the Hello interval, by default. For routers to become adjacent, their Hello interval, Dead interval, network types, and subnet masks must match. Use the show ip ospf neighbors command to verify OSPFv2 adjacencies. OSPF elects a DR to act as collection and distribution point for LSAs sent and received in the multi-access network. A BDR is elected to assume the role of the DR should the DR fail. All other routers are known as DROTHERs. All routers send their LSAs to the DR, which then floods the LSA to all other routers in the multi-access network. The show ip protocols command is used to verify important OSPFv2 configuration information, including the OSPF process ID, the router ID, and the networks the router is advertising. OSPFv3 is enabled on an interface and not under router configuration mode. OSPFv3 needs link-local addresses to be configured. IPv6 Unicast routing must be enabled for OSPFv3. A 32-bit router-ID is required before an interface can be enabled for OSPFv3. Similar verification commands used for OSPFv2 are used for OSPFv3.
OSPF Cost (Cont.)
Default Interface Bandwidths As with reference bandwidth, interface bandwidth values do not actually affect the speed or capacity of the link. Use the show interfaces command to view the interface bandwidth setting. Adjust Interface Bandwidth To adjust the interface bandwidth use the bandwidth kilobits interface configuration command. Use the no bandwidth command to restore the default value. Set OSPF Cost Manually The cost can be manually configured on an interface using the ip ospf cost value interface configuration command.
Single-Area OSPFv2 Configure Single-Area OSPFv2
Enabling OSPF Any interfaces on a router that match the network address in the network command are enabled to send and receive OSPF packets. Wildcard Mask In a wildcard mask, binary 0 is equal to a match and binary 1 is not a match.
Single-Area OSPFv2 OSPF Router ID
Enabling OSPFv2 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, which means that it does not have to be the same value on the other OSPF routers to establish adjacencies with those neighbors.
OSPF Characteristics OSPF Messages (Cont.)
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 multi-access networks like Ethernet and Frame Relay. OSPF Hello packets are transmitted to multicast address 224.0.0.5 in IPv4 and FF02::5 in IPv6
Configuring OSPFv3
Link-Local Addresses Link-local addresses are automatically created when an IPv6 global unicast address is assigned to the interface. Assigning Link-Local Addresses Link-local addresses can be configured manually using the same interface command used to create IPv6 global unicast addresses, but appending the link-local keyword to the ipv6 address command. Configuring the OSPFv3 Router ID OSPFv3 requires a 32-bit router ID to be assigned before OSPF can be enabled on an interface. The router-id rid command is used to assign a router ID in OSPFv3. Clearing the OSPF process is the preferred method to reset the router ID.
OSPFv2 vs. OSPFv3 (Cont.)
Link-Local Addresses Link-local addresses are automatically created when an IPv6 global unicast address is assigned to the interface. Assigning Link-Local Addresses Link-local addresses can be configured manually using the same interface command used to create IPv6 global unicast addresses, but appending the link-local keyword to the ipv6 address command. Configuring the OSPFv3 Router ID OSPFv3 requires a 32-bit router ID to be assigned before OSPF can be enabled on an interface. The router-id rid command is used to assign a router ID in OSPFv3. Clearing the OSPF process is the preferred method to reset the router ID.
OSPF cost
OSPF Metric = Cost The cost of an interface is inversely proportional to the bandwidth of the interface. Cost = reference bandwidth / interface bandwidth The cost of an OSPF route is the accumulated value from one router to the destination network. To adjust the reference bandwidth, use the auto-cost reference-bandwidth Mb/s router configuration command.
OSPF Characteristics OSPF Operation
OSPF progresses through several states while attempting to reach convergence Down state, Init state, Two-Way state, ExStart state, Exchange state, Loading state, and Full state Establishing Adjacencies When a neighboring OSPF-enabled router receives a Hello packet with a router ID that is not within its neighbor list, the receiving router attempts to establish an adjacency with the initiating router. OSPF DR and BDR 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. After the Two-Way state, routers transition to database synchronization states.
OSPF Characteristics OSPF Messages
OSPFv2 messages contain: Data Link header, IP packet Header, OSPF Packet Header, OSPF packet type-specific database LSP Types: Type 1: Hello packet Type 2: Database Description (DBD) packet Type 3: Link-State Request (LSR) packet Type 4: Link-State Update (LSU) packet Type 5: Link-State Acknowledgment (LSAck) packet
Single-Area OSPFv2 OSPF Router ID (Cont.)
Router ID The router ID is used by the OSPF-enabled router to uniquely identify the router and participate in the election of the DR Router ID based on one of three criteria Explicitly configured using the OSPF router-id rid command Router chooses the highest IPv4 address of any of configured loopback interfaces If no loopback interfaces are configured, then the router chooses the highest active IPv4 address of any of its physical interfaces Clearing the OSPF process is the preferred method to reset the router ID. Note: The router ID looks like an IPv4 address, but it is not routable and, therefore, is not included in the routing table, unless the OSPF routing process chooses an interface (physical or loopback) that is appropriately defined by a network command.
OSPFv3
Similar to its IPv4 counterpart, OSPFv3 exchanges routing information to populate the IPv6 routing table with remote prefixes Packets with a source or destination link-local address cannot be routed beyond the link from where the packet originated.
Summary
The current version of OSPF for IPv4 is OSPFv2 introduced in RFC 1247 and updated in RFC 2328 by John Moy. In 1999, OSPFv3 for IPv6 was published in RFC 2740. OSPF is a link-state routing protocol with a default administrative distance of 110, and is denoted in the routing table with a route source code of O. OSPFv2 is enabled with the router ospf process-id global configuration mode command. The process-id value is locally significant, which means that it does not need to match other OSPFv2 routers to establish adjacencies with those neighbors. The network command used with OSPFv2 has the same function as when used with other IGP routing protocols, but with slightly different syntax. The wildcard-mask value is the inverse of the subnet mask, and the area-id value should be set to 0.
Configure Single-Area OSPFv2 (Cont.)
The network Command OSPFv2 can be enabled using the network intf-ip-address 0.0.0.0 area area-id router configuration mode command The advantage of specifying the interface is that the wildcard mask calculation is not necessary. Unneeded OSPFv2 messages affect the network: Inefficient use of bandwidth, inefficient use of resources, and increased security risk Configure passive interfaces Use the passive-interface router configuration mode command to prevent the transmission of routing messages through a router interface, but still allow that network to be advertised to other routers. A neighbor adjacency cannot be formed over a passive interface.
Verify OSPF Interface Settings
The quickest way to verify OSPFv2 interface settings is to use the show ip ospf interface command. To get a summary of OSPFv2-enabled interfaces, use the show ip ospf interface brief command.
OSPF Characteristics Open Shortest Path First
Version 2 (OSPFv2) is available for IPv4 while OSPF version 3 (OSPFv3) is available for IPv6. 3 Main Components Data Structures, Routing Protocol Messages, and Algorithm Achieving Convergence: Establish Neighbor Adjacencies Exchange Link-State Advertisements Build the Topology Table Execute the SPF Algorithm OSPF can be implemented in one of two ways: Single-Area OSPF Multi-area OSPF