• No results found

MISC OSPF Commands

In document ccna-full (Page 104-107)

- The show ip route ospf EXEC command displays only OSPF routes in the routing table.

- The show ip ospf EXEC command displays OSPF information for all OSPF processes running on a router, eg: Router ID, area information, SPF statistics, LSA timer information, etc.

Notice that the RID on RT1 is 10.1.3.1, which is the highest IP address (physical) of the router.

RT3#sh ip route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 6 subnets

O 10.1.1.0 [110/65] via 10.1.3.1, 00:01:09, Serial0/0 O 10.1.2.0 [110/128] via 10.1.3.1, 00:01:09, Serial0/0

[110/128] via 10.1.5.1, 00:01:09, Serial0/1 C 10.1.3.0 is directly connected, Serial0/0

O 10.1.4.0 [110/65] via 10.1.5.1, 00:01:09, Serial0/1 C 10.1.5.0 is directly connected, Serial0/1

C 10.1.6.0 is directly connected, FastEthernet1/0 RT3#

RT1#sh ip route ospf

10.0.0.0/24 is subnetted, 3 subnets

O 10.1.4.0 [110/65] via 10.1.2.2, 00:02:01, Serial0/0 O 10.1.5.0 [110/128] via 10.1.2.2, 00:02:01, Serial0/0 [110/128] via 10.1.3.2, 00:02:01, Serial0/1 O 10.1.6.0 [110/65] via 10.1.3.2, 00:02:01, Serial0/1 RT1#

RT1#sh ip ospf

Routing Process "ospf 1" with ID 10.1.3.1 Supports only single TOS(TOS0) routes Supports opaque LSA

SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs

Number of external LSA 0. Checksum Sum 0x0 Number of opaque AS LSA 0. Checksum Sum 0x0 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0

Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0

Area BACKBONE(0)

Number of interfaces in this area is 3 Area has no authentication

SPF algorithm last executed 00:03:10 ago SPF algorithm executed 3 times

Area ranges are

Number of LSA 3. Checksum Sum 0x015FCD

Number of opaque link LSA 0. Checksum Sum 0x0 Number of DCbitless LSA 0

Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0

RT1#

- The show ip ospf database EXEC command displays the OSPF topology database, which contains the number of routers in the autonomous system and the RID of the neighboring router.

It shows the Router ID (Link ID), the RID of the advertising router (ADV Router), the version of the OSPF database which used to detect old or duplicate LSUs (Seq#), and the number of links (including point-to-point links, transit links, stub networks, and virtual links) detected for a particular router (Link count). The output is broken down by the OSPF processes and areas.

- The show ip ospf interface [intf-type intf-num] EXEC command displays all interface-related OSPF information for all interfaces or a particular interface. It shows the interface state, interface IP address, area assignment, Process ID, Router ID, network type, cost, priority, DR/BDR election information (if applicable), timer intervals, adjacent neighbor information, and authentication configuration information (if applicable).

- The show ip ospf neighbor [intf-type intf-num] [neighbor-id] [detail] EXEC command is a very useful command because it summarizes the important OSPF information regarding neighbors and the adjacency state, as well as the DR/BDR information (only if applicable, as DR and BDR are not used on point-to-point and point-to-multipoint interfaces) for all interfaces or a particular interface. The neighbors are identified with their Router IDs (highest IP address).

RT1#sh ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count 10.1.3.1 10.1.3.1 170 0x80000003 0x00234A 5

10.1.5.1 10.1.5.1 172 0x80000003 0x0066FC 5 10.1.6.1 10.1.6.1 169 0x80000003 0x00D587 5 RT1#

RT1#sh ip ospf interface

FastEthernet1/0 is up, line protocol is up Internet Address 10.1.1.1/24, Area 0

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

Designated Router (ID) 10.1.3.1, Interface address 10.1.1.1 No backup designated router on this network

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:00

Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0)

Last flood scan length is 0, maximum is 0

Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s)

--- output omitted ---

RT1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface 10.1.5.1 1 FULL/ - 00:00:29 10.1.2.2 Serial0/0 10.1.6.1 1 FULL/ - 00:00:35 10.1.3.2 Serial0/1 RT1#

- The show ip protocols EXEC command provides an overview of all running routing protocols when multiple routing protocols are running on a single router. The following command output shows the Process ID, Router ID, the number of OSPF areas and their types, networks and areas configured for OSPF, and OSPF Router IDs of the neighbors.

- The debug ip ospf adj privileged command displays the OSPF adjacency events, eg: DR/BDR election.

- The debug ip ospf events privileged command displays information on OSPF-related events, eg: adjacency formation, flooding information, DR/BDR election, and SPF calculation.

- The debug ip ospf packet privileged command displays the contents of all sent and received OSPF packets.

- Cisco OSPF link cost is calculated based on bandwidth, whereas other vendors may use other methods for link cost / metric calculation. Hence when connecting routers from different vendors, the OSPF cost might need to be adjusted to match other vendor’s router. Both routers must have the same cost for a particular link for the OSPF to operate properly.

- Since OSPF cost is based on bandwidth, the OSPF cost of an interface can also be changed with the bandwidth {bw} interface subcommand. If an interface’s cost is not set, the formula 108 / bandwidth is used by default. Changing an interface’s bandwidth changes its OSPF cost as well.

Cisco OSPF cost calculation  108 / bandwidth (in bps). 100Mbps FE  1, 10Mbps  10. A higher bandwidth indicates a lower cost, making higher speed links more preferable.

- Gigabit Ethernet = 0.1, but since only integer value can be used, so OSPF uses a cost of 1 for both FE and GE links. The reference bandwidth, which is the value of the numerator in the cost calculation formula, can be changed with the auto-cost reference-bandwidth 1000 router subcommand. This command changes the numerator to 1000Mbps (109), and hence the formula becomes 109 / bandwidth. Finally, the cost calculation will be 1 for GE and 10 for FE.

* 108 = 100’000’000 = 100Mbps

* 109 = 1’000’000’000 = 1000Mbps = 1Gbps

- The ip ospf cost {cost} interface subcommand manipulates the OSPF cost associated with a particular interface. This command overrides the default formulated cost. The OSPF cost value ranges from 1 – 65535. The OSPF cost has no unit of measurement, it is just a number.

RT1#sh ip protocols

Routing Protocol is "ospf 1"

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID 10.1.3.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4

Routing for Networks:

10.0.0.0 0.255.255.255 area 0 Routing Information Sources:

Gateway Distance Last Update 10.1.3.1 110 00:02:21 10.1.6.1 110 00:02:21 10.1.5.1 110 00:02:21 Distance: (default is 110)

RT1#

In document ccna-full (Page 104-107)