狠狠撸

狠狠撸Share a Scribd company logo
Dynamic Routing and OSPF
(part 1)
IP routing
?Each router or host makes its own routing
decisions
?Sending machine does not have to
determine the entire path to the
destination
?Sending machine just determines the
next-hop along the path.
?This process is repeated until the destination
is reached
?Forwarding table consulted to determine
the next-hop
IP routing
?Classless routing
?route entries include
?destination
?next-hop
?mask (prefix-length) indicating size of address
space described by the entry
?Longest match
?for a given destination, find longest prefix
match in the routing table
?example: destination is 35.35.0.0/19
?routing table entries are 35.0.0.0/8 and
35.35.0.0/16
IP routing
?Default route
?where to send packets if don’t have an entry
for the destination in the routing table
?most machines have a single default route
?often referred to as a default gateway
Static routing
?each router manually configured with a
list of destinations and the next hop to
reach those destinations
?ideal for small number of destinations or
“stub” networks
?stub network - network with only one or two
paths to the rest of the network
Dynamic Routing
?routers compute routing tables
dynamically based on information
provided by other routers in the network
?routers communicate topology to each
other via different protocols
?routers then compute one or more next
hops for each destination - trying to
calculate the most optimal path
Static and Dynamic Routing
?Static routing is a simplistic approach
?Shortcomings:
?Cumbersome to configure
?Cannot adapt to link/node failures, addition of
new nodes and links
?Doesn't scale to large networks
?Solution: Dynamic Routing
Desirable Characteristics
?Automatically detect and adapt to network
topology changes
?Optimal routing
?Scalability
?Robustness
?Simplicity
?Speed of convergence
?Some control of routing choices (e.g. which
links we prefer to use)
Convergence - Why do I care?
?Convergence is when all the routers have the
same routing information
?When a network is not converged, there is
network downtime
?Packets don't get to where they are supposed to
be going: routing loops, black holes
?Occurs when there is a change in the status of a
router or link
Dynamic Protocols
?Metrics can be calculated based on a
single characteristic of a path or by
combining multiple characteristics
?Metrics commonly used:
?Bandwidth
?Hop count
?Cost
?administratively defined metrics
OSPF magic exercise
?delete your static routes
?config t
?no ip route x.x.x.x y.y.y.y z.z.z.z
?enter the following:
?router ospf 1
?network x.x.x.x 0.0.0.0 area 0
?x.x.x.x = ip address of your backbone
interface
?redistribute connected subnets
OSPF magic exercise
?Verify connectivity to all PCs in the
network
?Do not save your config
Dynamic Routing Protocols
and OSPF (part 2)
Types of Routing Protocols
?EGP
?Exterior Gateway Protocol
?Example: BGP
?IGP
?Interior Gateway Protocol
?Example: OSPF, RIP
Types of Routing Protocols
?Link-state
?Distance-vector
IGP
?Used within a single Autonomous System
(AS)
?Within a single network
Other Interior Gateway
Protocols (IGPs)
?RIP
?Lots of scaling problems
?RIPv1 is classful and officially obsolete
?RIPv2 is classless
?EIGRP
?Proprietry (Cisco only)
?IS/IS
?The forerunner of OSPF
?Multiprotocol (OSPF is IP only)
Distance Vector Protocols
?Listen to neighboring routes
?Install all routes in a table
?Advertise all routes in table
?Very simple
?Very Stupid
?example: RIP
RIP
?routing information protocol
?distance-vector algorithm
?cost is hop count
?broadcast information to all neighbors
every 30 seconds
RIP
A B
D E
C
ROUTING TABLE for A
A -
B 1
C 2
D 3
E 2
Why not use RIP?
?Distance Vector algorithm
?Broadcasts everything (not scalable)
?Metric is hop-count only
?Infinity of 16 (not large enough)
?Slow convergence (routing loops)
?Poor robustness
OSPF
?Open Shortest Path First
?Dynamic IGP (Interior Gateway Protocol)
?Use within your own network
?Link state algorithm
Shortest Path First
A B
C D
15
3
4 4
7
Metric: Link Cost
Link State Algorithm
?Each router maintains a database containing
map of the whole topology
?Links
?State (including cost)
?All routers have the same information
?All routers calculate the best path to every
destination
Link State Algorithm (con)
?Any link state changes are flooded across
the network
?"Global spread of local knowledge”
Link State vs. Distance
vector
?Distance Vector
?views net topology from neighbor’s
perspective
?adds distance vectors from route to router
?frequent, periodic updates; slow convergence
?passes copies of routing table to neighbor
routers
Link State vs. Distance
vector
?Link-State
?gets common view of entire network
topology
?calculates the shortest path to other routers
?event-triggered updates; faster convergence
?passes link-state routing updates to other
routers
Distance Vector and Link
State Protocols
?Distance vector routers compute the best
path from information passed to them
from neighbors
?Link State routers each have a copy of the
entire network map
?Link State routers compute best routes
from this local map
Note: Routing is not the same
as Forwarding
?Forwarding: passing packets along to the
next hop
?There is only one forwarding table
?Just has prefix and next-hop info
?Routing: populating the forwarding table
?You might have multiple routing databases -
e.g. both OSPF and BGP
?Routing databases have more information
Routing and Forwarding
OSPF
BGP
Static
Forwarding
Table
On Cisco, if the same prefix is received from multiple protocols, the
"administrative distance" is used to choose between them
OSPF
?open shortest path first
?dynamic IGP
?not distance vector
?Link-State algorithm
OSPF: How it works (1)
?"Hello" packets sent periodically on all
OSPF-enabled interfaces
?become "neighbors"
?establishes that link can carry data
?used to determine if neighbor is up
?Adjacencies (virtual point-to-point links)
formed between some neighbors
How it works (2)
?Once an adjacency is established, trade
information with your neighbor
?Topology information is packaged in a "link
state announcement"
?Announcements are sent ONCE, and only
updated if there's a change (or every 30
minutes)
How it works (3)
?Each router sends Link State
Announcements (LSAs) over all adjacencies
?LSAs describe router's links, interfaces and state
?Each router receives LSAs, adds them into
its database, and passes the information
along to its neighbors
How it works (4)
?Each router builds identical link-state
database
?Runs SPF algorithm on the database to
build SPF tree
?Forwarding table built from SPF tree
How it works (5)
?When change occurs:
?Broadcast change
?All routers run SPF algorithm
?Install output into forwarding
table
HELLO
?Broadcast* HELLO on network segment
?Receive ACK
?Establishes 2-way communication
?Repeat periodically
?Default: HELLO sent every 10 seconds
?Default: if no HELLO heard for 40 seconds, link
is assumed to be dead
?Now establish adjacencies
* Actually uses Multicast addresses (224.0.0.9, 224.0.0.10) so
that non-OSPF devices can ignore the packets
The HELLO packet
?Router priority
?Hello interval
?Router dead
interval
?Network mask
?List of
These must match
HELLO
HELLO HELLO
Neighbors
?Bi-directional communication
?Result of OSPF hello packets
?Need not exchange routing information
Who is adjacent?
?"Adjacent" neighbors exchange routing
information
?Not all neighbors are adjacent
?On a point-to-point link
?everyone
?On broadcast medium
?not everyone
?why?
Broadcast neighbors
A B
C D
Order of N^2 adjacencies
Broadcast medium
?Select a neighbor: Designated Router (DR)
?All routers become adjacent to DR
?Exchange routing information with the DR
?DR updates all the other neighbors
?Scales
?Adjacencies reduced from N^2 to 2N
?Backup Designated Router (BDR)
LSAs propagate along
adjacencies
DR BDR
Other nice features of OSPF
?Authentication (optional)
?Equal-cost multipath
?more than one "best" path - share traffic
?Proper classless support (CIDR)
?Multiple areas
?For very large networks (>150 routers)
?Aggregate routes across area boundaries
?Keep route flaps within an area
?Proper use of areas reduce bandwidth and CPU
utilisation
?Backbone is Area 0
Cisco OSPF commands and
configuration
?show ip route
?show ip ospf neighbor
?show ip ospf database
Configuring OSPF
?router ospf <process-id>
?network x.x.x.x m.m.m.m area <area-id>
?m.m.m.m = wildcard mask
?0 = don’t care bit
?1 = check bit
?0.0.0.0 mask for exact match
?network 203.167.177.10 0.0.0.0 area 0
?network 203.167.177.0 0.0.0.255 area 0
A
C
B
F
E
I
G
D
H
J
Router
PC
HUB
Router
PC
HUB
Router
PC
HUB
Router
PC
HUB
Router
PC
HUB
Router PC
HUB
Router PC
HUB
Router PC
HUB
Router PC
HUB
Router PC
HUB
SWITCH
Classroom Layout
A
C
B
F
E
I
G
D
H
J
133.27.162.96/28
133.27.162.128/28
133.27.162.160/28
133.27.162.192/28
133.27.162.224/28
133.27.162.112/28
133.27.162.144/28
133.27.162.176/28
133.27.162.208/28
133.27.162.240/28
Serial Links for exercise
133.27.162.16/28
133.27.162.48/30
133.27.162.52/30
133.27.162.56/30
133.27.162.60/30
133.27.162.64/30

More Related Content

Similar to ospf.ppt (20)

Ccna day3
Ccna day3Ccna day3
Ccna day3
danishrafiq
?
Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01
Sachin Morya
?
Ccna day3
Ccna day3Ccna day3
Ccna day3
Sabiulla Barkathullah
?
Routing protocols
Routing protocolsRouting protocols
Routing protocols
N.Jagadish Kumar
?
ch2_p3_ospf.pptx
ch2_p3_ospf.pptxch2_p3_ospf.pptx
ch2_p3_ospf.pptx
NilsJuanSoncoMedina
?
Chapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxChapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptx
GirT2
?
OSPF Open Shortest Path First protocol full details
OSPF Open Shortest Path First  protocol full detailsOSPF Open Shortest Path First  protocol full details
OSPF Open Shortest Path First protocol full details
Vignesh kumar
?
Routing
RoutingRouting
Routing
Ivan Ivanovich Ivanov
?
CSC427_Week_11.pdf
CSC427_Week_11.pdfCSC427_Week_11.pdf
CSC427_Week_11.pdf
muazumuhammad6
?
Layer3protocols
Layer3protocolsLayer3protocols
Layer3protocols
assinha
?
ppt (it).pdf
ppt (it).pdfppt (it).pdf
ppt (it).pdf
GouravJain420954
?
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrp
SagarR24
?
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
phanleson
?
Dynamic Routing
Dynamic RoutingDynamic Routing
Dynamic Routing
tmavroidis
?
Pathlet routing CS513
Pathlet routing CS513Pathlet routing CS513
Pathlet routing CS513
Gauri Pulekar
?
Day 8 1 introducing routing n
Day 8 1 introducing routing nDay 8 1 introducing routing n
Day 8 1 introducing routing n
CYBERINTELLIGENTS
?
RIP and OSPF
RIP and OSPFRIP and OSPF
RIP and OSPF
MusharratTabassum
?
Routing and OSPF
Routing and OSPFRouting and OSPF
Routing and OSPF
arpit
?
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
MoctardOLOULADE
?
OSPF IN COMPUTER NETWORKING..............
OSPF IN COMPUTER NETWORKING..............OSPF IN COMPUTER NETWORKING..............
OSPF IN COMPUTER NETWORKING..............
shawwalrashed
?

Recently uploaded (20)

Week-2-1.pptx Media and Information Literacy
Week-2-1.pptx Media and Information LiteracyWeek-2-1.pptx Media and Information Literacy
Week-2-1.pptx Media and Information Literacy
AngelAndres30
?
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
IJCNCJournal
?
2a Solving Equations Bar Method.pkdkdmptx
2a Solving Equations Bar Method.pkdkdmptx2a Solving Equations Bar Method.pkdkdmptx
2a Solving Equations Bar Method.pkdkdmptx
alvinlibre
?
IPv6 - Global and Malaysia's Perspectives
IPv6 - Global and Malaysia's PerspectivesIPv6 - Global and Malaysia's Perspectives
IPv6 - Global and Malaysia's Perspectives
APNIC
?
IDM Crack 2025 Internet Download Manger Patch
IDM Crack 2025 Internet Download Manger PatchIDM Crack 2025 Internet Download Manger Patch
IDM Crack 2025 Internet Download Manger Patch
wistrendugftr
?
SMOAD Networks Load Balancing Router in Chennai.pptx
SMOAD Networks Load Balancing Router in Chennai.pptxSMOAD Networks Load Balancing Router in Chennai.pptx
SMOAD Networks Load Balancing Router in Chennai.pptx
HubraSEO
?
HITRUST Overview and AI Assessments Webinar.pptx
HITRUST Overview and AI Assessments Webinar.pptxHITRUST Overview and AI Assessments Webinar.pptx
HITRUST Overview and AI Assessments Webinar.pptx
AmyPoblete3
?
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
taqyed
?
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practiceB.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
naveenithkrishnan
?
Social Media Marketing & Optimization | Prasun Dinda
Social Media Marketing & Optimization | Prasun DindaSocial Media Marketing & Optimization | Prasun Dinda
Social Media Marketing & Optimization | Prasun Dinda
Prasun Dinda
?
Introduction on how unique identifier systems are managed and coordinated - R...
Introduction on how unique identifier systems are managed and coordinated - R...Introduction on how unique identifier systems are managed and coordinated - R...
Introduction on how unique identifier systems are managed and coordinated - R...
APNIC
?
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
taqyed
?
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteBusiness
?
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptxCQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
naveenithkrishnan
?
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdfAdvanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
CartCoders
?
Intelligent-Systems-in-Manufacturing.pptx
Intelligent-Systems-in-Manufacturing.pptxIntelligent-Systems-in-Manufacturing.pptx
Intelligent-Systems-in-Manufacturing.pptx
ErickWasonga2
?
digital india initiative of indian government
digital india initiative of indian governmentdigital india initiative of indian government
digital india initiative of indian government
arujn1
?
COMPUTER NETWORK With it's Types and Layer
COMPUTER NETWORK With it's Types  and LayerCOMPUTER NETWORK With it's Types  and Layer
COMPUTER NETWORK With it's Types and Layer
sureshrani1169
?
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdfKeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
sabranghindi
?
Importance of understanding buyer behaviors.pptx
Importance of understanding buyer behaviors.pptxImportance of understanding buyer behaviors.pptx
Importance of understanding buyer behaviors.pptx
ankitregmi20580419
?
Week-2-1.pptx Media and Information Literacy
Week-2-1.pptx Media and Information LiteracyWeek-2-1.pptx Media and Information Literacy
Week-2-1.pptx Media and Information Literacy
AngelAndres30
?
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
Elliptic Curve Cryptography Algorithm with Recurrent Neural Networks for Atta...
IJCNCJournal
?
2a Solving Equations Bar Method.pkdkdmptx
2a Solving Equations Bar Method.pkdkdmptx2a Solving Equations Bar Method.pkdkdmptx
2a Solving Equations Bar Method.pkdkdmptx
alvinlibre
?
IPv6 - Global and Malaysia's Perspectives
IPv6 - Global and Malaysia's PerspectivesIPv6 - Global and Malaysia's Perspectives
IPv6 - Global and Malaysia's Perspectives
APNIC
?
IDM Crack 2025 Internet Download Manger Patch
IDM Crack 2025 Internet Download Manger PatchIDM Crack 2025 Internet Download Manger Patch
IDM Crack 2025 Internet Download Manger Patch
wistrendugftr
?
SMOAD Networks Load Balancing Router in Chennai.pptx
SMOAD Networks Load Balancing Router in Chennai.pptxSMOAD Networks Load Balancing Router in Chennai.pptx
SMOAD Networks Load Balancing Router in Chennai.pptx
HubraSEO
?
HITRUST Overview and AI Assessments Webinar.pptx
HITRUST Overview and AI Assessments Webinar.pptxHITRUST Overview and AI Assessments Webinar.pptx
HITRUST Overview and AI Assessments Webinar.pptx
AmyPoblete3
?
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
办理卡普顿大学成绩单触购买加拿大颁叠鲍成绩单文凭定制
taqyed
?
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practiceB.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
B.Sc Nursing OSCE INC.pdf for all nursing college mandatory to practice
naveenithkrishnan
?
Social Media Marketing & Optimization | Prasun Dinda
Social Media Marketing & Optimization | Prasun DindaSocial Media Marketing & Optimization | Prasun Dinda
Social Media Marketing & Optimization | Prasun Dinda
Prasun Dinda
?
Introduction on how unique identifier systems are managed and coordinated - R...
Introduction on how unique identifier systems are managed and coordinated - R...Introduction on how unique identifier systems are managed and coordinated - R...
Introduction on how unique identifier systems are managed and coordinated - R...
APNIC
?
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
加拿大毕业证(鲍罢惭成绩单)多伦多大学毕业证如何办理
taqyed
?
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteAP: AI-Powered Supplier Invoice Automation for Seamless Accounts Payabl...
AstuteBusiness
?
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptxCQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
CQE-7-Nursing-Quality-indicators 5.3.25 ppt.pptx
naveenithkrishnan
?
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdfAdvanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
Advanced Liquid Coding Techniques for Custom Shopify Development Services.pdf
CartCoders
?
Intelligent-Systems-in-Manufacturing.pptx
Intelligent-Systems-in-Manufacturing.pptxIntelligent-Systems-in-Manufacturing.pptx
Intelligent-Systems-in-Manufacturing.pptx
ErickWasonga2
?
digital india initiative of indian government
digital india initiative of indian governmentdigital india initiative of indian government
digital india initiative of indian government
arujn1
?
COMPUTER NETWORK With it's Types and Layer
COMPUTER NETWORK With it's Types  and LayerCOMPUTER NETWORK With it's Types  and Layer
COMPUTER NETWORK With it's Types and Layer
sureshrani1169
?
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdfKeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
KeepItOn-2024-Internet-Shutdowns-Annual-Report.pdf
sabranghindi
?
Importance of understanding buyer behaviors.pptx
Importance of understanding buyer behaviors.pptxImportance of understanding buyer behaviors.pptx
Importance of understanding buyer behaviors.pptx
ankitregmi20580419
?

ospf.ppt

  • 1. Dynamic Routing and OSPF (part 1)
  • 2. IP routing ?Each router or host makes its own routing decisions ?Sending machine does not have to determine the entire path to the destination ?Sending machine just determines the next-hop along the path. ?This process is repeated until the destination is reached ?Forwarding table consulted to determine the next-hop
  • 3. IP routing ?Classless routing ?route entries include ?destination ?next-hop ?mask (prefix-length) indicating size of address space described by the entry ?Longest match ?for a given destination, find longest prefix match in the routing table ?example: destination is 35.35.0.0/19 ?routing table entries are 35.0.0.0/8 and 35.35.0.0/16
  • 4. IP routing ?Default route ?where to send packets if don’t have an entry for the destination in the routing table ?most machines have a single default route ?often referred to as a default gateway
  • 5. Static routing ?each router manually configured with a list of destinations and the next hop to reach those destinations ?ideal for small number of destinations or “stub” networks ?stub network - network with only one or two paths to the rest of the network
  • 6. Dynamic Routing ?routers compute routing tables dynamically based on information provided by other routers in the network ?routers communicate topology to each other via different protocols ?routers then compute one or more next hops for each destination - trying to calculate the most optimal path
  • 7. Static and Dynamic Routing ?Static routing is a simplistic approach ?Shortcomings: ?Cumbersome to configure ?Cannot adapt to link/node failures, addition of new nodes and links ?Doesn't scale to large networks ?Solution: Dynamic Routing
  • 8. Desirable Characteristics ?Automatically detect and adapt to network topology changes ?Optimal routing ?Scalability ?Robustness ?Simplicity ?Speed of convergence ?Some control of routing choices (e.g. which links we prefer to use)
  • 9. Convergence - Why do I care? ?Convergence is when all the routers have the same routing information ?When a network is not converged, there is network downtime ?Packets don't get to where they are supposed to be going: routing loops, black holes ?Occurs when there is a change in the status of a router or link
  • 10. Dynamic Protocols ?Metrics can be calculated based on a single characteristic of a path or by combining multiple characteristics ?Metrics commonly used: ?Bandwidth ?Hop count ?Cost ?administratively defined metrics
  • 11. OSPF magic exercise ?delete your static routes ?config t ?no ip route x.x.x.x y.y.y.y z.z.z.z ?enter the following: ?router ospf 1 ?network x.x.x.x 0.0.0.0 area 0 ?x.x.x.x = ip address of your backbone interface ?redistribute connected subnets
  • 12. OSPF magic exercise ?Verify connectivity to all PCs in the network ?Do not save your config
  • 14. Types of Routing Protocols ?EGP ?Exterior Gateway Protocol ?Example: BGP ?IGP ?Interior Gateway Protocol ?Example: OSPF, RIP
  • 15. Types of Routing Protocols ?Link-state ?Distance-vector
  • 16. IGP ?Used within a single Autonomous System (AS) ?Within a single network
  • 17. Other Interior Gateway Protocols (IGPs) ?RIP ?Lots of scaling problems ?RIPv1 is classful and officially obsolete ?RIPv2 is classless ?EIGRP ?Proprietry (Cisco only) ?IS/IS ?The forerunner of OSPF ?Multiprotocol (OSPF is IP only)
  • 18. Distance Vector Protocols ?Listen to neighboring routes ?Install all routes in a table ?Advertise all routes in table ?Very simple ?Very Stupid ?example: RIP
  • 19. RIP ?routing information protocol ?distance-vector algorithm ?cost is hop count ?broadcast information to all neighbors every 30 seconds
  • 20. RIP A B D E C ROUTING TABLE for A A - B 1 C 2 D 3 E 2
  • 21. Why not use RIP? ?Distance Vector algorithm ?Broadcasts everything (not scalable) ?Metric is hop-count only ?Infinity of 16 (not large enough) ?Slow convergence (routing loops) ?Poor robustness
  • 22. OSPF ?Open Shortest Path First ?Dynamic IGP (Interior Gateway Protocol) ?Use within your own network ?Link state algorithm
  • 23. Shortest Path First A B C D 15 3 4 4 7 Metric: Link Cost
  • 24. Link State Algorithm ?Each router maintains a database containing map of the whole topology ?Links ?State (including cost) ?All routers have the same information ?All routers calculate the best path to every destination
  • 25. Link State Algorithm (con) ?Any link state changes are flooded across the network ?"Global spread of local knowledge”
  • 26. Link State vs. Distance vector ?Distance Vector ?views net topology from neighbor’s perspective ?adds distance vectors from route to router ?frequent, periodic updates; slow convergence ?passes copies of routing table to neighbor routers
  • 27. Link State vs. Distance vector ?Link-State ?gets common view of entire network topology ?calculates the shortest path to other routers ?event-triggered updates; faster convergence ?passes link-state routing updates to other routers
  • 28. Distance Vector and Link State Protocols ?Distance vector routers compute the best path from information passed to them from neighbors ?Link State routers each have a copy of the entire network map ?Link State routers compute best routes from this local map
  • 29. Note: Routing is not the same as Forwarding ?Forwarding: passing packets along to the next hop ?There is only one forwarding table ?Just has prefix and next-hop info ?Routing: populating the forwarding table ?You might have multiple routing databases - e.g. both OSPF and BGP ?Routing databases have more information
  • 30. Routing and Forwarding OSPF BGP Static Forwarding Table On Cisco, if the same prefix is received from multiple protocols, the "administrative distance" is used to choose between them
  • 31. OSPF ?open shortest path first ?dynamic IGP ?not distance vector ?Link-State algorithm
  • 32. OSPF: How it works (1) ?"Hello" packets sent periodically on all OSPF-enabled interfaces ?become "neighbors" ?establishes that link can carry data ?used to determine if neighbor is up ?Adjacencies (virtual point-to-point links) formed between some neighbors
  • 33. How it works (2) ?Once an adjacency is established, trade information with your neighbor ?Topology information is packaged in a "link state announcement" ?Announcements are sent ONCE, and only updated if there's a change (or every 30 minutes)
  • 34. How it works (3) ?Each router sends Link State Announcements (LSAs) over all adjacencies ?LSAs describe router's links, interfaces and state ?Each router receives LSAs, adds them into its database, and passes the information along to its neighbors
  • 35. How it works (4) ?Each router builds identical link-state database ?Runs SPF algorithm on the database to build SPF tree ?Forwarding table built from SPF tree
  • 36. How it works (5) ?When change occurs: ?Broadcast change ?All routers run SPF algorithm ?Install output into forwarding table
  • 37. HELLO ?Broadcast* HELLO on network segment ?Receive ACK ?Establishes 2-way communication ?Repeat periodically ?Default: HELLO sent every 10 seconds ?Default: if no HELLO heard for 40 seconds, link is assumed to be dead ?Now establish adjacencies * Actually uses Multicast addresses (224.0.0.9, 224.0.0.10) so that non-OSPF devices can ignore the packets
  • 38. The HELLO packet ?Router priority ?Hello interval ?Router dead interval ?Network mask ?List of These must match HELLO HELLO HELLO
  • 39. Neighbors ?Bi-directional communication ?Result of OSPF hello packets ?Need not exchange routing information
  • 40. Who is adjacent? ?"Adjacent" neighbors exchange routing information ?Not all neighbors are adjacent ?On a point-to-point link ?everyone ?On broadcast medium ?not everyone ?why?
  • 41. Broadcast neighbors A B C D Order of N^2 adjacencies
  • 42. Broadcast medium ?Select a neighbor: Designated Router (DR) ?All routers become adjacent to DR ?Exchange routing information with the DR ?DR updates all the other neighbors ?Scales ?Adjacencies reduced from N^2 to 2N ?Backup Designated Router (BDR)
  • 44. Other nice features of OSPF ?Authentication (optional) ?Equal-cost multipath ?more than one "best" path - share traffic ?Proper classless support (CIDR) ?Multiple areas ?For very large networks (>150 routers) ?Aggregate routes across area boundaries ?Keep route flaps within an area ?Proper use of areas reduce bandwidth and CPU utilisation ?Backbone is Area 0
  • 45. Cisco OSPF commands and configuration ?show ip route ?show ip ospf neighbor ?show ip ospf database
  • 46. Configuring OSPF ?router ospf <process-id> ?network x.x.x.x m.m.m.m area <area-id> ?m.m.m.m = wildcard mask ?0 = don’t care bit ?1 = check bit ?0.0.0.0 mask for exact match ?network 203.167.177.10 0.0.0.0 area 0 ?network 203.167.177.0 0.0.0.255 area 0