OSPF Route View

Answered Question
Apr 24th, 2008

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

I have this problem too.
0 votes
Correct Answer by Harold Ritter about 8 years 9 months ago

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,

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Harold Ritter Thu, 04/24/2008 - 10:36

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 Fri, 04/25/2008 - 05:21

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

Regards,

Actions

This Discussion