Saturday, April 20, 2013

Configuring OSPF loopback address and router priority


Configuring OSPF loopback address and router priority
2.3.2


This page will explain the purpose of an OSPF loopback interface. Students will also learn how to assign an IP address to a loopback interface.
When the OSPF process starts, the Cisco IOS uses the highest local active IP address as its OSPF router ID. If there is no active interface, the OSPF process will not start. If the active interface goes down, the OSPF process has no router ID and therefore ceases to function until the interface comes up again.
To ensure OSPF stability there should be an active interface for the OSPF process at all times. A loopback interface, which is a logical interface, can be configured for this purpose. When a loopback interface is configured, OSPF uses this address as the router ID, regardless of the value. On a router that has more than one loopback interface, OSPF takes the highest loopback IP address as its router ID.
To create and assign an IP address to a loopback interface use the following commands:
Router(config)#interface loopback number
Router(config-if)#ip address ip-address subnet-mask
It is considered good practice to use loopback interfaces for all routers running OSPF. This loopback interface should be configured with an address using a 32-bit subnet mask of 255.255.255.255. A 32-bit subnet mask is called a host mask because the subnet mask specifies a network of one host. When OSPF is requested to advertise a loopback network, OSPF always advertises the loopback as a host route with a 32-bit mask.
In broadcast multi-access networks there may be more than two routers. OSPF elects a designated router (DR) to be the focal point of all link-state updates and link-state advertisements. Because the DR role is critical, a backup designated router (BDR) is elected to take over if the DR fails.
If the network type of an interface is broadcast, the default OSPF priority is 1. When OSPF priorities are the same, the OSPF election for DR is decided on the router ID. The highest router ID is selected.
The election result can be determined by ensuring that the ballots, the hello packets, contain a priority for that router interface. The interface reporting the highest priority for a router will ensure that it becomes the DR.
The priorities can be set to any value from 0 to 255. A value of 0 prevents that router from being elected. A router with the highest OSPF priority will be selected as the DR. A router with the second highest priority will be the BDR. After the election process, the DR and BDR retain their roles even if routers are added to the network with higher OSPF priority values.
Modify the OSPF priority by entering global interface configuration ip ospf priority command on an interface that is participating in OSPF. The command show ip ospf interface will display the interface priority value as well as other key information.
Router(config-if)#ip ospf prioritynumber
Router#show ip ospf interfacetype number
The Lab Activity will teach students to configure loopback interfaces for OSPF as well as observe the election process for DR and BDR.
The next page will discuss the OSPF cost metric.

Steps in the operation of OSPF / Configuring OSPF routing process


Steps in the operation of OSPF
2.3.1








This page will explain how routers communicate in an OSPF network.
When a router starts an OSPF routing process on an interface, it sends a Hello packet and continues to send Hellos at regular intervals. The set of rules that govern the exchange of OSPF Hello packets is called the Hello protocol. On multi-access networks, the Hello protocol elects a designated router (DR) and a backup designated router (BDR). The Hello carries information about which all neighbors must agree to form an adjacency and exchange link-state information. On multi-access networks the DR and BDR maintain adjacencies with all other OSPF routers on the network. 
Adjacent routers go through a sequence of states. Adjacent routers must be in the full state before routing tables are created and traffic routed. Each router sends link-state advertisements (LSA) in link-state update (LSU) packets. These LSAs describe all of the routers links. Each router that receives an LSA from its neighbor records the LSA in the link-state database. This process is repeated for all routers in the OSPF network.
When the databases are complete, each router uses the SPF algorithm to calculate a loop free logical topology to every known network. The shortest path with the lowest cost is used in building this topology, therefore the best route is selected.
Routing information is now maintained. When there is a change in a link-state, routers use a flooding process to notify other routers on the network about the change. The Hello protocol dead interval provides a simple mechanism for determining that an adjacent neighbor is down. -
This page concludes this lesson. The next lesson will explain more about OSPF. The first page will discuss the configuration of OSPF.

Configuring OSPF routing process
2.2.8
This page will teach students how to configure OSPF.
OSPF routing uses the concept of areas. Each router contains a complete database of link-states in a specific area. An area in the OSPF network may be assigned any number from 0 to 65,535. However a single area is assigned the number 0 and is known as area 0. In multi-area OSPF networks, all areas are required to connect to area 0. Area 0 is also called the backbone area.
OSPF configuration requires that the OSPF routing process be enabled on the router with network addresses and area information specified. Network addresses are configured with a wildcard mask and not a subnet mask. The wildcard mask represents the links or host addresses that can be present in this segment. Area IDs can be written as a whole number or dotted decimal notation.
To enable OSPF routing, use the global configuration command syntax:
Router(config)#router ospfprocess-id
The process ID is a number that is used to identify an OSPF routing process on the router. Multiple OSPF processes can be started on the same router. The number can be any value between 1 and 65,535. Most network administrators keep the same process ID throughout an autonomous system, but this is not a requirement. It is rarely necessary to run more than one OSPF process on a router. IP networks are advertised as follows in OSPF:
Router(config-router)#network address wildcard-mask area area-id
Each network must be identified with the area to which it belongs. The network address can be a whole network, a subnet, or the address of the interface. The wildcard mask represents the set of host addresses that the segment supports. This is different than a subnet mask, which is used when configuring IP addresses on interfaces.
The Lab Activity will help students configure and verify OSPF routing.
This next page will teach students how to configure an OSPF loopback interface.