OSPF COMMAND LINE: LIVE CONFIGURATION


COMMANDS WITH OUTPUT & EXPLANATION

sh ip ospf int br

sh ip ospf int  < int name >

sh ip ospf database

sh ip ospf border-routers

sh ip ospf traffic

sh ip ospf database router < router id >

****************

sh ip ospf int br

OUTPUT

Router#sh ip ospf int br

Interface PID Area IP Address/Mask Cost State Nbrs F/C

Lo0     100   0    10.144.1.4/32     1       LOOP        0/0

Gi1/2   100   0    10.144.1.13/30    1       DR            1/1

Gi2/2  100   0   10.144.1.9/30      1       BDR           1/1

Vl696   100  0   10.144.1.185/29    1         BDR        1/1

Vl2      100   0     10.144.2.8/24     1         DOWN    0/0

 

DETAILS

==> Output shows all the physical & virtual interfaces on logged in device, over which OSPF is enabled.

Example: Gi2/2 is physical interface & Vl696 is the virtual interface.

==> Here, PID represens the process id of OSPF, to which any particular interface belongs.

Example: Gi2/2 & Vl696, both belongs to process id 100.


sh ip ospf int < int name >

OUTPUT

Router#sh ip ospf int  GigabitEthernet1/2

GigabitEthernet1/2 is up, line protocol is up (connected)

Internet Address 10.144.1.13/30,  Area 0

Process ID 100, Router ID 10.144.1.4, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 10.144.1.4, Interface address 10.144.1.13

Backup Designated router (ID) 10.144.1.3, Interface address 10.144.1.14

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

 

DETAILS

==> Here, network type is broadcast

==> Hello, Dead, Wait, Re-transmit  time intervals are 10, 40, 40 & 5

==> Internet address is the interface ip address on the logged in device, over which OSPF is enabled

Example: 10.144.1.13 is the ip address of interface GigabitEthernet1/2

==> Router ID = Designated ID = 10.144.1.4, it means device itself is DR.


 

sh ip ospf database

OUTPUT

MPLS#sh ip ospf database

OSPF Router with ID (10.144.1.4) (Process ID 100)

Router Link States (Area 0)              / LSA-1 /

Link ID     ADV Router Age Seq# Checksum Link count

10.144.1.3 10.144.1.3 386 0x80028B40 0x009926 50

10.144.1.4 10.144.1.4 483 0x8000C4C4 0x00F601 5

10.144.1.190 10.144.1.190 1019 0x8000A725 0x008477 1

 

Net Link States (Area 0)         / LSA-2 /

Link ID       ADV Router Age Seq# Checksum

10.144.1.10 10.146.1.222 257 0x80007BF7 0x005834

10.144.1.13 10.144.1.4 1768 0x8000C3DF 0x0018FB

10.144.1.162 10.144.1.3 1201 0x8000C3D4 0x005859

 

Summary Net Link States (Area 0)         / LSA-3 /

Link ID         ADV Router Age Seq# Checksum

10.159.1.144 10.159.1.153 625 0x8000A0F3 0x00FA35

10.159.9.104 10.159.9.113 12 0x80003044 0x009DF2

Summary ASB Link States (Area 0)           / LSA-4 /

Link ID          ADV Router Age Seq# Checksum

213.12.66.75 10.159.1.153 625 0x80007231 0x009F45

213.12.66.76 10.159.9.113 12 0x80001771 0x00DF3F

 

Type-5 AS External Link States         / LSA-5 /

Link ID        ADV Router Age Seq# Checksum Tag

0.0.0.0        10.144.1.3 1242 0x800091D9 0x006CE5 65225

0.0.0.0        10.146.1.222 365 0x800091DB 0x003141 65225

 

DETAILS

Output shows database of all the subnets or routes learned from different LSA-types.

First line shows Router ID of the device, which is 10.144.1.4


 

sh ip ospf border-routers

OUTPUT

MPLS#sh ip ospf border-routers

OSPF Process 100 internal Routing TableCodes: i – Intra-area route, I – Inter-area route

i 10.146.192.142 [3] via 10.146.1.6, GigabitEthernet1/1, ASBR, Area 0, SPF 13514

I 213.12.66.75 [13] via 10.144.1.10, GigabitEthernet2/2, ASBR, Area 0, SPF 13514

I 213.12.66.75 [13] via 10.144.1.14, GigabitEthernet1/2, ASBR, Area 0, SPF 13514

I 213.12.66.76 [14] via 10.146.1.3, GigabitEthernet1/1, ASBR, Area 0, SPF 13514

i 10.144.99.4 [2] via 10.144.1.14, GigabitEthernet1/2, ABR/ASBR, Area 0, SPF 13514

DETAILS

==> Output shows all the border routers, including both ABR & ASBR.

==> 10.146.192.142 is the RID of ASBR learned.

==> GigabitEthernet1/1 is the OSPF enabled interface on logged in device, through which ASBR

==> 10.146.1.6 is the interface ip of next hop device, through ASBR is learned


sh ip ospf traffic

OUTPUT

4507#sh ip ospf traffic

Interface statistics:Interface Loopback0  

OSPF packets received/sent

Invalid Hellos DB-des LS-req LS-upd LS-ack Total

Rx: 0 0 0 0 0 0 0

Tx: 0 0 0 0 0 0 0

OSPF header errors

Length 0, Auth Type 0, Checksum 0, Version 0,

Bad Source 0, No Virtual Link 0, Area Mismatch 0,

No Sham Link 0, Self Originated 0, Duplicate ID 0,

Hello 0, MTU Mismatch 0, Nbr Ignored 0,

LLS 0, Unknown Neighbor 0, Authentication 0,

TTL Check Fail 0,

OSPF LSA errors

Type 0, Length 0, Data 0, Checksum 0

DETAILS

==> Output shows stats like different type of packets transferring ( Tx / Rx ) for every individual interface.

==> It is showing all the error types also.


 

sh ip ospf database router  < router id >

OUTPUT

MPLS#sh ip ospf database router 10.144.1.4

OSPF Router with ID (10.144.1.4) (Process ID 100)

Router Link States (Area 0)

LS age: 1940

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 10.144.1.4

Advertising Router: 10.144.1.4

LS Seq Number: 8000C4C3

Checksum: 0xF8FF

Length: 84

Number of Links: 5

Link connected to: a Stub Network

(Link ID) Network/subnet number: 10.144.1.4

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 1

DETAILS

==> Login to any device in the OSPF network & You can check above mentioned details for any of the OSPF enabled router in the network.

==> Number of Links: 5, means on router with RID ( 10.144.1.4 ), OSPF is enabled on 5 interfaces.
==> Link connected to: a Stub Network, means out of above mentioned five interfaces, one interface is connected to Stub network. Similar to this, details of remaining 4 interfaces will also be given.


 

REFERENCE LINK

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/ospf-s1.html#wp9885551910

https://supportforums.cisco.com/document/133976/reading-and-understanding-ospf-database


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s