Problem
You want to use OSPF on a dial interface, but you don't want the protocol traffic to keep the link active unnecessarily.
Solution
In this example, Router4 will dial into Router1 by using an ISDN circuit:
Router4#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router4(config)#username Router1 password 0 cisco Router4(config)#interface BRI0 Router4(config-if)#ip address 192.168.15.4 255.255.255.0 Router4(config-if)#encapsulation ppp Router4(config-if)#ip ospf demand-circuit Router4(config-if)#dialer map ip 192.168.15.1 broadcast 4165550000 Router4(config-if)#dialer-group 1 Router4(config-if)#isdn switch-type basic-ni Router4(config-if)#isdn spid1 416555001000 4165550010 Router4(config-if)#isdn spid2 416555001100 4165550011 Router4(config-if)#ppp authentication chap Router4(config-if)#ppp multilink Router4(config-if)#exit Router4(config)#dialer-list 1 protocol ip permit Router4(config)#router ospf 87 Router4(config-router)#network 192.168.15.0 0.0.0.255 area 10 Router4(config-router)#exit Router4(config)#end Router4#
The configuration of the other router is similar, although it does not require the ip ospf demand-circuit command:
Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#username Router4 password 0 cisco Router1(config)#interface BRI0/0 Router1(config-if)#ip address 192.168.15.1 255.255.255.0 Router1(config-if)#encapsulation ppp Router1(config-if)#dialer-group 1 Router1(config-if)#isdn switch-type basic-ni Router1(config-if)#isdn spid1 416555000000 4165550000 Router1(config-if)#isdn spid2 416555000100 4165550001 Router1(config-if)#ppp authentication chap Router1(config-if)#ppp multilink Router1(config-if)#exit Router1(config)#dialer-list 1 protocol ip permit Router1(config)#router ospf 87 Router1(config-router)#network 192.168.15.0 0.0.0.255 area 10 Router1(config-router)#exit Router1(config)#end Router1#
Discussion
In this example, we have used ISDN to provide a specific example for an OSPF Demand Circuit. In fact, you could use a similar configuration anywhere that you want to make the OSPF neighbor relationships and routing information remain, even when the link becomes unavailable. Most of the time, of course, this means some sort of dial link. For more information on the ISDN and dialup portions of this configuration, please refer to Chapter 13.
The critical command is the ip ospf demand-circuit command, which we have configured on the BRI interface of one of the routers:
Router4(config)#interface BRI0 Router4(config-if)#ip ospf demand-circuit
You can see the effect of this command with the show ip ospf interface command:
Router4#show ip ospf interface Bri0 BRI0 is up, line protocol is up (spoofing) Internet Address 192.168.15.4/24, Area 10 Process ID 87, Router ID 172.18.6.4, Network Type POINT_TO_POINT, Cost: 1562 Configured as demand circuit. Run as demand circuit. DoNotAge LSA allowed. 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:03 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 172.18.6.1 (Hello suppressed) Suppress hello for 1 neighbor(s) Router4#
The other router also knows that this is a demand circuit, even though it is not explicitly configured as such:
Router1#show ip ospf interface Bri0/0 BRI0/0 is up, line protocol is up (spoofing) Internet Address 192.168.15.1/24, Area 10 Process ID 87, Router ID 172.18.6.1, Network Type POINT_TO_POINT, Cost: 1562 Run as demand circuit. DoNotAge LSA allowed. 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:09 Index 5/5, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 2, maximum is 2 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 172.18.6.4 (Hello suppressed) Suppress hello for 1 neighbor(s) Router1#
The OSPF neighbor relationship and the routing table remain intact after the dialer interface has dropped due to inactivity:
Router4#show dialer BRI0 - dialer type = ISDN Dial String Successes Failures Last DNIS Last status 4165550000 6 2 00:05:48 successful 0 incoming call(s) have been screened. 0 incoming call(s) rejected for callback. BRI0:1 - dialer type = ISDN Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is idle BRI0:2 - dialer type = ISDN Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is idle Router4#
The show ip ospf neighbor command confirms that even though the dial connection has dropped, the neighbor relationship is still active:
Router4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 172.18.6.1 1 FULL/ - - 192.168.15.1 BRI0 Router4#
Notice in particular that the output of this command shows a dead time for this neighbor of "-", indicating that this neighbor will not time out due to the absence of OSPF Hello packets. Also, the routes that have been learned through this link are maintained in the routing table:
Router4#show ip route ospf 10.0.0.0/32 is subnetted, 1 subnets O 10.1.2.1 [110/1563] via 192.168.15.1, 00:02:41, BRI0 O 10.1.1.1 [110/1563] via 192.168.15.1, 00:02:41, BRI0 Router4#
And because the next hop router shown in each of the routing table entries is the one listed in the dialer-map statement, any traffic directed to one of these prefixes will automatically activate the interface again:
Router4#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: . 01:05:14: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up 01:05:15: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 36/36/36 ms Router4# 01:05:15: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up 01:05:16: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, chang ed state to up Router4#
There are a few cautions that you should be aware of when dealing with demand circuits. The first is that the configuration in the example will only allow Router4 to dial to Router1. If Router1 has traffic for Router4, it cannot be delivered. To address this change, you should configure a dialer-map statement on Router1, as well as Router4. The second and more serious potential issue is that, by its very nature, a demand-circuit will not keep an up-to-date routing table. If there are topology changes on the other side of the dial link, the router will not know until it eventually has a reason to dial and obtain the latest OSPF database.
See Also
Chapter 13
Router Configuration and File Management
Router Management
User Access and Privilege Levels
TACACS+
IP Routing
RIP
EIGRP
OSPF
BGP
Frame Relay
Handling Queuing and Congestion
Tunnels and VPNs
Dial Backup
NTP and Time
DLSw
Router Interfaces and Media
Simple Network Management Protocol
Logging
Access-Lists
DHCP
NAT
First Hop Redundancy Protocols
IP Multicast
IP Mobility
IPv6
MPLS
Security
Appendix 1. External Software Packages
Appendix 2. IP Precedence, TOS, and DSCP Classifications
Index