Thanks to http://hocquantrimang.com/hoidap/22/cau-hinh-load-balancing-tren-2-tuyen-ftth-voi-router-cisco

Hướng dẫn cấu hình Router Cisco Loadbalancing trên 2 tuyến FTTH

1. Cấu hình Interface kết nối 2 tuyến FTTH

CISCO(config)#int g0/0
CISCO(config-if)#description #FTTH FPT#
CISCO(config-if)#pppoe enable group global
CISCO(config-if)#pppoe-client dial-pool-number 1
CISCO(config-if)#no shut

CISCO(config)#int g0/1
CISCO(config-if)#description #FTTH VNPT#
CISCO(config-if)#pppoe enable group global
CISCO(config-if)#pppoe-client dial-pool-number 2
CISCO(config-if)#no shut

CISCO(config)#dialer-list 1 protocol ip permit

 

2. Khai báo thông tin chứng thực 2 tuyến FTTH

CISCO(config)#int dialer 1
CISCO(config-if)#description #FTTH FPT#
CISCO(config-if)#ip address negotiated
CISCO(config-if)#ip mtu 1492
CISCO(config-if)#ip nat outside
CISCO(config-if)#encapsulation ppp
CISCO(config-if)#dialer pool 1
CISCO(config-if)#dialer-group 1
CISCO(config-if)#ppp pap sent-username <Username> password 0 <Password>
CISCO(config-if)#no shut
CISCO(config-if)#exit

CISCO(config)#int dialer 2
CISCO(config-if)#description #FTTH VNPT#
CISCO(config-if)#ip address negotiated
CISCO(config-if)#ip mtu 1492
CISCO(config-if)#ip nat outside
CISCO(config-if)#encapsulation ppp
CISCO(config-if)#dialer pool 2
CISCO(config-if)#dialer-group 1
CISCO(config-if)#ppp pap sent-username <Username> password 0 <Password>
CISCO(config-if)#no shut
CISCO(config-if)#exit

 

3. Cấu hình Loadbalancing

CISCO(config)#track 1 interface Dialer1 ip routing
CISCO(config-track)#delay down 5 up 10
CISCO(config)#track 2 interface Dialer2 ip routing
CISCO(config-track)#delay down 5 up 10

CISCO(config)#route-map nat1 permit 10
CISCO(config-route-map)#match interface Dialer1
CISCO(config-route-map)#set interface Dialer1

 

CISCO(config)#route-map nat2 permit 20
CISCO(config-route-map)#match interface Dialer2
CISCO(config-route-map)#set interface Dialer2

CISCO(config)#ip nat inside source route-map nat1 interface Dialer1 overload
CISCO(config)#ip nat inside source route-map nat2 interface Dialer2 overload

CISCO(config)#ip route 0.0.0.0 0.0.0.0 Dialer1 track 1
CISCO(config)#ip route 0.0.0.0 0.0.0.0 Dialer2 track 2