Contents

Introduction

Prerequisites

Requirements

Components Used

Related Products

Conventions

Configure

Network Diagram

Configurations

Verify

Troubleshoot

Troubleshooting Commands

Related Information

Introduction

This document explains a sample configuration for Open Shortest Path First (OSPF) over the broadcast medium, such as Ethernet and Token Ring. The command show ip ospf interface verifies that OSPF runs over all the broadcast media as broadcast network type by default.

Prerequisites

Requirements

Readers of this document must have knowledge of these topics:

- Ethernet Technologies

- Configuring OSPF

- OSPF Neighbor States

Components Used

The information in this document applies to these software and hardware versions.

- Two Cisco 2501 routers

- Cisco IOS® Software Release 12.2(27)

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Related Products

You can also use this configuration with any two routers with at least one Ethernet, Token Ring, or FDDI interface.

Conventions

For more information on document conventions, refer to the Cisco Technical Tips Conventions.

Configure

This section presents you with information you can use in order to configure the features this document describes.

Note: In order to find additional information on the commands this document uses, refer to OSPF Commands or use the Command Lookup Tool (registered customers only) .

Network Diagram

This document uses this network setup.

Configurations

This document uses these configurations.

- Router1

- Router2

Router1

interface Loopback0

ip address 192.168.45.1 255.255.255.0

!

interface Ethernet0

ip address 10.10.10.1 255.255.255.0

!

router ospf 1

network 10.10.10.0 0.0.0.255 area 0

!--- OSPF is configured to run on the !--- Ethernet interface with an Area ID of 1.

!

Router2

interface Loopback0

ip address 172.16.10.1 255.255.255.0

!

interface Ethernet0

ip address 10.10.10.2 255.255.255.0

!

router ospf 1

network 10.10.10.0 0.0.0.255 area 0

!--- OSPF is configured to run on the !--- Ethernet interface with an Area ID of 1.

!

Verify

This section provides information you can use to confirm your configuration works properly.

Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.

- show ip ospf neighbor —Displays OSPF-neighbor information on a per-interface basis. The output from Router1 is shown here:

Router1#show ip ospf neighbor

Neighbor ID   Pri    State          Dead Time      Address       Interface

172.16.10.1    1     FULL/BDR       00:00:38     10.10.10.2      Ethernet0

From this output, the neighbor state is 'Full' in Router1 with respect to Router2 which has a Neighbor ID of 172.16.10.1. Router2 is a Backup Designated Router (BDR) in this broadcast network. In order to learn more about what the show ip ospf neighbor command displays, refer to What Does the show ip ospf neighbor Command Reveal?

- show ip ospf interface —Displays OSPF-related interface information. The output from Router1 issued on the Ethernet interface is shown here:

Router1#show ip ospf interface ethernet 0

Ethernet0 is up, line protocol is up

Internet Address 10.10.10.1/24, Area 0

Process ID 1, Router ID 192.168.45.1, Network Type BROADCAST, Cost: 10

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 192.168.45.1, Interface address 10.10.10.1

Backup Designated router (ID) 172.16.10.1, Interface address 10.10.10.2

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:00

Index 2/2, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 2, maximum is 2

Last flood scan time is 0 msec, maximum is 0 msec

Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 172.16.10.1 (Backup Designated Router)

Suppress hello for 0 neighbor(s)

From this output, you know that the network type for the Ethernet 0 interface is broadcast. In order to learn more about what the show ip ospf interface command displays, refer to What Does the show ip ospf interface Command Reveal?

Similarly, the outputs for the show commands on Router2 are shown here.

Router2#show ip ospf neighbor

Neighbor ID    Pri    State       Dead Time       Address        Interface

192.168.45.1    1     FULL/DR       00:00:31      10.10.10.1       Ethernet0

From the show ip ospf neighbor command output, you know that Router1 is the Designated Router (DR) in this broadcast network.

Router2#show ip ospf interface ethernet 0

Ethernet0 is up, line protocol is up

Internet Address 10.10.10.2/24, Area 0

Process ID 1, Router ID 172.16.10.1, Network Type BROADCAST, Cost: 10

Transmit Delay is 1 sec, State BDR, Priority 1

Designated Router (ID) 192.168.45.1, Interface address 10.10.10.1

Backup Designated router (ID) 172.16.10.1, Interface address 10.10.10.2

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:00

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 0 msec

Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 192.168.45.1 (Designated Router)

Suppress hello for 0 neighbor(s)

The show ip ospf interface ethernet 0 command output from Router2 also shows that the network type for the Ethernet 0 interface is broadcast.

Troubleshoot

This section provides information you can use to troubleshoot your configuration.

Troubleshooting Commands

Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.

Note: Before you issue debug commands, refer to Important Information on Debug Commands.

There are various states when adjacencies are formed between two routers. You can use the debug ip ospf adj command in order to see the various states and also the DR and BDR election that takes place in a broadcast OSPF network. In earlier Cisco IOS Software releases, you can use the command debug ip ospf adjacency. You need to issue this debug command before the neighbor relationship is established.

This output is from the perspective of Router1. The portions of the output that are in bold font are the various states the adjacency process goes through.

Router1#debug ip ospf adj

OSPF adjacency events debugging is on

*Mar  1 01:41:23.319: OSPF: Rcv DBD from 172.16.10.1 on Ethernet0 seq 0x1F6C opt

0x42 flag 0x7 len 32  mtu 1500 state INIT

*Mar  1 01:41:23.323: OSPF: 2 Way Communication to 172.16.10.1

on Ethernet0, state 2WAY

*Mar  1 01:41:23.327: OSPF: Neighbor change Event on interface Ethernet0

*Mar  1 01:41:23.327: OSPF: DR/BDR election on Ethernet0

*Mar  1 01:41:23.331: OSPF: Elect BDR 172.16.10.1

*Mar  1 01:41:23.331: OSPF: Elect DR 192.168.45.1

*Mar  1 01:41:23.335:        DR: 192.168.45.1 (Id)   BDR: 172.16.10.1 (Id)

*Mar  1 01:41:23.339: OSPF: Send DBD to 172.16.10.1 on Ethernet0 seq 0x2552 opt

0x42 flag 0x7 len 32

*Mar  1 01:41:23.343: OSPF: First DBD and we are not SLAVE

*Mar  1 01:41:23.359: OSPF: Rcv DBD from 172.16.10.1 on Ethernet0 seq 0x2552 opt

0x42 flag 0x2 len 52  mtu 1500 state EXSTART

*Mar  1 01:41:23.363: OSPF: NBR Negotiation Done. We are the MASTER

*Mar  1 01:41:23.367: OSPF: Send DBD to 172.16.10.1 on Ethernet0 seq 0x2553 opt

0x42 flag 0x3 len 72

*Mar  1 01:41:23.387: OSPF: Rcv DBD from 172.16.10.1 on Ethernet0 seq 0x2553 opt

0x42 flag 0x0 len 32  mtu 1500 state EXCHANGE

*Mar  1 01:41:23.391: OSPF: Send DBD to 172.16.10.1 on Ethernet0 seq 0x2554 opt

0x42 flag 0x1 len 32

*Mar  1 01:41:23.411: OSPF: Rcv DBD from 172.16.10.1 on Ethernet0 seq 0x2554 opt

0x42 flag 0x0 len 32  mtu 1500 state EXCHANGE

*Mar  1 01:41:23.415: OSPF: Exchange Done with 172.16.10.1 on Ethernet0

*Mar  1 01:41:23.419: OSPF: Synchronized with 172.16.10.1 on Ethernet0, state FULL

01:41:23: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.10.1 on Ethernet0

from LOADING to FULL, Loading Done

*Mar  1 01:41:23.879: OSPF: Build router LSA for area 0, router ID 192.168.45.1,

seq 0x80000004

*Mar  1 01:41:23.923: OSPF: Build network LSA for Ethernet0, router ID 192.168.45.1

*Mar  1 01:41:25.503: OSPF: Neighbor change Event on interface Ethernet0

*Mar  1 01:41:25.507: OSPF: DR/BDR election on Ethernet0

*Mar  1 01:41:25.507: OSPF: Elect BDR 172.16.10.1

*Mar  1 01:41:25.511: OSPF: Elect DR 192.168.45.1

*Mar  1 01:41:25.511:        DR: 192.168.45.1 (Id)   BDR: 172.16.10.1 (Id)

Issue the debug ip ospf events command in order to verify the hello timer value, as this example output shows.

Router1#debug ip ospf events

OSPF events debugging is on

Router1#

*Mar  1 04:04:11.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:04:11.930: OSPF: End of hello processing

*Mar  1 04:04:21.926: OSPF: Rcv hello from 172.16.10.1

area 0 from Ethernet0 10.10.10.2

*Mar  1 04:04:21.930: OSPF: End of hello processing

*Mar  1 04:04:31.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:04:31.930: OSPF: End of hello processing

*Mar  1 04:04:41.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:04:41.930: OSPF: End of hello processing

*Mar  1 04:04:51.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:04:51.930: OSPF: End of hello processing

*Mar  1 04:05:01.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:05:01.930: OSPF: End of hello processing

*Mar  1 04:05:11.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:05:11.930: OSPF: End of hello processing

*Mar  1 04:05:21.926: OSPF: Rcv hello from 172.16.10.1 area 0 from

Ethernet0 10.10.10.2

*Mar  1 04:05:21.930: OSPF: End of hello processing

This output shows that the hello packet is exchanged every 10 seconds.

Related Information

- OSPF Routers Connected by a Multi-Access Network

- Initial Configurations for OSPF over Non-Broadcast Links

- Troubleshooting OSPF

- OSPF Support Page

- IP Routing Technology Support Page

- Technical Support & Documentation - Cisco Systems