Notes of JNCIP_OSPF
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