東坡下載:內(nèi)容最豐富最安全的下載站!

首頁(yè)IT技術(shù) → Notes of JNCIP_OSPF

Notes of JNCIP_OSPF

相關(guān)文章發(fā)表評(píng)論 來(lái)源:本站時(shí)間:2011/4/3 7:00:19字體大。A-A+

更多

作者:點(diǎn)擊:537次評(píng)論:0次標(biāo)簽:

OSPF基本配置的3個(gè)問(wèn)題:
-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中無(wú)法更改fxp接口mtu,故無(wú)法做實(shí)驗(yàn)


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起什么作用?如何進(jìn)行檢驗(yàn)?


Virtul Links:R3/R5兩邊分別配置ospf area 3,但是R5上還是收到10.0.4/22路由,但是從R7到R2不通

重啟r4上的路由協(xié)議
run restart routing logical-router r4 immediately

RID是否需要配置?
JUNOS默認(rèn)以lo0作為RID,無(wú)需配置

ospf下慎用int all
例如CaseStudy中R1要求10.0.5/24以外部路由宣告,而且R1的相應(yīng)接口不能再建立鄰居

什么時(shí)候需要配置router-id?
不希望lo0路由被宣告出去

手工配置RID有什么樣的后果?
路由器不會(huì)為L(zhǎng)o0分配stub route,故這條路由(lo0)將無(wú)法傳遞出去,影響到loopback的連通性
如果此時(shí)要求lo0可達(dá),則需要在lo0上啟用ospf或者手動(dòng)配置RID


如果lo0啟用ospf會(huì)怎么樣?
lo0會(huì)以network summary route形式對(duì)外宣告為stub network
不在lo0上啟用ospf會(huì)怎么樣?
lo0會(huì)以type 1 LSAs形式對(duì)外宣告為stub network


lo0是否需要宣告到ospf中?
JUNNOS宣告stub路由到RID網(wǎng)段,一般不需要


WHY is passive required?
1.不允許建立adjacency
2.避免產(chǎn)生不必要的hello報(bào)文,浪費(fèi)系統(tǒng)資源


顯示r3宣告的router LSA

關(guān)于RID選舉

網(wǎng)絡(luò)類型:
1.multipoint
(1)類型為P2MP,因?yàn)椴痪邆鋌roadcast能力,所以需要指明neighbor
(2)實(shí)際可以理解為類型是p2p,所以不會(huì)選舉DR
(3)hello interval默認(rèn)10秒
(4)配置要點(diǎn):
HUB:
1.接口上multipoint,ospf中無(wú)需指明
2.配置neihgbor
SPOKE?
JUNOS需要配置neighbor,IOS不需要配置neighbor


2.NBMA
(1)實(shí)際上還是一種廣播,所以要選舉DR
(2)但因?yàn)槭莕on-broadcast,所以還是需要指明neighbor
(3)hello interval默認(rèn)30秒
(4)ATM & FR全互聯(lián)的情況下使用(實(shí)際網(wǎng)絡(luò)架構(gòu)很少用這種類型,所以NBMA很少用到)
(5)配置要點(diǎn):
1.在ospf接口中指明NBMA
2.指明neihgbor
3.不參選的priority設(shè)置為0

eligible的作用
1.只會(huì)對(duì)自認(rèn)為可以做DR的路由器有影響:產(chǎn)生hello
2.對(duì)實(shí)際DR選舉沒(méi)有任何影響
3.保證hello報(bào)文只在DR-eligible中間傳播


OSPF的non-preemptive特點(diǎn)
priority為128,配置R4的priority為200,此時(shí)R4不會(huì)搶占成為DR。
when to kick in?
網(wǎng)絡(luò)斷開(kāi)
路由進(jìn)程重啟


STUB區(qū)域
Network summary LSAs (type 3s) are generated by ABRs to summarize their SPF cost to destinations within their attached areas.
解讀:ABR創(chuàng)建到stub區(qū)域以外路由的summary路由,例如R3 & R4向AREA 10宣告area 1內(nèi)的路由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區(qū)域內(nèi)的non-ABR路由器,例如AREA 10內(nèi)的R1 & R2
1.ABR(R3 & R4)宣告了一條匯總路由10.0.8/24,metric為10
2.non-ABR(R1 & R4)首先計(jì)算自己到ABR的最短metric,然后將ABR宣告過(guò)來(lái)的metric相加,最后得出自己到10.0.8/24的metric

NSSA的本質(zhì)
STUB不許external LSAs進(jìn)來(lái),同時(shí)也不允許external LSAs從自己到bone
NSSA允許


ASBR metric向NSSA以外區(qū)域宣告,例如為R1的靜態(tài)路由設(shè)置metric
ABR metric向NSSA以內(nèi)區(qū)域宣告,例如這里的R3 & R4配置的default-metric


OSPF & ISIS如何注入默認(rèn)路由
1.OSPF在ABR上配置default-metric
2.ISIS無(wú)需配置,L1/L2 Router會(huì)自動(dòng)向L1區(qū)域注入0/0路由

OSPF & ISIS關(guān)于loopback網(wǎng)段的宣告
1.OSPF的loopback地址默認(rèn)會(huì)自動(dòng)宣告到non-AREA 0區(qū)域中去
2.ISIS的loopback地址需要配置ISIS AREA


參考帶寬計(jì)算
參考帶寬/100,000,000bit=cost
例如,設(shè)置參考帶寬為1G,則cost=1G/100,000,000bit=10

Juniper vs OSPF
1.rip對(duì)外宣告metric
場(chǎng)景:r1-r2,r1設(shè)置metric-out 1
Juniper:r1-r2之間的直連接口也算一跳,加上1,最后r2看到metric為2
CISCO:r2看到metric為1

2.DUAL-ABR/L1-L2 Router情況下,OSPF & ISIS如何選定默認(rèn)ABR/L1-L2 Router
OSPF路由選擇Router-ID較大的ABR
ISIS


3.area-range匯總路由的metric如何確定?
Juniper:由contributing route中子網(wǎng)最小的metric做為匯總metric
CISCO:由contributing route中子網(wǎng)最大的metric做為匯總metric

4.wide-metric中的contrbuting routes

ABR匯總:
1.匯總non-area 0內(nèi)的物理網(wǎng)段
2.如果題目沒(méi)有明確要求禁止匯總loopback,area內(nèi)的loopback地址也要匯總
3.ABR-ABR之間的網(wǎng)段不匯總,而且ABR的loopback不匯總
4.如果physical & loopback地址不連續(xù),可以發(fā)送兩個(gè)aggregates

area 1內(nèi)部網(wǎng)段
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內(nèi)部網(wǎng)段
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


匯總路由掩碼計(jì)算:
1.contributing routes最小的網(wǎng)段
2.二進(jìn)制計(jì)算匯總掩碼
3.run sh route 172.16.4/29 log r6進(jìn)行驗(yàn)證


問(wèn)題一:為什么在RIP上以loopback為source可以到達(dá)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不通
按照書(shū)上實(shí)例,此時(shí)通過(guò)雙向發(fā)布路由,RIP有了OSPF區(qū)域內(nèi)的路由(10.0.5.0/24),OSPF也有RIP上的靜態(tài)路由(192.168.1.0~4.0),只是OSPF區(qū)域還沒(méi)有R6-RIP之間的路由。
192.168.0.1@RIP怎么traceroute到10.0.5.1?
以172.16.40.1為source,報(bào)文丟到172.16.40.2,然后經(jīng)由R6將報(bào)文送到10.0.5.1,但是回送報(bào)文怎么處理呢?


既然172.16.40.2@R6到不了10.0.5.1,192.168.0.1@RIP怎么能夠到達(dá)10.0.5.1?憑什么通過(guò)RIP-R6可以到達(dá)?

 

ping & tracert的實(shí)質(zhì)
有去有回,去的是ICMP Request,回的是ICMP echo,所以source-destination之間必須是雙向路由可達(dá)的
RIP可以ping通R1的前提是什么?只要RIP有到R1的路由即可?
NO,P208中RIP有到R1網(wǎng)段的路由,但是仍然不能ping通,輸出如下:
lab@rip> traceroute 10.0.5.1
而加上source以后卻能ping通,WHY?
lab@rip# run traceroute 10.0.5.1 source 192.168.0.1
通過(guò)前邊路由發(fā)布我們知道,RIP有OSPF區(qū)域內(nèi)的路由(10.0.5.0/24),OSPF也有RIP上的靜態(tài)路由(192.168.1.0~4.0),即192.168.0.1~10.0.5/24之間有了雙向路由,所以此時(shí)可以ping通

 

lab@r6# run traceroute 10.0.5.1 source 172.16.40.2不通,WHY?
因?yàn)镺SPF內(nèi)部并不知道如何到達(dá)172.16.40.2這個(gè)網(wǎng)段,事實(shí)上OSPF只知道192.168.0.1~4.0


問(wèn)題二:/28 & /24沒(méi)看懂(p210)
為什么用discard?這里172.16.40/28實(shí)際上是一個(gè)aggregate路由

書(shū)中解釋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的嗎?難道僅僅是因?yàn)?28比/24更精確嗎?


書(shū)中解釋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掩碼),就無(wú)需導(dǎo)出route-filter語(yǔ)句,如果不這樣做(即不采用 /28掩碼,而是采用/24掩碼),就需要在RIP路由器上禁止其他直連路由(例如192.168.x.1/32環(huán)回地址)的重新發(fā)布
為什么要這樣?

P209解釋RIP無(wú)法到達(dá)10.0.5/24曾經(jīng)做過(guò)如下描述:
解法一: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上宣告靜態(tài)路由的方案
[edit routing-options]
lab@rip# set static route 172.16.40/28 discard

學(xué)習(xí)大貓貓<>P13忽然有所得:
CaseStudy要求"以O(shè)SPF內(nèi)部路由的形式通告172.16.40.x的rip子網(wǎng)路由,并且確定沒(méi)有鄰居可以在這些接口上建立"
解法:在R6 & R7對(duì)應(yīng)RIP網(wǎng)段宣告passive接口,實(shí)際上這正是StudyGuide上的解法一,這樣做可以使得RIP到達(dá)10.0.5/24,但是在product network中網(wǎng)絡(luò)需要最優(yōu)化(在可達(dá)的基礎(chǔ)上保證精確),因此這里需要做匯總(CaseStudy也暗含此要求),顯然匯總得來(lái)的掩碼是/28,包含RIP內(nèi)所有的物理網(wǎng)段(172.16.40.1~40.3),F(xiàn)在回頭來(lái)看StudyGuide中的靜態(tài)路由:用/28一是為了保證路由最精確,另外路由經(jīng)RIP-R6以后無(wú)需再做匯總,最終實(shí)現(xiàn)網(wǎng)絡(luò)最優(yōu)化


問(wèn)題三:為什么路由經(jīng)過(guò)abr后metric會(huì)加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,這個(gè)好理解:R6-R5 metric=1,R5-R3 metric=1,R3-R1=1,三段加起來(lái)為3

switch在HUB上的奇怪現(xiàn)象:
R6看到的10.0.6.1(R1的loopback) metric為13
R6看到的10.0.3.3(R3的loopback)metric為11,看到R3-R5網(wǎng)段(10.0.2.0/30)metric也是11
R6-R5之間的metric為1(采用HUB連接olive,鏈路接口都為10^8/100,000,000=1),10.0.2.0/30經(jīng)過(guò)R5后metric加10,故metric=11
問(wèn)題在于為什么路由經(jīng)過(guò)abr后metric會(huì)加10?難道是用了OLIVE的緣故?


事實(shí)上這個(gè)和連接OLIVE的設(shè)備有關(guān),上邊那個(gè)用的是SWITCH(TCL傻瓜交換機(jī)),下邊輸出用的是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打破環(huán)路
1.next-hop的解決方案
需要在R6 & R7上同時(shí)配置
注意:這里用的是next-hop,而非neighbor喔!!

2.route-filter的解決方案:
如果R6 & r7同時(shí)配置此策略,RIP將無(wú)法到達(dá)10.0.5.1,WHY?
因?yàn)榇藭r(shí)從R5以后都不知道如何到達(dá)r6-RIP-r7之間的網(wǎng)段,雖然此前RIP注入了172.16.40.0/28,但是在R6 & R7上同時(shí)被reject了,故采用route-filter只能在R6或者R7上配置
如果R6 & R7設(shè)置172.16.40.0/28網(wǎng)段為passive,這樣R6 & R7就可以同時(shí)配置route-filter了。


方案1 & 2不會(huì)產(chǎn)生次有路徑問(wèn)題,是解決環(huán)路的最好方案

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
為什么只有一跳?見(jiàn)P214的分析
如果修改RIP preference,RIP到10.0.5/24有兩個(gè)下一跳(可以負(fù)載均衡),WHY?
R7有兩條到10.0.5/24的路由,一個(gè)OSPF,一個(gè)RIP,現(xiàn)在RIP因?yàn)閜reference升高棄之不用,R7收斂,R7-10.0.5/24只有OSPF發(fā)布的路由,RIP domain泛洪收斂,此時(shí)R7向RIP發(fā)布10.0.5/24路由,最后RIP有兩個(gè)下一跳


試驗(yàn):不要修改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調(diào)高,路由器啟用RIP路由,RIP路由變成inactive,導(dǎo)致rip-ospf不成功,例如R6調(diào)高RIP preference,此時(shí)R6就不會(huì)成為RIP路由的發(fā)布點(diǎn),R7變成RIP路由發(fā)布點(diǎn),所以R6必須經(jīng)過(guò)R7才能到達(dá)192.168.1.1,顯然這是個(gè)次優(yōu)路徑。

這里做個(gè)試驗(yàn),先升高R6的rip preference=160,然后調(diào)整R7的rip preference=170,會(huì)怎么樣呢?
分析:對(duì)于R6/R7來(lái)講,誰(shuí)先修改rip preference,誰(shuí)的路由選擇就發(fā)生變化,例如,這里先修改R6的rip preference,此時(shí)在R6觀察192.168/16路由,發(fā)現(xiàn)2條路由:ospf優(yōu)先,而RIP次之,然后修改R7的rip preference,在R6 & R7可以看到關(guān)于192.168/16的路由沒(méi)有變化;同樣,如果先修改R7上RIP preference,則R7看到OSPF優(yōu)先,RIP次之
這就是說(shuō),同一時(shí)刻只有一個(gè)ASBR上的RIP在起作用

(3)r6 & r7都要配置以下兩個(gè)語(yǔ)句,否則在rip到10.0.5/24不會(huì)出現(xiàn)兩個(gè)下一跳(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看來(lái),從R5看到10.0.5/24的metric為50,而R6-RIP-R7-R6再回來(lái)時(shí),RIP為10.0.5/24重新賦予metric=400,這樣R6會(huì)選取R5為下一跳(因?yàn)閙etric最小)

問(wèn)題四:為什么需要將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上做實(shí)驗(yàn)發(fā)現(xiàn),只需將metric改成10.0.3.3(R3)宣告的metric即可,這里改成2。
教材說(shuō)需要將R3所在area 10的接口metric都加1,為什么?這個(gè)是怎么得出來(lái)的?

大貓貓<>P16:
因?yàn)閖uniper的路由器的實(shí)現(xiàn)區(qū)域匯總,在選擇metric的時(shí)候是選擇一條匯總下面的子網(wǎng)最小的metric為這條匯總的metric,顯然最小子網(wǎng)是R3-R2之間的10.0.4.0/30,所以需要調(diào)整這里的metric,為什么加1呢?因?yàn)樵贘UNOS中,R3宣告這條匯總路由時(shí)也算一跳,調(diào)整R3-R2之間的metric=2,這樣從R3宣告出去的匯總路由metric=2+1=3,此時(shí)(R3 & R4)-R5宣告的匯總路由相同了
注意:cisco是選擇最大metric的發(fā)出去的

注意:教材上更改了R3在area 10中的兩個(gè)接口,還有R2-R3中間的互聯(lián)端口

關(guān)于路由選項(xiàng)
discard,---router說(shuō)丟就丟了吧,我也不管你了,那么你有可能看到的就是icmp timeout,沉默的殺手哦
reject---router說(shuō)我有良心一點(diǎn),丟了你的包,我還告訴你一聲,給你一個(gè)icmp unreachable吧,殺了人,一聲大吼,看過(guò)投名狀吧,想想最后一段
receive---這個(gè)太壞了,明明沒(méi)有,明明是不可達(dá)的,明明包已經(jīng)被丟掉咧,可以router還是給你一個(gè)echo reply,讓你感覺(jué)是。。。!,呵呵,有點(diǎn)意思,有點(diǎn)意思
那么你想一想,從某種意義上來(lái)說(shuō),reject和receive是一樣的
包,最起碼是沒(méi)有發(fā)出去的,只是router產(chǎn)生的icmp message不一樣而已
就像你給女孩子寫(xiě)情書(shū),要通過(guò)女孩子的父母轉(zhuǎn)交,
最好的結(jié)果,父母轉(zhuǎn)交了--你小子運(yùn)氣不錯(cuò)---這就是next-h(huán)op
另外的結(jié)果
父母把信丟了,還不告訴你,你就傻等著吧,這就是discard
父母把信丟了,告訴你,你小子不要對(duì)我家丫頭耍流氓,這就是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發(fā)過(guò)來(lái)的路由(10.0.5/24),這個(gè)路由是從RIP-R7之間的接口學(xué)習(xí)到的,根據(jù)水平分割,R7不會(huì)將這條路由再發(fā)給RIP,這樣在RIP看來(lái)到10.0.5/24的路由只有從R6走

P214
10.0.5/24由R5傳遞到R6 & R7以后,R6也向R7泛洪這條LSA,R7也可能在OSPF中將R6作為達(dá)到10.0.5/24,但是根據(jù)OSPF算法是不會(huì)的,另外到達(dá)外部10.0.5/24路由肯定應(yīng)該從ABR走的。
所以R6將10.0.5/24注入RIP路由以后,R7只有一條經(jīng)R5走的OSPF路由到達(dá)10.0.5/24的路由
R7開(kāi)始引入RIP路由,R7多了一條經(jīng)R6走的RIP路由,由于RIP的管理距離較小,R7裝入這條RIP發(fā)布過(guò)來(lái)的路由,下一跳指向R6。
R7有了更新10.0.5/24條目,開(kāi)始向OSPF area 1泛洪,R5 & R6收到這條新的LSA,而此時(shí)10.0.5/24從RIP發(fā)布過(guò)來(lái)以后metric已經(jīng)變成2,而原來(lái)R5 & R6上關(guān)于此條路由metric=50,因此R5 & R6裝入這個(gè)新的LSA,R6將10.0.5/24指向R7

 

問(wèn)題五:為什么在R1上配置NSSA看到0/0屬性是OSPF/150呢?做stub看到0/0屬性是OSPF/10?
如果配置NSSA,ABR會(huì)做7-to-5轉(zhuǎn)換,對(duì)內(nèi)對(duì)外都一樣
[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

 


問(wèn)題七:解決172.16.40/29段可達(dá)性問(wèn)題的時(shí)候,可以在r6上注入該網(wǎng)段,這個(gè)policy怎么寫(xiě)?
[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默認(rèn)為v1,不支持172.16.40/29這樣的變長(zhǎng)網(wǎng)段
2.router-filter和protocol rip之間是AND關(guān)系,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卻可以這樣寫(xiě)?
[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支持變長(zhǎng)子網(wǎng)
2.172.16.40/29可以和protocol ospf成功匹配


問(wèn)題八:R3 & R4其中一方配置為ABR且限制3/8,則R5還是可以學(xué)到3/8路由,必須兩個(gè)同時(shí)配置?


問(wèn)題九:R1上同時(shí)引入2個(gè)policy時(shí)注意,不能像下面這樣寫(xiě),因?yàn)?0.0.5/24到policy static匹配到term 2會(huì)被reject,從而跳出policy chain,最終無(wú)法將路由宣告出去,這里要么刪除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;
}
}

問(wèn)題十:
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.
場(chǎng)景復(fù)現(xiàn):r1上灌入3條靜態(tài)路由并且導(dǎo)入ospf are 10,r1/r2/r3/r4去掉stub或者nssa
r1手工創(chuàng)建3條靜態(tài)路由,然后導(dǎo)入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上驗(yàn)證匯總:
-1).area 10內(nèi)部路由匯總
沒(méi)做匯總的輸出:
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上做內(nèi)部匯總
[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上對(duì)r1引入的靜態(tài)路由進(jìn)行匯總:
[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無(wú)法對(duì)extern路由進(jìn)行匯總
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

 

相關(guān)評(píng)論

閱讀本文后您有什么感想? 已有 人給出評(píng)價(jià)!

  • 2791 喜歡喜歡
  • 2101 頂
  • 800 難過(guò)難過(guò)
  • 1219 囧
  • 4049 圍觀圍觀
  • 5602 無(wú)聊無(wú)聊
熱門評(píng)論
最新評(píng)論
發(fā)表評(píng)論 查看所有評(píng)論(0)
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過(guò)審核才能顯示)