Guest

IP Routing

Initial Configurations for OSPF over a Point-to-Point Link

Document ID: 13687

Updated: Jul 06, 2007

   Print

Introduction

On point-to-point links such as High-Level Data Link Control (HDLC) and Point-to-Point Protocol (PPP), Open Shortest Path First (OSPF) runs as a point-to-point network type. This network type is enabled by default. This document shows sample configurations for OSPF over a point-to-point link. The other network types that OSPF supports are Point to Multipoint, Broadcast, and Non-Broadcast. In order to check the network type of an interface that runs OSPF, issue the show ip ospf interface command.

The examples explained in this document work with both HDLC and PPP encapsulations.

Prerequisites

Requirements

Readers of this document should have some basic knowledge of OSPF routing protocol. For more information on OSPF routing protocol, refer to the Open Shortest Path First documentation.

Components Used

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

  • Cisco 2500 routers

  • Cisco IOS® Software Release 12.2(27) that runs on routers

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, make sure that you understand the potential impact of any command.

Conventions

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

OSPF over a Point-to-Point Link with IP Addresses on Serial Interfaces

This section presents you with the information you can use to configure routers that run OSPF and are connected through a point-to-point serial link with the use of HDLC encapsulation with IP addresses configured on serial interfaces.

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

Network Diagram

15a.gif

Configurations

This section uses these configurations.

Router1
Router1
!
interface Loopback0
� ip address 3.3.3.3 255.255.255.255
!
interface Serial0
�ip address 1.1.1.2 255.255.255.0
!
router ospf 1
network 1.1.1.0 0.0.0.255 area 0

!--- Configures the Serial Interface S0 under OSPF area 0.

!

Router2
Router2
!
interface Loopback0
�ip address 2.2.2.2 255.255.255.255
!
interface Serial0
�ip address 1.1.1.1 255.255.255.0
�clockrate 2000000
!
router ospf 1
network 1.1.1.0 0.0.0.255 area 0

!--- Configures the Serial Interface S0 under OSPF area 0..

OSPF over a Point-to-Point Link with Unnumbered Interfaces

This section presents you with the information you can use to configure routers that run OSPF as the routing protocol and are connected through a point-to-point serial link with PPP encapsulation and with Unnumbered serial interfaces. Unnumbered serial interfaces are interfaces which do not have their own IP address. These interfaces borrow the IP address from another interface on the router which has an IP address configured. For more information on the Unnumbered serial interfaces, refer to Understanding and Configuring the ip unnumbered Command.

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

Network Diagram

15b.gif

Configurations

This section uses these configurations.

Router1
!

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial0
 ip unnumbered loopback 0

!--- Configures Serial 0 as an unnumbered interface.

 encapsulation ppp

!--- Configures the Encapsulation on the interface as PPP.

!
router ospf 1
  network 3.3.3.0 0.0.0.255 area 0

!--- Configures the Loopback Interface L0 under OSPF area 0.

!

Router2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Serial0
 ip unnumbered loopback 0

!--- Configures Serial 0 as an unnumbered interface.

 encapsulation ppp

!--- Configures the Encapsulation on the interface as PPP.

!
router ospf 1
  network 2.2.2.0 0.0.0.255 area 0

!--- Configures the Loopback Interface L0 under OSPF area 0..

!

Verify

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

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

Verify the Configuration of OSPF with IP Addresses on Serial Interfaces

This is the show ip ospf neighbor command output issued on Router1.

Router1#show ip ospf neighbor
   Neighbor ID   Pri   State       Dead Time       Address        Interface
     2.2.2.2      1   FULL/ -       00:00:32       1.1.1.1         Serial 0

This output shows that Router1 has one neighbor with a Router ID of 2.2.2.2, and has formed full adjacency with this neighbor. The address 1.1.1.1 is the IP address of the Serial0 interface on Router2.

For additional information about the show ip ospf neighbor command, refer to What Does the show ip ospf neighbor Command Reveal?

This is the output of the show ip ospf interface serial 0 command on Router1. This output shows the OSPF network type for interface Serial0 as point-to-point.

Router1# show ip ospf interface serial 0 
   Serial0 is up, line protocol is up 
   Internet Address 1.1.1.2/24, Area 0 
   Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 64
   Transmit Delay is 1 sec, State POINT_TO_POINT,
   Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
   Hello due in 00:00:05
   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 2.2.2.2
   Suppress hello for 0 neighbor(s)

Similarly, this example displays the output for the show ip ospf neighbor and the show ip ospf interface commands on Router2.

Router2# show ip ospf neighbor
   Neighbor ID     Pri    State     Dead Time     Address      Interface
    3.3.3.3         1     FULL/ -    00:00:32      1.1.1.2      Serial0

Router2# show ip ospf interface serial 0
   Serial0 is up, line protocol is up 
   Internet Address 1.1.1.1/24, Area 0 
   Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64
   Transmit Delay is 1 sec, State POINT_TO_POINT,
   Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:05
   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 3.3.3.3
   Suppress hello for 0 neighbor(s)

Verify the Configuration of OSPF with Unnumbered Interfaces

The show ip ospf neighbor command on Router1 and Router2 confirms full adjacency. This output shows the OSPF network type for interface Serial0 as point-to-point. You can also see that the internet address is 0.0.0.0 for the serial interface on both routers. This is because an IP address is borrowed from the loopback interface (in this case) by virtue of the ip unnumbered command.

Router1#show ip ospf neighbor
      Neighbor ID  Pri   State    Dead Time    Address      Interface
      2.2.2.2      1   FULL/ -    00:00:37    2.2.2.2       Serial0

Router1# show ip ospf interface serial 0
Serial0 is up, line protocol is up
  Internet Address 0.0.0.0/24, Area 0
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
  Index 2/2, 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 2.2.2.2
  Suppress hello for 0 neighbor(s)

This example displays the output of the show ip ospf neighbor and show ip ospf interface serial 0 commands on Router2.

Router2#show ip ospf neighbor
      Neighbor ID   Pri   State   Dead Time   Address   Interface
      3.3.3.3        1   FULL/ -  00:00:30    3.3.3.3    Serial0

Router2# show ip ospf interface serial 0
Serial0 is up, line protocol is up
  Internet Address 0.0.0.0/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
  Index 2/2, 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 3.3.3.3
  Suppress hello for 0 neighbor(s)

This example shows the output of the show ip route command on Router1 with encapsulation PPP and the use of unnumbered interfaces.

Router1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Serial0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0

This example displays the output of the show ip route command on Router 2 with encapsulation PPP and the use of unnumbered interfaces.

Router2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Serial0

This example displays the output of the show ip route command on Router1 with encapsulation HDLC and the use of unnumbered interfaces.

Router1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 2.2.2.2, 00:00:08, Serial0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0

This example displays output of the show ip route command on Router2 with encapsulation HDLC and the use of unnumbered interfaces.

Router1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

        2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 3.3.3.3, 00:01:28, Serial0

Note: The output of the show ip route command might differ between PPP and HDLC encapsulations when IP unnumbered configuration is used on serial interfaces. PPP installs a host route to the IP address that is used on the serial interface at the other end as a directly connected network. If the same prefix is also learned through OSPF as in this configuration, it displays only as a connected route (as this show ip route output shows). This is because connected routes have a lower administrative distance than OSPF and are more preferred. You can change this behavior when you issue the no peer neighbor-route command under the serial interfaces which prevents a host route from being installed and treats it as an OSPF route.

This is not the case with HDLC because it does not install a host route. HDLC installs an OSPF route for the address on the other end when IP unnumbered is used.

Troubleshoot

For information on how to troubleshoot OSPF issues, refer to Troubleshooting OSPF.

Related Information

Updated: Jul 06, 2007
Document ID: 13687