?
快捷搜索:  as  test  1111  test aNd 8=8  test++aNd+8=8  as++aNd+8=8  as aNd 8=8

湖南丫丫麻将辅助:金库娱乐app官网:探讨OSPF次优路由选择

?

长沙转转麻将必胜口诀 www.fv7j.com.cn 拓扑为工大年夜瑞普ccnp实验lab17,描述如下:

R1(S1/1)--R2(S1/0),cost=10;R1(S1/2)-framerelay-R4(S1/2),cost=2

R2(S1/1)--R3(S1/0),cost=2,R2(F0/0)--R4(F0/0),cost=2

R3(S1/1)--R4(S1/0),cost=5

R1的F0/0口衔吸收集192.168.1.0/24,cost=1

R1#show run

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

!

interface Serial1/1

description DCE,OSPF area 0,connected to R2's S1/0,ip 172.16.255.2/30

ip address 172.16.255.1 255.255.255.252

ip ospf cost 10

clock rate 9600

!

interface Serial1/2

description FrameRelay,OSPF area 0,connected to R4's S1/2,ip 172.16.255.14/30

ip address 172.16.255.13 255.255.255.252

encapsulation frame-relay

ip ospf network broadcast

ip ospf cost 2

!

router ospf 100

router-id 1.1.1.1

network 172.16.255.0 0.0.0.3 area 0

network 172.16.255.12 0.0.0.3 area 0

network 192.168.1.0金库娱乐app官网 0.0.0.255 area 2

!

////////////////////

R2#show run

interface FastEthernet0/0

description OSPF area 1,connected to Network 172.16.255.16/30

ip address 172.16.255.17 255.255.255.252

ip ospf cost 2

!

interface Serial1/0

description DTE,OSPF area 0,connected to R1's S1/1,ip 172.16.255.1/30

ip address 172.16.255.2 255.255.255.252

ip ospf cost 10

!

interface Serial1/1

description DCE,OSPF area 1,connected to R3's S1/0,ip 172.16.255.6/30

ip address 17金库娱乐app官网2.16.255.5 255.255.255.252

ip ospf cost 2

clock rate 9600

!

router ospf 100

router-id 2.2.2.2

network 172.16.255.0 0.0.0.3 area 0

network 172.16.255.4 0.0.0.3 area 1

network 172.16.255.16 0.0.0.3 area 1

!

////////////////////

R3#show run

interface Serial1/0

description DTE,OSPF area 1,connected to R2's S1/1,ip 172.16.255.5/30

ip address 172.16.255.6 255.255.255.252

ip ospf cost 2

!

interface Serial1/1

description DCE,OSPF area 1,connected to R4's S1/0,ip 172.16.255.10/30

ip address 172.16.255.9 255.255.255.252

ip ospf cost 5

clock rate 9600

!

router ospf 100

router-id 3.3.3.3

network 172.16.255.4 0.0.0.3 area 1金库娱乐app官网

network 172.16.255.8 0.0.0.3 area 1

!

////////////////////

R4#show run

interface FastEthernet0/0

description OSPF area 1,connected to Network 172.16.255.16/30

ip address 172.16.255.18 255.255.255.252

ip ospf cost 2

!

interface Serial1/0

description DTE,OSPF area 1,connected to R3's S1/1,ip 172.16.255.9/30

ip address 172.16.255.10 255.255.255.252

ip ospf cost 5

!

interface Serial1/2

d金库娱乐app官网escription FrameRelay,OSPF area 0,connected to R1's S1/2,ip 172.16.255.13/30

ip address 172.16.255.14 255.255.255.252

encapsulation frame-relay

ip ospf network broadcast

ip ospf cost 2

!

router ospf 100

router-id 4.4.4.4

network 172.16.255.8 0.0.0.3 area 1

network 172.16.255.12 0.0.0.3 area 0

network 172.16.255.16 0.0.0.3 area 1

!

R3#traceroute 192.168.1.1

1 172.16.255.5 24 msec 68 msec 12 msec

2 172.16.255.1 20 msec *20 msec

R3#show ip route

172.16.0.0/30 is subnetted, 5 subnets

O IA172.16.255.0 [110/12] via 172.16.255.5, 00:00:07, Serial1/0

C172.16.255.4 is directly connected, Serial1/0

C172.16.255.8 is directly connected, Serial1/1

O IA172.16.255.12 [110/6] via 172.16.255.5, 00:00:07, Serial1/0

O172.16.255.16 [110/4] via 172.16.255.5, 00:00:07, Serial1/0

O IA 192.168.1.0/24 [110/7] via 172.16.255.5, 00:00:07, Serial1/0

从R3到达192.168.1.0/24,起码的cost为R3-R2-R4-R1=7,可实际路由为R3-R2-R1=13。为何呈现这样的环境?

首先查看R3的ospf database:

R3#show ip ospf data

Router Link States (Area 1)

Link IDADV RouterAgeSeq#Checksum Link count

2.2.2.22.2.2.26730x80000005 0x003C97 3

3.3.3.33.3.3.36150x80000003 0x005569 4

4.4.4.44.4.4.46280x80000005 0x00951E 3

Net Link States (Area 1)

Link IDADV RouterAgeSeq#Checksum

172.16.255.172.2.2.26730x80000002 0x002C22

Summary Net Link States (Area 1)

Link IDADV RouterAgeSeq#Checksum

172.16.255.02.2.2.26730x80000002 0x001858

172.16.255.04.4.4.46280x80000002 0x00EF76

172.16.255.122.2.2.26730x80000004 0x00AFB0

172.16.255.124.4.4.46280x80000004 0x000F53

192.168.1.02.2.2.26730x80000002 0x00FCC1

192.168.1.04.4.4.46280x80000002 0x00704E

可以肯定,R4和R2同时向R3告示了192.168.1.0/24的路由

R3#show ip ospf database summary

Routing Bit Set on this LSA

LS age: 886

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(Network)

Link State ID: 192.168.1.0 (summary Network Number)

Advertising Router: 2.2.2.2

LS Seq Number: 80000002

Checksum: 0xFCC1

Length: 28

Network Mask: /24

TOS: 0Metr金库娱乐app官网ic: 11

Routing Bit Set on this LSA

LS age: 843

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(Network)

Link State ID: 192.168.1.0 (summary Network Number)

Advertising Router: 4.4.4.4

LS Seq Number: 80000002

Checksum: 0x704E

Length: 28

Network Mask: /24

TOS: 0Metric: 3

这里已经呈现了两个问题。1、以该告示的cost来谋略,R3经由过程R2(2.2.2.2)到达192.168.1.0/24的总cost为13,经由过程R4(4.4.4.4)的cost为8,而R3却没有选择R4作为首选ABR;2、R2告示的192.168.1.0/24的cost为11,而不是我们所估计的5。

R3肯定是懂得全部拓扑的环境,由于从它的路由表中可以看出,到达192.168.1.0/24的起码cost与理论值不停,为7。是以R3的路由选择并没有错,关键是R2。

R2#show ip route

O IA 192.168.1.0/24 [110/11] via 172.16.255.1, 00:07:39, Serial1/0

无论从这里照样刚才R3接管到的LSA看,R2自身认定192.168.1.0/24的cost为11,并且把该值看护给了R3。然则R3并没有采取该metric,而是经由过程自身谋略,“得出”了“R2应该从R4转发到192.168.1.0/24的数据包”这个结论。关键问题是,R2并没有采用该结论。

小我感到其实不应该呈现这种问题??赡苡腥烁芯鮎2的选路出了问题,但我感觉造成次优路由选择差错的不是R2,而是R3。首先,OSPF是一个可划分区域的路由协议。从大年夜局上看,最优路由因该有两个前提。一是区域间最优,即转发数据包从ABR到达另一个ABR,此中骨干内的cost起码;二是区域内最优,即源到ABR,以及ABR到目的地的cost起码。区域与区域间的路由选择是各自自力的,包括骨干区域。现在的环境是,R3干预了区域间及ABR到目的地的区域内两者的选路。是以它得出了R2会经由过程R4转发数据包这种差错的结论。别的,R2已经告示了它到达192.168.1.0/24的cost为11,R4也告示了cost为3,但R3仍然选择了R2。当然这是LS routing相对付DV routing的一个进步,即路由器能够懂得全部收集拓扑的布局而做出加倍精确的决策,只是这里的决策已经越俎代庖了。从实验本身来看,小我感觉最为合理的路由应该是R3-R4-R1,即R3不再懂得整网的拓扑,而只是懂得本区域的拓扑及各ABR告示的cost,根据这些得出的结论,虽然并非最优的结论,然则会加倍合理。

ps:

有同伙要求贴上R2、R4的路由表,若是能够赞助表达我的意思,也便是举手之劳而已。下面是完备的路由表

R4#show ip route

172.16.0.0/30 is subnetted, 5 subnets

O172.16.255.0 [110/12] via 172.16.255.13, 00:00:04, Serial1/2

O172.16.255.4 [110/4] via 172.16.255.17, 00:00:54, FastEthernet0/0

C172.16.255.8 is directly connected, Serial1/0

C172.16.255.12 is directly connected, Serial1/2

C172.16.255.16 is directly connected, FastEthernet0/0

O IA 192.168.1.0/24 [110/3] via 172.16.255.13, 00:00:04, Serial1/2

R2#show ip route

172.16.0.0/30 is subnetted, 5 subnets

C172.16.255.0 is directly connected, Serial1/0

C172.16.255.4 is directly connected, Serial1/1

O172.16.255.8 [110/7] via 172.16.255.6, 00:07:09, Serial1/1

[110/7] via 172.16.255.18, 00:07:09, FastEthernet0/0

O172.16.255.12 [110/12] via 172.16.255.1, 00:06:19, Serial1/0

C172.16.255.16 is directly connected, FastEthernet0/0

O IA 192.168.1.0/24 [110/11] via 172.16.255.1, 00:06:19, Serial1/0

免责声明:以上内容源自网络,版权归原作者所有,如有侵犯您的原创版权请告知,我们将尽快删除相关内容。

您可能还会对下面的文章感兴趣: