JNCIP实验: OSPF NSSA区域配置 – Part 2

过滤JUNOS OSPF NSSA域间路由Type-3 LSA

configurate-juniper-junos-ospf-stub-tsa-nssa-area

在JUNOS的OSPF NSSA当中完全过滤LSA-3是很棘手的事情,能够注意到的是正如在配置TSA的时候指定default-Metric的同时加入no-summary参数。然而问题依然会存在,我们现在ABR R3/R4上做相同的配置。

area 0.0.0.10 {
    nssa {
        default-lsa default-metric 10;
        no-summaries;
    }

完成配置以后,查看R1的OSPF路由,发现域间路由被过滤掉,同时0.0.0.0/0默认路由也被安装到路由表当中。

nigel@junos7.2# run show route protocol ospf
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:02:44, metric 11
                   > to 10.0.4.13 via fxp1.13
10.0.4.8/30        *[OSPF/10] 00:44:12, metric 2
                   > to 10.0.4.6 via fxp1.12
10.0.6.2/32        *[OSPF/10] 00:44:12, metric 1
                   > to 10.0.4.6 via fxp1.12
224.0.0.5/32       *[OSPF/10] 1d 10:30:35, metric 1
                     MultiRecv

然而查看R1的OSPF数据库却发现,0.0.0.0这条LSA却并非以NSSA LSA-7的形式出现,而是以LSA-3的形式被安装到OSPF的LSDB当中。这是由于在JUNOS当中,路由表的显示并没有像IOS那样显示每条OSPF路由的具体类型,因此这一点非常容易会被忽略掉。

nigel@junos7.2# run show ospf database logical-router r1
nssa      

    OSPF link state database, Area 0.0.0.10
Type    ID       Adv Rtr   Seq      Age  Opt  Cksum  Len
NSSA *3.0.0.0 10.0.6.1 0x80000004   547  0x28 0x7e7a  36

[edit logical-routers]
nigel@junos7.2# run show ospf database logical-router r1
netsummary 

    OSPF link state database, Area 0.0.0.10
Type      ID       Adv Rtr   Seq     Age  Opt  Cksum  Len
Summary 0.0.0.0 10.0.3.3 0x80000001  385  0x20 0x8a9a  28
Summary 0.0.0.0 10.0.3.4 0x80000001  386  0x20 0x849f  28

此时区域10当中仍然存在LSA-3,这是因为在默认情况下,JUNOS均采用LSA-3的形式向末节区域/TSA/TNSSA注入默认路由。我们需要额外的参数将LSA-3默认路由修改为LSA-7,在R3/R4上修改default-lsa属性。另外可选的是将默认类型1的metric-type修改成为类型2。

nigel@junos7.2# set r3 protocols ospf area 10 nssa
default-lsa metric-type 2 type-7 

[edit logical-routers]
nigel@junos7.2# set r4 protocols ospf area 10 nssa
default-lsa metric-type 2 type-7   

area 0.0.0.10 {
    nssa {
        default-lsa {
            default-metric 10;
            metric-type 2;
            type-7;
        }
        no-summaries;
    }

重新查看R1的OSPF数据库,确认所有LSA-3被过滤掉,并且0.0.0.0默认路由以LSA-7的形式被安装到路由表当中。

nigel@junos7.2# run show ospf database logical-router r1
netsummary | count
Count: 0 lines 

[edit logical-routers]
nigel@junos7.2# run show ospf database logical-router r1
nssa          

    OSPF link state database, Area 0.0.0.10
Type    ID       Adv Rtr    Seq     Age  Opt  Cksum  Len
NSSA  0.0.0.0 10.0.3.3 0x80000001    16  0x20 0x62b6  36
NSSA  0.0.0.0 10.0.3.4 0x80000001    17  0x20 0x5cbb  36
NSSA *3.0.0.0 10.0.6.1 0x80000005   529  0x28 0x7c7b  36
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s