實驗3ospf路由聚合


實驗任務一:ABR上的路由聚合
1.建立物理連接

2.配置ospf協議
[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[RTA-ospf-1-area-0.0.0.1]network 192.168.0.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.1]network 10.0.0.0 0.0.0.255

[RTB-ospf-1-area-0.0.0.1]network 10.0.0.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[RTC-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
3.查看ospf路由
[RTC]display ip routing-table

Destinations : 20 Routes : 20

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
2.2.2.2/32 O_INTRA 10 1 20.0.0.1 GE0/1
3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 O_INTER 10 2 20.0.0.1 GE0/1
20.0.0.0/24 Direct 0 0 20.0.0.2 GE0/1
20.0.0.0/32 Direct 0 0 20.0.0.2 GE0/1
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.1/32 O_INTER 10 2 20.0.0.1 GE0/1
192.168.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
192.168.2.1/32 O_INTER 10 2 20.0.0.1 GE0/1
192.168.3.1/32 O_INTER 10 2 20.0.0.1 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

4.配置abr聚合,要在abr上,路由的始發區域進行路由聚合配置。
[RTB-ospf-1-area-0.0.0.1]UNDO abr-summary 192.168.0.0 22

[RTC]display ip routing-table

Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
2.2.2.2/32 O_INTRA 10 1 20.0.0.1 GE0/1
3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 O_INTER 10 2 20.0.0.1 GE0/1
20.0.0.0/24 Direct 0 0 20.0.0.2 GE0/1
20.0.0.0/32 Direct 0 0 20.0.0.2 GE0/1
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/22 O_INTER 10 2 20.0.0.1 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

5.在始發區域,配置聚合路由。
[RTB-ospf-1-area-0.0.0.1]abr-summary 192.168.0.0 22 not-advertise
[RTC]display ip routing-table

Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
2.2.2.2/32 O_INTRA 10 1 20.0.0.1 GE0/1
3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 O_INTER 10 2 20.0.0.1 GE0/1
20.0.0.0/24 Direct 0 0 20.0.0.2 GE0/1
20.0.0.0/32 Direct 0 0 20.0.0.2 GE0/1
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

發現已經不存在聚合后的路由,其實abr聚合不發布可以過濾掉TYPE3LSA。
//過濾前。
[RTC]display ospf lsdb

     OSPF Process 1 with Router ID 3.3.3.3
             Link State Database

                     Area: 0.0.0.0

Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 16 48 80000006 0
Router 2.2.2.2 2.2.2.2 21 48 80000007 0
Network 20.0.0.1 2.2.2.2 21 32 80000003 0
Sum-Net 10.0.0.0 2.2.2.2 113 28 80000002 1
Sum-Net 192.168.3.1 2.2.2.2 7 28 80000001 1
Sum-Net 192.168.2.1 2.2.2.2 7 28 80000001 1
Sum-Net 1.1.1.1 2.2.2.2 89 28 80000002 1
Sum-Net 192.168.1.1 2.2.2.2 7 28 80000001 1
Sum-Net 192.168.0.1 2.2.2.2 7 28 80000001 1
//過濾后。
[RTC]display ospf lsdb

     OSPF Process 1 with Router ID 3.3.3.3
             Link State Database

                     Area: 0.0.0.0

Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 1579 48 80000005 0
Router 2.2.2.2 2.2.2.2 1580 48 80000006 0
Network 20.0.0.1 2.2.2.2 1579 32 80000002 0
Sum-Net 10.0.0.0 2.2.2.2 1672 28 80000001 1
Sum-Net 1.1.1.1 2.2.2.2 1647 28 80000001 1
實驗任務二:ASBR的路由聚合
1.建立物理連接

2.RTA,RTB,RTC運行ospf協議,其中RTA只使能1.1.1.1和10.0.0.0.RTA上配置import-direct命令引入直連路由
3.查看RTC的ip路由表
[RTC]display ip routing-table

Destinations : 20 Routes : 20

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
2.2.2.2/32 O_INTRA 10 1 20.0.0.1 GE0/1
3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 O_INTER 10 2 20.0.0.1 GE0/1
20.0.0.0/24 Direct 0 0 20.0.0.2 GE0/1
20.0.0.0/32 Direct 0 0 20.0.0.2 GE0/1
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 O_ASE2 150 1 20.0.0.1 GE0/1
192.168.1.0/24 O_ASE2 150 1 20.0.0.1 GE0/1
192.168.2.0/24 O_ASE2 150 1 20.0.0.1 GE0/1
192.168.3.0/24 O_ASE2 150 1 20.0.0.1 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

4.RTA上配置ASBR-SUMMARY
[RTA-ospf-1]asbr-summary 192.168.0.0 22
[RTC]display ip routing-table

Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 20.0.0.1 GE0/1
2.2.2.2/32 O_INTRA 10 1 20.0.0.1 GE0/1
3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 O_INTER 10 2 20.0.0.1 GE0/1
20.0.0.0/24 Direct 0 0 20.0.0.2 GE0/1
20.0.0.0/32 Direct 0 0 20.0.0.2 GE0/1
20.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
20.0.0.255/32 Direct 0 0 20.0.0.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/22 O_ASE2 150 1 20.0.0.1 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

和實驗任務一一樣,使用abr聚合和asbr聚合分別減少五類LSA和七類LSA。
No-advertise可以直接過濾掉相應的LSA。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM