SlideShare a Scribd company logo
ROUTING & OSPF CCNA 3.0
OSPF Open Shortest Path First is a link-state routing protocol (do not broadcast their routing tables periodically like RIP & IGRP) It is non-proprietary like RIP v1 & v2, but much more scalable Can scale because it can be set up hierarchical  Routing loops usually do not occur because each router builds a complete “map” of the network Cisco’s OSPF metric based on bandwidth You can divide an OSPF network into multiple areas, which allows for control of routing updates
OSPF Convergence is faster If network has converged, then each router in an OSPF area has a link-state database that has the same status as the other routers It is classless, so it supports VLSM No 15 hop limitation Updates are triggered by network changes   OSPF selects optimal routes Uses concept of “areas” and can segment a network into smaller clusters of routers – changes in one area will not affect all areas More than 50 routers, use OSPF
Link-State Advertisements LSAs are multicast to all routers in an area These multicast packets begin new adjacencies and make sure that neighbor routers are still “there”. Routers use LSAs to learn about the topology of the entire network LSAs are sent when there is a topology change
OSPF Terminology An interface on a router The status of a link between 2 routers A list of info about other routers in the network – shows the topology (also called Link-State database) A collection of network and routers that have the same area identification. Each router has same link-state info. A router in a area is called an internal router. OSPF Terminology Cost is the value assigned to the link, based on the bandwidth
OSPF Terminology
OSPF Terminology Cost is the value assigned to the link, based on the bandwidth
OSPF Terminology Routing Table is generated when an algorithm is run on the link-state database. Each router’s table is unique to that router.
OSPF Terminology Adjacencies database is a listing of all the neighbors to which a router has established bi-directional communication
OSPF Terminology Designated router & backup designated router are routers that are elected by all other routers to represent all the routers. Every network has a DR & a BDR.
OSPF Terminology Router ID – Used to identify the routers in the OSPF network IP address configured with the Router-ID command (extra) Highest loopback address (configuration coming) Highest active IP address Loopback address has the advantage of never going down, thus diminishing the possibility of having to re-establish adjacencies.
OSPF Terminology CCNA 3.0 covers Single Area OSPF as opposed to Multi-Area OSPF All routers will be configured in a single area, the convention is to use  area 0 If OSPF has more than one area, it must have an area 0 CCNP includes Multi-Area OSPF Or  “OSPF Routing Domain” Single Area OSPF uses only one area, usually Area 0
Cisco:  Cost = Bandwidth Cisco uses a default cost of  10 8 /bandwidth Default bandwidth of the interface (bandwidth command)  10 8  (100,000,000) as the  reference bandwidth : This is used so that the faster links (higher bandwidth) have lower costs. Routing metrics, lower the cost the better the route. I.e. RIP:  3 hops is better than 10 hops The reference bandwidth can be modified to accommodate networks with links faster than 100,000,000 bps (100 Mbps).  (See  ospf   auto-cost reference-bandwidth  command.) Cost of a route is the cumulative costs of the outgoing interfaces from this router to the network. OSPF’s Metric is Cost (Bandwidth)
OSPF’s Metric is Cost (Bandwidth) Cisco default interface costs: 56-kbps serial link =  1785   (100,000,000/56000) 64-kbps serial link =  1562   128-kbps serial link =  781   T1 (1.544-Mbps serial link) =  64  (100,000,000/15400) E1 (2.048-Mbps serial link) =  48   4-Mbps Token Ring =  25   Notes:   Cisco routers default to T1 (1.544 Mbps) on all serial interfaces and require manual modification with the bandwidth command. ip ospf cost  [some number] is used to set the link cost.  In a 100-Mbps and Gigabit Ethernet situation, the default cost values could cause routing to take a less desirable path unless they are adjusted.   Cost = 100,000,000/Bandwidth
OSPF’s Metric is Cost (Bandwidth) For serial links, if it is not a T1 line, use the bandwidth command to configure the interface to the right bandwidth Both sides of the link should have the same bandwidth value If you use the command  ospf auto-cost reference-bandwidth   reference-bandwidth,  configure all of the routers to use the same value.
OSPF Packet Types Acknowledges receipt of a neighbor’s LSA Type 5 – Link-state acknowledgement (LSAck) Transports LSAs to neighbor routers Type 4 – Link-state update (LSU) Requests specific pieces of a router’s LSD Type 3 – Link-state request (LSR) Describes contents of an OSPF router’s link-state database Type 2 – Database description packet (DBD) Estab. & main. Adjacency info w/ neighbors Type 1 – Hello Description OSPF Packet Type
OSPF Hello Protocol OSPF routers send  Hellos  on OSPF enabled interfaces: Default  every 10 seconds  on multi-access and point-to-point segments Default  every 30 seconds  on NBMA segments Most cases OSPF Hello packets are sent as multicast to ALL SPF Routers ( 224.0.0.5 ) HelloInterval  - Cisco default = 10 seconds or 30 seconds and can be changed with the command  ip ospf hello-interval . RouterDeadInterval   - The period in seconds that the router will wait to hear a Hello from a neighbor before declaring the neighbor down.  Cisco uses a  default of four-times the  HelloInterval   (4 x 10 sec. =  40 seconds, 120 secconds for NBMA ) and can be changed with the command  ip ospf dead-interval To become adjacent, the Hello, DeadInterval and network types must be identical between routers or Hello packets get dropped!  No need to change these unless there is some reason for increased performance.
OSPF States After loading, routers now fully adjacent. Full Adjacency Link state updates exchanged Loading Routers send each other their databases Exchange Type 2 packets exchanged; master & slave estab. ExStart When a router sees itself in its neighbor’s hello packet Two-Way Hello packets are sent Init Everything down, nothing exchanged Down Definition State
OSPF Network Types Ethernet, Token-ring, FDDI PPP, HDLC Frame-Relay, X.25 No DR or BDR needed DR and BDR needed DR and BDR needed
Steps for OSPF Operation Establish router adjacencies Elect a DR & BDR Discover routes Select appropriate routes to be used Maintain routing info
Steps to OSPF Operation with States -  DR and BDR Router with the  highest Router ID  is elected the  DR , next is  BDR . But like other elections, this one can be rigged. The router’s priority field can be set to either ensure that it becomes the DR or prevent it from being the DR. Rtr(config-if)#  ip ospf priority <0-255> Higher priority becomes DR/BDR Default = 1 0 = Ineligible to become DR/BDR The router can be assigned a priority between 0 and 255, with 0 preventing this router from becoming the DR (or BDR) and 255 ensuring at least a tie.  (The highest Router ID would break the tie.) Show ip ospf interface   [interface]  will display the priority value
Steps to OSPF Operation with States -  DR and BDR DROther(s) All other routers, “DROther”, establish adjacencies with only the DR and BDR. DRother routers multicast LSAs  to only the DR and BDR (224.0.0.6 - all DR routers) DR sends LSA to all adjacent neighbors  (224.0.0.5 - all OSPF routers send) Backup Designated Router - BDR Listens, but doesn’t act. If LSA is sent, BDR sets a timer. If timer expires before it sees the reply from the DR, it becomes the DR and takes over the update process. The process for a new BDR begins.
OSPF Configuration Process – ID – locally sig. – doesn’t have to be same on all routers Wildcard is necessary because OSPF supports VLSM & CIDR
Network Command and the Wildcard Mask S0 S0 fa0 fa0 RouterID: lo0 200.0.0.1/32 lo1 lo1 Merida Vargas 192.168.1.0/24 192.168.30.0/24 192.168.20.4.0/30 192.168.2.0/24 192.168.20.0/30 .1 .2 .5 Non-OSPF link .1 .1 .1 RouterID: lo0 201.0.0.1/32   Merida Merida(config)#router ospf 1 Merida(config-router)#network 192.168.1.0 0.0.0.255 area 0 Merida(config-router)#network 192.168.2.0 0.0.0.255 area 0 Merida(config-router)#network 192.168.20.0 0.0.0.3 area 0 Vargas Vargas(config)#router ospf 10 Vargas(config-router)#network 192.168.20.0 0.0.0.3 area 0 Vargas(config-router)#network 192.168.30.0 0.0.0.255 area 0 Only 192.168.20.0/30 NOT 192.168.20.4/30
Configuring a Loopback Address Rtr(config)#  interface loopback 0 Rtr(config-if)#  ip add 10.1.1.1 255.255.255.0 Automatically are “up” and “up” Very useful in setting Router IDs as they never go down. RouterID is used to identify the routers in the OSPF network IP address configured with the Router-ID command Highest loopback address Highest active IP address Important for DR/BDR elections unless you use the  ip ospf priority  command Extra: Also, useful to configure “virtual” networks that you can ping and route as if they were attached networks.
Configuring Simple Authentication A router, by default, trusts that routing information received, has come from a router that should be sending it. Rtr(config-if)#  ip ospf authentication-key   passwd Configured on an interface password  = Clear text unless message-digest is used (lab) Easily captured using a packet sniffer Passwords do  not  have to be the same throughout an area, but they must be same between neighbors. After a password is configured, you enable authentication for the area on all participating area routers with: Rtr(config-router)#  area  area  authentication   Configured for an OSPF area, in ospf router mode. Note that this is a 2-step process (lab)
Encrypted Authentication Message-digest keyword (MD5) is used ip ospf message-digest-key   key-id   md5   encryption-type key   On the interface: area   area-id   authentication message-digest  A message digest is scrambled data that is based on the password and the packet contents.   The receiving router uses the shared password and the packet to re-calculate the digest.  If the digests match, the router believes that the source and contents of the packet have not been tampered with.
MD5 Authentication Normally used in OSPF: To prevent OSPF packets from being decoded by someone using a packet sniffer To make sure the routing info is from a valid source To make sure that routing info is not falsified
Configuring and Propagating a Default Route Router(config)#  ip route 0.0.0.0 0.0.0.0 serial0 Router(config)#  router ospf 1 Router(config-router)#  default-information originate  [always]  If the ASBR has a default route configured (ip route 0.0.0.0 0.0.0.0), the  default-information originate  command is necessary to advertise 0.0.0.0/0 to the other routers in the area.  If the  default-information originate  command is  not  used, the default “quad-zero” route will  not  be propagated. Important :  The default route and the default-information originate command are usually only be configured on your “Entrance” or “Gateway” router, the router that connects your network to the outside world. This router is known as the ASBR (Autonomous System Boundary Router) The  always  option will propagate a default “quad-zero” route even if one is not configured on this router.
Default Route Example Entrance(config)#  ip route 0.0.0.0 0.0.0.0 serial 0 Entrance(config)#  router ospf 1 Entrance(config-router)#  network 10.0.0.0 0.0.0.255 area 0 Entrance(config-router)#  network 11.0.0.0 0.0.0.255 area 0 Entrance(config-router)#  default-information originate ISP Entrance Engineering Marketing ip route 0.0.0.0/0 Static Route 0.0.0.0/0 0.0.0.0/0 Automatically Propagated s0 10.0.0.0/24 11.0.0.0/24 Engineering and Marketing will have 0.0.0.0/0 default routes forwarding packets to the Entrance router.
show ip route Router# show ip route 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks O IA  172.16.51.1/32 [110/783] via 172.16.1.2, 00:11:44, FastEthernet0 O  172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0 C  172.16.10.4/30 is directly connected, Serial0 C  172.16.1.0/24 is directly connected, FastEthernet0 O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0 O E1 12.0.0.0/8 [110/782] via 172.16.1.1, 00:11:44, FastEthernet0 O  = OSPF routes within the same area (intra-area routes) 110/number  = Administrative Distance/metric  (cumulative 10 8 /bandwidth) E2  = Routes outside of the OSPF routing domain,  redistributed into OSPF. Default is E2, the metric is  20  and does  not  get modified within the OSPF O IA  = OSPF routes from another area (inter-area routes)
show ip ospf  Router#show ip ospf Routing Process &quot;ospf 1&quot; with ID 192.168.3.1 Supports only single TOS(TOS0) routes It is an area border router 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 3. Checksum Sum 0x97E3  Number of DCbitless external LSA 0 Number of DoNotAge external LSA 0 Number of areas in this router is 2. 2 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0)   Number of interfaces in this area is 1   Area has no authentication   SPF algorithm executed 8 times   <text omitted> Area 1   <text omitted>
show ip ospf interface Router#  show ip ospf interface Ethernet0  is up, line protocol is up Internet Address 206.202.2.1/24,  Area 1 Process ID 1, Router ID 1.2.202.206, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 2.2.202.206, Interface address 206.202.2.2 Backup Designated router (ID) 1.2.202.206, Interface address 206.202.2.1 Timer intervals   configured , Hello 10, Dead 40,  Wait 40, Retransmit 5 Hello due in 00:00:00 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.2.202.206  (Designated Router) Suppress hello for 0 neighbor(s) Serial0  is up, line protocol is up Internet Address 206.202.1.2/24, Area 1 Process ID 1, Router ID 1.2.202.206,  Network Type POINT_TO_POINT ,  Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.0.202.206 Suppress hello for 0 neighbor(s) Timer intervals Router ID # Neighbor adjacencies
OSPF Neighbors Adjacencies Hello interval
show ip ospf neighbor RouterB#show ip ospf neighbor Neighbor ID  Pri  State  Dead Time  Address  Interface 1.5.202.206  1  FULL/DROTHER  00:00:33  206.202.0.3  Ethernet0 1.10.202.206  1  FULL/BDR  00:00:32  206.202.0.4  Ethernet0 1.0.202.206  1  2WAY/DROTHER  00:00:30  206.202.0.1  Ethernet0 1.2.202.206  1  FULL/  -  00:00:32  206.202.1.2  Serial0 In this example, we are the DR Notice: DROTHER may be in FULL or 2 WAY state, both cases are normal.
Clear & Debug Always clear out your routing table before troubleshooting with: clear ip route * To debug, use: debug ip ospf w/ appropriate options (events, packet)
OSPF Configuration Commands - Review Required Commands: Rtr(config)#  router ospf  process-id Rtr(config-router)# network  address   wildcard-mask  area  area-id Optional Commands: Rtr(config-router)#  default-information originate (Send default) Rtr(config-router)#  area  area  authentication  (Plain authen.) Rtr(config-router)#  area  area  authentication message-digest  (md5 authen.) Rtr(config)#  interface loopback  number  (Configure lo as RtrID) Rtr(config)#  interface type slot/port (int Fa0/0) Rtr(config-if)#  ip ospf priority <0-255>  (DR/BDR election) Rtr(config-if)#  bandwidth  kbps   (Modify default bandwdth) RTB(config-if)#  ip ospf cost  cost  (Modify inter. cost) Rtr(config-if)#  ip ospf hello-interval  seconds  (Modify Hello) Rtr(config-if)#  ip ospf dead-interval  seconds  (Modify Dead) Rtr(config-if)#  ip ospf authentication-key  passwd  (Plain/md5authen) Rtr(config-if)#  ip ospf message-digest-key  key-id  md5  password
ROUTING & OSPF CCNA 3.0

More Related Content

PPTX
OPEN SHORTEST PATH FIRST (OSPF)
PPTX
Open shortest path first (ospf)
PPTX
Ospf area types
PPTX
Open Shortest Path First
PDF
Cisco Router Basic Configuration
PPTX
AZ-104 training & certification - warner-AZ-104.pptx
PDF
Cisco ospf
PPTX
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
OPEN SHORTEST PATH FIRST (OSPF)
Open shortest path first (ospf)
Ospf area types
Open Shortest Path First
Cisco Router Basic Configuration
AZ-104 training & certification - warner-AZ-104.pptx
Cisco ospf
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx

What's hot (20)

PPTX
OSPF Basics
PPT
PPT
PDF
Segment Routing Lab
PDF
How BGP Works
PPTX
Routing protocols
PPTX
Bgp protocol
PDF
Cisco IPv6 Tutorial
PPTX
Border Gatway Protocol
PPTX
IS-IS Protocol
PDF
PPTX
IS-IS Packet Types
PPT
MPLS (Multi-Protocol Label Switching)
PPT
Mpls L3_vpn
PPTX
IP Multicasting
PPT
Spanning tree protocol
PDF
MPLS Concepts and Fundamentals
PPTX
IS-IS Protocol Introduction
OSPF Basics
Segment Routing Lab
How BGP Works
Routing protocols
Bgp protocol
Cisco IPv6 Tutorial
Border Gatway Protocol
IS-IS Protocol
IS-IS Packet Types
MPLS (Multi-Protocol Label Switching)
Mpls L3_vpn
IP Multicasting
Spanning tree protocol
MPLS Concepts and Fundamentals
IS-IS Protocol Introduction
Ad

Viewers also liked (20)

PDF
Protocole OSPF
PPTX
Link state routing protocol
PPTX
Ppt of routing protocols
PPT
Link State Protocol
PPT
Routing algorithm
PPSX
OSPF - Routing Protocol
PPT
OSPF- Multi area
PPTX
Ch 20 UNICAST ROUTING SECTION 2
PPSX
RIP - Routing Information Protocol
PPTX
Routing Information Protocol
PPT
Distance vector routing
PPTX
Troubleshooting ospf
DOCX
Eigrp and ospf comparison
PPT
Ip addressing...
PPTX
PPT
Chapter7ccna
PDF
OLSR setup
PPTX
PPTX
Protocole OSPF
Link state routing protocol
Ppt of routing protocols
Link State Protocol
Routing algorithm
OSPF - Routing Protocol
OSPF- Multi area
Ch 20 UNICAST ROUTING SECTION 2
RIP - Routing Information Protocol
Routing Information Protocol
Distance vector routing
Troubleshooting ospf
Eigrp and ospf comparison
Ip addressing...
Chapter7ccna
OLSR setup
Ad

Similar to Routing and OSPF (20)

PPTX
PPT
C C N A Day3
PPT
Chapter7ccna
PDF
Cisco ospf
PDF
Ccna day3-140715152337-phpapp01
PPT
PPT
PPT
Ccna day3
PPT
Ccna day3
PPTX
Ccna ppt1
PPTX
OSPF IN COMPUTER NETWORKING..............
PPT
Menggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.ppt
PPT
ospf.ppt
PPTX
CCNA pptCCNA ppt Day 6
PPT
BSCI30S03 OSPF open shortest path first .ppt
PPTX
Allwyn ospf ppt
PPTX
ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
PPT
Ospf
PDF
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
PPTX
OSPF by Abdullah Mukhtar
C C N A Day3
Chapter7ccna
Cisco ospf
Ccna day3-140715152337-phpapp01
Ccna day3
Ccna day3
Ccna ppt1
OSPF IN COMPUTER NETWORKING..............
Menggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.ppt
ospf.ppt
CCNA pptCCNA ppt Day 6
BSCI30S03 OSPF open shortest path first .ppt
Allwyn ospf ppt
ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
Ospf
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
OSPF by Abdullah Mukhtar

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Modernizing your data center with Dell and AMD
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
A Presentation on Artificial Intelligence
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Modernizing your data center with Dell and AMD
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
A Presentation on Artificial Intelligence

Routing and OSPF

  • 1. ROUTING & OSPF CCNA 3.0
  • 2. OSPF Open Shortest Path First is a link-state routing protocol (do not broadcast their routing tables periodically like RIP & IGRP) It is non-proprietary like RIP v1 & v2, but much more scalable Can scale because it can be set up hierarchical Routing loops usually do not occur because each router builds a complete “map” of the network Cisco’s OSPF metric based on bandwidth You can divide an OSPF network into multiple areas, which allows for control of routing updates
  • 3. OSPF Convergence is faster If network has converged, then each router in an OSPF area has a link-state database that has the same status as the other routers It is classless, so it supports VLSM No 15 hop limitation Updates are triggered by network changes OSPF selects optimal routes Uses concept of “areas” and can segment a network into smaller clusters of routers – changes in one area will not affect all areas More than 50 routers, use OSPF
  • 4. Link-State Advertisements LSAs are multicast to all routers in an area These multicast packets begin new adjacencies and make sure that neighbor routers are still “there”. Routers use LSAs to learn about the topology of the entire network LSAs are sent when there is a topology change
  • 5. OSPF Terminology An interface on a router The status of a link between 2 routers A list of info about other routers in the network – shows the topology (also called Link-State database) A collection of network and routers that have the same area identification. Each router has same link-state info. A router in a area is called an internal router. OSPF Terminology Cost is the value assigned to the link, based on the bandwidth
  • 7. OSPF Terminology Cost is the value assigned to the link, based on the bandwidth
  • 8. OSPF Terminology Routing Table is generated when an algorithm is run on the link-state database. Each router’s table is unique to that router.
  • 9. OSPF Terminology Adjacencies database is a listing of all the neighbors to which a router has established bi-directional communication
  • 10. OSPF Terminology Designated router & backup designated router are routers that are elected by all other routers to represent all the routers. Every network has a DR & a BDR.
  • 11. OSPF Terminology Router ID – Used to identify the routers in the OSPF network IP address configured with the Router-ID command (extra) Highest loopback address (configuration coming) Highest active IP address Loopback address has the advantage of never going down, thus diminishing the possibility of having to re-establish adjacencies.
  • 12. OSPF Terminology CCNA 3.0 covers Single Area OSPF as opposed to Multi-Area OSPF All routers will be configured in a single area, the convention is to use area 0 If OSPF has more than one area, it must have an area 0 CCNP includes Multi-Area OSPF Or “OSPF Routing Domain” Single Area OSPF uses only one area, usually Area 0
  • 13. Cisco: Cost = Bandwidth Cisco uses a default cost of 10 8 /bandwidth Default bandwidth of the interface (bandwidth command) 10 8 (100,000,000) as the reference bandwidth : This is used so that the faster links (higher bandwidth) have lower costs. Routing metrics, lower the cost the better the route. I.e. RIP: 3 hops is better than 10 hops The reference bandwidth can be modified to accommodate networks with links faster than 100,000,000 bps (100 Mbps). (See ospf auto-cost reference-bandwidth command.) Cost of a route is the cumulative costs of the outgoing interfaces from this router to the network. OSPF’s Metric is Cost (Bandwidth)
  • 14. OSPF’s Metric is Cost (Bandwidth) Cisco default interface costs: 56-kbps serial link = 1785 (100,000,000/56000) 64-kbps serial link = 1562 128-kbps serial link = 781 T1 (1.544-Mbps serial link) = 64 (100,000,000/15400) E1 (2.048-Mbps serial link) = 48 4-Mbps Token Ring = 25 Notes: Cisco routers default to T1 (1.544 Mbps) on all serial interfaces and require manual modification with the bandwidth command. ip ospf cost [some number] is used to set the link cost. In a 100-Mbps and Gigabit Ethernet situation, the default cost values could cause routing to take a less desirable path unless they are adjusted. Cost = 100,000,000/Bandwidth
  • 15. OSPF’s Metric is Cost (Bandwidth) For serial links, if it is not a T1 line, use the bandwidth command to configure the interface to the right bandwidth Both sides of the link should have the same bandwidth value If you use the command ospf auto-cost reference-bandwidth reference-bandwidth, configure all of the routers to use the same value.
  • 16. OSPF Packet Types Acknowledges receipt of a neighbor’s LSA Type 5 – Link-state acknowledgement (LSAck) Transports LSAs to neighbor routers Type 4 – Link-state update (LSU) Requests specific pieces of a router’s LSD Type 3 – Link-state request (LSR) Describes contents of an OSPF router’s link-state database Type 2 – Database description packet (DBD) Estab. & main. Adjacency info w/ neighbors Type 1 – Hello Description OSPF Packet Type
  • 17. OSPF Hello Protocol OSPF routers send Hellos on OSPF enabled interfaces: Default every 10 seconds on multi-access and point-to-point segments Default every 30 seconds on NBMA segments Most cases OSPF Hello packets are sent as multicast to ALL SPF Routers ( 224.0.0.5 ) HelloInterval - Cisco default = 10 seconds or 30 seconds and can be changed with the command ip ospf hello-interval . RouterDeadInterval - The period in seconds that the router will wait to hear a Hello from a neighbor before declaring the neighbor down. Cisco uses a default of four-times the HelloInterval (4 x 10 sec. = 40 seconds, 120 secconds for NBMA ) and can be changed with the command ip ospf dead-interval To become adjacent, the Hello, DeadInterval and network types must be identical between routers or Hello packets get dropped! No need to change these unless there is some reason for increased performance.
  • 18. OSPF States After loading, routers now fully adjacent. Full Adjacency Link state updates exchanged Loading Routers send each other their databases Exchange Type 2 packets exchanged; master & slave estab. ExStart When a router sees itself in its neighbor’s hello packet Two-Way Hello packets are sent Init Everything down, nothing exchanged Down Definition State
  • 19. OSPF Network Types Ethernet, Token-ring, FDDI PPP, HDLC Frame-Relay, X.25 No DR or BDR needed DR and BDR needed DR and BDR needed
  • 20. Steps for OSPF Operation Establish router adjacencies Elect a DR & BDR Discover routes Select appropriate routes to be used Maintain routing info
  • 21. Steps to OSPF Operation with States - DR and BDR Router with the highest Router ID is elected the DR , next is BDR . But like other elections, this one can be rigged. The router’s priority field can be set to either ensure that it becomes the DR or prevent it from being the DR. Rtr(config-if)# ip ospf priority <0-255> Higher priority becomes DR/BDR Default = 1 0 = Ineligible to become DR/BDR The router can be assigned a priority between 0 and 255, with 0 preventing this router from becoming the DR (or BDR) and 255 ensuring at least a tie. (The highest Router ID would break the tie.) Show ip ospf interface [interface] will display the priority value
  • 22. Steps to OSPF Operation with States - DR and BDR DROther(s) All other routers, “DROther”, establish adjacencies with only the DR and BDR. DRother routers multicast LSAs to only the DR and BDR (224.0.0.6 - all DR routers) DR sends LSA to all adjacent neighbors (224.0.0.5 - all OSPF routers send) Backup Designated Router - BDR Listens, but doesn’t act. If LSA is sent, BDR sets a timer. If timer expires before it sees the reply from the DR, it becomes the DR and takes over the update process. The process for a new BDR begins.
  • 23. OSPF Configuration Process – ID – locally sig. – doesn’t have to be same on all routers Wildcard is necessary because OSPF supports VLSM & CIDR
  • 24. Network Command and the Wildcard Mask S0 S0 fa0 fa0 RouterID: lo0 200.0.0.1/32 lo1 lo1 Merida Vargas 192.168.1.0/24 192.168.30.0/24 192.168.20.4.0/30 192.168.2.0/24 192.168.20.0/30 .1 .2 .5 Non-OSPF link .1 .1 .1 RouterID: lo0 201.0.0.1/32   Merida Merida(config)#router ospf 1 Merida(config-router)#network 192.168.1.0 0.0.0.255 area 0 Merida(config-router)#network 192.168.2.0 0.0.0.255 area 0 Merida(config-router)#network 192.168.20.0 0.0.0.3 area 0 Vargas Vargas(config)#router ospf 10 Vargas(config-router)#network 192.168.20.0 0.0.0.3 area 0 Vargas(config-router)#network 192.168.30.0 0.0.0.255 area 0 Only 192.168.20.0/30 NOT 192.168.20.4/30
  • 25. Configuring a Loopback Address Rtr(config)# interface loopback 0 Rtr(config-if)# ip add 10.1.1.1 255.255.255.0 Automatically are “up” and “up” Very useful in setting Router IDs as they never go down. RouterID is used to identify the routers in the OSPF network IP address configured with the Router-ID command Highest loopback address Highest active IP address Important for DR/BDR elections unless you use the ip ospf priority command Extra: Also, useful to configure “virtual” networks that you can ping and route as if they were attached networks.
  • 26. Configuring Simple Authentication A router, by default, trusts that routing information received, has come from a router that should be sending it. Rtr(config-if)# ip ospf authentication-key passwd Configured on an interface password = Clear text unless message-digest is used (lab) Easily captured using a packet sniffer Passwords do not have to be the same throughout an area, but they must be same between neighbors. After a password is configured, you enable authentication for the area on all participating area routers with: Rtr(config-router)# area area authentication Configured for an OSPF area, in ospf router mode. Note that this is a 2-step process (lab)
  • 27. Encrypted Authentication Message-digest keyword (MD5) is used ip ospf message-digest-key key-id md5 encryption-type key On the interface: area area-id authentication message-digest A message digest is scrambled data that is based on the password and the packet contents. The receiving router uses the shared password and the packet to re-calculate the digest. If the digests match, the router believes that the source and contents of the packet have not been tampered with.
  • 28. MD5 Authentication Normally used in OSPF: To prevent OSPF packets from being decoded by someone using a packet sniffer To make sure the routing info is from a valid source To make sure that routing info is not falsified
  • 29. Configuring and Propagating a Default Route Router(config)# ip route 0.0.0.0 0.0.0.0 serial0 Router(config)# router ospf 1 Router(config-router)# default-information originate [always] If the ASBR has a default route configured (ip route 0.0.0.0 0.0.0.0), the default-information originate command is necessary to advertise 0.0.0.0/0 to the other routers in the area. If the default-information originate command is not used, the default “quad-zero” route will not be propagated. Important : The default route and the default-information originate command are usually only be configured on your “Entrance” or “Gateway” router, the router that connects your network to the outside world. This router is known as the ASBR (Autonomous System Boundary Router) The always option will propagate a default “quad-zero” route even if one is not configured on this router.
  • 30. Default Route Example Entrance(config)# ip route 0.0.0.0 0.0.0.0 serial 0 Entrance(config)# router ospf 1 Entrance(config-router)# network 10.0.0.0 0.0.0.255 area 0 Entrance(config-router)# network 11.0.0.0 0.0.0.255 area 0 Entrance(config-router)# default-information originate ISP Entrance Engineering Marketing ip route 0.0.0.0/0 Static Route 0.0.0.0/0 0.0.0.0/0 Automatically Propagated s0 10.0.0.0/24 11.0.0.0/24 Engineering and Marketing will have 0.0.0.0/0 default routes forwarding packets to the Entrance router.
  • 31. show ip route Router# show ip route 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks O IA 172.16.51.1/32 [110/783] via 172.16.1.2, 00:11:44, FastEthernet0 O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0 C 172.16.10.4/30 is directly connected, Serial0 C 172.16.1.0/24 is directly connected, FastEthernet0 O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0 O E1 12.0.0.0/8 [110/782] via 172.16.1.1, 00:11:44, FastEthernet0 O = OSPF routes within the same area (intra-area routes) 110/number = Administrative Distance/metric (cumulative 10 8 /bandwidth) E2 = Routes outside of the OSPF routing domain, redistributed into OSPF. Default is E2, the metric is 20 and does not get modified within the OSPF O IA = OSPF routes from another area (inter-area routes)
  • 32. show ip ospf Router#show ip ospf Routing Process &quot;ospf 1&quot; with ID 192.168.3.1 Supports only single TOS(TOS0) routes It is an area border router 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 3. Checksum Sum 0x97E3 Number of DCbitless external LSA 0 Number of DoNotAge external LSA 0 Number of areas in this router is 2. 2 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 1 Area has no authentication SPF algorithm executed 8 times <text omitted> Area 1 <text omitted>
  • 33. show ip ospf interface Router# show ip ospf interface Ethernet0 is up, line protocol is up Internet Address 206.202.2.1/24, Area 1 Process ID 1, Router ID 1.2.202.206, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 2.2.202.206, Interface address 206.202.2.2 Backup Designated router (ID) 1.2.202.206, Interface address 206.202.2.1 Timer intervals configured , Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:00 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.2.202.206 (Designated Router) Suppress hello for 0 neighbor(s) Serial0 is up, line protocol is up Internet Address 206.202.1.2/24, Area 1 Process ID 1, Router ID 1.2.202.206, Network Type POINT_TO_POINT , Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.0.202.206 Suppress hello for 0 neighbor(s) Timer intervals Router ID # Neighbor adjacencies
  • 34. OSPF Neighbors Adjacencies Hello interval
  • 35. show ip ospf neighbor RouterB#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.5.202.206 1 FULL/DROTHER 00:00:33 206.202.0.3 Ethernet0 1.10.202.206 1 FULL/BDR 00:00:32 206.202.0.4 Ethernet0 1.0.202.206 1 2WAY/DROTHER 00:00:30 206.202.0.1 Ethernet0 1.2.202.206 1 FULL/ - 00:00:32 206.202.1.2 Serial0 In this example, we are the DR Notice: DROTHER may be in FULL or 2 WAY state, both cases are normal.
  • 36. Clear & Debug Always clear out your routing table before troubleshooting with: clear ip route * To debug, use: debug ip ospf w/ appropriate options (events, packet)
  • 37. OSPF Configuration Commands - Review Required Commands: Rtr(config)# router ospf process-id Rtr(config-router)# network address wildcard-mask area area-id Optional Commands: Rtr(config-router)# default-information originate (Send default) Rtr(config-router)# area area authentication (Plain authen.) Rtr(config-router)# area area authentication message-digest (md5 authen.) Rtr(config)# interface loopback number (Configure lo as RtrID) Rtr(config)# interface type slot/port (int Fa0/0) Rtr(config-if)# ip ospf priority <0-255> (DR/BDR election) Rtr(config-if)# bandwidth kbps (Modify default bandwdth) RTB(config-if)# ip ospf cost cost (Modify inter. cost) Rtr(config-if)# ip ospf hello-interval seconds (Modify Hello) Rtr(config-if)# ip ospf dead-interval seconds (Modify Dead) Rtr(config-if)# ip ospf authentication-key passwd (Plain/md5authen) Rtr(config-if)# ip ospf message-digest-key key-id md5 password
  • 38. ROUTING & OSPF CCNA 3.0