当前位置:文档之家› ospf数据包及LSA分析

ospf数据包及LSA分析

ospf数据包及LSA分析
ospf数据包及LSA分析

SW2(config-if-range)#do sh mac add

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports ---- ----------- -------- ----- All 000c.8575.eb80 STATIC CPU

All https://www.doczj.com/doc/db18871928.html,cc STATIC CPU

All https://www.doczj.com/doc/db18871928.html,cd STATIC CPU

All 0100.0cdd.dddd STATIC CPU

1 0002.b933.ee61 DYNAMIC Fa0/2

2 1 0004.ddbc.0d11 DYNAMIC Fa0/24 1 00e0.1e7f.7101 DYNAMIC Fa0/23

(OSPF-4)

分析:R6发出的第一个HELLO,无邻居,无DR,BDR

状态。

分析:R6发出的第五个HELLO包,此时DR BDR已选举成功,R6已经开始与邻接路由器同步。

分析:R6向R8发出的第一个DBD报文,I(初始位)位1表示为第一个DBD,M位(后继位)置1表示后面还有,MS位(主/从位)置1表示认为自已是主。

分析:R8向R6发出的第一个DBD报文,置位同上。

分析:R6向R8发出的第二个DBD报文,M位置1表示后面还有,MS置0表示同步中为从路由器,携带LSA HEADER,内容为一条ROUTER-LSA。

分析:R8向R6发出一条LSR(链路状态请求报文),请求一条一类的LSA

分析:R6向R8回应一条LSU,携带具体的LSA信息。

LSA分析(R9LOOP0改为E1)

一、路由器LSA

R6#show ip ospf database router

OSPF Router with ID (1.1.6.6) (Process ID 10)

Router Link States (Area 0)

LS age: 409 //发出LSA后所经历的时间

Options: (No TOS-capability, DC) //指明部分OSPF域中LSA能够支持的可选性能

LS Type: Router Links //LSA 类型路由器LSA

Link State ID: 1.1.6.6 //一类LSA链路状态ID为始发路由器ID Advertising Router: 1.1.6.6 //始发路由器

LS Seq Number: 80000003 //LSA的序列号

Checksum: 0x3BAC //校验和

Length: 48 //长度

Number of Links: 2 //链路数量

Link connected to: a Transit Network //链路有类型,(1)点到点(2)传送网络(3)末梢网络(4)虚链路

(Link ID) Designated Router address: 192.168.68.6 //链路ID,用来标识连接的对象

(Link Data) Router Interface address: 192.168.68.6 //链路数据,始发者与该网络相连的接口IP

Number of TOS metrics: 0 //TOS号:为列出的这条链路指定服务类型度量值的编号,目前已不用。CISCO只支持TOS=0

TOS 0 Metrics: 10 //和指定TOS值相关联的开销

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.60.6

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 1

LS age: 411

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 1.1.7.7

Advertising Router: 1.1.7.7

LS Seq Number: 80000003

Checksum: 0x10C7

Length: 48

Number of Links: 2

Link connected to: a Transit Network

(Link ID) Designated Router address: 192.168.68.6

(Link Data) Router Interface address: 192.168.68.7

Number of TOS metrics: 0

TOS 0 Metrics: 10

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.70.7

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 1

Routing Bit Set on this LSA

LS age: 211

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 1.1.8.8

Advertising Router: 1.1.8.8

LS Seq Number: 80000003

Checksum: 0x9702

Length: 36

Area Border Router

Number of Links: 1

Link connected to: a Transit Network

(Link ID) Designated Router address: 192.168.68.6

(Link Data) Router Interface address: 192.168.68.8

Number of TOS metrics: 0

TOS 0 Metrics: 10

二、网络LSA

R6#show ip ospf int e1/0

Ethernet1/0 is up, line protocol is up

Internet Address 192.168.68.6/24, Area 0

Process ID 10, Router ID 1.1.6.6, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 1.1.6.6, Interface address 192.168.68.6

Backup Designated router (ID) 1.1.7.7, Interface address 192.168.68.7 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Hello due in 00:00:09

Index 2/2, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 1, maximum is 1

Last flood scan time is 0 msec, maximum is 4 msec

Neighbor Count is 2, Adjacent neighbor count is 2

Adjacent with neighbor 1.1.7.7 (Backup Designated Router)

Adjacent with neighbor 1.1.8.8

Suppress hello for 0 neighbor(s)

R6#show ip ospf database network

OSPF Router with ID (1.1.6.6) (Process ID 10)

Net Link States (Area 0)

Routing Bit Set on this LSA

LS age: 336

Options: (No TOS-capability, DC)

LS Type: Network Links

Link State ID: 192.168.68.6 (address of Designated Router) //链路状态ID为:DR的接口IP

Advertising Router: 1.1.6.6

LS Seq Number: 80000002

Checksum: 0xF74B

Length: 36

Network Mask: /24 //这个网络上使用的掩码

Attached Router: 1.1.6.6 //相连的路由器

Attached Router: 1.1.7.7

Attached Router: 1.1.8.8

三、网络汇总LSA

R6#show ip ospf database summary

OSPF Router with ID (1.1.6.6) (Process ID 10)

Summary Net Link States (Area 0)

Routing Bit Set on this LSA

LS age: 477

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

LS Type: Summary Links(Network)

Link State ID: 192.168.89.0 (summary Network Number)//所通告的网络号

Advertising Router: 1.1.8.8

LS Seq Number: 80000003

Checksum: 0xE774

Length: 28

Network Mask: /24 //网络的掩码

TOS: 0 Metric: 10 //ABR到达目的地的路由开销

四、ASBR汇总LSA

R6#show ip ospf database asbr-summary

OSPF Router with ID (1.1.6.6) (Process ID 10)

Summary ASB Link States (Area 0)

Routing Bit Set on this LSA

LS age: 622

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

LS Type: Summary Links(AS Boundary Router)

Link State ID: 1.1.9.9 (AS Boundary Router address) //ASBR 的路由器ID

Advertising Router: 1.1.8.8

LS Seq Number: 80000001

Checksum: 0x8F7C

Length: 28

Network Mask: /0

TOS: 0 Metric: 10 //ABR到达目的地的路由开销

五、外部LSA

R6#show ip ospf database external

OSPF Router with ID (1.1.6.6) (Process ID 10)

Type-5 AS External Link States

Routing Bit Set on this LSA

LS age: 799

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 10.1.1.0 (External Network Number ) //目的网段号

Advertising Router: 1.1.9.9

LS Seq Number: 80000001

Checksum: 0x315E

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 5 //ASBR设定的度量值

Forward Address: 0.0.0.0 //到达所通告目的地应被转发到的地址,为4个0表示,转发给ASBR

External Route Tag: 0 //外部路由标记,可以重分布打上

六、NSSA外部LSA(将AREA1配为NSSA后)

R8#show ip ospf database nssa-external

OSPF Router with ID (1.1.8.8) (Process ID 10)

Type-7 AS External Link States (Area 1)

Routing Bit Set on this LSA

LS age: 46

Options: (No TOS-capability, Type 7/5 translation, DC)

LS Type: AS External Link

Link State ID: 10.1.1.0 (External Network Number )

Advertising Router: 1.1.9.9

LS Seq Number: 80000001

Checksum: 0xD4E4

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 5

Forward Address: 192.168.89.9 //R9始发时填入的,R8 7转5时仍保仍,AREA1的路由器仍然知道最终的转发者

External Route Tag: 0

七、将AREA1改为NSSA后对R6的影响

R6#show ip ospf border-routers

OSPF Process 10 internal Routing Table

Codes: i - Intra-area route, I - Inter-area route

i 1.1.8.8 [10] via 192.168.68.8, Ethernet1/0, ABR/ASBR, Area 0, SPF 6

路由器R8成为了ASBR/ABR

R6#show ip ospf database external

OSPF Router with ID (1.1.6.6) (Process ID 10)

Type-5 AS External Link States

Routing Bit Set on this LSA

LS age: 337

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 10.1.1.0 (External Network Number )

Advertising Router: 1.1.8.8

LS Seq Number: 80000001

Checksum: 0x764F

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 5

Forward Address: 192.168.89.9 //当四类LSA消失的时候会显示,用来指明最终的转发者

External Route Tag: 0

五类LSA的始发者成为了R8

R6#show ip ospf database asbr-summary

OSPF Router with ID (1.1.6.6) (Process ID 10)

四类LSA消失,因为四类指明的区域间的ASBR,当R8成为ASBR后四类就不需要了。

点到点链路的一类LSA

R1(config)#do sh ip ospf data rout

OSPF Router with ID (1.1.1.1) (Process ID 10)

Router Link States (Area 1)

LS age: 1364

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 1.1.1.1

Advertising Router: 1.1.1.1

LS Seq Number: 80000004

Checksum: 0xD562

Length: 60

Number of Links: 3

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.10.1

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 1

Link connected to: another Router (point-to-point)

(Link ID) Neighboring Router ID: 1.1.2.2

(Link Data) Router Interface address: 192.168.1.1

Number of TOS metrics: 0

TOS 0 Metrics: 64

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.1.0

(Link Data) Network Mask: 255.255.255.0 //相当于二类的作用 Number of TOS metrics: 0

TOS 0 Metrics: 64

Routing Bit Set on this LSA

LS age: 361

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 1.1.2.2

Advertising Router: 1.1.2.2

LS Seq Number: 80000003

Checksum: 0xE2D7

Length: 48

Area Border Router

Number of Links: 2

Link connected to: another Router (point-to-point)

(Link ID) Neighboring Router ID: 1.1.1.1

(Link Data) Router Interface address: 192.168.1.2

Number of TOS metrics: 0

TOS 0 Metrics: 64

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.1.0

(Link Data) Network Mask: 255.255.255.0

Number of TOS metrics: 0

TOS 0 Metrics: 64

相关主题
文本预览
相关文档 最新文档