HELPME: Prefered Routing using Dialer Watch.

by David Sudjiman ~ March 18th, 2007. Filed under: Cisco, helpme.

Have you ever tried to implement dialer watch? Yes, I know this is not the best way to implement dial backup which most people will use floating route. However, for the sake of curiosity, I want to try to create a small scenario where two routers are connected using Frame Relay (FR) link and a dial backup whenever particular route is gone from the routing table.

hostname R1
!
username r2 password 0 cisco
!
isdn switch-type basic-net3
!
interface Loopback0
 ip address 10.10.10.10 255.255.255.255
!
interface Serial0
 bandwidth 64
 no ip address
 encapsulation frame-relay
!
interface Serial0.111 point-to-point
 ip address 131.108.0.1 255.255.255.252
 frame-relay interface-dlci 111
!
interface BRI0
 ip address 131.108.0.5 255.255.255.252
 encapsulation ppp
 dialer idle-timeout 30
 dialer watch-disable 10
 dialer map ip 20.20.20.20 name R2 broadcast 98050041
 dialer watch-group 1
 dialer-group 1
 isdn switch-type basic-net3
 ppp authentication chap
!
router ospf 1
 log-adjacency-changes
 network 10.10.10.10 0.0.0.0 area 0
 network 131.108.0.0 0.0.0.3 area 0
 network 131.108.0.4 0.0.0.3 area 0
!
access-list 101 deny   ospf any any
access-list 101 permit ip any any
dialer watch-list 1 ip 20.20.20.20 255.255.255.255
dialer watch-list 1 delay route-check initial 600
dialer-list 1 protocol ip list 101
!
end
hostname R2
!
username R1 password 0 cisco
!
isdn switch-type basic-net3
!
interface Loopback0
 ip address 20.20.20.20 255.255.255.255
!
interface Serial0
 bandwidth 64
 no ip address
 encapsulation frame-relay
!
interface Serial0.222 point-to-point
 ip address 131.108.0.2 255.255.255.252
 frame-relay interface-dlci 222
!
interface BRI0
 ip address 131.108.0.6 255.255.255.252
 encapsulation ppp
 isdn switch-type basic-net3
 ppp authentication chap
!
router ospf 1
 log-adjacency-changes
 network 20.20.20.20 0.0.0.0 area 0
 network 131.108.0.0 0.0.0.3 area 0
 network 131.108.0.4 0.0.0.3 area 0
!
dialer-list 1 protocol ip permit
!
end
R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1563] via 131.108.0.2, 00:08:13, Serial0.111
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/30 is subnetted, 2 subnets
C       131.108.0.4 is directly connected, BRI0
C       131.108.0.0 is directly connected, Serial0.111

You can see ip 20.20.20.20 is reachable from s0.111. It is where the FR link is.

R1#sh frame-relay pvc

PVC Statistics for interface Serial0 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          1            0            0            0
  Switched       0            0            0            0
  Unused         0            1            0            0

DLCI = 111, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0.111

  input pkts 82            output pkts 83           in bytes 9415
  out bytes 9471           dropped pkts 0           in pkts dropped 0
  out pkts dropped 0                out bytes dropped 0
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0
  out BECN pkts 0          in DE pkts 0             out DE pkts 0
  out bcast pkts 83        out bcast bytes 9471
  pvc create time 00:10:44, last time pvc status changed 00:10:19

Looking at the network diagram above and configuration from each router. We can see that we are watching this particular ip 20.20.20.20/32. If this routing is gone, the dialer watch will initiate to dial using command dialer map ip 20.20.20.20 name R2 broadcast 98050041. Let’s see what happen when I shut R2’s s0.222 down.

R1#debug dialer
Dial on demand events debugging is on
R1#
00:17:22: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Serial0.111 from FULL to DOWN, Neighbor Down: Dead timer expired
00:17:28: DDR: Dialer Watch: watch-group = 1
00:17:28: DDR:    network 20.20.20.20/255.255.255.255 DOWN,
00:17:28: DDR:    primary DOWN
00:17:28: DDR: Dialer Watch: Dial Reason: Primary of group 1 DOWN
00:17:28: DDR: Dialer Watch: watch-group = 1,
00:17:28: DDR:    dialing secondary by dialer map 20.20.20.20 on BR0
00:17:28: BR0 DDR: Attempting to dial 98050041
00:17:28: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:17:28: BR0:1 DDR: Dialer Watch: resetting call in progress
00:17:28: BR0:1 DDR: dialer protocol up
00:17:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up
00:17:34: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on BRI0 from LOADING to FULL, Loading Done
00:17:34: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 98050041 R2

We can see that because of 00:17:28: DDR: network 20.20.20.20/255.255.255.255 DOWN then 00:17:28: BR0 DDR: Attempting to dial 98050041
. Finally, 00:17:34: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on BRI0 from LOADING to FULL, Loading Done, the OSPF state back to FULL.

R1#sh ip route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
C       20.20.20.20 is directly connected, BRI0
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/30 is subnetted, 2 subnets
C       131.108.0.4 is directly connected, BRI0
C       131.108.0.0 is directly connected, Serial0.111

Checking the routing table reveals that 20.20.20.20/32 is now reachable from BRI0.

So far, we can initiate a dial using dialer watch. However, I haven’t been successful to get the BRI0 disconnected when I no shut s0.222 thus making the FR link back up. Let me show show you more of it.

R2(config-subif)#int s0.222
R2(config-subif)#no shut
00:25:34: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Serial0.111 from LOADING to FULL, Loading Done
R1#sh ip route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
C       20.20.20.20 is directly connected, BRI0
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/30 is subnetted, 2 subnets
C       131.108.0.4 is directly connected, BRI0
C       131.108.0.0 is directly connected, Serial0.111

We can see that OSPF manage to get 20.20.20.20 from S0.111 back and not from BRI0. However, when I check on the routing table, it still prefers the directly connected router over OSPF, which is quite reasonable.

00:29:59: BR0:1 DDR: idle timeout
00:29:59: DDR: Dialer Watch: watch-group = 1
00:29:59: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:29:59: DDR:    primary DOWN
00:30:29: BR0:1 DDR: idle timeout
00:30:29: DDR: Dialer Watch: watch-group = 1
00:30:29: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:30:29: DDR:    primary DOWN
00:30:59: BR0:1 DDR: idle timeout
00:30:59: DDR: Dialer Watch: watch-group = 1
00:30:59: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:30:59: DDR:    primary DOWN
00:31:29: %ISDN-6-DISCONNECT: Interface BRI0:1  disconnected from 98050041 R2, call lasted 119 seconds
00:31:29: %LINK-3-UPDOWN: Interface BRI0:1, changed state to down
00:31:29: BR0:1 DDR: disconnecting call
00:31:29: BR0:1 DDR: Dialer Watch: resetting call in progress
00:31:29: DDR: Dialer Watch: watch-group = 1
00:31:29: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:31:29: DDR:    primary DOWN
00:31:29: DDR: Dialer Watch: Dial Reason: Secondary of group 1 DOWN
00:31:29: DDR: Dialer Watch: watch-group = 1,
00:31:29: DDR:    dialing secondary by dialer map 20.20.20.20 on BR0
00:31:29: BR0 DDR: Attempting to dial 98050041
00:31:29: DDR: Dialer Watch: watch-group = 1
00:31:29: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:31:29: DDR:    primary DOWN
00:31:29: DDR: Dialer Watch: Dial Reason: Primary of group 1 DOWN
00:31:29: DDR: Dialer Watch: watch-group = 1,
00:31:30: DDR: Dialer Watch: watch-group = 1
00:31:30: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:31:30: DDR:    primary DOWN
00:31:30: DDR: Dialer Watch: Dial Reason: Secondary of group 1 AVAILABLE
00:31:30: DDR: Dialer Watch: watch-group = 1,
00:31:30: DDR: Dialer Watch: watch-group = 1
00:31:30: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:31:30: DDR:    primary DOWN
00:31:30: DDR: Dialer Watch: Dial Reason: Secondary of group 1 AVAILABLE
00:31:30: DDR: Dialer Watch: watch-group = 1,
00:31:30: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:31:30: BR0:1 DDR: Dialer Watch: resetting call in progress
00:31:30: BR0:1 DDR: dialer protocol up
00:31:30: DDR: Dialer Watch: watch-group = 1
00:31:30: DDR:    network 20.20.20.20/255.255.255.255 UP,
00:31:30: DDR:    primary DOWN
00:31:30: DDR: Dialer Watch: Dial Reason: Primary of group 1 DOWN
00:31:30: DDR: Dialer Watch: watch-group = 1,
00:31:36: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 98050041 R2

Is there someway I can get this BRI0 down and route to 20.20.20.20 back through s0.111?

=========================================================

SOLUTION 1

A friend of mine told me to use Dialer Interface. This is the configuration change on R1

R1#sh run int bri0
!
interface BRI0
 no ip address
 encapsulation ppp
 dialer pool-member 1
 isdn switch-type basic-net3
 ppp authentication chap
end

R1#sh run int dialer 1
!
interface Dialer1
 ip address 131.108.0.5 255.255.255.252
 encapsulation ppp
 dialer pool 1
 dialer idle-timeout 30
 dialer watch-disable 10
 dialer string 98050041
 dialer watch-group 1
 dialer-group 1
 ppp authentication chap
end

This is the routing table before I shut the R2’s s0.222

R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1563] via 131.108.0.2, 00:06:21, Serial0.111
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/30 is subnetted, 2 subnets
C       131.108.0.4 is directly connected, Dialer1
C       131.108.0.0 is directly connected, Serial0.111

And this is what happens when I shut the R2’s s0.222

00:26:56: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Serial0.111 from FULL to DOWN, Neighbor Down: Dead timer expired
00:27:02: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:27:02: %DIALER-6-BIND: Interface BR0:1 bound to profile Di1
00:27:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up
00:27:08: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 98050041 R2
00:27:11: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Dialer1 from LOADING to FULL, Loading Done
R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1786] via 131.108.0.6, 00:00:03, Dialer1
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       131.108.0.6/32 is directly connected, Dialer1
C       131.108.0.4/30 is directly connected, Dialer1
C       131.108.0.0/30 is directly connected, Serial0.111

And this is what happens when I no-shut the R2’s interface.

00:28:25: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Serial0.111 from LOADING to FULL, Loading Done
00:29:02: %ISDN-6-DISCONNECT: Interface BRI0:1  disconnected from 98050041 R2, call lasted 119 seconds
00:29:02: %LINK-3-UPDOWN: Interface BRI0:1, changed state to down
00:29:02: %DIALER-6-UNBIND: Interface BR0:1 unbound from profile Di1
00:29:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to down
00:29:34: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on Dialer1 from FULL to DOWN, Neighbor Down: Dead timer expired
R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1563] via 131.108.0.2, 00:00:05, Serial0.111
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/30 is subnetted, 2 subnets
C       131.108.0.4 is directly connected, Dialer1
C       131.108.0.0 is directly connected, Serial0.111

Finally it works!

======================================================

SOLUTION 2

However, what if I change the BRI0 to only use dialer string and not dialer map and remove the dialer interface?

interface BRI0
 ip address 131.108.0.5 255.255.255.252
 encapsulation ppp
 dialer idle-timeout 30
 dialer watch-disable 10
 dialer string 98050041
 dialer watch-group 1
 dialer-group 1
 isdn switch-type basic-net3
 ppp authentication chap
end

Now, when I try to get the primary link back up, I am still seeing BRI0 route, but this time is has the same metric with s0.111.

R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1563] via 131.108.0.6, 00:00:36, BRI0
                    [110/1563] via 131.108.0.2, 00:00:36, Serial0.111
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       131.108.0.6/32 is directly connected, BRI0
C       131.108.0.4/30 is directly connected, BRI0
C       131.108.0.0/30 is directly connected, Serial0.111

The second solution is quite easy. You can just play with Bandwidth, Delay, and Distance parameter. To make it easy, let try the Bandwidth parameter.

R1’s s0.111 has bandwidth 64, and I make BRI0 has bandwidth 63.

R1(config)#int bri 0
R1(config-if)#bandwidth 63
R1(config-if)#^Z
R1#
R1#clear ip route *
R1#sh ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/1563] via 131.108.0.2, 00:00:02, Serial0.111
     10.0.0.0/32 is subnetted, 1 subnets
C       10.10.10.10 is directly connected, Loopback0
     131.108.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       131.108.0.6/32 is directly connected, BRI0
C       131.108.0.4/30 is directly connected, BRI0
C       131.108.0.0/30 is directly connected, Serial0.111
R1#
00:14:02: %ISDN-6-DISCONNECT: Interface BRI0:1  disconnected from 98050041 R2, call lasted 100 seconds
00:14:02: %LINK-3-UPDOWN: Interface BRI0:1, changed state to down
00:14:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to down
00:14:32: %OSPF-5-ADJCHG: Process 1, Nbr 20.20.20.20 on BRI0 from FULL to DOWN, Neighbor Down: Dead timer expired

It finally works, for the second time!

Leave a Reply