test

How to configure OSPF Stub Area

Giờ chúng ta hãy xem làm cách nào để cấu hình stub areas nhé.
Trong hình trên ta thấy có 2 areas, area0 và area1. Chúng ta sẽ sử dụng để làm ví dụ. Giờ hãy xem cấu hình.

R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#redistribute connected subnets

R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.23.0 0.0.0.255 area 1

R3(config)#router ospf 1
R3(config-router)#network 192.168.23.0 0.0.0.255 area 1

Tôi đã quảng bá tất cả các interfaces vào trong OSPF, ngoại trừ cổng loopback0 trên R1. Đây là interfaces đã được redistrubut vào trong OSPF, vì thế nó sẽ có LSA type5.

R3#show ip route ospf
O    IA 192.168.12.0/24 [110/2] via 192.168.23.2, 00:08:53, FastEthernet0/0
         1.0.0.0/24 is subnetted, 1 subnets
O    E2            1.1.1.0 [110/20] via 192.168.23.2, 00:01:16, FastEthernet0/0

Khi nhìn vào R3 bạn sẽ thấy dải mạng 192.168.12.0/24 là 1 inter-area (LSA typ3) và 1.1.1.0/24 là 1 external type2 (LSA type 5). Giờ hãy cấu hình stub area nhé.

R2(config)#router ospf 1
R2(config-router)#area 1 stub

R3(config)#router ospf 1
R3(config-router)#area 1 stub

Giờ hãy kiểm tra lại route trên R3 nhé.

R3#show ip route ospf
O IA 192.168.12.0/24 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0

Như vậy là stub area sẽ blocks LSA type 5, vì thế trên R3 bạn sẽ không nhìn thấy mạng 1.1.1.0/24
Đó là tất cả thông tin về stub area.
Dưới đây là cấu hình nhé.

hostname R2
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
!
router ospf 1
area 1 stub
network 192.168.12.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area 1
!
end

hostname R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
media-type rj45
!
router ospf 1
redistribute connected subnets
network 192.168.12.0 0.0.0.255 area 0
!
end

hostname R3
!
interface FastEthernet0/0
ip address 192.168.23.3 255.255.255.0
!
router ospf 1
area 1 stub
network 192.168.23.0 0.0.0.255 area 1
!
end
How to configure OSPF Stub Area How to configure OSPF Stub Area Reviewed by phucvm on tháng 10 14, 2019 Rating: 5

Không có nhận xét nào:

Được tạo bởi Blogger.