JNCIP案例分析 – Juniper/Cisco OSPF互操作 Part2

JNCIP OSPF综合实验案例分析

我们将根据实验目标步骤,分成各部分并逐步实现与检测相关需求,对于明显需要在多个路由器上应用的类似配置,我们会使用高亮字体标出,同时应当被实现在全部关联路由器上。假如你在实验的过程中发现网络现象与我们的验证结果不符,可参照末尾附录的全部路由器的案例相关配置,核查是否在某些路由器上忽略了必要的配置。

另外,为了得到更好的验证效果,在开始前我们先按照拓扑上的区域划分将路由器的接口在OSPF内发布。需要注意的是在JUNOS与IOS互联的时候由于百兆fxp接口默认MTU为1496 bytes,与IOS上快速以太网接口默认的1500 bytes不匹配,在建立OSPF邻居的时候会停留在Exchange/ExStart的状态,因此我们需要在IOS路由器上将与JUNOS相连的接口MUT值修改为与其匹配的1496 bytes。

1. JUNOS与IOS OSPF路由协议互联

kangaroo

  1. 所有OSPF路由器使用环回接口地址作为RID,并且均能通过OSPF被其他路由器访问;
  2. 骨干区域内的环回接口地址应当以LSA-3的形式出现在非骨干区域内;

通过手动设置骨干区域ABR – R3/R4/R5的RID,并且明确将其在OSPF区域0内通告满足以上需求。

[edit logical-routers r5]
nigel@junos7.2# show routing-options
router-id 10.0.3.5;

[edit logical-routers r5]
nigel@junos7.2# show protocols ospf
area 0.0.0.0 {
    interface lo0.5 {
        passive;
    }
    interface fxp2.45;
    interface fxp2.35;
}
area 0.0.0.20 {
    interface fxp1.56;
    interface fxp1.57;
}
r4#wr t
!
interface Loopback0
 ip address 10.0.3.4 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.24
 encapsulation dot1Q 24
 ip address 10.0.4.9 255.255.255.252
 ip mtu 1496
!
interface FastEthernet0/0.34
 encapsulation dot1Q 34
 ip address 10.0.2.6 255.255.255.252
 ip mtu 1496
!
interface FastEthernet0/0.45
 encapsulation dot1Q 45
 ip address 10.0.2.10 255.255.255.252
 ip mtu 1496
!
!
router ospf 64
 router-id 10.0.3.4
 log-adjacency-changes
 network 10.0.2.4 0.0.0.3 area 0
 network 10.0.2.8 0.0.0.3 area 0
 network 10.0.3.4 0.0.0.0 area 0
 network 10.0.4.8 0.0.0.3 area 1
!

分别在JUNOS与IOS上确认OSPF邻居达到FULL状态,可以注意到JUNOS默认选举DR的优先级为128,而IOS为1

nigel@junos7.2# run show ospf neighbor logical-router r5
  Address  Interface   State     ID         Pri Dead
10.0.2.2  fxp2.35      Full   10.0.3.3      128   38
10.0.2.10 fxp2.45      Full   10.0.3.4        1   35
10.0.8.5  fxp1.56      Full   10.0.9.6      128   36
10.0.8.10 fxp1.57      Full   10.0.9.7        1   32 
r4#show ip ospf neighbor 

Neighbor ID Pri State    Dead Time Address  Interface
10.0.3.3    128 FULL/BDR 00:00:34 10.0.2.5  Fa0/0.34
10.0.3.5    128 FULL/DR  00:00:36 10.0.2.9  Fa0/0.45
10.0.6.2    128 FULL/BDR 00:00:39 10.0.4.10 Fa0/0.24

*注:由于篇幅所限,我将FastEthernet缩写为Fa

并且查看R6/R7数据库,确认全部骨干区域的环回接口地址均以LSA-3的形式被注入区域20,并且确认数据库内LSA-3完全同步。

nigel@junos7.2# run show ospf database logical-router
r6 netsummary | match summary 

Summary  10.0.2.0  10.0.3.5 0x8000000d  571 0x2 0x2510 28
Summary  10.0.2.4  10.0.3.5 0x8000000b  529 0x2 0xb27  28
Summary  10.0.2.8  10.0.3.5 0x80000011  399 0x2 0xcc5c 28
Summary  10.0.3.3  10.0.3.5 0x80000007  271 0x2 0x1a1a 28
Summary  10.0.3.4  10.0.3.5 0x80000009  229 0x2 0x161a 28
Summary  10.0.3.5  10.0.3.5 0x8000000a   99 0x2 0xf53a 28
Summary  10.0.4.0  10.0.3.5 0x80000006 2329 0x2 0x2712 28
Summary  10.0.4.4  10.0.3.5 0x80000006 2199 0x2 0x92b  28
Summary  10.0.4.8  10.0.3.5 0x80000008 1429 0x2 0xdc51 28
Summary  10.0.4.12 10.0.3.5 0x80000006 2071 0x2 0xae7e 28
Summary  10.0.6.1  10.0.3.5 0x80000006 2029 0x2 0x191a 28
Summary  10.0.6.2  10.0.3.5 0x80000006 1299 0x2 0xf23  28
r7#show ip ospf database summary | include summary
  Link State ID: 10.0.2.0 (summary Network Number)
  Link State ID: 10.0.2.4 (summary Network Number)
  Link State ID: 10.0.2.8 (summary Network Number)
  Link State ID: 10.0.3.3 (summary Network Number)
  Link State ID: 10.0.3.4 (summary Network Number)
  Link State ID: 10.0.3.5 (summary Network Number)
  Link State ID: 10.0.4.0 (summary Network Number)
  Link State ID: 10.0.4.4 (summary Network Number)
  Link State ID: 10.0.4.8 (summary Network Number)
  Link State ID: 10.0.4.12 (summary Network Number)
  Link State ID: 10.0.6.1 (summary Network Number)
  Link State ID: 10.0.6.2 (summary Network Number)

发表评论

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