1:RID与lo0口的关系。
JUNOS software automatically advertises a stub route to the interface from which the RID
is obtained; therefore it is not actually necessary to explicitly configure lo0 as an OSPF interface
to meet the lo0 connectivity requirements of this configuration example.
Cisco需要手动配置后才会通告。
2:环回口的网络类型
Cisco默认的网络类型是loopback. 而juniper默认的是LAN并且要选举DR(都是本接口,并且BDR字段永远为0.0.0.0,如果被动此接口状态变为DRother)
R1#show ip ospf in lo 0
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/32, Area 0
Process ID 10, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
root@lunsui# run show ospf interface lo0.7 extensive logical-router R7
Interface
State
Area
DR ID
BDR ID
Nbrs
lo0.7
DRother
0.0.0.1
0.0.0.0
0.0.0.0
0
Type: LAN, Address: 7.7.7.7, Mask: 255.255.255.255, MTU: 65535, Cost: 0
Adj count: 0, Priority: 128, Passive
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
3:网络类型
Juniper没有点到多点非广播这个概念(cisco私有)
除了NBMA网络类型的HELLO间隔是30秒,其他所有网络类型全是10秒。
LAN链路的默认网络类型是LAN(广播)
Juniper路由器在NBMA的链路上面默认采用点到多点网络类型。
4:认证
The following commands correctly configure the authentication type for area 0 and area 1:
[edit protocols ospf]
lab@r5# set area 0 authentication-type md5
[edit protocols ospf]
lab@r5# set area 1 authentication-type simple
The next set of commands configure the MD5 specifics for all backbone area interfaces:
[edit protocols ospf area 0.0.0.0]
lab@r5# set interface at-0/2/1.35 authentication-key jni key-id 10
[edit protocols ospf area 0.0.0.0]
lab@r5# set interface as1.0 authentication-key jni key-id 10
MD5 authentication requires that communicating stations share both the key
value and a corresponding key-id. Specifying the same secret with two different
key-ids will result in authentication failures.
如果使用相同的密码与不同的KEY-ID将导致认证失败。
5:STUB区域
Juniper的stub区域中,ABR不会自动向stub注入默认路由,需要在ABR上配置。
area 0.0.0.10 {
stub default-metric 10;(10为类型3 LSA的默认路由的度量值)
interface fxp1.213;
interface fxp1.223;
}
下面是stub中的一台路由器的路由表。
root@lunsui# run show ospf database netsummary logical-router R2
OSPF link state database, area 0.0.0.10
Type
ID
Adv Rtr
Seq
Age
Opt
Cksum
Len
Summary
0.0.0.0
3.3.3.3
0x80000001
213
0x0
0x93b5
28
在CISCO的stub区域中,ABR则会自动注入默认路由。
6:NSSA区域
Juniper的NSSA区域与cisco一样ABR不会自动注入默认路由进NSSA。需要经过配置。
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
}
no-summaries;
默认情况下默认路由是由类型3的LSA的形式存在。可以经过配置使其以类型7的形式存在。
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
type-7;
}
no-summaries;
另外:类型3的默认路由优先于类型7的默认路由。
下面是NSSA区域里的R1的路由表。(选择的是类型3的默认路由LSA)
root@lunsui# run show route logical-router R1
inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0
*[OSPF/10] 00:05:09, metric 30
> to 12.1.1.2 via fxp1.212
下面是R1关于ABR通告的默认路由LSA7
root@lunsui# run show ospf database nssa extensive logical-router R1
OSPF link state database, area 0.0.0.10
Type
ID
Adv Rtr
Seq
Age
Opt
Cksum
Len
NSSA
0.0.0.0
3.3.3.3
0x80000001
338
0x0
0x6bd1
36
mask 0.0.0.0
Type 1, TOS 0x0, metric 10, fwd addr 0.0.0.0, tag 0.0.0.0
Aging timer 00:54:21
Installed 00:05:37 ago, expires in 00:54:22, sent 00:05:37 ago
下面是R1关于ABR通告的默认路由LSA3
root@lunsui# ...netsummary extensive logical-router R1
OSPF link state database, area 0.0.0.10
Type
ID
Adv Rtr
Seq
Age
Opt
Cksum
Len
Summary
0.0.0.0
4.4.4.4
0x80000002
380
0x0
0x73d0
28
mask 0.0.0.0
TOS 0x0, metric 10
Aging timer 00:53:39
Installed 00:06:16 ago, expires in 00:53:40, sent 00:06:16 ago
另外不管是类型3还是类型7的默认路由都拥有度量值类型E1和E2,默认为E2。E1累加,E2不累加,E1优先。
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
metric-type 2;
type-7;
}
no-summaries;
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
metric-type 2;
}
no-summaries;
root@lunsui# run show ospf database nssa extensive logical-router R1
NSSA
0.0.0.0
4.4.4.4
0x80000001
212
0x0
0x4deb
36
mask 0.0.0.0
Type 1, TOS 0x0, metric 10, fwd addr 0.0.0.0, tag 0.0.0.0
Aging timer 00:56:27
Installed 00:03:30 ago, expires in 00:56:28, sent 00:03:30 ago
最后juniper在处于NSSA区域中的ABR在处理外部路由的类型1的度量值的方式与cisco有稍微的差别,不同之处在于ABR在收到外部路由之后将种子度量累加然后再发给骨干区域,而cisco则不累加。
7:OSPF汇总与过滤
OSPF在ABR上的汇总内部路由
area 0.0.0.1 {
area-range 56.0.0.0/8 override-metric 40;(种子度量值)
OSPF在ABR上同样可以汇总外部路由,前提是此ABR连接了NSSA区域。因为NSSA外部路由在7转5的时候是ABR通告的类型5的LSA进骨干区域。
area 0.0.0.10 {
nssa {
default-lsa {
area-range 11.0.0.0/8
}关键字NSSA标志着,控制的是外部路由其实是类型7的LSA。
在ABR上过滤外部路由。
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
metric-type 2;
type-7;
}
no-summaries;
area-range 12.0. 0.0/8;
area-range 11.0.0.0/8 restrict;
8:虚链路
与cisco差不太多
area 0.0.0.0 {
virtual-link neighbor-id 7.7.7.7 transit-area 0.0.0.1;
注意neighbor-id后面接的是RID而不是物理接口,另外虚链路的建立一定要在传送区域之间建立。