Introduction
This document describes the procedure to configure dual ISP failover with the use of DHCP on Cisco's Integrated Service Router (ISR) 2900 series.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Configure
Network Diagram
Configurations
This setup is useful when you have two ISP's terminate on the router and both get IP addresses via DHCP from the ISP.
CLIENT#sh ip int b
Interface IP-Address OK? Method Status Protocol
Embedded-Service-Engine0/0 unassigned YES NVRAM administratively down down
GigabitEthernet0/0 10.106.38.136 YES DHCP up up
GigabitEthernet0/1 unassigned YES NVRAM up up
GigabitEthernet0/1.100 1.1.1.4 YES DHCP up up
GigabitEthernet0/1.200 2.2.2.4 YES DHCP up up
GigabitEthernet0/2 unassigned YES NVRAM down down
Loopback0 11.11.11.11 YES NVRAM up up
interface gigabitethernet 0/1.100 and interface gigabitethernet 0/1.200 are two interfaces which are get dhcp ip address from two ISP's respectively.
interface gigabitethernet 0/1.100 is primary and interface gigabitethernet 0/1.200 is secondary.
Static Route configurations:
A secondary route with higher AD value:
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1.200 dhcp 200
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1.100 dhcp
Interface configuration:
CLIENT#sh run int GigabitEthernet0/1.100
Building configuration...
Current configuration : 112 bytes
!
interface GigabitEthernet0/1.100
encapsulation dot1Q 100
ip dhcp client route track 2
ip address dhcp
end
Note: You must configure the ip dhcp client command before you issue the ip address dhcp command on an interface. The ip dhcp client command is checked only when an IP address is acquired from DHCP. If the ip dhcp client command is issued after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from DHCP.
CLIENT#sh run int GigabitEthernet0/1.200
Building configuration...
Current configuration : 82 bytes
!
interface GigabitEthernet0/1.200
encapsulation dot1Q 200
ip address dhcp
end
IP Service Level Agreement (SLA): A route sourcing primary interface is tracked:
CLIENT#sh run | sec ip sla
track 2 ip sla 2 reachability
ip sla 2
icmp-echo 11.11.11.11 source-interface GigabitEthernet0/1.100
ip sla schedule 2 life forever start-time now
ip sla auto discovery
CLIENT#sh ip route
C 1.1.1.0/24 is directly connected, GigabitEthernet0/1.100
L 1.1.1.4/32 is directly connected, GigabitEthernet0/1.100
2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 2.2.2.0/24 is directly connected, GigabitEthernet0/1.200
L 2.2.2.4/32 is directly connected, GigabitEthernet0/1.200
Verify
Use this section in order to confirm that your configuration works properly.
When the track is up, the default gateway points route towards primary:
CLIENT#sh ip route track-table
ip route 0.0.0.0 0.0.0.0 1.1.1.1 254 track 2 state is [up]
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1.100 1.1.1.1 track 2 state is [up]
CLIENT#sh ip route
Codes: L - local, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 1.1.1.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 1.1.1.1, GigabitEthernet0/1.100
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, GigabitEthernet0/1.100
L 1.1.1.5/32 is directly connected, GigabitEthernet0/1.100
2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 2.2.2.0/24 is directly connected, GigabitEthernet0/1.200
L 2.2.2.4/32 is directly connected, GigabitEthernet0/1.200
When the track goes down, default gateway points route towards secondary:
CLIENT#sh ip route track-table
ip route 0.0.0.0 0.0.0.0 1.1.1.1 254 track 2 state is [down]
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1.100 1.1.1.1 track 2 state is [down]
CLIENT#sh ip route
Codes: L - local, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 2.2.2.1 to network 0.0.0.0
S* 0.0.0.0/0 [200/0] via 2.2.2.1, GigabitEthernet0/1.200
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, GigabitEthernet0/1.100
L 1.1.1.5/32 is directly connected, GigabitEthernet0/1.100
2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 2.2.2.0/24 is directly connected, GigabitEthernet0/1.200
L 2.2.2.4/32 is directly connected, GigabitEthernet0/1.200
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.106.38.0/24 is directly connected, GigabitEthernet0/0
L 10.106.38.136/32 is directly connected, GigabitEthernet0/0
Troubleshoot
There is currently no specific troubleshooting information available for this configuration.