[Contents] [Prev] [Next] [Index] [Report an Error]


Enabling OSPF

When you enable OSPF on your system, you can create either a range of OSPF interfaces or a single OSPF interface.

Creating a Range of OSPF Interfaces

To create a range of OSPF interfaces:

  1. Create an OSPF routing process.
  2. Create the range of IP addresses associated with the routing process and the corresponding OSPF interfaces.
  3. Assign an area ID associated with each range of IP addresses.

Each router running OSPF has a database describing a map of the routing domain. This map needs to be identical in all participating routers.

    network area

host1(config-if)#ip address 2.2.2.1 255.255.0.0
host1(config-if)#ip address 2.2.1.1 255.255.0.0 secondary
host1(config)#router ospf 2
host1(config-router)#network 2.2.2.0 0.0.0.255 area 0
host1(config-if)#ip address 2.2.2.1 255.255.255.0
host1(config-if)#ip address 2.2.1.1 255.255.255.0 secondary
host1(config)#router ospf 2
host1(config-router)#network 2.2.2.0 0.0.0.255 area 0
host1(config-router)#network 2.2.1.0 0.0.0.255 area 1

This sequence of commands creates two OSPF ranges (2.2.2.0/24 and 2.2.1.0/24), with each range belonging to a different area. Area 0 is configured for 2.2.2.0/24, and area 1 is configured for 2.2.1.0/24. This sequence also creates two OSPF interfaces: one in the backbone area (area 0) using IP address 2.2.2.1, the second in a nonbackbone area (area 1) using IP address 2.2.1.1. This command also creates the two areas if they do not already exist.



Note: The configured network range is not active for summarization until you activate this range for summaries by issuing the area range command. The only range that is active by default if you do not issue the area range command is the network that matches the IP interface's network exactly. (In other words, by default the exact network of the IP interface is going to be summarized into other areas.)



Note: Active for summarization means that the network range is summarized through area summaries—for ABRs only. See the Aggregating OSPF Networks section in this chapter.

    ospf enable

host1(config-router)#ospf enable

    router ospf

host1(config)#router ospf 5

Creating a Single OSPF Interface

To create a single OSPF interface:

  1. Create an OSPF routing process.
  2. Create the OSPF interface associated with the IP interface at the specified address.

Each router running OSPF has a database describing a map of the routing domain. This map needs to be identical in all participating routers.

    address area

host1(config-router)#address 10.10.32.100 area 0.0.0.0

    ospf enable

host1(config-router)#ospf enable

    router ospf

host1(config)#router ospf 5

[Contents] [Prev] [Next] [Index] [Report an Error]