-1)是否需要在loopback啟用OSPF?
-2)loopback是否需要passive?
-3)是否需要配置RID?
JNCIP-M考試新變化:
I believe the only thing that maybe you can see different is the fact that beginning junos 8.5 the router-id is not longer advertised as a stub network in OSPF:
"Historically, JUNOS software automatically advertised a stub route to the interface from which the RID is obtained. This meant that you did not need to run an IGP instance on the loopback interface to advertise reachability to the RID. Starting with JUNOS Release 8.5, this behavior has changed. Now, whether you use an explicit or an automatically generated RID that is lo0-based, you need to enable OSPF on the loopback interface to advertise reachability to the related loopback address, even when it is the source of an automatically selected RID."
Also, there are some slight differences in OSPF authentication between the 5.2 (book version) and the 8.1 version.
Troubleshooting Adjacency Problems中無法更改fxp接口mtu,故無法做實驗
Study Guide:
edit protocols ospf area 0.0.0.10]
lab@r4# show
nssa {
default-lsa {
default-metric 10;
metric-type 2;
type-7;
}
這句中的default-metric 10起什么作用?如何進行檢驗?
Virtul Links:R3/R5兩邊分別配置ospf area 3,但是R5上還是收到10.0.4/22路由,但是從R7到R2不通
重啟r4上的路由協議
run restart routing logical-router r4 immediately
RID是否需要配置?
JUNOS默認以lo0作為RID,無需配置
ospf下慎用int all
例如CaseStudy中R1要求10.0.5/24以外部路由宣告,而且R1的相應接口不能再建立鄰居
什么時候需要配置router-id?
不希望lo0路由被宣告出去
手工配置RID有什么樣的后果?
路由器不會為Lo0分配stub route,故這條路由(lo0)將無法傳遞出去,影響到loopback的連通性
如果此時要求lo0可達,則需要在lo0上啟用ospf或者手動配置RID
如果lo0啟用ospf會怎么樣?
lo0會以network summary route形式對外宣告為stub network
不在lo0上啟用ospf會怎么樣?
lo0會以type 1 LSAs形式對外宣告為stub network
lo0是否需要宣告到ospf中?
JUNNOS宣告stub路由到RID網段,一般不需要
WHY is passive required?
1.不允許建立adjacency
2.避免產生不必要的hello報文,浪費系統資源
顯示r3宣告的router LSA
關于RID選舉
網絡類型:
1.multipoint
(1)類型為P2MP,因為不具備broadcast能力,所以需要指明neighbor
(2)實際可以理解為類型是p2p,所以不會選舉DR
(3)hello interval默認10秒
(4)配置要點:
HUB:
1.接口上multipoint,ospf中無需指明
2.配置neihgbor
SPOKE?
JUNOS需要配置neighbor,IOS不需要配置neighbor
2.NBMA
(1)實際上還是一種廣播,所以要選舉DR
(2)但因為是non-broadcast,所以還是需要指明neighbor
(3)hello interval默認30秒
(4)ATM & FR全互聯的情況下使用(實際網絡架構很少用這種類型,所以NBMA很少用到)
(5)配置要點:
1.在ospf接口中指明NBMA
2.指明neihgbor
3.不參選的priority設置為0
eligible的作用
1.只會對自認為可以做DR的路由器有影響:產生hello
2.對實際DR選舉沒有任何影響
3.保證hello報文只在DR-eligible中間傳播
OSPF的non-preemptive特點
priority為128,配置R4的priority為200,此時R4不會搶占成為DR。
when to kick in?
網絡斷開
路由進程重啟
STUB區域
Network summary LSAs (type 3s) are generated by ABRs to summarize their SPF cost to destinations within their attached areas.
解讀:ABR創建到stub區域以外路由的summary路由,例如R3 & R4向AREA 10宣告area 1內的路由10.0.8/24
Other routers compute their SPF cost to each ABR, and then add (as in distance vector routing!) the metric received in summary LSAs to compute the shortest path to inter-area destinations.
解讀:other routers指的是stub區域內的non-ABR路由器,例如AREA 10內的R1 & R2
1.ABR(R3 & R4)宣告了一條匯總路由10.0.8/24,metric為10
2.non-ABR(R1 & R4)首先計算自己到ABR的最短metric,然后將ABR宣告過來的metric相加,最后得出自己到10.0.8/24的metric
NSSA的本質
STUB不許external LSAs進來,同時也不允許external LSAs從自己到bone
NSSA允許
ASBR metric向NSSA以外區域宣告,例如為R1的靜態路由設置metric
ABR metric向NSSA以內區域宣告,例如這里的R3 & R4配置的default-metric
OSPF & ISIS如何注入默認路由
1.OSPF在ABR上配置default-metric
2.ISIS無需配置,L1/L2 Router會自動向L1區域注入0/0路由
OSPF & ISIS關于loopback網段的宣告
1.OSPF的loopback地址默認會自動宣告到non-AREA 0區域中去
2.ISIS的loopback地址需要配置ISIS AREA
參考帶寬計算
參考帶寬/100,000,000bit=cost
例如,設置參考帶寬為1G,則cost=1G/100,000,000bit=10
Juniper vs OSPF
1.rip對外宣告metric
場景:r1-r2,r1設置metric-out 1
Juniper:r1-r2之間的直連接口也算一跳,加上1,最后r2看到metric為2
CISCO:r2看到metric為1
2.DUAL-ABR/L1-L2 Router情況下,OSPF & ISIS如何選定默認ABR/L1-L2 Router
OSPF路由選擇Router-ID較大的ABR
ISIS
3.area-range匯總路由的metric如何確定?
Juniper:由contributing route中子網最小的metric做為匯總metric
CISCO:由contributing route中子網最大的metric做為匯總metric
4.wide-metric中的contrbuting routes
ABR匯總:
1.匯總non-area 0內的物理網段
2.如果題目沒有明確要求禁止匯總loopback,area內的loopback地址也要匯總
3.ABR-ABR之間的網段不匯總,而且ABR的loopback不匯總
4.如果physical & loopback地址不連續,可以發送兩個aggregates
area 1內部網段
8.0 0000 1000.0000 0000
8.4 0000 1000.0000 0100
8.8 0000 1000.0000 1000
9.6 0000 1001.0000 0110
9.7 0000 1001.0000 0111
匯總掩碼:8.0/23
3.5 0000 0011.0000 0101 (loopback@r5)
area 10內部網段
4.0 0000 0100.0000 0001
4.4
4.8
4.12
6.1 0000 0110.0000 0001
6.2 0000 0110.0000 0010
匯總掩碼:4.0/22
ABR-ABR loopback interfaces
3.3 0000 0011.0000 0011
3.4 0000 0011.0000 0100
2.4 0000 0010.0000 0100
匯總路由掩碼計算:
1.contributing routes最小的網段
2.二進制計算匯總掩碼
3.run sh route 172.16.4/29 log r6進行驗證
問題一:為什么在RIP上以loopback為source可以到達10.0.5.1,而用172.16.40.1卻不行?P208
lab@rip# run traceroute 10.0.5.1 source 192.168.0.1可以通
lab@r6# run traceroute 10.0.5.1 source 172.16.40.2不通
按照書上實例,此時通過雙向發布路由,RIP有了OSPF區域內的路由(10.0.5.0/24),OSPF也有RIP上的靜態路由(192.168.1.0~4.0),只是OSPF區域還沒有R6-RIP之間的路由。
192.168.0.1@RIP怎么traceroute到10.0.5.1?
以172.16.40.1為source,報文丟到172.16.40.2,然后經由R6將報文送到10.0.5.1,但是回送報文怎么處理呢?
既然172.16.40.2@R6到不了10.0.5.1,192.168.0.1@RIP怎么能夠到達10.0.5.1?憑什么通過RIP-R6可以到達?
ping & tracert的實質
有去有回,去的是ICMP Request,回的是ICMP echo,所以source-destination之間必須是雙向路由可達的
RIP可以ping通R1的前提是什么?只要RIP有到R1的路由即可?
NO,P208中RIP有到R1網段的路由,但是仍然不能ping通,輸出如下:
lab@rip> traceroute 10.0.5.1
而加上source以后卻能ping通,WHY?
lab@rip# run traceroute 10.0.5.1 source 192.168.0.1
通過前邊路由發布我們知道,RIP有OSPF區域內的路由(10.0.5.0/24),OSPF也有RIP上的靜態路由(192.168.1.0~4.0),即192.168.0.1~10.0.5/24之間有了雙向路由,所以此時可以ping通
lab@r6# run traceroute 10.0.5.1 source 172.16.40.2不通,WHY?
因為OSPF內部并不知道如何到達172.16.40.2這個網段,事實上OSPF只知道192.168.0.1~4.0
問題二:/28 & /24沒看懂(p210)
為什么用discard?這里172.16.40/28實際上是一個aggregate路由
書中解釋1:
because direct routes have a higher global preference than static routes. Because the /28 mask is more specific than the /24 direct route, the static route will now be considered active
preference:direct>static,精確度:/28>/24,所以/28就一定是active的嗎?難道僅僅是因為/28比/24更精確嗎?
書中解釋2:
This approach was taken because it eliminated the need for export policy route-filter statements that would otherwise have been needed to prevent the redistribution
of other direct routes (such as the 192.168.x.1/32 lo0 addresses) on the RIP router.
采用這種方式(采用/28掩碼),就無需導出route-filter語句,如果不這樣做(即不采用 /28掩碼,而是采用/24掩碼),就需要在RIP路由器上禁止其他直連路由(例如192.168.x.1/32環回地址)的重新發布
為什么要這樣?
P209解釋RIP無法到達10.0.5/24曾經做過如下描述:
解法一:Listing r6's fe-0/1/3 interface as passive under the OSPF process,
解法二:redistributing the 172.16.40.0/24 address from either the RIP router,or r6, will resolve this issue.
StudyGuide中采用的是在RIP上宣告靜態路由的方案
[edit routing-options]
lab@rip# set static route 172.16.40/28 discard
學習大貓貓<>P13忽然有所得:
CaseStudy要求"以OSPF內部路由的形式通告172.16.40.x的rip子網路由,并且確定沒有鄰居可以在這些接口上建立"
解法:在R6 & R7對應RIP網段宣告passive接口,實際上這正是StudyGuide上的解法一,這樣做可以使得RIP到達10.0.5/24,但是在product network中網絡需要最優化(在可達的基礎上保證精確),因此這里需要做匯總(CaseStudy也暗含此要求),顯然匯總得來的掩碼是/28,包含RIP內所有的物理網段(172.16.40.1~40.3)。現在回頭來看StudyGuide中的靜態路由:用/28一是為了保證路由最精確,另外路由經RIP-R6以后無需再做匯總,最終實現網絡最優化
問題三:為什么路由經過abr后metric會加10?P192
這是教材上的截圖:
lab@r6> show route 10.0.6.1
inet.0: 28 destinations, 28 routes (28 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.6.1/32 *[OSPF/10] 00:27:34, metric 3
> to 10.0.8.6 via fe-0/1/0.0
R6到10.0.6.1的metric=3,這個好理解:R6-R5 metric=1,R5-R3 metric=1,R3-R1=1,三段加起來為3
switch在HUB上的奇怪現象:
R6看到的10.0.6.1(R1的loopback) metric為13
R6看到的10.0.3.3(R3的loopback)metric為11,看到R3-R5網段(10.0.2.0/30)metric也是11
R6-R5之間的metric為1(采用HUB連接olive,鏈路接口都為10^8/100,000,000=1),10.0.2.0/30經過R5后metric加10,故metric=11
問題在于為什么路由經過abr后metric會加10?難道是用了OLIVE的緣故?
事實上這個和連接OLIVE的設備有關,上邊那個用的是SWITCH(TCL傻瓜交換機),下邊輸出用的是HUB
lab@OLIVE# run show route 10.0.2.0 logical-router r6
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.2.0/30 *[OSPF/10] 00:26:20, metric 20
> to 10.0.8.6 via fxp2.56
lab@OLIVE# run show route 10.0.3.3 logical-router r6
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.3.3/32 *[OSPF/10] 00:26:39, metric 20
> to 10.0.8.6 via fxp2.56
R5-R6用10M Ethernet,故metric=10;R5-R3也是10M Ethernet,故metric=10。因此R6-R5-R3 metric=10+10=20
lab@OLIVE# run show route 10.0.2.0 logical-router r7
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.2.0/30 *[OSPF/10] 00:26:24, metric 20
> to 10.0.8.9 via fxp2.57
lab@OLIVE# run show route 10.0.3.3 logical-router r7
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.3.3/32 *[OSPF/10] 00:26:42, metric 20
> to 10.0.8.9 via fxp2.57
P216打破環路
1.next-hop的解決方案
需要在R6 & R7上同時配置
注意:這里用的是next-hop,而非neighbor喔!!!
2.route-filter的解決方案:
如果R6 & r7同時配置此策略,RIP將無法到達10.0.5.1,WHY?
因為此時從R5以后都不知道如何到達r6-RIP-r7之間的網段,雖然此前RIP注入了172.16.40.0/28,但是在R6 & R7上同時被reject了,故采用route-filter只能在R6或者R7上配置
如果R6 & R7設置172.16.40.0/28網段為passive,這樣R6 & R7就可以同時配置route-filter了。
方案1 & 2不會產生次有路徑問題,是解決環路的最好方案
3.修改rip preference P219
(1):Failing to change the protocol preference will result in only one next hop for 10.0.5/24 on the RIP router
為什么只有一跳?見P214的分析
如果修改RIP preference,RIP到10.0.5/24有兩個下一跳(可以負載均衡),WHY?
R7有兩條到10.0.5/24的路由,一個OSPF,一個RIP,現在RIP因為preference升高棄之不用,R7收斂,R7-10.0.5/24只有OSPF發布的路由,RIP domain泛洪收斂,此時R7向RIP發布10.0.5/24路由,最后RIP有兩個下一跳
試驗:不要修改rip-ospf,不要修改rip preference
(2):Another side effect of this approach is that only one ASBR will be redistributing the RIP routes into OSPF at any given time because the RIP routes will be inactive on one of the ASBRs, and only active routes can be exported through policy.
解讀:RIP preference調高,路由器啟用RIP路由,RIP路由變成inactive,導致rip-ospf不成功,例如R6調高RIP preference,此時R6就不會成為RIP路由的發布點,R7變成RIP路由發布點,所以R6必須經過R7才能到達192.168.1.1,顯然這是個次優路徑。
這里做個試驗,先升高R6的rip preference=160,然后調整R7的rip preference=170,會怎么樣呢?
分析:對于R6/R7來講,誰先修改rip preference,誰的路由選擇就發生變化,例如,這里先修改R6的rip preference,此時在R6觀察192.168/16路由,發現2條路由:ospf優先,而RIP次之,然后修改R7的rip preference,在R6 & R7可以看到關于192.168/16的路由沒有變化;同樣,如果先修改R7上RIP preference,則R7看到OSPF優先,RIP次之
這就是說,同一時刻只有一個ASBR上的RIP在起作用
(3)r6 & r7都要配置以下兩個語句,否則在rip到10.0.5/24不會出現兩個下一跳(r6 & r7)
[edit protocols rip]
lab@r7# set group rip preference 160
[edit policy-options]
lab@r7# show policy-statement rip-ospf
term 1 {
from {
protocol rip;
route-filter 10.0.5.0/24 orlonger reject;
route-filter 0.0.0.0/0 orlonger;
}
4.修改RIP通告的10.0.5/24的metric為400
在R6看來,從R5看到10.0.5/24的metric為50,而R6-RIP-R7-R6再回來時,RIP為10.0.5/24重新賦予metric=400,這樣R6會選取R5為下一跳(因為metric最小)
問題四:為什么需要將R3所在area 10的接口metric,都加1?P223
lab@r5> show ospf database netsummary area 0 detail
OSPF link state database, area 0.0.0.0
Metrics and Various Other Knobs 223
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary 10.0.4.0 10.0.3.3 0x80000083 734 0x2 0x3b82 28
mask 255.255.252.0
TOS 0x0, metric 2
Summary 10.0.4.0 10.0.3.4 0x8000005e 874 0x2 0x8957 28
mask 255.255.252.0
TOS 0x0, metric 3
在olive上做實驗發現,只需將metric改成10.0.3.3(R3)宣告的metric即可,這里改成2。
教材說需要將R3所在area 10的接口metric都加1,為什么?這個是怎么得出來的?
大貓貓<>P16:
因為juniper的路由器的實現區域匯總,在選擇metric的時候是選擇一條匯總下面的子網最小的metric為這條匯總的metric,顯然最小子網是R3-R2之間的10.0.4.0/30,所以需要調整這里的metric,為什么加1呢?因為在JUNOS中,R3宣告這條匯總路由時也算一跳,調整R3-R2之間的metric=2,這樣從R3宣告出去的匯總路由metric=2+1=3,此時(R3 & R4)-R5宣告的匯總路由相同了
注意:cisco是選擇最大metric的發出去的
注意:教材上更改了R3在area 10中的兩個接口,還有R2-R3中間的互聯端口
關于路由選項
discard,---router說丟就丟了吧,我也不管你了,那么你有可能看到的就是icmp timeout,沉默的殺手哦
reject---router說我有良心一點,丟了你的包,我還告訴你一聲,給你一個icmp unreachable吧,殺了人,一聲大吼,看過投名狀吧,想想最后一段
receive---這個太壞了,明明沒有,明明是不可達的,明明包已經被丟掉咧,可以router還是給你一個echo reply,讓你感覺是!!!!!,呵呵,有點意思,有點意思
那么你想一想,從某種意義上來說,reject和receive是一樣的
包,最起碼是沒有發出去的,只是router產生的icmp message不一樣而已
就像你給女孩子寫情書,要通過女孩子的父母轉交,
最好的結果,父母轉交了--你小子運氣不錯---這就是next-hop
另外的結果
父母把信丟了,還不告訴你,你就傻等著吧,這就是discard
父母把信丟了,告訴你,你小子不要對我家丫頭耍流氓,這就是reject
父母把信丟了,還告訴你,小子,信送到了哦,這就是receive
P214
r7 is using a 10.0.5/24 route learned through RIP from r6, which explains why r7 was not listed as a next hop on the RIP router-split horizon is preventing r7 from advertising
the 10.0.5/24 prefix back out the interface it was learned on.
分析:R7收到RIP發過來的路由(10.0.5/24),這個路由是從RIP-R7之間的接口學習到的,根據水平分割,R7不會將這條路由再發給RIP,這樣在RIP看來到10.0.5/24的路由只有從R6走
P214
10.0.5/24由R5傳遞到R6 & R7以后,R6也向R7泛洪這條LSA,R7也可能在OSPF中將R6作為達到10.0.5/24,但是根據OSPF算法是不會的,另外到達外部10.0.5/24路由肯定應該從ABR走的。
所以R6將10.0.5/24注入RIP路由以后,R7只有一條經R5走的OSPF路由到達10.0.5/24的路由
R7開始引入RIP路由,R7多了一條經R6走的RIP路由,由于RIP的管理距離較小,R7裝入這條RIP發布過來的路由,下一跳指向R6。
R7有了更新10.0.5/24條目,開始向OSPF area 1泛洪,R5 & R6收到這條新的LSA,而此時10.0.5/24從RIP發布過來以后metric已經變成2,而原來R5 & R6上關于此條路由metric=50,因此R5 & R6裝入這個新的LSA,R6將10.0.5/24指向R7
問題五:為什么在R1上配置NSSA看到0/0屬性是OSPF/150呢?做stub看到0/0屬性是OSPF/10?
如果配置NSSA,ABR會做7-to-5轉換,對內對外都一樣
[edit]
lab@OLIVE# run show route protocol ospf 0/0 logical-router r1
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[OSPF/150] 00:15:49, metric 10, tag 0
> to 10.0.4.13 via fxp1.13
10.0.4.0/30 *[OSPF/10] 00:15:49, metric 20
> to 10.0.4.5 via fxp1.12
to 10.0.4.13 via fxp1.13
10.0.4.8/30 *[OSPF/10] 00:16:07, metric 20
> to 10.0.4.5 via fxp1.12
10.0.6.2/32 *[OSPF/10] 00:16:07, metric 10
> to 10.0.4.5 via fxp1.12
224.0.0.5/32 *[OSPF/10] 00:51:02, metric 1
MultiRecv
問題七:解決172.16.40/29段可達性問題的時候,可以在r6上注入該網段,這個policy怎么寫?
[edit logical-routers r6 policy-options policy-statement rip-ospf]
lab@OLIVE# show
term 1 {
from {
protocol rip;
route-filter 172.16.40.0/29 longer;
route-filter 192.168.0.0/16 longer;
}
then accept;
}
term 2 {
then reject;
}
分析:
1.rip默認為v1,不支持172.16.40/29這樣的變長網段
2.router-filter和protocol rip之間是AND關系,172.16.40/29匹配失敗
3.修改rip-ospf
lab@OLIVE# show
term 1 {
from {
route-filter 172.16.40.0/29 longer;
route-filter 192.168.0.0/16 longer;
}
then accept;
}
term 2 {
then reject;
}
ISIS case study卻可以這樣寫?
[edit logical-routers r7 policy-options policy-statement adv-ospf]
lunsui@lab# show
term 1 {
from {
protocol ospf;
route-filter 192.168.0.0/16 orlonger;
route-filter 172.16.40.0/29 longer;
}
then accept;
}
1.OSPF支持變長子網
2.172.16.40/29可以和protocol ospf成功匹配
問題八:R3 & R4其中一方配置為ABR且限制3/8,則R5還是可以學到3/8路由,必須兩個同時配置?
問題九:R1上同時引入2個policy時注意,不能像下面這樣寫,因為10.0.5/24到policy static匹配到term 2會被reject,從而跳出policy chain,最終無法將路由宣告出去,這里要么刪除policy static的term 2,要么刪除policy static
lab@FSJ# show protocols
ospf {
export [ static DIRECT ];
area 0.0.0.10 {
nssa;
interface fxp2.12;
interface fxp2.23;
interface fxp2.24;
}
}
lab@FSJ# show policy-options
policy-statement static {
term 1 {
from {
protocol static;
route-filter 3.0.0.0/8 exact;
}
then {
metric 10;
external {
type 1;
}
accept;
}
}
term 2 {
then reject;
}
}
policy-statement DIRECT {
term 1 {
from {
protocol direct;
route-filter 10.0.5.0/24 exact;
}
then {
metric 50;
tag 420;
accept;
}
}
term 2 {
then reject;
}
}
問題十:
There is no mechanism in JUNOS software to summarize or filter type 5 LSAs using area-range statements. Options for the control of type 5 LSAs include the configuration of external route aggregates at the source ASBR, or the deployment of stub areas, which automatically filter external routes.
場景復現:r1上灌入3條靜態路由并且導入ospf are 10,r1/r2/r3/r4去掉stub或者nssa
r1手工創建3條靜態路由,然后導入ospf area 10
[edit logical-routers r1]
lab@OLIVE# show
interfaces {
fxp1 {
unit 12 {
vlan-id 12;
family inet {
address 10.0.4.6/30;
}
family iso;
}
unit 13 {
vlan-id 13;
family inet {
address 10.0.4.14/30;
}
family iso;
}
unit 55 {
vlan-id 55;
family inet {
address 10.0.5.1/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 10.0.6.1/32;
}
family iso {
address 49.0002.1111.1111.1111.00;
}
}
}
}
protocols {
ospf {
export [ STAT DIRECT ];
area 0.0.0.10 {
interface fxp1.13;
interface fxp1.12;
}
}
}
policy-options {
policy-statement STAT {
term 1 {
from protocol static;
then accept;
}
}
policy-statement DIRECT {
term 1 {
from {
protocol direct;
route-filter 10.0.5.0/24 exact;
}
then {
metric 50;
tag 420;
accept;
}
}
}
}
routing-options {
static {
route 3.0.2.0/24 reject;
route 3.0.1.0/24 reject;
route 3.0.3.0/24 reject;
}
}
然后r1/r2/r3/r4去掉stub或者nssa配置
r5上驗證匯總:
-1).area 10內部路由匯總
沒做匯總的輸出:
lab@OLIVE# run show route 10.0.4/22 logical-router r5
inet.0: 33 destinations, 33 routes (33 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/30 *[OSPF/10] 00:00:46, metric 3
> to 10.0.2.2 via fxp2.35
to 10.0.2.10 via fxp2.45
10.0.4.4/30 *[OSPF/10] 00:00:46, metric 3
> to 10.0.2.2 via fxp2.35
to 10.0.2.10 via fxp2.45
10.0.4.8/30 *[OSPF/10] 00:00:46, metric 2
> to 10.0.2.10 via fxp2.45
10.0.4.12/30 *[OSPF/10] 00:00:46, metric 2
> to 10.0.2.2 via fxp2.35
10.0.5.0/24 *[OSPF/150] 00:00:46, metric 50, tag 420
> to 10.0.2.2 via fxp2.35
to 10.0.2.10 via fxp2.45
10.0.6.1/32 *[OSPF/10] 00:00:46, metric 2
> to 10.0.2.2 via fxp2.35
10.0.6.2/32 *[OSPF/10] 00:00:46, metric 2
> to 10.0.2.10 via fxp2.45
-2).在r3/r4上做內部匯總
[edit logical-routers r3]
lab@OLIVE# set protocols ospf area 10 area-range 10.0.4/22
lab@OLIVE# run show route 10.0.4/22 logical-router r5
inet.0: 28 destinations, 28 routes (28 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/22 *[OSPF/10] 00:00:03, metric 4
to 10.0.2.2 via fxp2.35
> to 10.0.2.10 via fxp2.45
10.0.5.0/24 *[OSPF/150] 00:00:04, metric 50, tag 420
> to 10.0.2.2 via fxp2.35
to 10.0.2.10 via fxp2.45
-3).嘗試在r3/r4上對r1引入的靜態路由進行匯總:
[edit logical-routers r3]
lab@OLIVE# show protocols
ospf {
area 0.0.0.10 {
area-range 3.0.0.0/8;
interface fxp2.13;
interface fxp1.23 {
metric 2;
}
}
可以看到area-range 3.0.0.0/8無法對extern路由進行匯總
lab@OLIVE# run show route 3/8 logical-router r5
inet.0: 28 destinations, 28 routes (28 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.1.0/24 *[OSPF/150] 00:03:13, metric 0, tag 0
> to 10.0.2.2 via fxp2.35
3.0.2.0/24 *[OSPF/150] 00:03:13, metric 0, tag 0
> to 10.0.2.2 via fxp2.35
3.0.3.0/24 *[OSPF/150] 00:03:13, metric 0, tag 0
> to 10.0.2.2 via fxp2.35