Configuring OSPF

OSPF Configuration Examples

In the following example, a 30-bit subnet mask is used, leaving two bits of address space reserved for serial line host addresses. There is sufficient host address space for two host endpoints on a point-to-point serial link.

interface ethernet 0

ip address 131.107.1.1 255.255.255.0

! 8 bits of host address space reserved for ethernets

interface serial 0

ip address 131.107.254.1 255.255.255.252

!2 bits of address space reserved for serial lines

!Router is configured for OSPF and assigned AS 107 router ospf 107

!Specifies network directly connected to the router network 131.107.0.0 0.0.255.255 area 0.0.0.0

OSPF Routing and Route Redistribution Examples

OSPF typically requires coordination among many internal routers, ABRs, and ASBRs. At a minimum, OSPF-based routers can be configured with all default parameter values, with no authentication, and with interfaces assigned to areas.

Three types of examples follow:

The first is a simple configuration illustrating basic OSPF commands.

The second example illustrates a configuration for an internal router, ABR, and ASBRs within a single, arbitrarily assigned, OSPF autonomous system.

The third example illustrates a more complex configuration and the application of various tools available for controlling OSPF-based routing environments.

Basic OSPF Configuration Examples

The following example illustrates a simple OSPF configuration that enables OSPF routing process 9000, attaches Ethernet interface 0 to area 0.0.0.0, and redistributes RIP into OSPF, and OSPF into RIP:

interface ethernet 0

ip address 10.93.1.1 255.255.255.0 ip ospf cost 1

!

interface ethernet 1

ip address 10.94.1.1 255.255.255.0

!

router ospf 9000

network 10.93.0.0 0.0.255.255 area 0.0.0.0 redistribute rip metric 1 subnets

!

router rip network 10.94.0.0 redistribute ospf 9000 default-metric 1

Cisco IOS IP Configuration Guide

IPC-245

Page 291
Image 291
Cisco Systems 78-11741-02 manual Ospf Routing and Route Redistribution Examples, Basic Ospf Configuration Examples, IPC-245