Récemment j’ai été confronté à un problème de configuration sur un routeur Cisco 3845. L’objectif était simple, il fallait configurer du failover sur le routeur entre deux provider. D’un côté une ligne louée et de l’autre une connexion ADSL négociée à partir du routeur. Si l’énoncé semble simple, le résultat n’est pas pour autant évident (surtout pour un expert Cisco comme moi).
Le premier requis est d’avoir la bonne version d’IOS installé, en l’occurrence la fonctionnalité ip sla est disponible à partir de l’IOS 12.4 avec le feature set advanced IP services ou advanced security. Pour rappel, vous trouverez la procédure pour mettre à jour un IOS Cisco ici. Voici un petit schéma qui reprends l’énoncé précédent.
Cisco IP SLA
Voici la configuration nécessaire au bon fonctionnement de votre loadbalancing :
hostname Router_Name
!
ip cef
!
!#### Définir les objets de tracking. Ces objets sont utilisés pour ####!
!#### vérifier la disponibilité d’un host sur chaque ISP ####!
!
ip sla 1
icmp-echo 1.1.1.2 source-ip 1.1.1.1
frequency 30
ip sla schedule 1 start-time now life forever
!
ip sla 2
icmp-echo 2.2.2.3 source-ip 2.2.2.2
frequency 30
ip sla schedule 2 start-time now life forever
!
!#### Configurer les objets de tracking (cf. IP SLA) ####!
!
track 101 rtr 1 reachability
track 102 rtr 2 reachability
!
!#### Configuration des différentes interfaces ####!
!
interface GigabitEthernet0/0
description Internal connection
ip address 192.168.1.1 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
ip flow ingress
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
media-type rj45
no mop enabled
!
interface GigabitEthernet0/1
description ADSL connection
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip flow ingress
duplex auto
speed auto
media-type rj45
pppoe enable
pppoe-client dial-pool-number 1
no mop enabled
!
interface FastEthernet0/1/0
switchport access vlan 3
!
interface FastEthernet0/1/1
!
interface FastEthernet0/1/2
!
interface FastEthernet0/1/3
!
interface Vlan3
description Lease Line
ip address 1.1.1.1 255.255.255.248
ip nat outside
ip virtual-reassembly
!
interface Dialer0
ip address negotiated
no ip redirects
no ip unreachables
no ip proxy-arp
ip mtu 1492
ip flow ingress
ip nat outside
ip virtual-reassembly
encapsulation ppp
ip tcp adjust-mss 1412
dialer pool 1
dialer-group 1
ppp authentication pap callin
ppp pap sent-username user password 5 5s454f654r64v4br5t4bvr4
!
!#### Définition des routes en fonction des objets de tracking ####!
!#### dans notre, nous avons une configuration de load balancing ####!
!#### mais on pourrait définir une priorité sur une route pour éviter le loadbalancing ####!
!
ip route 0.0.0.0 0.0.0.0 vlan3 track 101
ip route 0.0.0.0 0.0.0.0 dialer0 track 102
!
!#### Configurer le NAT pour le trafic entrant ####!
!
ip nat inside source route-map ISP1 interface vlan3 overload
ip nat inside source route-map ISP2 interface dialer0 overload
!
!#### Configuration du NAT pour du traffic VPN entrant ####!
!
ip nat inside source static udp 192.168.1.1 500 1.1.1.1 500 route-map ISP1 extendable
ip nat inside source static udp 192.168.1.1 500 2.2.2.2 500 route-map ISP2 extendable
ip nat inside source static 192.168.1.1 1.1.1.1 route-map ISP1 extendable
ip nat inside source static 192.168.1.1 2.2.2.2 route-map ISP2 extendable
!
!#### Configuration des route maps en référence à la configuration du NAT ####!
!
route-map ISP1 permit 100
match interface vlan3
!
route-map ISP2 permit 100
match interface dialer0
!
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.