Tuesday, March 10, 2015

OSPF database command show




NOTE: trong ospf gia tri cost = outing interface


  1. Show ip ospf database router
R1#show ip os da router 3.3.3.3

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

                Router Link States (Area 0)

  LS age: 267
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 3.3.3.3
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000004
  Checksum: 0xE4E5
  Length: 48
  Number of Links: 2

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 3.3.3.3
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.1.123.3
     (Link Data) Router Interface address: 10.1.123.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 30

Command " show ip ospf database router {X} "  type 1 LSA. cho thay duoc gia tri cost tu router X den router dang show

Cost R3 -> R1 = 30

  1. show ip os da router self-originate
R1#show ip os da router self-originate

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

                Router Link States (Area 0)

  LS age: 466
  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: 80000003
  Checksum: 0xAC4D
  Length: 48
  Number of Links: 2

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.1.123.3
     (Link Data) Router Interface address: 10.1.123.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 10

Show LSA sinh ra boi no, va gia tri cost cua no den cac router ben canh.

Cost R1 -> R3 = 10


  1. show ip os da network

R1#show ip os da network

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

                Net Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 650
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 10.1.123.3 (address of Designated Router)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0x6F19
  Length: 36
  Network Mask: /24
        Attached Router: 3.3.3.3
        Attached Router: 1.1.1.1
        Attached Router: 2.2.2.2

Command show type 2 LSA, cho biet cac router attack trong multiaccess. Router DR

DR: 10.1.123.3


  1. show ip os da summary

R1#show ip os da summary 4.4.4.4

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

                Summary Net Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 773
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 4.4.4.4 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x67A8
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 21

Command show type 3 LSA. Cho biet advertise router hay  va gia tri cost tu advertise router ABR - > no

Cost  R2 - > 4.4.4.4 = R2->R4 + R4-> 4.4.4.4 = 20 + 1 = 21


  1. Show ip ospf da ex {X}
R1#show ip os da ex 5.5.5.5

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

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 48
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 5.5.5.5 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000003
  Checksum: 0x7656
  Length: 36
  Network Mask: /32
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 5
        Forward Address: 10.1.45.5
        External Route Tag: 0

Command show type 5 LSA. Cho biet router ASBR advertise, gia tri metric tu 5.5.5.5 -> ASBR
Hay gia tri advertise = 5

Cost 5.5.5.5 -> ASBR = 5


  1. show ip os da asbr-summary
show ip os da asbr-summary 4.4.4.4

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

                Summary ASB Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 1370
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 4.4.4.4 (AS Boundary Router address)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x4FC0
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 20

Command  cho biet gia tri cost tu ABR-> ASBR
Cost R2 -> R4 = 20

  1. Show ip route 5.5.5.5
R1#show ip route 5.5.5.5
Routing entry for 5.5.5.5/32
  Known via "ospf 1", distance 110, metric 40, type extern 1
  Last update from 10.1.123.2 on FastEthernet0/0, 00:00:46 ago
  Routing Descriptor Blocks:
  * 10.1.123.2, from 4.4.4.4, 00:00:46 ago, via FastEthernet0/0
      Route metric is 40, traffic share count is 1


R1-> 5.5.5.5 = R1-R2 + R2-R4 + R4- + adverstise metric
 = 10 + 20 + 5 + 5 = 40  (vi tren cong f0/1 R4 run ospf vs cost = 5)

Disable ospf in f0/0 R4.

R1#show ip route 5.5.5.5
Routing entry for 5.5.5.5/32
  Known via "ospf 1", distance 110, metric 35, type extern 1
  Last update from 10.1.123.2 on FastEthernet0/0, 00:01:06 ago
  Routing Descriptor Blocks:
  * 10.1.123.2, from 4.4.4.4, 00:01:06 ago, via FastEthernet0/0
      Route metric is 35, traffic share count is 1

R1-> 5.5.5.5 = R1-R2 + R2-R4 + advertise
 = 10 + 20 + 5 = 35

  1. Config area 1 nssa
Show ip os data nssa

R2#show ip os database nssa-external 5.5.5.5

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

                Type-7 AS External Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 113
  Options: (No TOS-capability, Type 7/5 translation, DC)
  LS Type: AS External Link
  Link State ID: 5.5.5.5 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xA24F
  Length: 36
  Network Mask: /32
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 5
        Forward Address: 4.4.4.4
        External Route Tag: 0


Command show type 7 LSA. Cho biet gia tri cost adver vao tu ASBR


Cost 5.5.5.5 -> R4 = 5

No comments:

Post a Comment