Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF Route View

Hi

Could somone please tell me how I can view the mask of a route advertised in OSPF, whether it is Inter or Intra area routes or External routes. If I run "show ip ospf database" I can see the routes but not their associated masks?

Thanks

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: OSPF Route View

Dan,

The information is in the lsdb.

1. For internal routes network type broadcast, you have to look at the lsa type 2:

r6#sh ip ospf dat net

OSPF Router with ID (6.6.6.6) (Process ID 1)

Net Link States (Area 2)

Routing Bit Set on this LSA

LS age: 155

Options: (No TOS-capability, DC)

LS Type: Network Links

Link State ID: 192.168.156.5 (address of Designated Router)

Advertising Router: 5.5.5.5

LS Seq Number: 80000001

Checksum: 0x42AC

Length: 32

Network Mask: /24

Attached Router: 5.5.5.5

Attached Router: 6.6.6.6

r6#

2. For internal routes network type point-to-point, there is stub network associated to the p-to-p that give you that information:

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

(Link ID) Neighboring Router ID: 6.6.6.6

(Link Data) Router Interface address: 192.168.56.5

Number of TOS metrics: 0

TOS 0 Metrics: 48

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.56.0

(Link Data) Network Mask: 255.255.255.0

Number of TOS metrics: 0

TOS 0 Metrics: 48

3. For inter area routes, the information is in the lsa type 3:

Summary Net Link States (Area 2)

Routing Bit Set on this LSA

LS age: 621

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

LS Type: Summary Links(Network)

Link State ID: 2.2.2.2 (summary Network Number)

Advertising Router: 5.5.5.5

LS Seq Number: 80000001

Checksum: 0x4649

Length: 28

Network Mask: /32

TOS: 0 Metric: 145

4. For inter area routes, the information is in the lsa type 5 or 7:

Type-5 AS External Link States

Routing Bit Set on this LSA

LS age: 1359

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 3.3.3.3

LS Seq Number: 80000001

Checksum: 0xE0C5

Length: 36

Network Mask: /0

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

TOS: 0

Metric: 1

Forward Address: 0.0.0.0

External Route Tag: 1

Type-7 AS External Link States (Area 1)

Routing Bit Set on this LSA

LS age: 21

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

LS Type: AS External Link

Link State ID: 192.168.255.0 (External Network Number )

Advertising Router: 1.1.1.1

LS Seq Number: 80000001

Checksum: 0xB56F

Length: 36

Network Mask: /24

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

TOS: 0

Metric: 20

Forward Address: 1.1.1.1

External Route Tag: 0

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
2 REPLIES
Cisco Employee

Re: OSPF Route View

Dan,

The information is in the lsdb.

1. For internal routes network type broadcast, you have to look at the lsa type 2:

r6#sh ip ospf dat net

OSPF Router with ID (6.6.6.6) (Process ID 1)

Net Link States (Area 2)

Routing Bit Set on this LSA

LS age: 155

Options: (No TOS-capability, DC)

LS Type: Network Links

Link State ID: 192.168.156.5 (address of Designated Router)

Advertising Router: 5.5.5.5

LS Seq Number: 80000001

Checksum: 0x42AC

Length: 32

Network Mask: /24

Attached Router: 5.5.5.5

Attached Router: 6.6.6.6

r6#

2. For internal routes network type point-to-point, there is stub network associated to the p-to-p that give you that information:

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

(Link ID) Neighboring Router ID: 6.6.6.6

(Link Data) Router Interface address: 192.168.56.5

Number of TOS metrics: 0

TOS 0 Metrics: 48

Link connected to: a Stub Network

(Link ID) Network/subnet number: 192.168.56.0

(Link Data) Network Mask: 255.255.255.0

Number of TOS metrics: 0

TOS 0 Metrics: 48

3. For inter area routes, the information is in the lsa type 3:

Summary Net Link States (Area 2)

Routing Bit Set on this LSA

LS age: 621

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

LS Type: Summary Links(Network)

Link State ID: 2.2.2.2 (summary Network Number)

Advertising Router: 5.5.5.5

LS Seq Number: 80000001

Checksum: 0x4649

Length: 28

Network Mask: /32

TOS: 0 Metric: 145

4. For inter area routes, the information is in the lsa type 5 or 7:

Type-5 AS External Link States

Routing Bit Set on this LSA

LS age: 1359

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 3.3.3.3

LS Seq Number: 80000001

Checksum: 0xE0C5

Length: 36

Network Mask: /0

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

TOS: 0

Metric: 1

Forward Address: 0.0.0.0

External Route Tag: 1

Type-7 AS External Link States (Area 1)

Routing Bit Set on this LSA

LS age: 21

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

LS Type: AS External Link

Link State ID: 192.168.255.0 (External Network Number )

Advertising Router: 1.1.1.1

LS Seq Number: 80000001

Checksum: 0xB56F

Length: 36

Network Mask: /24

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

TOS: 0

Metric: 20

Forward Address: 1.1.1.1

External Route Tag: 0

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Cisco Employee

Re: OSPF Route View

Just for the record, point number 4 should have said "for external routes" rather than "for inter area routes".

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
218
Views
0
Helpful
2
Replies