Powered by Blogger.

Lab GLBP - Gateway Load-balancing Protocol

Yêu cầu

1) Cấu hình cơ bản
2) Cấu hình địa chỉ IP như mô hình LAB
3) Định tuyến OSPF giữa Core và Distribution
4) Cấu hình GLBP cho các DS như sau :


- DS 1 : priority 150
weight 150 lower 90 upper 120
chiếm quyền sau 30s

- DS2 : priority 120
weight 120 lower 80 upper 100
chiếm quyền sau 30s

- DS3 : priority default
weight default
chiếm quyền sau 30s

5) Dùng command để kiểm tra các trạng thái của GLBP

6) Cấu hình tracking trên DS1 như sau

- Track line - protocol : interface f0/0 của R1 bị up/down thì giảm weight 80
- Track ip routing : interface f0/0 của R1 bị mất địa chỉ IP thì giảm weight 50
- Track ip route : nếu địa chỉ 1.1.1.0/24 không có trong bảng định tuyến thì giảm weight 40

7) Test

Trên client :

- Cấu hình default route chỉ về ip next-hop là 192.168.123.254
- Ping liên tục địa chỉ 1.1.1.1
- Shutdown lần lượt các interface DS1-f0/1 & DS2-f0/0. Sau đó quan sát kết quả
Thực hiện

1) Cấu hình cơ bản

Router(config)#hostname DS1
DS1(config)#line con 0
DS1(config-line)#logg synch
DS1(config-line)#exec-timeout 0 0
DS1(config-line)#exit
DS1(config)#no ip domain lookup

Tương tự cho các Router còn lại


2) Đặt IP như mô hình lab


DS1(config)#int f0/0
DS1(config-if)#no shut
DS1(config-if)#ip add 192.168.14.1 255.255.255.0
DS1(config-if)#exit
DS1(config)#int f0/1
DS1(config-if)#no shut
DS1(config-if)#ip add 192.168.123.1 255.255.255.0


DS2(config)#int f0/1
DS2(config-if)#ip address 192.168.24.2 255.255.255.0
DS2(config-if)#exit
DS2(config)#int f0/0
DS2(config-if)#no shut
DS2(config-if)#ip add 192.168.123.2 255.255.255.0


DS3(config)#int f0/1
DS3(config-if)#no shut
DS3(config-if)#ip address 192.168.34.3 255.255.255.0
DS3(config-if)#exit
DS3(config)#int f0/0
DS3(config-if)#no shut
DS3(config-if)#ip add 192.168.123.3 255.255.255.0


Core(config)#int f0/0
Core(config-if)#no shut
Core(config-if)#ip address 192.168.14.4 255.255.255.0
Core(config-if)#exit
Core(config)#int f0/1
Core(config-if)#no shut
Core(config-if)#ip add 192.168.24.4 255.255.255.0
Core(config-if)#exit
Core(config)#int f1/0
Core(config-if)#no shut
Core(config-if)#ip add 192.168.34.4 255.255.255.0
Core(config-if)#exit
Core(config)#int loo0
Core(config-if)#ip address 1.1.1.1 255.255.255.0
Core(config-if)#ip ospf network point-to-point


3) Định tuyến OSPF giữa Core & Distribution
DS1(config)#router ospf 1
DS1(config-router)#network 192.168.14.0 0.0.0.255 a 0
DS1(config-router)#network 192.168.123.0 0.0.0.255 a 0
DS1(config-router)#router-id 1.1.1.1

DS2(config)#router ospf 1
DS2(config-router)#network 192.168.24.0 0.0.0.255 a 0
DS2(config-router)#network 192.168.123.0 0.0.0.255 a 0
DS2(config-router)#router-id 2.2.2.2


DS3(config)#router ospf 1
DS3(config-router)#network 192.168.34.0 0.0.0.255 a 0
DS3(config-router)#network 192.168.123.0 0.0.0.255 a 0
DS3(config-router)#router-id 3.3.3.3

Core(config)#router ospf 1
Core(config-router)#network 192.168.14.0 0.0.0.255 a 0
Core(config-router)#network 192.168.24.0 0.0.0.255 a 0
Core(config-router)#network 192.168.34.0 0.0.0.255 a 0
Core(config-router)#network 1.1.1.1 0.0.0.0 a 0
Core(config-router)#router-id 4.4.4.4

4) Cấu hình GLBP

DS1(config)#int f0/1
DS1(config-if)#glbp 1 ip 192.168.123.254
DS1(config-if)#glbp 1 priority 150
DS1(config-if)#glbp 1 weighting 150 lower 90 upper 120
DS1(config-if)#glbp 1 preempt
DS1(config-if)#glbp 1 preempt delay minimum 30

DS2(config)#int f0/0
DS2(config-if)#glbp 1 ip 192.168.123.254
DS2(config-if)#glbp 1 priority 120
DS2(config-if)#glbp 1 weighting 120 lower 80 upper 100
DS2(config-if)#glbp 1 preempt
DS2(config-if)#glbp 1 preempt delay minimum 30

DS3(config)#int f0/0
DS3(config-if)#glbp 1 ip 192.168.123.254
DS3(config-if)#glbp 1 preempt
DS3(config-if)#glbp 1 preempt delay minimum 30

5) Dùng command : show glbp brief để kiểm tra


6) Cấu hình tracking

a) Tracking line - protocol

DS1(config)#track 80 interface f0/0 line-protocol
DS1(config)#int f0/1
DS1(config-if)#glbp 1 weighting track 80 decrement 80
Vào shutdown interface f0/0 của R1
DS1(config)#int f0/0
DS1(config-if)#shutdown

Ta thấy khoảng thời gian từ lúc interface f0/0 bị down cho đến khi Router DS1 chuyển trạng thái từ Active sang Listen là 30s – thời gian preempt, và giá trị weighting đã giảm xuống còn 70




b) Track ip routing

DS1(config)#track 50 interface f0/0 ip routing
DS1(config-if)#glbp 1 weighting track 50 decrement 50
Vào interface f0/0 của DS1, xóa địa chỉ IP, sau đó dùng command show để xem kết quảDS1(config)#interface f0/0
DS1(config-if)#no ip address

c) Track IP route


DS1(config)#track 40 ip route 1.1.1.0/24 reachability

DS1(config-if)#glbp 1 weighting track 40 decrement 40

Vào Router Core,shutdown interface Loopback0
Core(config)# interface loopback0
Core(config-if)# shutdown

Dùng command show để xem kết quả

7) Cấu hình trên Client
Client(config)#int f0/0
Client(config-if)#no shut
Client(config-if)#ip address 192.168.123.5 255.255.255.0

Client(config)#ip route 0.0.0.0 0.0.0.0 192.168.123.254
Client ping liên tục tới địa chỉ 1.1.1.1/24



Sau đó lần lượt shutdown các interface DS1-f0/1 và DS2-f0/0.

DS1(config)#interface f0/1
DS1(config-if)#shutdown

DS2(config)#interface f0/0
DS2(config-if)#shutdown

Quan sát kết quả ping.
    Blogger Comment
    Facebook Comment