Difference between revisions of "Routing protocol OSPF"

From Ever changing code
Jump to navigation Jump to search
Line 63: Line 63:


= Troubleshooting =
= Troubleshooting =
show ip protocols
clear ip ospf process  !This forces OSPF on R1 to transition to the Down and Init states. Required if router-id needs changing
show ip ospf neighbor  !State - The OSPF state of the interface. FULL state means that the router and its neighbor have identical OSPF LSDBs.
                        !On multiaccess networks, such as Ethernet, two routers that are adjacent may have their states displayed as 2WAY.
                        !The dash indicates that no DR or BDR is required because of the network type.
show ip ospf    !spf, backbone area, router-id
show ip ospf interface brief
show ip ospf interface serial 0/0/1  !cost, bandwidth
Default reference bandwidth for 100Mb/s is 10^8 100.000.000 therefore Fast Ethernet 100Mbps link cost is 1. Cost is calculated using formula:
cost = reference bandwidth bps / interface bandwidth in bps
show interface serial 0/0/1 | include BW    !verify the current bandwidth of an interface

Revision as of 17:23, 26 January 2015

OSPF States

Operation State Description
Establish neighbor adjacencies
1. Down state Negotiate master / slave relationship and DBD packet sequence number.
The master initiates the DBD packet exchange.
2. Init state Hello packets are received from the neighbor.
They contain the sending router’s Router ID.
Transition to Two-Way state.
3. Two-Way state On Ethernet links, elect a DR, and a BDR.
Transition to ExStart state.
Synchronize OSPF Databases
4. ExStart state Negotiate master / slave relationship and DBD packet sequence number.
The master initiates the DBD packet exchange.
5. Exchange state Routers exchange DBD packets.
If additional router information is required then transition to Loading; otherwise, transition to Full.
6. Loading state LSRs and LSUs are used to gain additional route information.
Routes are processed using the SPF algorithm.
Transition to the Full state.

7. Full state Routers have converged.

Differences between OSPFv2 vs OSPFv3


OSPFv2 OSPFv3
Advertises IPv4 networks IPv6 prefixes
Source address IPv4 source address IPv6 link-local address
Destination address neighbor IPv4 unicast address
224.0.0.5 all-OSPF-routers multicast address
244.0.0.6 DR/BDR multicats address
neighbor IPv6 link-local address
FF02::5 all-OSPFv3-routers multicast address
FF02::6 DR/BDR multicast address
Advertise networks network router command ipv6 ospf process-id area area-id interface configuration command
IP unicast routing Enabled by default ipv6 unicast-routing global configuration command
Authentication plaintext authentication or MD5 authentication IPv6 authentication

Troubleshooting

show ip protocols
clear ip ospf process   !This forces OSPF on R1 to transition to the Down and Init states. Required if router-id needs changing
show ip ospf neighbor   !State - The OSPF state of the interface. FULL state means that the router and its neighbor have identical OSPF LSDBs. 
                        !On multiaccess networks, such as Ethernet, two routers that are adjacent may have their states displayed as 2WAY. 
                        !The dash indicates that no DR or BDR is required because of the network type.
show ip ospf     !spf, backbone area, router-id
show ip ospf interface brief
show ip ospf interface serial 0/0/1   !cost, bandwidth


Default reference bandwidth for 100Mb/s is 10^8 100.000.000 therefore Fast Ethernet 100Mbps link cost is 1. Cost is calculated using formula:

cost = reference bandwidth bps / interface bandwidth in bps
show interface serial 0/0/1 | include BW    !verify the current bandwidth of an interface