First lab dedicated to Configuring OSPF in a Single Area. It is the beginning of a series which will aim to establish a relatively advanced OSPF configuration. Each item will add a series of configurations to the previous.

  1. Amongst the items, you will find: Basic Configuration of OSPF in multi-area.  
  2. OSPF point-to-point links, Ethernet and NBMA (frame-relay).       
  3.  Configuration of priorities to influence the election of the DR and BDR.
  4.   Redistribution of base of another protocol.
  5.  Configuring a virtual link.
  6. Type of area (stub, stub and nssa totally) every day.
  7.  "Summarization.
The Topology:

GNS3 Network Simulator  is used for this topology.
The routers used in this topology are all models 2691 (256 MB RAM).

The IOS used is: c2691-advipservicesk9 - mz.124 - 15.T12.bin.unpacked (uncompressed version).

First step

First we set up the area 0. The first thing to do is set the bandwidth on the interfaces so that subsequently OSPF can correctly calculate its metric (often referred to as the 'cost').

Here is the formula to calculate the OSPF metric:
COST = 100 / (bandwidth in Mbps)

To configure the bandwidth on an interface, just go in the interface configuration and enter the following command:

Router(config-if)# bandwidth 128

The bandwidth value is here in Kbps. We will here defined 128kbits/s bandwidth. So just configure the serial interfaces of BBR1, ABR1, ABR2 and ABR4 in this way.

A little quick checking of the bandwidth. For example the interface Serial 0/0 on BBR1:

BBR1#show interface s0/0 | inc BW
MTU 1500 bytes, BW 128 Kbit/sec, DLY 20000 usec,

The command used here allows, a bit like in linux, to filter the display. Here I asked that IOS not ' that displays the line containing the word "BW" in the normal view of the 'show interface '.
Second step

Now let's configure OSPF for Area 0. Remember in the world of OSPF area 0 is the backbone of the network. All the other area must be attached, as well as an arm or a leg is attached to the trunk.

All router must have a router-id which is expressed in the form a.b.c.d (4 x 8) as an IP address. Default OSPF uses the largest address configured on a loopback interface. If there is not, it will be the largest address configured on a physical interface. It is also possible and advisable to configure the router id of statically via the following command (in the configuration router ospf):
Router(config-router)# router-id a.b.c.d

This is the router-id we set up:


Once the router-id defined, one can then define which interfaces will be part of the area 0 via the following command:
Router(config-router)# network <subnet> <wildcard mask> area <area nr>
Where is the address the concerned interface network, is < wildcard mask > mask 'reversed' network and < area nr > number of the area desired.


BBR1(config)#router ospf 1
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0

Interfaces FastEthernet 0/0, Serial 0/0 et Serial 0/1

ABR1(config)#router ospf 1
ABR1(config-router)#network area 0
ABR1(config-router)#network area 0
ABR1(config-router)#network area 0


BBR1(config)#router ospf 1
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0
BBR1(config)#router ospf 1
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0
BBR1(config-router)#network area 0
Third step
check now the effective functioning of OSPF in area 0, for example on BBR1.

show ip protocols
BBR1#sh ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks: area 0 area 0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway         Distance      Last Update              110      00:08:40              110      00:09:37              110      00:11:52
Distance: (default is 110)
Here, we see the router-id is well, OSPF is enabled for 3 networks connected to BBR1 and that BBR1 receives information of three neighbors.
show ip ospf neighbors
BBR1#sh ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface           0   FULL/  -        00:00:36        Serial0/1           0   FULL/  -        00:00:37        Serial0/0           1   FULL/BDR        00:00:36        FastEthernet0/0           1   FULL/DROTHER    00:00:35        FastEthernet0/0           1   FULL/DROTHER    00:00:37        FastEthernet0/0
It can be seen that BBR1 has established 5 adjacency relationships. A point-to-point link hand and three on the Ethernet network. Everything seems in order from this point of view. I will say more in detail on the "State" column in a future article when we influencers the election of DR and the BDR on a network shared.

show ip route
BBR1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
O [110/782] via, 00:20:23, FastEthernet0/0
                    [110/782] via, 00:17:10, FastEthernet0/0
O [110/782] via, 00:18:07, FastEthernet0/0
                     [110/782] via, 00:17:10, FastEthernet0/0
C is directly connected, FastEthernet0/0
C is directly connected, Serial0/0
C is directly connected, Serial0/1

BBR1 so well taught new routes to networks and with a cost of 782. Note that the administrative distance default OSPF is 110.

Whence the 782? … Referring to the topology, BBR1 can access via ABR1 either via ABR4. Dan sles both the metric is the same: of BBR1 to ABR1, the best road passes by the Fa0/0 interface, which has a bandwidth of 100 Mbps.

Attention... GNS3 sometimes seems bad player the game from the point of view of the negotiation of the Ethernet interface, perhaps the fa0/0 is 10Mbit/s... Check in case of inconsistency. If this is the case, force the bandwidth via the command "bandwidth 100000.

Then ABR1 has an affair in 128kbits/s to the network. This allows to calculate the overall metric of this network for BBR1:

( 100 / 100 ) + ( 100 / 0,128 ) = 1 + 781 = 782

show ip ospf interface fa0/0
BBR1#sh ip ospf interface fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address, Area 0
  Process ID 1, Router ID, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID), Interface address
  Backup Designated router (ID), Interface address
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor  (Backup Designated Router)
    Adjacent with neighbor
    Adjacent with neighbor
  Suppress hello for 0 neighbor(s)
We found here, set colors, from top to bottom, the area configured for the interface (via the network command), the type of network (broadcast, non-broadcast, point-to-point), the cost (metric) of the interface to access the connected network, the values of the different timers (note that the Hello and Dead timer are part of the critical for establishing an adjacency, the routers have the same values) , and finally, the list of adjacent routers on the network connected to this interface.

That is a first step in the configuration of the topology. At this point we have a functional single-area configuration. The next step will be to configure the other area directly (physically) connected.