.jpg)
1. Yêu cầu:
Cấu hình cơ bản trên các thiết bị.
PAT: Cấu hình PAT trên R1 và R2 đảm bảo các thiết bị nội bộ truy cập được Internet.
GLBP:
+ Cấu hình GLBP trên cổng e0/0 trên R1 và R2.
+ Hiệu chỉnh GLBP sao cho R1 làm Active AVG, R2 làm Standby AVG, R1 & R2 đóng vai trò AVF.
2. Thực hiện:
Yêu cầu 1:
Cấu hình cơ bản trên các thiết bị.
Cấu hình cơ bản trên R1.
Code:
[B]hostname R1[/B] [B]interface e0/0[/B] [B]ip address 10.0.1.1 255.255.255.0[/B] [B]no shutdown[/B] [B]exit[/B] [B]interface e0/1[/B] [B]ip address dhcp[/B] [B]no shutdown[/B] [B]exit[/B] [B]ip route 0.0.0.0 0.0.0.0 dhcp[/B] [B]line vty 0 4[/B] [B]privilege level 15[/B] [B]no login[/B] [B]exit[/B] [B]line console 0[/B] [B]logging synchronous[/B] [B]exec-timeout 0 0[/B] [B]exit[/B] [B]no ip domain-lookup[/B] [B]no cdp run[/B]
Code:
[B]hostname R2[/B] [B]interface e0/0[/B] [B]ip address 10.0.1.2 255.255.255.0[/B] [B]no shutdown[/B] [B]exit[/B] [B]interface e0/1[/B] [B]ip address dhcp[/B] [B]no shutdown[/B] [B]exit[/B] [B]ip route 0.0.0.0 0.0.0.0 dhcp[/B] [B]line vty 0 4[/B] [B]privilege level 15[/B] [B]no login[/B] [B]exit[/B] [B]line console 0[/B] [B]logging synchronous[/B] [B]exec-timeout 0 0[/B] [B]exit[/B] [B]no ip domain-lookup[/B] [B]no cdp run[/B]
Gán IP trên PC1 nếu sử dụng VPCS để giả lập PC trên Unetlab.
Code:
[B]VPCS> ip 10.0.1.3/24 10.0.1.254[/B]
Gán IP trên PC2 nếu sử dụng VPCS để giả lập PC trên Unetlab.
Code:
[B]VPCS> ip 10.0.1.4/24 10.0.1.254[/B]
Gán IP trên PC3 nếu sử dụng VPCS để giả lập PC trên Unetlab.
Code:
[B]VPCS> ip 10.0.1.5/24 10.0.1.254[/B]
Gán IP trên PC4 nếu sử dụng VPCS để giả lập PC trên Unetlab.
Code:
[B]VPCS> ip 10.0.1.6/24 10.0.1.254[/B]
Yêu cầu 2: Cấu hình PAT trên R1 và R2 đảm bảo các thiết bị nội bộ truy cập được Internet.
Code:
[B]ip nat inside source list 1 interface e0/1 overload[/B] [B]interface e0/1[/B] [B]ip nat outside[/B] [B]exit[/B] [B]interface e0/0[/B] [B]ip nat inside[/B] [B]exit[/B] [B]access-list 1 permit 10.0.1.0 0.0.0.255[/B]
Cấu hình GLBP trên cổng e0/0 trên R1.
Code:
[B]interface e0/0[/B] [B]glbp 1 ip 10.0.1.254[/B] [B]exit[/B]
Code:
[B]interface e0/0[/B] [B]glbp 1 ip 10.0.1.254[/B] [B]exit[/B]
Code:
[B]VPCS> ping 10.0.1.254[/B] [B]VPCS> ping 8.8.8.8[/B]
- MAC 0007.b400.0101 là địa chỉ Virtual MAC của R1.
- MAC aabb.cc00.0100 là địa chỉ MAC cổng e0/0 của R1.
Code:
[B]R1# show glbp[/B] [B]Ethernet0/0 - Group 1[/B] [B]State is Active[/B] [B]1 state change, last state change 00:12:22[/B] [B]Virtual IP address is 10.0.1.254[/B] [B]Hello time 3 sec, hold time 10 sec[/B] [B]Next hello sent in 0.448 secs[/B] [B]Redirect time 600 sec, forwarder timeout 14400 sec[/B] [B]Preemption disabled[/B] [B]Active is local[/B] [B]Standby is 10.0.1.2, priority 100 (expires in 8.256 sec)[/B] [B]Priority 100 (default)[/B] [B]Weighting 100 (default 100), thresholds: lower 1, upper 100[/B] [B]Load balancing: round-robin[/B] [B]Group members:[/B] [B]aabb.cc00.0100 (10.0.1.1) local[/B] [B]aabb.cc00.0200 (10.0.1.2)[/B] [B]There are 2 forwarders (1 active)[/B] [B]Forwarder 1[/B] [B]State is Active[/B] [B]1 state change, last state change 00:11:40[/B] [B]MAC address is 0007.b400.0101 (default)[/B] [B]Owner ID is aabb.cc00.0100[/B] [B]Redirection enabled[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is local, weighting 100[/B] [B]Client selection count: 1[/B] [B]Forwarder 2[/B] [B]State is Listen[/B] [B]MAC address is 0007.b400.0102 (learnt)[/B] [B]Owner ID is aabb.cc00.0200[/B] [B]Redirection enabled, 598.272 sec remaining (maximum 600 sec)[/B] [B]Time to live: 14398.272 sec (maximum 14400 sec)[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is 10.0.1.2 (primary), weighting 100 (expires in 8.704 sec)[/B] [B]Client selection count: 1[/B] [B]R1#[/B]
Kiểm tra thông tin địa chỉ Virtual MAC của R2.
- MAC 0007.b400.0102 là địa chỉ Virtual MAC của R2.
- MAC aabb.cc00.0200 là địa chỉ MAC cổng e0/0 của R2.
Code:
[B]R2# show glbp[/B] [B]Ethernet0/0 - Group 1[/B] [B]State is Standby[/B] [B]1 state change, last state change 00:14:38[/B] [B]Virtual IP address is 10.0.1.254[/B] [B]Hello time 3 sec, hold time 10 sec[/B] [B]Next hello sent in 0.608 secs[/B] [B]Redirect time 600 sec, forwarder timeout 14400 sec[/B] [B]Preemption disabled[/B] [B]Active is 10.0.1.1, priority 100 (expires in 9.536 sec)[/B] [B]Standby is local[/B] [B]Priority 100 (default)[/B] [B]Weighting 100 (default 100), thresholds: lower 1, upper 100[/B] [B]Load balancing: round-robin[/B] [B]Group members:[/B] [B]aabb.cc00.0100 (10.0.1.1)[/B] [B]aabb.cc00.0200 (10.0.1.2) local[/B] [B]There are 2 forwarders (1 active)[/B] [B]Forwarder 1[/B] [B]State is Listen[/B] [B]2 state changes, last state change 00:14:16[/B] [B]MAC address is 0007.b400.0101 (learnt)[/B] [B]Owner ID is aabb.cc00.0100[/B] [B]Time to live: 14399.328 sec (maximum 14400 sec)[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is 10.0.1.1 (primary), weighting 100 (expires in 10.112 sec)[/B] [B]Forwarder 2[/B] [B]State is Active[/B] [B]1 state change, last state change 00:14:41[/B] [B]MAC address is 0007.b400.0102 (default)[/B] [B]Owner ID is aabb.cc00.0200[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is local, weighting 100[/B] [B]R2#[/B]
Code:
[B]VPCS> show arp[/B] [B]00:07:b4:00:01:01 10.0.1.254[/B][B] expires in 113 seconds[/B] [B]VPCS>[/B]
Code:
[B]VPCS> ping 8.8.8.8[/B] [B]VPCS> show arp[/B] [B]00:07:b4:00:01:02 10.0.1.254[/B][B] expires in 95 seconds[/B] [B]aa:bb:cc:00:02:00 10.0.1.2 expires in 95 seconds[/B] [B]VPCS>[/B]
Yêu cầu 3.b: Hiệu chỉnh GLBP sao cho R1 làm Active AVG, R2 làm Standby AVG, R1 & R2 đóng vai trò AVF.
AVG giữ vai trò quan trọng trong giao thức GLBP, nó phát sinh các địa chỉ Virtual MAC rồi phân phối cho các Router thành viên AVF (Active Virtual Forwarder). AVG cũng đứng ra để hồi đáp các bản tin ARP Request do các PC gửi đến hỏi thăm về địa chỉ Virtual MAC tương ứng với Virtual IP là gì. Cơ chế bầu chọn Active AVG trong GLBP tương tự như HSRP, Router nào có Priority càng lớn, Router đó làm Active AVG, còn lại làm Standby AVG. Nếu giá trị Priority bằng nhau thì các Router dựa vào địa chỉ IP để bầu chọn Active AVG, IP của Router nào lớn nhất thì Router đó sẽ đóng vai trò là Active AVG. Kiểm tra giá trị Priority mặc định trên các Router.
Code:
[B]R1# show glbp[/B] [B]Ethernet0/0 - Group 1[/B] [B]State is Active[/B] [B]1 state change, last state change 00:12:22[/B] [B]Virtual IP address is 10.0.1.254[/B] [B]Hello time 3 sec, hold time 10 sec[/B] [B]Next hello sent in 0.448 secs[/B] [B]Redirect time 600 sec, forwarder timeout 14400 sec[/B] [B]Preemption disabled[/B] [B]Active is local[/B] [B]Standby is 10.0.1.2, priority 100 (expires in 8.256 sec)[/B] [B]Priority 100 (default)[/B] [B]Weighting 100 (default 100), thresholds: lower 1, upper 100[/B] [B]Load balancing: round-robin[/B] [B]Group members:[/B] [B]aabb.cc00.0100 (10.0.1.1) local[/B] [B]aabb.cc00.0200 (10.0.1.2)[/B] [B]There are 2 forwarders (1 active)[/B] [B]Forwarder 1[/B] [B]State is Active[/B] [B]1 state change, last state change 00:11:40[/B] [B]MAC address is 0007.b400.0101 (default)[/B] [B]Owner ID is aabb.cc00.0100[/B] [B]Redirection enabled[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is local, weighting 100[/B] [B]Client selection count: 1[/B] [B]Forwarder 2[/B] [B]State is Listen[/B] [B]MAC address is 0007.b400.0102 (learnt)[/B] [B]Owner ID is aabb.cc00.0200[/B] [B]Redirection enabled, 598.272 sec remaining (maximum 600 sec)[/B] [B]Time to live: 14398.272 sec (maximum 14400 sec)[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is 10.0.1.2 (primary), weighting 100 (expires in 8.704 sec)[/B] [B]Client selection count: 1[/B] [B]R1#[/B]
Code:
[B]R2# show glbp [/B] [B]Ethernet0/0 - Group 1[/B] [B]State is Standby[/B] [B]1 state change, last state change 00:29:08[/B] [B]Virtual IP address is 10.0.1.254[/B] [B]Hello time 3 sec, hold time 10 sec[/B] [B]Next hello sent in 0.064 secs[/B] [B]Redirect time 600 sec, forwarder timeout 14400 sec[/B] [B]Preemption disabled[/B] [B]Active is 10.0.1.1, priority 100 (expires in 11.296 sec)[/B] [B]Standby is local[/B] [B]Priority 100 (default)[/B] [B]Weighting 100 (default 100), thresholds: lower 1, upper 100[/B] [B]Load balancing: round-robin[/B] [B]Group members:[/B] [B]aabb.cc00.0100 (10.0.1.1)[/B] [B]aabb.cc00.0200 (10.0.1.2) local[/B] [B]There are 2 forwarders (1 active)[/B] [B]Forwarder 1[/B] [B]State is Listen[/B] [B]2 state changes, last state change 00:28:45[/B] [B]MAC address is 0007.b400.0101 (learnt)[/B] [B]Owner ID is aabb.cc00.0100[/B] [B]Time to live: 14399.424 sec (maximum 14400 sec)[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is 10.0.1.1 (primary), weighting 100 (expires in 9.952 sec)[/B] [B]Forwarder 2[/B] [B]State is Active[/B] [B]1 state change, last state change 00:29:11[/B] [B]MAC address is 0007.b400.0102 (default)[/B] [B]Owner ID is aabb.cc00.0200[/B] [B]Preemption enabled, min delay 30 sec[/B] [B]Active is local, weighting 100[/B] [B]R2#[/B]
Code:
[B]R1# show ip interface brief[/B] [B]Interface IP-Address OK? Method Status Protocol[/B] [B]Ethernet0/0 10.0.1.1 YES TFTP up up[/B] [B]Ethernet0/1 10.215.26.235 YES DHCP up up [/B] [B]Ethernet0/2 unassigned YES TFTP administratively down down [/B] [B]Ethernet0/3 unassigned YES TFTP administratively down down [/B] [B]NVI0 10.0.1.1 YES unset up up [/B] [B]R1#[/B]
Code:
[B]R2# show ip interface brief[/B] [B]Interface IP-Address OK? Method Status Protocol[/B] [B]Ethernet0/0 10.0.1.2 YES TFTP up up[/B] [B]Ethernet0/1 10.215.26.234 YES DHCP up up [/B] [B]Ethernet0/2 unassigned YES TFTP administratively down down [/B] [B]Ethernet0/3 unassigned YES TFTP administratively down down [/B] [B]NVI0 10.0.1.2 YES unset up up [/B] [B]R2#[/B]
Code:
[B]R1# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 100 Active 10.0.1.254 local 10.0.1.2[/B] [B]Et0/0 1 1 - Active 0007.b400.0101 local -[/B] [B]Et0/0 1 2 - Listen 0007.b400.0102 10.0.1.2 -[/B] [B]R1#[/B]
Code:
[B]R2# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 100 Standby 10.0.1.254 10.0.1.1 local[/B] [B]Et0/0 1 1 - Listen 0007.b400.0101 10.0.1.1 -[/B] [B]Et0/0 1 2 - Active 0007.b400.0102 local -[/B] [B]R2#[/B]
Code:
[B]R1(config)# interface e0/0[/B] [B]R1(config-if)# glbp 1 priority 120[/B] [B]R1(config-if)# glbp 1 preempt [/B]
Code:
[B]R2(config)# interface e0/0[/B] [B]R2(config-if)# glbp 1 priority 100[/B] [B]R2(config-if)# glbp 1 preempt[/B]
Code:
[B]R1# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 120 Active 10.0.1.254 local 10.0.1.2[/B] [B]Et0/0 1 1 - Active 0007.b400.0101 local -[/B] [B]Et0/0 1 2 - Listen 0007.b400.0102 10.0.1.2 -[/B] [B]R1#[/B]
Code:
[B]R2# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 100 Standby 10.0.1.254 10.0.1.1 local[/B] [B]Et0/0 1 1 - Listen 0007.b400.0101 10.0.1.1 -[/B] [B]Et0/0 1 2 - Active 0007.b400.0102 local -[/B] [B]R2#[/B]
Code:
[B]R1# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 120 Active 10.0.1.254 local 10.0.1.2[/B] [B]Et0/0 1 1 - Active 0007.b400.0101 local -[/B] [B]Et0/0 1 2 - Listen 0007.b400.0102 10.0.1.2 -[/B] [B]R1#[/B]
Code:
[B]R2# show glbp brief[/B] [B]Interface Grp Fwd Pri State Address Active router Standby router[/B] [B]Et0/0 1 - 100 Standby 10.0.1.254 10.0.1.1 local[/B] [B]Et0/0 1 1 - Listen 0007.b400.0101 10.0.1.1 -[/B] [B]Et0/0 1 2 - Active 0007.b400.0102 local -[/B] [B]R2#[/B]
Bùi Quốc Kỳ VnPro