OSPF Configuration and Verification for Operation in a Single Area


To enable the OSPF process on a Cisco router, type the following command while in global configuration mode:

 RouterA(config)#  router ospf   process-id  

The OSPF process ID is an integer value between 1 and 65,535 that is used to assign an identifier to the OSFP process operating on the router. A router uses the OSPF router ID number for internal purposes only and may run more than one OSPF process at a time. You must use the router ospf process-id command to get to the OSPF process in which you want the interfaces to be configured. If you have existing processes running, simply type this command first to take you to that process. This is comparable to entering interface configuration mode. The prompt reflects this change (config-router) to indicate that you are in a router configuration mode.

Next, you should designate the IP networks on the router that are part of the OSPF network with this command in router configuration mode:

 RouterA(config-router)#  network   address wildcard-mask   area   area-id  

The address keyword represents the network address, subnet, or interface address of the link. The wildcard-mask keyword is an inverse mask where the bit value is a match and a 1 bit value represents a wildcard. Finally, the area area-id portion of the command designates the OSPF area associated with the IP address expressed as a decimal or A.B.C.D format. This value is mandatory because every OSPF interface must be assigned to an area. The following is a sample OSPF configuration snippet:

 RouterA(config)# router ospf 100 RouterA(config-router)# network 172.16.0.0 0.0.255.255 area 0 

If you want to run OSPF on every interface on your Cisco router, use the following command:

  RouterA(config-router)# network 0.0.0.0 255.255.255.255 area 0  

You can also use some optional commands to change an OSPF router's default behavior. For example, you may want to assign a loopback address to important routers and configure the IP address to the highest number so that it becomes the router ID value. You can "publish" a loopback address as you would advertise any network with the network area command. Remember that an unpublished loopback address cannot be pinged, so there is a caveat. Here is the syntax to configure a loopback interface:

 RouterA(config)#  interface loopback   number  RouterA(config-if)#  ip address   address mask  

To rig the DR and BDR election process, you can use the interface configuration command show ip ospf priority number command to manually configure interface priority value. Here is a sample of the command:

 RouterA(config-if)#  ip ospf priority   number  

The number keyword is an integer between 1 and 255 used to manually configure priority. The higher the number, the higher the router's priority. Again, configuring the priority to 0 removes the selected interface from all future DR and BDR elections .

You can override a connection's default link cost value if necessary. The Cisco OSPF link cost is based on the link's bandwidth. You may have to modify the value for interoperability with other vendors or for better control. Cisco routers use the formula of 10 8 divided by bandwidth (bps) to generate the cost. The greater the bandwidth, the lower the cost. For example, a 56Kbps serial link has a default cost of 1785, whereas Ethernet has a default cost of 10. The syntax to change the cost in interface configuration mode is

  RouterA(config-if)# ip ospf cost   cost  

As previously mentioned, you configure OSPF over NBMA by using the RFC-defined NBMA and point-to-multipoint modes or the Cisco-defined point-to-multipoint non-broadcast mode, broadcast mode, or point-to-point mode. The interface command ip ospf network is used to configure the network type when OSPF is configured over NBMA networks such as frame relay. The command syntax to configure the interface is as follows :

[View full width]
 
[View full width]
RouterA(config-if)# ip ospf network {broadcast non-broadcast point-to-point point-to-multipoint point-to-multipoint non-broadcast}

OSPF in NBMA-Mode Configuration

Because NBMA mode is the default in Cisco, you do not need to use the ip ospf network non-broadcast command. Because the non-broadcast environment precludes IP multicasting, which OSPF requires for DR/BDR election and adjacency formation, an administrator must use the neighbor command to manually identify all OSPF neighbors in the cloud.

Although the neighbor command is a little dated because of newer Cisco-compliant modes, it is still applicable for some situations and may be mentioned on the exam.


Here is the syntax of the neighbor command:

[View full width]
 
[View full width]
RouterA(config-router)# neighbor ip-address [ priority number ] [ poll-interval sec ] [ cost number ]

The ip-address keyword is the IP address of the neighbor and the rest of the keywords are optional. Refer to RFC 2328 for explicit details. Here is a sample configuration:

 RouterA(config)# router ospf 100 RouterA(config-router)# network 172.16.1.0 0.0.0.255 area 0 RouterA(config-router)# neighbor 172.16.1.1 RouterA(config-router)# neighbor 172.16.1.2 RouterA(config-router)# neighbor 172.16.1.3 

OSPF in Point-to-Multipoint “Mode Configuration

OSPF point-to-multipoint interfaces are actually one or more point-to-point interfaces in a single subnet as far as the Cisco router is concerned . Here is a sample configuration:

 RouterA(config)# int S1 RouterA(config-if)# ip address 172.16.1.1 255.255.255.0 RouterA(config-if)# encap frame-relay RouterA(config-if)# ip ospf network point-to-multipoint RouterA(config-router)# neighbor 172.16.1.1 RouterA(config)# router ospf 100 RouterA(config-router)# network 172.16.1.0 0.0.0.255 area 0 

OSPF in Point-to-Multipoint Non-broadcast “Mode Configuration

When you use the non-broadcast parameter, the point-to-multipoint network is considered a nonbroadcast Cisco network. You need to use the neighbor command with this mode. Because this is a relatively new feature, you may need to do some further investigation at www.cisco.com.

OSPF in Broadcast-Mode Configuration

As mentioned, OSPF in broadcast-mode configuration is a way to circumvent the neighbor keyword in a fully meshed network (preferably). Here is a sample configuration of OSPF in broadcast mode:

 RouterB(config)# int S1 RouterB(config-if)# ip address 172.16.1.1 255.255.255.0 RouterB(config-if)# encap frame-relay RouterB(config-if)# ip ospf network broadcast RouterB(config)# router ospf 100 RouterB(config-router)# network 172.16.1.0 0.0.0.255 area 0 

OSPF in Point-to-Point “Mode Configuration

Because each subinterface in point-to-point mode is regarded as a physical point-to-point network, the adjacencies are automatically formed . You need to go into the interface configuration and strip away any IP addressing assigned to the physical interface. Next, assign the IP address to the subinterface and encapsulate the subinterface as Frame Relay. Configure the subinterfaces, IP addresses, and data-link connection identifier (DLCI) numbers . Because point-to-point mode is the default, your job is done. Here is a sample configuration of OSPF in point-to-point mode:

 RouterA(config)# int S0 RouterA(config-if)# no ip address RouterA(config-if)# encap frame-relay RouterA(config)# interface S0.1 point-to-point RouterA(config-subif)# ip address 172.16.1.1 255.255.255.0 RouterA(config-subif)# frame-relay interface-dlci 61 RouterA(config)# interface S0.2 point-to-point RouterA(config-subif)# ip address 172.16.2.1 255.255.255.0 RouterA(config-subif)# frame-relay interface-dlci 62 RouterA(config)# router ospf 100 RouterA(config-router)# network 172.16.0.0 0.0.255.255 area 0 

OSPF Verification

The primary command used to see information about router statistics such as timers and filters is show ip protocols . This command outputs data such as the running IP routing processes, update, invalid, holddown and flush timers, and outgoing and incoming update filters. Here is sample syntax:

 RouterA# show ip protocols 

If you want to show all the routes that the router is aware of and how it learned them, use the show ip route command. If you only want to see the OSFP routes, use the show ip route ospf command. You will be looking at the contents of your router's routing table with this popular command. This is one of the primary methods for verifying connectivity between your router and the entire network, as shown in the following snippet:

 RouterA# show ip route ___________172.16.0.0/16  is  variably  subnetted,  7 subnets,  4 masks C             172.16.4.128/25 is directly connected, Loopback1 O             172.16.5.32/27 [110/1010] via 172.16.1.2, 00:01:27, Ethernet0/0 O             172.16.6.1/32 [110/11] via 172.16.1.2, 00:01:27, Ethernet0/0 C             172.16.5.0/27 is directly connected, Loopback2 O             172.16.6.2/32 [110/11] via 172.16.1.2, 00:01:27, Ethernet0/0 C             172.16.4.0/25 is directly connected, Loopback0 C             172.16.1.2/24 is directly connected, Ethernet0/0 

The OSPF- related EXEC -MODE command show ip ospf interface [ type number ] shows the priority of the local OSPF router as well as confirms that interfaces are in the proper OSPF areas. Other information provided by this command includes OSPF timers and neighbor details. The type-number parameter is used to designate a particular interface for verification.

To find out how many times the shortest path first algorithm has been run on your router, use the show ip ospf command as shown in the following truncated output:

 RouterB# show ip ospf    Routing Process "ospf 100" with ID 172.16.1.129 <output omitted>    Number of areas in this router is 1. 0 normal 1 stub 0 nssa       Area 1           Number of interfaces in this area is 2           It is a stub area           Area has no authentication           SPF algorithm executed 4 times <output omitted> 

The show ip ospf neighbor syntax conveys OSPF neighbor information on an interface-by-interface basis. There are several optional keywords to use for additional functionality and data gathering. The command is as follows:

 RouterA#  show ip ospf neighbor  [  type number  ] [  neighbor-id  ] [  detail  ] 

The optional type keyword is used to designate the interface type that you want to output, and the number keyword is for the interface number. The neighbor-id keyword is another optional parameter to extract a particular neighbor. If you want to see all the neighbors in detail, you can list all the neighbors with the details keyword. Here is an example of using the detail parameter:

 RouterB# show ip ospf neighbor detail Neighbor  172.16.96.54,  interface address 172.16.96.54     In the area 0.0.0.1 via interface Ethernet0     Neighbor priority is 1, State is FULL     Options 2     Dead timer due in 0:00:17 

The EXEC-MODE command show ip ospf database is used to show the contents of the OSPF topological database (topology table). You can also use this to view the router ID and OSPF process ID numbers. Use this command to ensure that your router sees all network segments.

The primary troubleshooting and monitoring command for OSPF is the debug ip ospf syntax. You can use this to monitor a wide range of OSPF events. If you issue the debug ip ospf ? command, you will see several options. The most common option to run is debug ip ospf adj to monitor the DR and BDR election process.



Cisco BSCI Exam Cram 2 (Exam Cram 642-801)
CCNP BSCI Exam Cram 2 (Exam Cram 642-801)
ISBN: 0789730170
EAN: 2147483647
Year: 2003
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net