Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular tutorials, news, and study tips about networking, especially about Cisco CCIE related topics. Go ahead, subscribe to the rss feed! You can also receive updates from this blog via email. Thanks for visiting!
A common scenario that you might face when working with routers is the need to have an alternate path for traffic if your main interface goes down. Say for example you have your branch office connected to your main office via Frame-Relay. If this connection goes down, you might want an ISDN connection to be brought up and traffic automatically redirected through that interface.
This is the main idea behind a backup interface. If your main interface goes down, a secondary interface (like ISDN or frame) is brought up and traffic goes through this until connectivity is restored to the main interface. In this article we will be exploring how we can implement such a configuration using the Cisco IOS backup interface command.
We will be using the following topology for this tutorial:

The Dynagen configuration that I am using to demonstrate this is as follows:
ghostios = True
sparsemem = True
model = 3640
[localhost]
[[3640]]
image = \Program Files\Dynamips\images\c3640-jk9o3s-mz.124-12.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
ram = 96
[[ROUTER R1]]
f0/0 = LAN 1
s1/0 = FRAME 1
s1/1 = R2 s1/1
console = 2000
model = 3640
[[ROUTER R2]]
f0/0 = LAN 2
s1/0 = FRAME 2
console = 2001
model = 3640
[[FRSW FRAME]]
1:102 = 2:201
You can download this configuration .net file here.
Let’s set up the basic configuration. We are going to implement a point-to-point frame relay connection, and run EIGRP as our routing protocol.
R1:
hostname R1
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
!
interface Serial1/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no frame-relay inverse-arp
!
interface Serial1/0.12 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 102
!
interface Serial1/1
ip address 192.168.2.1 255.255.255.0
!
router eigrp 1
network 1.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
R2:
hostname R2
!
interface FastEthernet0/0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
no ip address
encapsulation frame-relay
no frame-relay inverse-arp
!
interface Serial1/0.12 point-to-point
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 201
!
interface Serial1/1
ip address 192.168.2.2 255.255.255.0
!
router eigrp 1
network 2.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
Let’s check connectivity and verify our routing table:
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/137/188 ms
R2#sh ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2172416] via 192.168.2.1, 00:05:44, Serial1/1
[90/2172416] via 192.168.1.1, 00:05:44, Serial1/0.12
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/0.12
C 192.168.2.0/24 is directly connected, Serial1/1
Looking at the routing table it looks like R2 has two paths to get to the 1.1.1.0/24 network attached to R1. EIGRP is doing its job and has discovered both paths to that network.
The scenario that we are going to implement is that our frame-relay connection is our main connection. The s1/1 connection is connected to an ISDN modem which we don’t want to send traffic through unless there is a failure on R2’s frame-relay connection.
Let’s have a look at the configuration:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s1/0.12
R2(config-subif)#backup interface s1/1
R2(config-subif)#
*Mar 1 00:39: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.2.1 (Serial1/1) is down: interface down
*Mar 1 00:39: %LINK-5-CHANGED: Interface Serial1/1, changed state to standby mode
*Mar 1 00:39: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
R2#sh int s1/1
Serial1/1 is standby mode, line protocol is down
Hardware is M4T
Internet address is 192.168.2.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:05:13, output 00:05:10, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
430 packets input, 24351 bytes, 0 no buffer
Received 243 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
443 packets output, 23912 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
3 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up
Here we have configured serial 1/1 to be the backup interface for serial 1/0.12 (our frame-relay interface). Serial 1/0.12 is our primary interface and Serial 1/1 is our secondary interface.
You can see that as soon as we configure this the s1/1 interface state was changed to the standby state. It will remain in this state until our main interface serial 1/0.12 goes into the down state.
We can verify the backup configuration using the show backup command:
R2#sh backup
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 normal operation
We can see here that serial 1/0.12 is acting as the primary interface. If that interface enters the down state the secondary interface will brought up.
Let’s test the configuration. We will shut down the main interface. The standby interface will should then be brought up and we will form a EIGRP neighbor relationship with R1 over the standby interface.
Let’s have a look at the current routing table before we take down our main interface.
R2#sh ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2172416] via 192.168.1.1, 00:09:31, Serial1/0.12
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/0.12
You can see above that traffic to the 1.1.1.0/24 subnet is via our frame-relay connection. Let’s take down the interface and verify that the backup configuration is working.
R2(config)#int s1/0
R2(config-if)#shut
R2(config-if)#end
R2#
*Mar 1 00:49: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.1.1 (Serial1/0.12) is down: interface down
*Mar 1 00:49: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:49: %LINK-5-CHANGED: Interface Serial1/0, changed state to administratively down
*Mar 1 00:49: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Mar 1 00:49: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar 1 00:49: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R2#sh backup
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 backup mode
R2#
*Mar 1 00:49: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.2.1 (Serial1/1) is up: new adjacency
Looks great. You can see that as soon as the main interface went down (interface serial 1/0.12) the standby interface was immediately brought up. Using the show backup command above, you can see that we are now operating in backup mode.
R2#sh ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2172416] via 192.168.2.1, 00:00:15, Serial1/1
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, FastEthernet0/0
D 192.168.1.0/24 [90/2681856] via 192.168.2.1, 00:00:15, Serial1/1
C 192.168.2.0/24 is directly connected, Serial1/1
Traffic to the 1.1.1.0/24 will now traverse the secondary interface until the main interface is brought back up.
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/80/212 ms
Let’s have a look and see what happens when the main interface is brought back up.
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s1/0
R2(config-if)#no shut
R2(config-if)#end
R2#
*Mar 1 00:54: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:54: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.1.1 (Serial1/0.12) is up: new adjacency
*Mar 1 00:54: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:54: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.2.1 (Serial1/1) is down: interface down
*Mar 1 00:54: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
*Mar 1 00:54: %LINK-5-CHANGED: Interface Serial1/1, changed state to standby mode
*Mar 1 00:54: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
R2#sh backup
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 normal operation
Looks like it works as advertised! When the main interface for frame-relay is up, our secondary interface is in the standby state. When the main interface goes down, our secondary interface immediately comes up and connectivity to the 1.1.1.0/24 is maintained.
Let’s say that the backup configuration is in a backup state (ie, the main interface has gone down). When the interface comes back up, the secondary interface switches back into a standby state immediately. This might not always be a good idea. Especially if the main interface is a bit flaky. We might want to wait a little while before we go into the standby state again in case the primary interface is flapping.
Let’s configure R2 to switch immediately to s1/1 if the main interface goes down. However if the main interface comes back up, we want to wait 5 minutes before interface s1/1 goes back into the standby state. We can implement this with the backup delay command.
R2:
interface Serial1/0.12 point-to-point
backup delay 0 300
backup interface Serial1/1
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 201
You can see above the backup delay command takes two arguments. The first argument is how long to wait before switching over to the standby interface (in this case 0 seconds ie. immediately). The second argument is how long the standby interface should wait once the main interface comes back up before switching back to the standby state (in this case 300 seconds ie. 5 minutes).
Let’s test it:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s1/0
R2(config-if)#shut
R2(config-if)#en
*Mar 1 01:21: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.1.1 (Serial1/0.12) is down: interface do
*Mar 1 01:21: %LINK-5-CHANGED: Interface Serial1/0, changed state to administratively down
*Mar 1 01:21: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Mar 1 01:21: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar 1 01:21: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R2#sh backu
*Mar 1 01:21:22.955: %SYS-5-CONFIG_I: Configured from console by console
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 backup mode
*Mar 1 01:21: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.2.1 (Serial1/1) is up: new adjacency
So it looks like our configuration is still working, with the standby interface coming up as soon as the main interface goes down.
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s1/0
R2(config-if)#no shut
*Mar 1 01:21: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 01:21: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.1.1 (Serial1/0.12) is up: new adjacency
*Mar 1 01:21: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2#sh backup
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 waiting to revert (288 more seconds)
You can see above, the secondary interface did not reenter the standby state. It will revert to the standby state once the 300 seconds have elapsed. Let’s wait 5 minutes and see if Serial1/1 reverts back to the standby state:
R2#
*Mar 1 01:26: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.2.1 (Serial1/1) is down: interface down
*Mar 1 01:26: %LINK-5-CHANGED: Interface Serial1/1, changed state to standby mode
*Mar 1 01:26: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
R2#
R2#sh backup
Primary Interface Secondary Interface Status
----------------- ------------------- ------
Serial1/0.12 Serial1/1 normal operation
Looks great. So we have a working backup configuration. Hope this helps, now back to labs!
Summary:
Resources:
Hi Arden
I found this a usefull demo on the backup interface command - thanks.
FYI i labbed this up and initially i could not get the backup interface to kick in. Once the primary interface s1/0 was shut i issued a show ip int brief on s1/1 and it showed ’standby mode/disabled’!!!
After some head scratching i realised i had the frame relay interfaces defined as the default ‘point-to-multipoint’. Once changed to point-to-point everything worked fine. So it would seem this functionality does require a p-2-p connection.
Regards
Richard
Hi Arden,
Another use of the backup interface is for a router (or more likely - voice gateways) with multiple ethernet interfaces. Utilising backup interface across the two ethernets effective provides the equivelant of server network teaming. This is useful where you don’t want to run a routing protocol on the device (particularly voice gateways!).
Great article.
Regards,
Mark.
great stuff.
had it working nicely.
thanks for sharing
@richard: It only works on a point-to-point connection because there is only one dlci to track. Think of it this way, if one dlci went down it wouldn’t take the whole interface down.