SOFTMAP'S SYSLOG
===========================================================
Configuring AUX-to-AUX Port Async Backup with Dialer Watch
===========================================================

这篇文章可以说是集DIAL-UP和DIAL-WATCH的大全了

http://www.cisco.com/en/US/tech/tk801/tk36/technologies_configuration_example09186a0080093d2b.shtml

Document ID: 10305


  -->


Contents

Introduction
Prerequisites
     Requirements
     Components Used
     Conventions
     Background Theory
Configure
     Network Diagram
     Configurations
Verify
     Sample show Output
Troubleshoot
     Troubleshooting Commands
     Sample Debug Output
Related Information

Introduction

This document provides information about configuring dial-on-demand routing (DDR) backup for a serial, WAN, or leased line link using the dialer watch feature. The backup link uses modems on the AUX ports of both routers. When the primary link goes down, dialer watch initiates the backup dialout using the modem on the AUX Port.

Prerequisites

Requirements

This document assumes you have a good understanding of the various issues associated with modems on AUX ports. If you need more information on these issues, please refer to the documents Modem-Router Connection Guide and Configuring Dialout using a Modem on the AUX Port before continuing on with this document.

Components Used

The information in this document is based on these software and hardware versions:

  • Two Cisco 2600s with US Robotics Modems connected to the AUX Ports. Both routers are running Cisco IOS® Software Release 12.1(2).

It is recommended that you use Cisco IOS version 12.1(7) or later, which includes fixes for IOS bugs that affect dialer watch.

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

Conventions

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

Background Theory

This scenario involves configuring dialin and dialout using modems on the AUX ports, and configuring DDR backup with dialer watch. For more information on the dialer watch feature, refer to Evaluating Backup Interfaces, Floating Static Routes, and Dialer Watch for DDR Backup.

Refer to Configuring DDR Backup using BRIs and Dialer Watch for information on how to configure and troubleshoot dialer watch. The concepts involved for dialer watch are independent of the media used, so that document is useful for dialer watch issues.

Configure

In this section, you are presented with the information to configure the features described in this document.

Note: To find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .

Network Diagram

This document uses the network setup shown in this diagram:

aux-aux-watch.gif

Configurations

In this configuration, maui-rtr-10 (Client) is connected by a serial link to maui-rtr-11 (Central Site). Both routers also have external US Robotics modems connected to the AUX Ports and used as backup. When the primary link goes down, dialer watch initiates the backup link and maui-rtr-10 dials the central site router, connects, negotiates PPP, and exchanges Open Shortest Path First (OSPF) routing information. All traffic between the routers now uses the backup connection. When the primary link is reestablished, the routing table is updated and all traffic once again uses the primary link. Since no traffic flows on the backup link, the idle timeout expires and dialer watch tears down the backup link.

maui-rtr-10 (Client)

maui-rtr-10#show running-config 
Building configuration...

Current configuration:
!
version 12.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname maui-rtr-10
!
aaa new-model
aaa authentication login default local
aaa authentication login NO_AUTHEN none
aaa authentication ppp default local

!--- This is the basic AAA configuration for PPP calls.

enable secret 5 <deleted>
!
username admin password 0 <deleted>
username maui-rtr-11 password 0 cisco

!--- Username for remote router (maui-rtr-11) and shared secret 
!--- password. Shared secret (used for Challenge Handshake Authentication 
!--- Protocol [CHAP] authentication) must be the same on both sides.

!    
ip subnet-zero
!
chat-script Dialout ABORT ERROR ABORT BUSY "" "AT" OK "ATDT T" TIMEOUT 45 
CONNECT c

!--- Chat script named "Dialout" is used for the backup dialout.

modemcap entry MY_USR_MODEM:MSC=&F1S0;=1

!--- Modemcap named "MY_USR_MODEM" will be applied to the AUX 
!--- port line interface. This modemcap was created with the 
!--- modemcap edit MY_USR_MODEM miscellaneous &F1S0;=1 command
!--- Refer to the Modem-Router Connection Guide for more information.

!
interface Loopback0
 ip address 172.17.1.1 255.255.255.0
!
interface Ethernet0/0
 ip address 172.16.1.1 255.255.255.0
 no keepalive
!
interface Serial0/0
 no ip address
 shutdown
 no fair-queue
!
interface Serial0/1

!--- This is the primary link.

 ip address 192.168.10.2 255.255.255.252
 encapsulation ppp
 clockrate 64000
 ppp authentication chap
!
interface Async65

!--- Async interface corresponding to the AUX Port (backup link). 
!--- This was determined using the show line command.

 ip unnumbered Loopback0

!--- This assigns the Loopback 0 IP address to this interface.
!--- The central router will have a dialer map to this loopback address.

 encapsulation ppp
 dialer in-band

!--- Allow DDR on this interface.

 dialer idle-timeout 30

!--- Idle timeout (in seconds) for this link.
!--- Dialer watch checks the status of the primary link
!--- every time the idle-timeout expires.

 dialer watch-disable 15

!--- Delays disconnection of the backup interface (for 15 seconds) after 
!--- the primary interface is found to be up.

 dialer map ip 172.22.1.1 name maui-rtr-11 broadcast 84007

!--- Dialer map for the AUX Port interface of the central router.
!--- Remember that the central router's AUX port is unnumbered to its Loopback 0.

 dialer map ip 172.22.53.0 name maui-rtr-11 broadcast 84007

!--- Map statement for the route or network being watched.
!--- Address must exactly match the network configured with 
!--- the dialer watch-list command.
!--- Dials the phone number specified when the watched route disappears.

 dialer watch-group 8

!--- Enable dialer watch on this backup interface.
!--- Watch the route specified with dialer watch-list 8.

 dialer-group 1

!--- Apply interesting traffic defined in dialer-list 1.

 async default routing

!--- Permit routing over the async interface.
!--- This is required for a routing protocol to run across the async link.

 async mode interactive
 ppp authentication chap
!
router ospf 5
 network 172.16.1.0 0.0.0.255 area 0
 network 172.17.1.0 0.0.0.255 area 0
 network 192.168.10.0 0.0.0.3 area 0
!
ip classless
no ip http server
!
access-list 101 remark Define Interesting Traffic
access-list 101 deny   ospf any any

!--- Mark OSPF as uninteresting.
!--- This prevents OSPF hellos from keeping the link up.

access-list 101 permit ip any any
!
dialer watch-list 8 ip 172.22.53.0 255.255.255.0

!--- Define the route to be watched.
!--- This exact route (including subnet mask) must exist in the routing table.

dialer-list 1 protocol ip list 101

!--- Interesting traffic is defined by access-list 101.
!--- This is applied to BRI0 using dialer-group 1.

!
line con 0
 login authentication NO_AUTHEN
 transport input none
line Aux 0

!--- Line configuration for the AUX port.

 exec-timeout 0 0

!--- Disable exec timeout on the interface.

 autoselect ppp
 script dialer Dialout

!--- Use the chat script named "Dialout" for outgoing calls.

 modem InOut

!--- Enable incoming and outgoing calls.

 modem autoconfigure type MY_USR_MODEM

!--- Apply the modemcap MY_USR_MODEM (configured previously) 
!--- to initialize the modem.

 transport input all
 stopbits 1

!--- Improve throughput by reducing async framing overhead.

 speed 115200

!--- AUX port on the 2600 supports a speed of 115200.
!--- Note: If you are routing through the AUX port, each character generates a 
!--- processor interrupt. This is an abnormally high load on the CPU, which can be
!--- resolved by using a lower AUX port speed.

 flowcontrol hardware

!--- This configures Ready To Send/Clear To Send (RTS/CTS) flow control.

line vty 0 4
!
no scheduler allocate
end

maui-rtr-11 (Central Site)

maui-rtr-11#show running-config 
Building configuration...

Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname maui-rtr-11
!
aaa new-model
aaa authentication login default local
aaa authentication login NO_AUTHEN none
aaa authentication ppp default local

!--- This is the basic AAA configuration for PPP calls.

enable secret 5 <deleted>
!
username admin password 0 <deleted>
username maui-rtr-10 password 0 cisco

!--- Username for remote router (maui-rtr-10) and shared secret.
!--- Shared secret (used for CHAP authentication) must be the same on both sides.

!
memory-size iomem 30
!
ip subnet-zero
!
modemcap entry MY_USR_MODEM:MSC=&F1S0;=1

!--- Modemcap (MY_USR_MODEM) will be applied to the AUX port line interface.
!--- This modemcap was created with the command 
!--- modemcap edit MY_USR_MODEM miscellaneous &F1S0;=1
!--- Refer to the Modem-Router Connection Guide for more information.

!
interface Loopback0
 ip address 172.22.1.1 255.255.255.0
!
interface FastEthernet0/0

!--- Interface to corporate network.

 ip address 172.22.53.105 255.255.255.0
 no keepalive
 duplex auto
 speed auto
!

!--- Irrelevant output removed here.

!
interface Serial0/1

!--- This is the primary link.

 ip address 192.168.10.1 255.255.255.252
 encapsulation ppp
 ppp authentication chap
!
interface Serial0/2
 no ip address
 shutdown
!
interface Async65

!--- Async interface corresponding to the AUX Port (backup link). 
!--- This was determined using the show line command.

 ip unnumbered Loopback0

!--- Use Loopback 0 address for this interface.
!--- The remote router will have a dialer map to this loopback address.

 encapsulation ppp
 dialer in-band
 dialer idle-timeout 900
 dialer map ip 172.17.1.1 name maui-rtr-10 broadcast

!--- Dialer map for the AUX Port interface of the remote router.
!--- Remember that the remote router AUX port is unnumbered to its Loopback 0.

 dialer-group 1

!--- Apply interesting traffic defined in dialer-list 1.

 async default routing

!--- Permit routing over the async interface.
!--- This is required for a routing protocol to run across the async link.

 async mode interactive

!--- Requires autoselect PPP under the line configuration PPP to be negotiated.
!--- This command may be replaced with async mode dedicated.

 no peer default ip address

!--- Do not assign the peer an IP address.

 ppp authentication chap
!
router ospf 5
 network 172.22.1.0 0.0.0.255 area 0
 network 172.22.53.0 0.0.0.255 area 0
 network 192.168.10.0 0.0.0.3 area 0
!
ip classless
no ip http server
!
dialer-list 1 protocol ip permit

!--- Mark all IP traffic as interesting.
!--- This interesting traffic definition is applied to BRI0 
!--- using dialer-group 1.

!
!
line con 0
 login authentication NO_AUTHEN
 transport input none
line aux 0

!--- AUX Port line configuration.

 autoselect ppp

!--- Launch PPP negotiation when PPP packets are received.
!--- If the Async Interface has async mode dedicated, 
!--- this command is not needed.

 modem InOut

!--- Enable incoming and outgoing calls.

 modem autoconfigure type MY_USR_MODEM

!--- Apply the modemcap MY_USR_MODEM that was configured previously.

 transport input all
 stopbits 1

!--- Improve throughput by reducing async framing overhead.

 speed 115200

!--- AUX port on the 2600 supports a speed of 115200.

 flowcontrol hardware

!--- Configures RTS/CTS flow control.

line vty 0 4
!
no scheduler allocate
end
Verify

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

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

Sample show Output

The routing table of the client (maui-rtr-10) with the primary link functioning is shown here:

maui-rtr-10#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, 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

     192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.10.0/30 is directly connected, Serial0/1
C       192.168.10.1/32 is directly connected, Serial0/1
     172.17.0.0/24 is subnetted, 1 subnets
C       172.17.1.0 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/0
     172.22.0.0/16 is variably subnetted, 2 subnets, 2 masks
O       172.22.53.0/24 [110/65] via 192.168.10.1, 00:00:57, Serial0/1
O       172.22.1.1/32 [110/65] via 192.168.10.1, 00:00:59, Serial0/1

The show ip route command output shown above displays the OSPF routes learned from the peers using the primary link (serial 0/1). Notice that the route being watched (172.22.53.0 with mask 255.255.255.0) exists in the routing table. This must be verified for dialer watch to function correctly.

Now the primary link is brought down and dialer watch activates the backup link.

After the backup link is activated, the OSPF table is exchanged and the new route using the backup link is installed. Traffic now passes across the backup link. An example of this is shown here:

maui-rtr-10#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, 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

     172.17.0.0/24 is subnetted, 1 subnets
C       172.17.1.0 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Ethernet0/0
     172.22.0.0/16 is variably subnetted, 2 subnets, 2 masks
O       172.22.53.0/24 [110/870] via 172.22.1.1, 00:00:11, Async65
C       172.22.1.1/32 is directly connected, Async65

The output above shows that the routing table has been updated and all traffic for the watched network now uses the backup link (Async 65).

Troubleshoot

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

Troubleshooting Commands

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

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

  • debug dialer—To display debugging information about the packets received on a dialer interface. When DDR is enabled on the interface, information concerning the cause of any call (called the Dialing cause) is also displayed. For more information, see the debug dialer information in the Debug Commands documentation.

  • debug modem—To display the modem line activity, modem control and process activation messages on the router.

  • debug chat—To monitor the execution of the chat script when async/POTS dialing is initiated. Refer to Dialup Technology: Troubleshooting Techniques for more information.

  • debug ppp negotiation—Displays information on PPP traffic and exchanges while negotiating the PPP components including Link Control Protocol (LCP), Authentication, and Network Control Protocol (NCP). A successful PPP negotiation first opens the LCP state, then Authenticates, and finally negotiates NCP.

  • debug ppp authentication—Displays the PPP authentication protocol messages, including Challenge Authentication Protocol (CHAP) packet exchanges and Password Authentication Protocol (PAP) exchanges

Sample Debug Output

The debug output below shows the primary link failing and dialer watch recognizing the lost route. The router then initiates the backup link. After the dialer idle-timeout expires, the router checks whether the primary link is down. When the primary link is reestablished, dialer watch disconnects the backup link after the disable timer expires. When looking at the debugs, pay attention to the timestamp in each message as they can provide information on the various timers and idle timeouts that are active.

maui-rtr-10#debug dialer
Dial on demand events debugging is on
maui-rtr-10#debug chat
Chat scripts activity debugging is on
maui-rtr-10#debug modem
Modem control/process activation debugging is on
maui-rtr-10#debug ppp negotiation 
PPP protocol negotiation debugging is on
maui-rtr-10#debug ppp authentication
PPP authentication debugging is on
maui-rtr-10#
maui-rtr-10#
maui-rtr-10#
maui-rtr-10#
maui-rtr-10#
*Mar  3 17:00:28.136: %LINK-3-UPDOWN: Interface Serial0/1, 
changed state to down

!--- Primary link is brought down.

*Mar  3 17:00:28.140: Se0/1 IPCP: State is Closed
*Mar  3 17:00:28.140: Se0/1 CDPCP: State is Closed
*Mar  3 17:00:28.140: Se0/1 PPP: Phase is TERMINATING
*Mar  3 17:00:28.140: Se0/1 LCP: State is Closed
*Mar  3 17:00:28.140: Se0/1 PPP: Phase is DOWN
*Mar  3 17:00:28.144: Se0/1 IPCP: Remove route to 192.168.10.1
*Mar  3 17:00:28.252: DDR: Dialer Watch: watch-group = 8

!--- Use dialer watch-group 8.

*Mar  3 17:00:28.252: DDR:        network 172.22.53.0/255.255.255.0 DOWN,
*Mar  3 17:00:28.252: DDR:        primary DOWN

!--- The primary network is down.

*Mar  3 17:00:28.252: DDR: Dialer Watch: 
Dial Reason: Primary of group 8 DOWN

!--- Dial reason is that the primary route is down.

*Mar  3 17:00:28.252: DDR: Dialer Watch: watch-group = 8, 
*Mar  3 17:00:28.252: DDR:        
dialing secondary by dialer map 172.22.53.0 on As65

!--- Indicates which dialer map statement is used for the dialout.
!--- Dialout will occur on AS 65 (the AUX Port).

*Mar  3 17:00:28.252: As65 DDR: Attempting to dial 84007

!--- Number being dialed for the backup link.

*Mar  3 17:00:28.252: CHAT65: Attempting async line dialer script
*Mar  3 17:00:28.256: CHAT65: Dialing using Modem script: Dialout
 & System script: none

!--- Using chat script "Dialout".

*Mar  3 17:00:28.268: CHAT65: process started
*Mar  3 17:00:28.273: CHAT65: Asserting DTR
*Mar  3 17:00:28.273: TTY65: Set DTR to 1
*Mar  3 17:00:28.273: CHAT65: Chat script Dialout started

!--- Chat script "Dialout" starts.

*Mar  3 17:00:28.273: CHAT65: Sending string: AT
*Mar  3 17:00:28.273: CHAT65: Expecting string: OK
*Mar  3 17:00:28.433: CHAT65: Completed match for expect: OK
*Mar  3 17:00:28.433: CHAT65: Sending string: ATDT T<84007>
*Mar  3 17:00:28.433: CHAT65: Expecting string: CONNECT
*Mar  3 17:00:29.138: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1,
 changed state to down
*Mar  3 17:00:42.560: CHAT65: Completed match for expect: CONNECT
*Mar  3 17:00:42.560: CHAT65: Sending string: c
*Mar  3 17:00:42.560: CHAT65: Chat script 
Dialout finished, status = Success

!--- Chat script is successful.
!--- Notice the Expect/Send Attributes and the time elapsed.

*Mar  3 17:00:42.564: TTY65: destroy timer type 1
*Mar  3 17:00:42.564: TTY65: destroy timer type 0
*Mar  3 17:00:42.568: As65 IPCP: Install route to 172.22.53.0
*Mar  3 17:00:44.567: %LINK-3-UPDOWN: Interface Async65, changed state to up
 Dialer statechange to up Async65
*Mar  3 17:00:44.571: As65 DDR: Dialer Watch: resetting call in progress
 Dialer call has been placed Async65
*Mar  3 17:00:44.571: As65 PPP: Treating connection as a callout

!--- PPP negotiation begins.

*Mar  3 17:00:44.571: As65 PPP: Phase is ESTABLISHING, Active Open
*Mar  3 17:00:44.571: As65 LCP: O CONFREQ [Closed] id 11 len 25
*Mar  3 17:00:44.571: As65 LCP:    ACCM 0x000A0000 (0x0206000A0000)
*Mar  3 17:00:44.575: As65 LCP:    AuthProto CHAP (0x0305C22305)
*Mar  3 17:00:44.575: As65 LCP:    MagicNumber 0x103EC1ED (0x0506103EC1ED)
*Mar  3 17:00:44.575: As65 LCP:    PFC (0x0702)
*Mar  3 17:00:44.575: As65 LCP:    ACFC (0x0802)
*Mar  3 17:00:46.575: As65 LCP: TIMEout: State REQsent
*Mar  3 17:00:46.575: As65 LCP: O CONFREQ [REQsent] id 12 Len 25
*Mar  3 17:00:46.575: As65 LCP:    ACCM 0x000A0000 (0x0206000A0000)
*Mar  3 17:00:46.575: As65 LCP:    AuthProto CHAP (0x0305C22305)
*Mar  3 17:00:46.575: As65 LCP:    MagicNumber 0x103EC1ED (0x0506103EC1ED)
*Mar  3 17:00:46.575: As65 LCP:    PFC (0x0702)
*Mar  3 17:00:46.575: As65 LCP:    ACFC (0x0802)
*Mar  3 17:00:46.703: As65 LCP: I CONFACK [REQsent] id 12 Len 25
*Mar  3 17:00:46.707: As65 LCP:    ACCM 0x000A0000 (0x0206000A0000)
*Mar  3 17:00:46.707: As65 LCP:    AuthProto CHAP (0x0305C22305)
*Mar  3 17:00:46.707: As65 LCP:    MagicNumber 0x103EC1ED (0x0506103EC1ED)
*Mar  3 17:00:46.707: As65 LCP:    PFC (0x0702)
*Mar  3 17:00:46.707: As65 LCP:    ACFC (0x0802)
*Mar  3 17:00:46.715: As65 LCP: I CONFREQ [ACKrcvd] id 21 Len 25
*Mar  3 17:00:46.715: As65 LCP:    ACCM 0x000A0000 (0x0206000A0000)
*Mar  3 17:00:46.715: As65 LCP:    AuthProto CHAP (0x0305C22305)
*Mar  3 17:00:46.719: As65 LCP:    MagicNumber 0x30CB092E (0x050630CB092E)
*Mar  3 17:00:46.719: As65 LCP:    PFC (0x0702)
*Mar  3 17:00:46.719: As65 LCP:    ACFC (0x0802)
*Mar  3 17:00:46.719: As65 LCP: O CONFACK [ACKrcvd] id 21 Len 25
*Mar  3 17:00:46.719: As65 LCP:    ACCM 0x000A0000 (0x0206000A0000)
*Mar  3 17:00:46.719: As65 LCP:    AuthProto CHAP (0x0305C22305)
*Mar  3 17:00:46.723: As65 LCP:    MagicNumber 0x30CB092E (0x050630CB092E)
*Mar  3 17:00:46.723: As65 LCP:    PFC (0x0702)
*Mar  3 17:00:46.723: As65 LCP:    ACFC (0x0802)
*Mar  3 17:00:46.723: As65 LCP: State is Open
*Mar  3 17:00:46.723: As65 PPP: Phase is AUTHENTICATING, by both

!--- Two-way PPP CHAP authentication begins.

*Mar  3 17:00:46.723: As65 CHAP: O CHALLENGE id 7 Len 32 from "maui-rtr-10"
*Mar  3 17:00:46.847: As65 CHAP: I CHALLENGE id 7 Len 32 from "maui-rtr-11"
*Mar  3 17:00:46.851: As65 CHAP: O RESPONSE id 7 Len 32 from "maui-rtr-10"
*Mar  3 17:00:46.967: As65 CHAP: I SUCCESS id 7 Len 4
*Mar  3 17:00:46.971: As65 CHAP: I RESPONSE id 7 Len 32 from "maui-rtr-11"
*Mar  3 17:00:46.975: As65 CHAP: O SUCCESS id 7 Len 4

!--- Incoming and Outgoing CHAP authentication are successful.

*Mar  3 17:00:46.975: As65 PPP: Phase is UP
*Mar  3 17:00:46.979: As65 IPCP: O CONFREQ [Closed] id 8 Len 10

!--- IP Control Protocol (IPCP) negotiation begins.

*Mar  3 17:00:46.979: As65 IPCP:    Address 172.17.1.1 (0x0306AC110101)
*Mar  3 17:00:46.979: As65 CDPCP: O CONFREQ [Closed] id 7 Len 4
*Mar  3 17:00:47.087: As65 IPCP: I CONFREQ [REQsent] id 7 Len 10
*Mar  3 17:00:47.091: As65 IPCP:    Address 172.22.1.1 (0x0306AC160101)
*Mar  3 17:00:47.091: As65 IPCP: O CONFACK [REQsent] id 7 Len 10
*Mar  3 17:00:47.091: As65 IPCP:    Address 172.22.1.1 (0x0306AC160101)
*Mar  3 17:00:47.095: As65 CDPCP: I CONFREQ [REQsent] id 7 Len 4
*Mar  3 17:00:47.095: As65 CDPCP: O CONFACK [REQsent] id 7 Len 4
*Mar  3 17:00:47.099: As65 IPCP: I CONFACK [ACKsent] id 8 Len 10
*Mar  3 17:00:47.099: As65 IPCP:    Address 172.17.1.1 (0x0306AC110101)
*Mar  3 17:00:47.099: As65 IPCP: State is Open
*Mar  3 17:00:47.103: As65 DDR: dialer protocol up
*Mar  3 17:00:47.103: As65 IPCP: Remove route to 172.22.53.0
*Mar  3 17:00:47.103: As65 CDPCP: I CONFACK [ACKsent] id 7 Len 4
*Mar  3 17:00:47.107: As65 CDPCP: State is Open
*Mar  3 17:00:47.107: As65 IPCP: Install route to 172.22.1.1
*Mar  3 17:00:47.708: %LINEPROTO-5-UPDOWN: Line protocol on Interface Async65,
 changed state to up

!--- Async 65 (AUX Port) is UP.

*Mar  3 17:01:14.572: As65 DDR: idle timeout

!--- Idle timeout expires.
!--- The router will check to see if the primary link has come up.

*Mar  3 17:01:14.572: DDR: Dialer Watch: watch-group = 8
*Mar  3 17:01:14.572: DDR:        network 172.22.53.0/255.255.255.0 UP,

!--- A route for the watched network exists (due to the active backup link).

*Mar  3 17:01:14.572: DDR:        primary DOWN

!--- The primary network is down.

*Mar  3 17:02:05.191: As65 DDR: idle timeout

!--- Idle Timeout expires.
!--- The router will check to see if the primary link has come up.

*Mar  3 17:02:05.191: DDR: Dialer Watch: watch-group = 8
*Mar  3 17:02:05.191: DDR:        network 172.22.53.0/255.255.255.0 UP,
*Mar  3 17:02:05.191: DDR:        primary DOWN

!--- The primary network is still down.

*Mar  3 17:02:50.982: %LINK-3-UPDOWN: Interface Serial0/1, 
changed state to up

!--- Primary link is reestablished.

*Mar  3 17:02:50.986: Se0/1 PPP: Treating connection as a dedicated line
*Mar  3 17:02:50.986: Se0/1 PPP: Phase is ESTABLISHING, Active Open
...
...
!--- Primary link PPP negotiation output omitted.

...
*Mar  3 17:02:51.039: Se0/1 IPCP: Install route to 192.168.10.1
*Mar  3 17:02:52.020: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1,
 changed state to up
*Mar  3 17:03:05.194: As65 DDR: idle timeout

!--- Next Idle Timeout expires.
!--- The router will check to see if the primary link has come up.

*Mar  3 17:03:05.194: DDR: Dialer Watch: watch-group = 8
*Mar  3 17:03:05.194: DDR:        network 172.22.53.0/255.255.255.0 UP,
*Mar  3 17:03:05.194: DDR:        primary DOWN

!--- Dialer watch considers the primary network still down.
!--- Even though the primary link is "up," the OSPF table has not yet been exchanged.
!--- The primary link is not considered up until the route is installed.

*Mar  3 17:03:35.195: As65 DDR: idle timeout

!--- Next idle timeout (30 seconds) expires.
!--- The router will check to see if the primary link has come up.

*Mar  3 17:03:35.195: DDR: Dialer Watch: watch-group = 8
*Mar  3 17:03:35.195: DDR:        network 172.22.53.0/255.255.255.0 UP,

!--- A route for the watched network exists. 

*Mar  3 17:03:35.195: DDR:        primary UP

!--- The primary network is up. 
!--- Dialer watch will initiate a disconnect of the backup link.

*Mar  3 17:03:35.195: As65 DDR: starting watch disable timer

!--- Delays disconnecting the backup interface  after the primary 
!--- interface recovers. This timer is 15 seconds as configured 
!--- with the command dialer watch-disable 15.

*Mar  3 17:03:50.196: As65 DDR: watch disable timeout

!--- The 15 second disconnect delay expires. 
!--- The link will be immediately brought down.

*Mar  3 17:03:50.196: As65 DDR: disconnecting call

!--- Call on Async 65 (AUX Port) is disconnected.

*Mar  3 17:03:50.196: TTY65: Async Int reset: Dropping DTR
...
...
!--- Link tear-down messages omitted here.

...
*Mar  3 17:03:57.203: %LINK-3-UPDOWN: Interface Async65, changed state to down

Related Information



Updated: Jun 14, 2004Document ID: 10305




softmap 发表于:2005.04.24 14:12 ::分类: ( 初始分类 ) ::阅读:(349次) :: 评论 (0)
===========================================================
Troubleshooting Duplicate Router IDs with OSPF
===========================================================

http://www.cisco.com/en/US/customer/tech/tk365/technologies_tech_note09186a0080117102.shtml

Document ID: 23862


-->


Contents

Introduction
Router ID
Troubleshooting
Related Information

Introduction

This document explains how a router running Open Shortest Path First (OSPF) selects a router ID, in what packets this value is sent, and how to troubleshoot router log messages that report duplicate IDs.

Prerequisites

This document requires a basic understanding of IP routing protocols and the OSPF routing protocol in general. For further information about IP routing protocols and OSPF, refer to Routing Basics and OSPF Routing Protocol respectively.

Hardware and Software Versions

OSPF can be configured in all routers, such as the 2500 and 2600 series, and Layer 3 switches. This document is based on Cisco IOS® Software Release 12.2.

Router ID

By default, when the OSPF process initializes, it selects the highest IP address on a router as the router ID for the OSPF process. The router ID uniquely identifies a router within an OSPF domain.

As explained in the Cisco IOS Software Release 12.2 Configuration Guides, OSPF uses the largest IP address configured on the interfaces as its router ID. If the interface associated with this IP address is ever brought down, or if the address is removed, the OSPF process must recalculate a new router ID and resend all its routing information out its interfaces.

If a loopback interface is configured with an IP address, the Cisco IOS software will use this IP address as its router ID, even if other interfaces have larger IP addresses. Greater stability in the routing table is achieved, because loopback interfaces never go down.

OSPF automatically prefers a loopback interface over any other kind, and it chooses the highest IP address among all loopback interfaces. If there are no loopback interfaces present, the highest IP address in the router is chosen. The OSPF cannot be directed to use any particular interface. Once the router ID is elected it does not change unless the OSPF process restarts or the router is reloaded.

Note: If there is not an interface with a valid IP address in an up/up state when it starts, OSPF reports "can't allocate router-id" error messages to the log.

The following commands are used to view the router ID.

R2-AGS# show ip ospf interface e0 
     Ethernet0 is up, line protocol is up 
       Internet Address 1.1.1.2 255.255.255.0, Area 0 
       Process ID 1, Router ID 5.5.5.5, Network Type BROADCAST, Cost: 10 
       Transmit Delay is 1 sec, State BDR, Priority 1 
       Designated Router (ID) 6.6.6.6, Interface address 1.1.1.1 
       Backup Designated router (ID) 5.5.5.5, Interface address 1.1.1.2 
       Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 
         Hello due in 0:00:07 
       Neighbor Count is 1, Adjacent neighbor count is 1 
         Adjacent with neighbor 6.6.6.6  (Designated Router)

The default behaviour of selecting the highest IP address on a router as the router ID can be changed by using the router-id OSPF command introduced in Cisco IOS version 12.0(1)T; refer to bug ID CSCdi38380 (registered customers only). With the OSPF router-id command, the router ID of the OSPF process is the one manually selected. In the example below, the router ID for the OSPF process is 10.10.10.10.

!
router ospf 100
 router-id 10.10.10.10

To check the router ID the show ip ospf database command can also be used as shown:

Router# show ip ospf database
OSPF Router with ID (10.10.10.10) (Process ID 100)

Value Transmission

Before troubleshooting duplicate router IDs with OSPF can be explained, you will need to understand the five OSPF packet types. These packet types are listed below:

  • Hello
  • Database Description (DD)
  • Link State Request
  • Link State Update
  • Link State Acknowledgment

All OSPF packets begin with a standard 24-octet header. Note that the header includes a "Router ID" field which indicates the unique ID of the route originating the OSPF packet.

Version   |   Type    |    Packet Length
Router ID
Area ID
Checksum    |     AuType
Authentication
Authentication
Packet Data

Typically, OSPF packets carry Link-State Advertisements (LSAs), which describe all of the router's links or interfaces, and the state of the links. While all LSAs start with the same header, a single LSA is identified uniquely by the following three fields:

  • Type
  • Link State ID
  • Advertising Router

OSPF uses Link State Update packets to flood LSAs and send LSAs in response to Link State Requests. To propagate OSPF LSAs beyond the network on which they were originated, an OSPF neighbor is responsible for reencapsulating the appropriate LSAs in new Update packets for further flooding. Thus, a duplicate router ID may be detected by, and propagated by multiple routers.

To determine if there is a duplicate router ID, use the following steps:

  1. Execute the show ip ospf database router x.x.x.x command on the router that should have this ID. This command displays the contents of a router LSA (Type 1), which advertises a router and all of its directly connected interfaces. Take a moment to understand the router's interface list and assigned IP addresses.

  2. Execute the show ip ospf database router x.x.x.x command a few times on the router reporting the duplicate. (The Shortest Path First (SPF) algorithm can run as frequently as once every 10 seconds.)
By capturing these commands, you should be able to catch changing information. Shown below is an example output of the show ip ospf database router command.
r2.2.2.2# show ip ospf database router 1.1.1.1 

      OSPF Router with ID (2.2.2.2) (Process ID 2) 
  

         Router Link States (Area 0) 

LS age: 279 
Options: (No TOS-capability, DC) 
LS Type: Router Links 
Link State ID: 1.1.1.1 
!--- For router links, the Link State ID is always the same as the 
!--- advertising router (next line). 
Advertising Router: 1.1.1.1 
!--- This is the router ID of the router which created 
!--- this LSA. 
LS Seq Number: 8000001A 
Checksum: 0xA6FA 
Length: 48 
Number of Links: 2 

Link connected to: another Router (point-to-point) 
!--- This line shows that this router (1.1.1.1) is a neighbor 
!--- with 2.2.2.2. 
(Link ID) Neighboring Router ID: 2.2.2.2 
(Link Data) Router Interface address: 0.0.0.12 
!--- In case of an unnumbered link, use the Management Information 
!--- Base (MIB) II IfIndex value, which usually starts with 0. 
Number of TOS metrics: 0 
 TOS 0 Metrics: 64 
!--- This is the OSPF cost of the link connecting the two routers. 

Link connected to: a Stub Network 
!--- This entry represents the Ethernet segment 4.0.0.0/8. 
(Link ID) Network/subnet number: 4.0.0.0 
(Link Data) Network Mask: 255.0.0.0 
Number of TOS metrics: 0 
TOS 0 Metrics: 10 
!--- This is the OSPF cost of the Ethernet segment.

Known Issue

When two routers are using the same router ID in an OSPF domain, routing may not work correctly. Cisco bug IDs CSCdr61598 and CSCdu08678 enhanced the detection and reporting mechanisms of duplicate router IDs. Registered users can view additional information about these Bug IDs by accessing the Bug Toolkit, linked at the Tools & Resources page. There are two duplicate router ID types:

  1. Area duplicate router ID
    %OSPF-4-DUP_RTRID1: Detected router with duplicate router ID 100.0.0.2 in area 0 

    Explanation: OSPF detected a router that has the same router ID in the area.

    Recommended Action: The OSPF router ID should be unique. Make sure all routers in the area have unique router ID.

  2. Type 4 LSA
    %OSPF-4-DUP_RTRID2: Detected router with duplicate router ID 100.0.0.2 in Type-4 LSA advertised by 100.0.0.1

    Explanation: OSPF detected a router that has the same router ID in the other area. This router was advertised in Type-4 LSA.

    Recommended Action: The OSPF router ID should be unique. Make sure all Autonomous System Border Routers (ASBRs) in remote areas have a unique router ID.

When a router acts as both an Area Border Router (ABR) and an ASBR in an OSPF domain, false reports of duplicate router IDs may occur, as shown in the example log message below.

OSPF-4-DUP_RTRID_AS Detected router with duplicate router ID 10.97.10.2 in Type-4 LSA advertised by 10.97.20.2

Cisco bug ID CSCdu71404 resolves this problem of OSPF domain-wide detection. Registered users can view additional information about these Bug IDs by accessing the Bug Toolkit, linked at the Tools & Utilities page.

  • If a router receives a Type 4 LSA and the Link State ID equals the router's own router ID and the router is not an ABR, then a valid router ID duplication in the remote area is occurring, and the error message should be logged.

  • If the router is not an ABR, it can receive a Type 4 LSA which tells it about itself from the other ABR. This condition does not represent a duplicate router ID problem, and the error message should not be logged.

A Type 4 LSA is also known as an ASBR Summary LSA. These LSAs can be observed by issuing the show ip ospf database asbr-summary command, as shown in the example below.

To advertise reachability of an ASBR into other areas, the ABR creates (Type 4) ASBR Summary LSAs.

r2.2.2.2# show ip ospf database asbr-summary 1.1.1.1 

           OSPF Router with ID (2.2.2.2) (Process ID 2) 

                    Summary ASB Link States (Area 0) 

      LS age: 266 
      Options: (No TOS-capability, DC) 
      LS Type: Summary Links(AS Boundary Router) 
      Link State ID: 1.1.1.1 (AS Boundary Router address) 
      !--- ABR (Router 2.2.2.2) is advertising that it knows how 
      !--- to reach the ASBR (Router 1.1.1.1). 
      Advertising Router: 2.2.2.2 
      LS Seq Number: 80000001 
      Checksum: 0x935C 
      Length: 28 
      Network Mask: /0 
            TOS: 0  Metric: 64 
     !--- The ABR's cost to reach the ASBR. 

If the LSA is a Type 4, the Link State ID is the router ID of the ASBR being advertised. Refer to How OSPF Propagates External Routes into Multiple Areas for more information.

Troubleshooting

The troubleshooting below was done with a Cisco IOS software version released before the Cisco bug ID CSCdr61598 and CSCdu08678 integration.

Single Area Network

The following image is a representation of the single area network described in the steps below.

 

 

  1. Issue the show proc cpu| include OSPF command. This allows you to see the OSPF processes that are utilizing CPU.
    r4# show proc cpu | include OSPF
       3        4704       473       9945  1.38%  0.81%  0.68%   0 OSPF Hello       
      71        9956      1012       9837  1.47%  1.62%  1.41%   0 OSPF Router     
    

    As seen in the example above, there is high CPU for OSPF. This shows that there must be something wrong with either the link stability or a duplicate router-id.

  2. Issue the show ip ospf statistics command. This allow you to see if the SPF algorithm is being run more than ordinary.
    r4# show ip ospf statistics
      Area 0: SPF algorithm executed 46 times
    
      SPF calculation time
    Delta T   Intra D-Intra Summ    D-Summ  Ext     D-Ext   Total   Reason
    00:01:36   0    0       0       0       0       0       0       N, 
    00:01:26   0    0       0       0       0       0       0       R, N, 
    00:01:16   0    0       0       0       0       0       0       R, N, 
    00:01:06   0    0       0       0       0       0       0       R, N, 
    00:00:56   0    0       0       0       0       0       0       R, N, 
    00:00:46   0    0       0       0       0       0       0       R, N, 
    00:00:36   0    0       0       0       0       0       0       R, N, kmbgvc
    00:00:26   0    0       0       0       0       0       0       R, N, 
    00:00:16   0    0       0       0       0       0       0       R, N, 
    00:00:06   0    0       0       0       0       0       0       R, N, 
    

    The show ip ospf statistics command shows that recalculation of SPF is done every 10 seconds, as seen in the example above. It is triggered by the router and network LSA. There is a problem in the same area as the current router.

  3. Issue the show ip ospf database command.
    r4# show ip ospf database 
    
                OSPF Router with ID (50.0.0.4) (Process ID 1)
    
                    Router Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    50.0.0.1        50.0.0.1        681         0x80000002 0x7E9D   3
    50.0.0.2        50.0.0.2        674         0x80000004 0x2414   5
    50.0.0.4        50.0.0.4        705         0x80000003 0x83D    4
    50.0.0.5        50.0.0.5        706         0x80000003 0x5C24   6
    50.0.0.6        50.0.0.6        16          0x80000095 0xAF63   6
    50.0.0.7        50.0.0.7        577         0x80000005 0x86D5   8
    
                    Net Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum
    192.168.2.6     50.0.0.6        6           0x8000007A 0xABC7
    

    The show ip ospf database command shows that one LSA is newer (age 16) and its sequence number is much higher then the other LSAs in the same OSPF database. You will need to figure out which router sent this LSA. Since it is in the same area, the advertising router id is known (50.0.0.6). It is more probable that this router ID is duplicated. You will need to find out which other router has the same router-id.

  4. The following example shows several instances of the show ip ospf database command.
    r4# show ip ospf database router adv-router 50.0.0.6
    
                OSPF Router with ID (50.0.0.4) (Process ID 1)
    
                    Router Link States (Area 0)
    
      LS age: 11
      Options: (No TOS-capability, DC)
      LS Type: Router Links
      Link State ID: 50.0.0.6
      Advertising Router: 50.0.0.6
      LS Seq Number: 800000C0
      Checksum: 0x6498
      Length: 72
      Number of Links: 4
    
        Link connected to: a Transit Network
         (Link ID) Designated Router address: 192.168.2.6
         (Link Data) Router Interface address: 192.168.2.6
          Number of TOS metrics: 0
           TOS 0 Metrics: 10
    
        Link connected to: another Router (point-to-point)
         (Link ID) Neighboring Router ID: 50.0.0.7
         (Link Data) Router Interface address: 192.168.0.21
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 192.168.0.20
         (Link Data) Network Mask: 255.255.255.252
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 50.0.0.6
         (Link Data) Network Mask: 255.255.255.255
          Number of TOS metrics: 0
           TOS 0 Metrics: 1
    
    r4# show ip ospf database router adv-router 50.0.0.6
    
                OSPF Router with ID (50.0.0.4) (Process ID 1)
    
                    Router Link States (Area 0)
    
      LS age: 7
      Options: (No TOS-capability, DC)
      LS Type: Router Links
      Link State ID: 50.0.0.6
      Advertising Router: 50.0.0.6
      LS Seq Number: 800000C7  
    !--- The sequence number has increased.
      Checksum: 0x4B95
      Length: 96
      Number of Links: 6 
    !--- The number of links has increased although the network has been stable.
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 192.168.3.0
         (Link Data) Network Mask: 255.255.255.0
          Number of TOS metrics: 0
           TOS 0 Metrics: 10
    
        Link connected to: another Router (point-to-point)
         (Link ID) Neighboring Router ID: 50.0.0.5
         (Link Data) Router Interface address: 192.168.0.9
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 192.168.0.8
         (Link Data) Network Mask: 255.255.255.252
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: another Router (point-to-point)
         (Link ID) Neighboring Router ID: 50.0.0.2
         (Link Data) Router Interface address: 192.168.0.2
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 192.168.0.0
         (Link Data) Network Mask: 255.255.255.252
          Number of TOS metrics: 0
           TOS 0 Metrics: 64
    
        Link connected to: a Stub Network
         (Link ID) Network/subnet number: 50.0.0.6
         (Link Data) Network Mask: 255.255.255.255
          Number of TOS metrics: 0
           TOS 0 Metrics: 1
    
  5. By knowing your network, you can find which router advertises those links. The first output above shows that the LSAs are sent by a router with OSPF neighbors 50.0.0.7, whereas the second output shows neighbors 50.0.0.5 and 50.0.0.6. Find those routers and access them to verify their OSPF router-id by issuing the show ip ospf command. In the following example setup, they are R6 and R3
    3> show ip ospf
     Routing Process "ospf 1" with ID 50.0.0.6
     Supports only single TOS(TOS0) routes
     Supports opaque LSA
    
    r6# show ip ospf
     Routing Process "ospf 1" with ID 50.0.0.6
     Supports only single TOS(TOS0) routes
     Supports opaque LSA
    
  6. Now check the configuration starting at the OSPF configuration b y issuing the show run | beg router ospf command.
    R6# show run | include router ospf
    router ospf 1
     router-id 50.0.0.6
     log-adjacency-changes
     network 50.0.0.0 0.0.0.255 area 0
     network 192.168.0.0 0.0.0.255 area 0
     network 192.168.2.0 0.0.0.255 area 0
    
    r3# show run | begin router ospf 
    router ospf 1
     log-adjacency-changes
     network 50.0.0.0 0.0.0.255 area 0
     network 192.168.0.0 0.0.0.255 area 0
     network 192.168.3.0 0.0.0.255 area 0
    

    In the example shown above, the router-id command was removed and the OSPF process was not restarted. The same problem could also result from a loopback interface being removed and configured somewhere else.

  7. Clear the processby issuing the clear ip ospf 1 process command and the show ip ospf command.
    r3# clear ip ospf 1 process 
    Reset OSPF process? [no]: y
    
    r3# show ip ospf
     Routing Process "ospf 1" with ID 50.0.0.6
     Supports only single TOS(TOS0) routes
     Supports opaque LSA
    
    As shown in the example above, the wrong IP address is still appearing.

  8. Check the interface by issuing the show ip int brie command.
    r3# show ip int brie
    Interface                  IP-Address      OK? Method Status                Protocol
    Ethernet0/0                192.168.3.1     YES NVRAM  up                    up      
    Serial1/0                  192.168.0.2     YES NVRAM  up                    up      
    Serial2/0                  192.168.0.9     YES NVRAM  up                    up      
    Loopback0                  unassigned      YES NVRAM  up                    up      
    Loopback1                  50.0.0.6        YES NVRAM  up                    up     
    !--- The highest Loopback IP address. 
    

    In order to correct the problem, make sure that either the highest loopback configured on the router is unique in your OSPF network, or configure statically the "router-id" with the router-id <ip address> command under the OSPF router configuration mode.

Multiple Areas with ASBR

The symptoms of these problems are that the external route (learned via redistribution from static into OSPF process by R6) ASBR router flaps from the routing table on all routers within OSPF Area 0. The external route is 120.0.0.0/16 and the problem is noticed on Router 5 in Area 0. Start the troubleshooting from there.

 

 

  1. Issue the show ip route command a few times consecutively in order to see the symptom.
    r5# show ip route 120.0.0.0
    Routing entry for 120.0.0.0/16, 1 known subnets
    
    O E2    120.0.0.0 [110/20] via 192.168.0.9, 00:00:03, Serial2/0
    
    r5# show ip route 120.0.0.0
    % Network not in table
    r5# 
    
  2. Take a look at the OSPF database to check whether the LSA is received. By entering the show ip ospf database command several times in a row, you will notice that the LSA is received by two routers, 50.0.0.6 and 50.0.0.7. If you look at the age of the second entry, if present, you will notice that its value changes dramatically.
    r5# show ip ospf database | begin Type-5 
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.6        2598        0x80000001 0xE10E   0
    120.0.0.0       50.0.0.7        13          0x80000105 0xD019   0
    r5# show ip ospf database | begin Type-5 
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.6        2599        0x80000001 0xE10E   0
    120.0.0.0       50.0.0.7        14          0x80000105 0xD019   0
    r5# show ip ospf database | begin Type-5 
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.6        2600        0x80000001 0xE10E   0
    120.0.0.0       50.0.0.7        3601        0x80000106 0x6F6    0
    r5# show ip ospf database | begin Type-5 
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.6        2602        0x80000001 0xE10E   0
    r5# show ip ospf database | begin Type-5 
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.6        2603        0x80000001 0xE10E   0
    r5#
    
  3. You will also notice strange behavior by looking at the sequence number for the LSAs that are received from 50.0.07, which is the advertising router. Review what other LSAs are received from 50.0.0.7. By entering the show ip ospf database adv-router 50.0.0.7 command several times in a row, you will notice that the entries vary quickly, as shown in the following example.
    r5# show ip ospf database adv-router 50.0.0.7
    
                OSPF Router with ID (50.0.0.5) (Process ID 1)
    
                    Router Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    50.0.0.7        50.0.0.7        307         0x8000000D 0xDF45   6
    
                    Type-5 AS External Link States
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    120.0.0.0       50.0.0.7        9           0x8000011B 0xA42F   0
    
    
    
    r5# show ip ospf database network adv-router 50.0.0.7
    
                OSPF Router with ID (50.0.0.5) (Process ID 1)
    r5# show ip ospf database network adv-router 50.0.0.7
    
                OSPF Router with ID (50.0.0.5) (Process ID 1)
    

    This last output does not show anything. Either the route is flapping or there is a problem of another kind, most probably a duplicate router id within the OSPF domain.

  4. Issue the show ip ospf database command to view the external LSAs advertised by 50.0.0.7.
    r5# show ip ospf database external adv-router 50.0.0.7
    
                OSPF Router with ID (50.0.0.5) (Process ID 1)
    
                    Type-5 AS External Link States
    
      Delete flag is set for this LSA
      LS age: MAXAGE(3600)
      Options: (No TOS-capability, DC)
      LS Type: AS External Link
      Link State ID: 120.0.0.0 (External Network Number )
      Advertising Router: 50.0.0.7
      LS Seq Number: 80000136
      Checksum: 0xA527
      Length: 36
      Network Mask: /16
            Metric Type: 2 (Larger than any link state path)
            TOS: 0 
            Metric: 16777215 
            Forward Address: 0.0.0.0
            External Route Tag: 0
    
    r5# show ip ospf database  external adv-router 50.0.0.7
    
                OSPF Router with ID (50.0.0.5) (Process ID 1)
    r5#
    
  5. To verify this, look at the SPF calculation reasons. X means that SPF runs every 10 seconds because of an External LSA (type 5) flap and indeed, you see that SPF is running.
    r5# show ip ospf statistic
      Area 0: SPF algorithm executed 2 times
    
      SPF calculation time
    Delta T   Intra D-Intra Summ    D-Summ  Ext     D-Ext   Total   Reason
    00:47:23   0    0       0       0       0       0       0       X
    00:46:33   0    0       0       0       0       0       0       X
    00:33:21   0    0       0       0       0       0       0       X
    00:32:05   0    0       0       0       0       0       0       X
    00:10:13   0    0       0       0       0       0       0       R, SN, X
    00:10:03   0    0       0       0       0       0       0       R, SN, X
    00:09:53   0    0       0       0       0       0       0       R, 
    00:09:43   0    0       0       0       0       0       0       R, SN, X
    00:09:33   0    0       0       0       0       0       0       X
    00:09:23   0    0       0       0       0       0       0       X
    
  6. It is known that the problem is outside the current area. Turn your focus on the ABR. Telnet to the ABR Router 2 in order to have more visibility on other areas than OSPF area 0. Issue the show ip ospf border-routers and show ip ospf database network adv-router commands.
    r2# show ip ospf border-routers 
    
    OSPF Process 1 internal Routing Table
    
    Codes: i - Intra-area route, I - Inter-area route
    
    i 50.0.0.7 [20] via 192.168.2.1, Ethernet0/0, ASBR, Area 1, SPF 25
    
    
    
    r2# show ip ospf database network adv-router 50.0.0.7 
    
                OSPF Router with ID (50.0.0.2) (Process ID 1)
    
                    Net Link States (Area 1)
    
      Routing Bit Set on this LSA
      LS age: 701
      Options: (No TOS-capability, DC)
      LS Type: Network Links
      Link State ID: 192.168.1.2 (address of Designated Router)
      Advertising Router: 50.0.0.7
      LS Seq Number: 80000001
      Checksum: 0xBC6B
      Length: 32
      Network Mask: /24
            Attached Router: 50.0.0.7
            Attached Router: 50.0.0.1
    
  7. The faulty router is on the same LAN as 50.0.0.1. It must be Router 6. Issue the show ip ospf command.
    r6# show ip ospf
     Routing Process "ospf 1" with ID 50.0.0.7
     Supports only single TOS(TOS0) routes
     Supports opaque LSA
     It is an autonomous system boundary router.
    
  8. Once the faulty router is found, refer to the Single Area Network section of this document to correct the problem.

Related Information



Updated: Oct 13, 2004Document ID: 23862



softmap 发表于:2005.03.23 17:36 ::分类: ( 初始分类 ) ::阅读:(324次) :: 评论 (0)
===========================================================
Introduction to Optical Fibers, dB, Attenuation and Measurements
===========================================================

http://www.cisco.com/en/US/tech/tk482/tk607/technologies_tech_note09186a008011b406.shtml

Document ID: 29000


-->


Contents


Introduction

This document is a quick reference to some of the formulas and important information that are useful in understanding optical technologies. It focuses on decibels (dB), decibels per milliwatt (dBm), attenuation and measurements, and provides an introduction to optical fibers.

Prerequisites

This document has no specific prerequisites.

Hardware and Software Versions

The information in this document is not based on specific software or hardware versions.

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

    What is a Decibel?

    A decibel (dB) is a unit used to express relative differences in signal strength. A decibel is expressed as the base 10 logarithm of the ratio of the power of two signals:

    dB = 10 x Log10 (P1/P2)

    where Log10 is the base 10 logarithm, and P1 and P2 are the powers to be compared.

    Note: Log10 is different from the Neparian Logarithm (Ln or LN) base e logarithm.

    Signal amplitude can also be expressed in dB. Since power is proportional to the square of a signal's amplitude, dB is expressed as follows:

    dB = 20 x Log10 (V1/V2)

    where V1 and V2 are the amplitudes to be compared.

    1 Bell (not currently used) = Log10 (P1/P2)

    1 decibel (dB) = 1 Bell / 10 = 10 * Log10 (P1/P2)

    dBr = dB (relative) = dB = 10 * Log10 (P1/P2)

    Base 10 Logarithm Rules
    Log10 (AxB) = Log10 (A) + Log10 (B)
    Log10 (A/B) = Log10 (A) - Log10 (B)
    Log10 (1/A) = - Log10 (A)
    Log10 (0,01) = - Log10 (100) = -2
    Log10 (0,1) = - Log10(10) = - 1
    Log10 (1) = 0
    Log10 (2) = 0,3
    Log10 (4) = 0,6
    Log10 (10) = 1
    Log10 (20) = 1,3
    Log10 (2 x 10) = Log10 (2) + Log10 (10) = 1 + 0,3
    Log10 (100) = 2
    Log10 (1 000) = 3
    Log10 (10 000) = 4

    dB

    Logarithm and dB (decibel)
    Power Ratio
    dB = 10 x Log10 (Power Ratio)
    AxBx dB = 10 x Log10(A) + 10 x Log10(B)
    A/Bx dB = 10 x Log10(A) - 10 x Log10(B)
    1/Ax dB = + 10 x Log10 (1/A) = - 10 x Log10 (A)
    0,01- 20 dB = - 10 x Log10(100)
    0,1- 10 dB = 10 x Log10 (1)
    10 dB = 10 x Log10 (1)
    23 dB = 10 x Log10 (2)
    46 dB = 10 x Log10 (4)
    1010 dB = 10 x Log10 (10)
    2013 dB = 10 x (Log10 (10) + Log10 (2))
    10020 dB = 10 x Log10 (100)
    1 00030 dB = 10 x Log10 (1 000)
    10 00040 dB = 10 x Log10 (10 000)

    Decibels in Milliwatts (dBm)

    dBm = dB milliwatt = 10 x Log10 (Power in mW / 1 mW)

    Power

    Ratio

    dBm = 10 x
    Log10 (Power in mW / 1 mW)

    1 mW

    1 mW / 1 mW = 1

    0 dBm = 10 x Log10 (1)

    2 mW

    2 mW / 1 mW = 2

    3 dBm = 10 x Log10 (2)

    4 mW

    4 mW/1mW=4

    6 dBm = 10 x Log10 (4)

    10 mW

    10 mW/1mW=10

    10 dBm = 10 x Log10 (10)

    0,1 W

    100 mW/1mW=100

    20 dBm = 10 x Log10 (100)

    1 W

    1000 mW/1mW=1000

    30 dBm = 10 x Log10 (1 000)

    10 W

    10 000mW/1mW=10 000

    40 dBm = 10 x Log10 (10 000)

    Decibels Referencing One Watt (dBW)

    dBW = dB Watt = 10 x Log10 (Power in W / 1 W)

    Power

    Ratio

    dBW = 10 x Log10 (Power in W / 1 W)

    1 W

    1 W / 1 W = 1

    0 dBW = 10 x Log10 (1)

    2 W

    2 W / 1 W = 2

    3 dBW = 10 x Log10 (2)

    4 W

    4 W / 1 W = 4

    6 dBW = 10 x Log10 (4)

    10 W

    10 W / 1 W = 10

    10 dBW = 10 x Log10 (10)

    100 mW

    0,1 W / 1 W = 0,1

    -10 dBW = -10 x Log10 (10)

    10 mW

    0,01 W / 1 W = 1/100

    -20 dBW = -10 x Log10 (100)

    1 mW

    0,001W/1W=1/1000

    -30 dBW = -10 x Log10 (1000)

    Power/Voltage Gains

    We can compare the power and voltage gains in the following table:

    Power/Voltage Gain

    dB

    Power Ratio

    Voltage Ratio

    dB

    Power Ratio

    Voltage Ratio

    0

    1,00

    1,00

    10

    10,00

    3,16

    1

    1,26

    1,12

    11

    12,59

    3,55

    2

    1,58

    1,26

    12

    15,85

    3,98

    3

    2,00

    1,41

    13

    19,95

    4,47

    4

    2,51

    1,58

    14

    25,12

    5,01

    5

    3,16

    1,78

    15

    31,62

    5,62

    6

    3,98

    2,00

    16

    39,81

    6,31

    7

    5,01

    2,24

    17

    50,12

    7,08

    8

    6,31

    2,51

    18

    63,10

    7,94

    9

    7,94

    2,82

    19

    79,43

    8,91

    10

    10,00

    3,16

    20

    100,00

    10,00

    With this information, we can define the following formula:

    Attenuation (dB) = 10 x Log10(P in/P out) = 20xLog10(V in/V out)

    Gain (dB) = 10 x Log10(P out/P in) = 20 x Log10(V out/V in)

    dB & dBm Calculator


    Ohm


    Optical Fiber Structure

    Optical fiber is an information-carrying medium made of silica-based glass. It consists of a core surrounded by cladding. The central part of the fiber, the core, has a refractive index of N1, and the cladding which surrounds the core has a lower refractive index of N2. When light is launched into the fiber, the cladding confines the light to the fiber core and the light travels down the fiber by internal reflection between the boundaries between the core and the cladding.

    Fiber Type

    The mainstream fibers manufactured and marketed today are singlemode (SM) and multimode (MM). The diagram below provides more information on both of these fiber types.

    Wavelength

    A small amount of light is injected into the fiber. This falls into visible wavelength (from 400nm to 700nm) and near infrared wavelength (from 700nm to 1700nm) in the electromagnetic spectrum shown here.

    There are four special wavelengths that can be used for fiber optic transmission with low optical loss levels.

    Windows
    WavelengthLoss
    1st wavelength850nm3dB/km
    2nd wavelength1310nm0.4dB/km
    3rd wavelength1550nm (C band)0.2dB/km
    4th wavelength1625nm (L band)0.2dB/km

    Optical Power

    To measure optical loss, we use two units such as dBm and dB. dBm is the actual power level referred to in milliwatts and dB (decibel) is the difference between the powers.

    If the optical input power is P1 (dBm) and the optical output power is P2 (dBm), the power loss is P1 - P2 dB. You can see how much power is lost between input and output by referring to this dB value in the power conversion table.

    For example, when direct line (LD) optical input into the fiber is 0dBm and output power is -15dBm, optical loss for the fiber is calculated as follows:

    InputOutput Optical Loss
    0dBm -(-15dBm)=15dB

    In the power conversion table, 15dB for optical loss equals 96.8 percent of lost optical power. Therefore, only 3.2 percent of optical power remains by traveling through the fiber.

    dB

    Power Out as a % of Power In

    % of Power lost

    Remarks

    1

    79%

    21%

    -

    2

    63%

    37%

    -

    3

    50%

    50%

    1/2 the power

    4

    40%

    60%

    -

    5

    32%

    68%

    -

    6

    25%

    75%

    1/4 the power

    7

    20%

    80%

    1/5 the power

    8

    16%

    84%

    1/6 the power

    9

    12%

    88%

    1/8 the power

    10

    10%

    90%

    1/10 the power

    11

    8.0%

    92%

    1/12 the power

    12

    6.3%

    93.7%

    1/16 the power

    13

    5.0%

    95%

    1/20 the power

    14

    4.0%

    96.0%

    1/25 the power

    15

    3.2%

    96.8%

    1/30 the power

    Understanding Insertion Loss

    In any fiber optic interconnection, some loss occurs. Insertion loss for a connector or splice is the difference in power that is seen by the insertion of the device into the system. For example, take a length of fiber and measure the optical power through it. Now cut the fiber in half, terminate the fibers and connect them, and re-measure the power. The difference between the first reading (P1) and the second (P2) is the insertion loss-the loss of optical power contributed by inserting the connector into the line. This is measured as follows:

    IL (dB) = 10 Log10 (P2 / P1)

    There are two important things to understand about insertion loss:

    • The specified insertion loss is for identical fibers. If the core diameter or the NA of the transmitting side is larger than the diameter or NA of the receiving fiber, there is additional loss.

      Ldia = 10 Log10 (diar/diat)²

      LNA = 10 Log10 (NAr/NAt)²

      where:

      Ldia = Loss diameter

      diar = diameter receive

      diat = diameter transmit

      LNA = Loss on optical fiber

      Additional loss can occur from Fresnel reflections. These occur when two fibers are separated so that a discontinuity exists in the refractive index. For two glass fibers separated by an air gap, Fresnel reflections are 0.32 dB.

    • Loss depends on the launch and receives conditions in the two fibers being joined. In a short launch, the fiber can be overfilled with optical energy carried in both the cladding and core. Over distance, this excess energy is lost until the fiber reaches a condition known as equilibrium mode distribution (EMD). In the long launch, the fiber has already reached EMD, so the excess energy is already stripped away and is not present at the connector.

      Light crossing the fiber-to-fiber junction of an interconnection may again overfill the fiber with excess cladding modes that will quickly be lost. This is the short-receive condition. If you measure the power output of a short-receive fiber, you will see extra energy that will not be propagated far. The reading is therefore misleading. Similarly, if the length of the receive fiber is long enough to reach EMD, the insertion loss reading may be higher, but will reflect actual application conditions.

      EMD (long launch and receive) can be easily simulated by wrapping the fiber around a mandrel five times. This strips the cladding modes.

    Calculating a Power Budget

    A rough estimate of a link power budget can be made by allowing 0.75 dB for each fiber-to-fiber connection and assuming that fiber loss is proportional with length in the fiber. If you want more accurate details click here.

    For a 100 meter run with three patch panels and 62.5/125 fiber having a loss of 3.5 dB/km, the total loss is 2.6 dB:

    Fiber: 3.5 dB/km = 0.35 dB for 100 meters

    Patch Panel 1 = 0.75 dB

    Patch Panel 2 = 0.75 dB

    Patch Panel 3 = 0.75 dB

    Total = 2.6 dB

    Measured loss is normally less. For example, the average insertion loss for an AMP SC connector is 0.3 dB. This being so, the link loss is only 1.4 dB. It does not matter if you are running Ethernet at 10 Mbps or ATM at 155 Mbps. The loss is the same.

    Optical time-domain reflectometry (OTDR) is a popular certification method for fiber systems. The OTDR injects light into the fiber and then graphically displays the results of detected back-reflected light. By measuring elapsed transit time of reflected light, the OTDR can calculate the distance to different events. The visual display allows determination of loss per unit length, evaluation of splices and connectors, and fault location. Capabilities, such as zooming in to certain locations, allow a close-up picture of portions of the link.

    While power meters and signal injectors can be used for many link certifications and evaluations, OTDRs provide a powerful diagnostic tool unsurpassed at giving a comprehensive picture of the link. But OTDR requires more training and some skill at interpreting the display.


    Related Information



    Updated: May 03, 2004Document ID: 29000




softmap 发表于:2005.03.23 17:33 ::分类: ( 初始分类 ) ::阅读:(422次) :: 评论 (0)
===========================================================
Measuring the Optical Level
===========================================================

http://www.cisco.com/warp/public/127/measure.html

Document ID: 16150


Contents

Introduction
Prerequisites
Requirements
Components Used
Conventions
Measuring the Optical Level
Determining the Power Budget
Related Information

Introduction

This document discusses the options for measuring the optical level of a signal for optical links between Cisco routers. It describes which command to use to measure signal level, and provides a reference for determining attenuation and power budget.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

Conventions

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

Measuring the Optical Level

Only Gigabit Switch Router (GSR) Engine 4 line cards 1xOC192 and 4xOC48 have built-in power monitoring capabilities. Issue the show controllers optics command to view the measured transmit and receive values.

The following sample output was captured on the 4xOC48 line card for the GSR.

LC-Slot1#show controllers optics
Rx AC+DC optical power in mWs or dBms
     Port 0 =   0.000 mW
     Port 1 =   0.000 mW
     Port 2 =   0.000 mW
     Port 3 =   0.000 mW
 
Tx laser diode forward bias current I(F) in milliamps
     Port 0 =   0.000 mA
     Port 1 =   0.000 mA
     Port 2 =   0.000 mA
     Port 3 =   0.000 mA

The following sample output was captured on the 1xOC192 line card for the GSR.

LC-Slot4#show controllers optics
Rx AC+DC optical power in mWs or dBms
   AC+DC = -  1.611 dBm
 
Rx AC optical power in mWs or DBMS
   AC =   0.000 mW
Tx optical power in mWs or DBMS
   power = -  8.239 dBm
TX laser diode forward bias current I(F) in milliamps
   current = 105.830 mA
TX laser diode temperature in degrees centigrade
   temperature =  61.889 C

In addition, the 1xOC-48c/STM-16 POS and 1xOC-48 channelized STS-12c/STM-4, STS-3c/STM-1 or DS3/E3 POS Internet Services Engine (ISE) line cards for the Cisco 12000 Series support power monitoring. Use the show controllers <interface> command to view the current levels.

     12404#show diag sum     
     SLOT 1  (RP/LC 1 ): 1 Port ISE Packet Over SONET OC-48c/STM-16 Single 
     Mode/SR SC connector 

12404#show controller pos 1/0     
     POS1/0 
     SECTION 
       LOF = 0          LOS    = 0                            BIP(B1) = 0 
     LINE 
       AIS = 0          RDI    = 0          FEBE = 0          BIP(B2) = 0 
     PATH 
       AIS = 0          RDI    = 0          FEBE = 0          BIP(B3) = 0 
       LOP = 0          NEWPTR = 0          PSE  = 0          NSE     = 0 
       
     Active Defects: None 
     Active Alarms:  None 
     Alarm reporting enabled for: SF SLOS SLOF B1-TCA B2-TCA PLOP B3-TCA 
       
     Framing: SONET 
     APS 
       
       COAPS = 0          PSBF = 0 
       State: PSBF_state = False 
       ais_shut = FALSE 
       Rx(K1/K2): 00/00  S1S0 = 03, C2 = FF 
       Remote aps status (none); Reflected local aps status (none) 
     CLOCK RECOVERY 
       RDOOL = 0 
       State: RDOOL_state = False 
     PATH TRACE BUFFER : UNSTABLE 
       Remote hostname : 
       Remote interface: 
       Remote IP addr  : 
       Remote Rx(K1/K2):   /    Tx(K1/K2):   / 
       
     BER thresholds:  SF = 10e-3  SD = 10e-6 
     TCA thresholds:  B1 = 10e-6  B2 = 10e-6  B3 = 10e-6 
                                                                                      
     Optical Power Monitoring 
         Laser Bias = 2.8 mA 
         Receive Power = -32.04 dBm (+/- 2 dBm)

The benefit of built-in power monitoring is that you can view the actual optical level seen by the card, rather than only the measured value before the fiber is attached to the line card. In rare circumstances, a dirty receive interface can lead to different values on the card than on the wire and in turn to high error rates.

For all other cards, ensure the receiver is clean. Ensure you use the same drop cable with the tester and the card.

Note:Over time, the power of the sender (or last repeater) and receiver sensitivity can fluctuate and fall out of range. In addition, frequently handling the connection can increase the chances of a degraded signal.

Determining the Power Budget

The following publications contain information on determining attenuation and Power Budget (PB).

  • T1E1.2/92-020R2 ANSI, the Draft American National Standard for Telecommunications entitled Broadband ISDN Customer

  • Installation Interfaces: Physical Layer Specification

  • Power Margin Analysis, AT&T Technical Note, TN89-004LWP, May 1988


Related Information



softmap 发表于:2005.03.23 17:31 ::分类: ( 初始分类 ) ::阅读:(403次) :: 评论 (0)
===========================================================
Troubleshooting Duplicate Router IDs with OSPF
===========================================================

http://www.cisco.com/en/US/customer/tech/tk365/technologies_tech_note09186a0080117102.shtml

Document ID: 23862


-->


Contents

Introduction
Router ID
Troubleshooting
Related Information

Introduction

This document explains how a router running Open Shortest Path First (OSPF) selects a router ID, in what packets this value is sent, and how to troubleshoot router log messages that report duplicate IDs.

Prerequisites

This document requires a basic understanding of IP routing protocols and the OSPF routing protocol in general. For further information about IP routing protocols and OSPF, refer to Routing Basics and OSPF Routing Protocol respectively.

Hardware and Software Versions

OSPF can be configured in all routers, such as the 2500 and 2600 series, and Layer 3 switches. This document is based on Cisco IOS® Software Release 12.2.

Router ID

By default, when the OSPF process initializes, it selects the highest IP address on a router as the router ID for the OSPF process. The router ID uniquely identifies a router within an OSPF domain.

As explained in the Cisco IOS Software Release 12.2 Configuration Guides, OSPF uses the largest IP address configured on the interfaces as its router ID. If the interface associated with this IP address is ever brought down, or if the address is removed, the OSPF process must recalculate a new router ID and resend all its routing information out its interfaces.

If a loopback interface is configured with an IP address, the Cisco IOS software will use this IP address as its router ID, even if other interfaces have larger IP addresses. Greater stability in the routing table is achieved, because loopback interfaces never go down.

OSPF automatically prefers a loopback interface over any other kind, and it chooses the highest IP address among all loopback interfaces. If there are no loopback interfaces present, the highest IP address in the router is chosen. The OSPF cannot be directed to use any particular interface. Once the router ID is elected it does not change unless the OSPF process restarts or the router is reloaded.

Note: If there is not an interface with a valid IP address in an up/up state when it starts, OSPF reports "can't allocate router-id" error messages to the log.

The following commands are used to view the router ID.

R2-AGS# show ip ospf interface e0 
     Ethernet0 is up, line protocol is up 
       Internet Address 1.1.1.2 255.255.255.0, Area 0 
       Process ID 1, Router ID 5.5.5.5, Network Type BROADCAST, Cost: 10 
       Transmit Delay is 1 sec, State BDR, Priority 1 
       Designated Router (ID) 6.6.6.6, Interface address 1.1.1.1 
       Backup Designated router (ID) 5.5.5.5, Interface address 1.1.1.2 
       Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 
         Hello due in 0:00:07 
       Neighbor Count is 1, Adjacent neighbor count is 1 
         Adjacent with neighbor 6.6.6.6  (Designated Router)

The default behaviour of selecting the highest IP address on a router as the router ID can be changed by using the router-id OSPF command introduced in Cisco IOS version 12.0(1)T; refer to bug ID CSCdi38380 (registered customers only). With the OSPF router-id command, the router ID of the OSPF process is the one manually selected. In the example below, the router ID for the OSPF process is 10.10.10.10.

!
router ospf 100
 router-id 10.10.10.10

To check the router ID the show ip ospf database command can also be used as shown:

Router# show ip ospf database
OSPF Router with ID (10.10.10.10) (Process ID 100)

Value Transmission

Before troubleshooting duplicate router IDs with OSPF can be explained, you will need to understand the five OSPF packet types. These packet types are listed below:

  • Hello
  • Database Description (DD)
  • Link State Request
  • Link State Update
  • Link State Acknowledgment

All OSPF packets begin with a standard 24-octet header. Note that the header includes a "Router ID" field which indicates the unique ID of the route originating the OSPF packet.

Version   |   Type    |    Packet Length
Router ID
Area ID
Checksum    |     AuType
Authentication
Authentication
Packet Data

Typically, OSPF packets carry Link-State Advertisements (LSAs), which describe all of the router's links or interfaces, and the state of the links. While all LSAs start with the same header, a single LSA is identified uniquely by the following three fields:

  • Type
  • Link State ID
  • Advertising Router

OSPF uses Link State Update packets to flood LSAs and send LSAs in response to Link State Requests. To propagate OSPF LSAs beyond the network on which they were originated, an OSPF neighbor is responsible for reencapsulating the appropriate LSAs in new Update packets for further flooding. Thus, a duplicate router ID may be detected by, and propagated by multiple routers.

To determine if there is a duplicate router ID, use the following steps:

  1. Execute the show ip ospf database router x.x.x.x command on the router that should have this ID. This command displays the contents of a router LSA (Type 1), which advertises a router and all of its directly connected interfaces. Take a moment to understand the router's interface list and assigned IP addresses.

  2. Execute the show ip ospf database router x.x.x.x command a few times on the router reporting the duplicate. (The Shortest Path First (SPF) algorithm can run as frequently as once every 10 seconds.)

By capturing these commands, you should be able to catch changing information. Shown below is an example output of the show ip ospf database router command.

r2.2.2.2# show ip ospf database router 1.1.1.1 

      OSPF Router with ID (2.2.2.2) (Process ID 2) 
  

         Router Link States (Area 0) 

LS age: 279 
Options: (No TOS-capability, DC) 
LS Type: Router Links 
Link State ID: 1.1.1.1 
!--- For router links, the Link State ID is always the same as the 
!--- advertising router (next line). 
Advertising Router: 1.1.1.1 
!--- This is the router ID of the router which created 
!--- this LSA. 
LS Seq Number: 8000001A 
Checksum: 0xA6FA 
Length: 48 
Number of Links: 2 

Link connected to: another Router (point-to-point) 
!--- This line shows that this router (1.1.1.1) is a neighbor 
!--- with 2.2.2.2. 
(Link ID) Neighboring Router ID: 2.2.2.2 
(Link Data) Router Interface address: 0.0.0.12 
!--- In case of an unnumbered link, use the Management Information 
!--- Base (MIB) II IfIndex value, which usually starts with 0. 
Number of TOS metrics: 0 
 TOS 0 Metrics: 64 
!--- This is the OSPF cost of the link connecting the two routers. 

Link connected to: a Stub Network 
!--- This entry represents the Ethernet segment 4.0.0.0/8. 
(Link ID) Network/subnet number: 4.0.0.0 
(Link Data) Network Mask: 255.0.0.0 
Number of TOS metrics: 0 
TOS 0 Metrics: 10 
!--- This is the OSPF cost of the Ethernet segment.

Known Issue

When two routers are using the same router ID in an OSPF domain, routing may not work correctly. Cisco bug IDs CSCdr61598 and CSCdu08678 enhanced the detection and reporting mechanisms of duplicate router IDs. Registered users can view additional information about these Bug IDs by accessing the Bug Toolkit, linked at the Tools & Resources page. There are two duplicate router ID types:

  1. Area duplicate router ID
    %OSPF-4-DUP_RTRID1: Detected router with duplicate router ID 100.0.0.2 in area 0 

    Explanation: OSPF detected a router that has the same router ID in the area.

    Recommended Action: The OSPF router ID should be unique. Make sure all routers in the area have unique router ID.

  2. Type 4 LSA
    %OSPF-4-DUP_RTRID2: Detected router with duplicate router ID 100.0.0.2 in Type-4 LSA advertised by 100.0.0.1

    Explanation: OSPF detected a router that has the same router ID in the other area. This router was advertised in Type-4 LSA.

    Recommended Action: The OSPF router ID should be unique. Make sure all Autonomous System Border Routers (ASBRs) in remote areas have a unique router ID.

When a router acts as both an Area Border Router (ABR) and an ASBR in an OSPF domain, false reports of duplicate router IDs may occur, as shown in the example log message below.

OSPF-4-DUP_RTRID_AS Detected router with duplicate router ID 10.97.10.2 in Type-4 LSA advertised by 10.97.20.2

Cisco bug ID CSCdu71404 resolves this problem of OSPF domain-wide detection. Registered users can view additional information about these Bug IDs by accessing the Bug Toolkit, linked at the Tools & Utilities page.

  • If a router receives a Type 4 LSA and the Link State ID equals the router's own router ID and the router is not an ABR, then a valid router ID duplication in the remote area is occurring, and the error message should be logged.

  • If the router is not an ABR, it can receive a Type 4 LSA which tells it about itself from the other ABR. This condition does not represent a duplicate router ID problem, and the error message should not be logged.

A Type 4 LSA is also known as an ASBR Summary LSA. These LSAs can be observed by issuing the show ip ospf database asbr-summary command, as shown in the example below.

To advertise reachability of an ASBR into other areas, the ABR creates (Type 4) ASBR Summary LSAs.

r2.2.2.2# show ip ospf database asbr-summary 1.1.1.1 

           OSPF Router with ID (2.2.2.2) (Process ID 2) 

                    Summary ASB Link States (Area 0) 

      LS age: 266 
      Options: (No TOS-capability, DC) 
      LS Type: Summary Links(AS Boundary Router) 
      Link State ID: 1.1.1.1 (AS Boundary Router address) 
      !--- ABR (Router 2.2.2.2) is advertising that it knows how 
      !--- to reach the ASBR (Router 1.1.1.1). 
      Advertising Router: 2.2.2.2 
      LS Seq Number: 80000001 
      Checksum: 0x935C 
      Length: 28 
      Network Mask: /0 
            TOS: 0  Metric: 64 
     !--- The ABR's cost to reach the ASBR. 

If the LSA is a Type 4, the Link State ID is the router ID of the ASBR being advertised. Refer to How OSPF Propagates External Routes into Multiple Areas for more information.

Troubleshooting

The troubleshooting below was done with a Cisco IOS software version released before the Cisco bug ID CSCdr61598 and CSCdu08678 integration.

Single Area Network

The following image is a representation of the single area network described in the steps below.

 

 

  1. Issue the show proc cpu| include OSPF command. This allows you to see the OSPF processes that are utilizing CPU.
    r4# show proc cpu | include OSPF
       3        4704       473       9945  1.38%  0.81%  0.68%   0 OSPF Hello       
      71        9956      1012       9837  1.47%  1.62%  1.41%   0 OSPF Router     
    

    As seen in the example above, there is high CPU for OSPF. This shows that there must be something wrong with either the link stability or a duplicate router-id.

  2. Issue the show ip ospf statistics command. This allow you to see if the SPF algorithm is being run more than ordinary.
    r4# show ip ospf