OSPF - PowerPoint PPT Presentation

About This Presentation
Title:

OSPF

Description:

A router elected by all others to represent the network area (multi-access ... Electing ... On multi-access networks,OSPF elects a DR and BDR to limit the number ... – PowerPoint PPT presentation

Number of Views:447
Avg rating:3.0/5.0
Slides: 74
Provided by: alasd8
Learn more at: https://hills.ccsf.edu
Category:
Tags: ospf | electing

less

Transcript and Presenter's Notes

Title: OSPF


1
OSPF
  • Link State Routing
  • Single Area and Multiarea OSPF

2
Identify Distance Vector Link State Routing
Characteristics
Updates contain entire routing table
Slow convergence
Updates consume significant bandwidth
Updates contain changes only
Increased memory processing requirements
Topology changes trigger updates
Updates sent to all routers
Support CIDR/VLSM
Updates sent to neighbours
Rapid convergence
Periodic updates
3
Identify Distance Vector Link State Routing
Characteristics
Updates contain entire routing table
Slow convergence
Updates consume significant bandwidth
Updates contain changes only
Increased memory processing requirements
Topology changes trigger updates
Updates sent to all routers
Support CIDR/VLSM
Updates sent to neighbours
Rapid convergence
Periodic updates
4
Summary of Link State Features
  • Responds quickly to network changes
  • Use hellos to discover and create neighbors
  • Send updates when a there has been a change in
    the network topology
  • Updates contain changes not whole routing table
  • Calculates shortest path to each route in the
    network from a separate topology table

5
Link State Operation
  • Routers are aware of directly connected networks
    known as links
  • Routers send hellos to discover neighbors
  • Routers send Link State Advertisements (LSAs) to
    other routers informing them of their links
  • All routers add Link State Advertisements to
    their topological database (topology table)
  • Shortest Path algorithm calculates best route to
    each network
  • When link states change, LSA update are sent to
    all routers which recalculate their routes

6
Topological Database
  • Every router advertises directly connected
    networks via Link State Advertisements
  • Every router has its own view of the network
    it builds a topological database
  • Router A is aware of 2 paths to 192.168.157.0
    this provides redundancy should one of the
    routers fail

7
Evaluation of Link State Routing
8
Review Link State Distance Vector
9
OSPF Overview
  • Preferred to RIP on larger networks
  • Open Standard - IETF RFC 2328
  • Link State routing protocol
  • Interior Gateway Protocol for Autonomous systems
  • Metric based on bandwidth - Cost
  • Supports VLSM
  • OSFP can use areas to allow hierarchical design
    Multiarea OSPF

10
OSPF Key Words
  • Adjacencies database
  • Directly connected routers
  • Topological Database
  • Routes to every network
  • Routing table
  • Best path to each network
  • (chosen from topological database)
  • Designated Router
  • A router elected by all others to represent the
    network area
  • (multi-access networks only)
  • Area 0
  • backbone

11
OSPF Packet Types
  • Type 1 Hello
  • Establishes and Maintains adjacency info w/
    neighbors
  • Type 2 Database description packet (DBD)
  • Describes the contents of an OSPF routers
    link-state database
  • Type 3 Link State Request
  • Requests specific pieces of a routers link-state
    database
  • Type 4 Link State Update (LSUs)
  • Transports link-state advertisements (LSAs) to
    neighbor routers
  • Type 5 Link-state acknowledgement (LSAKs)
  • Acknowledges receipt of a neighbors LSA

12
OSPF Hello Protocol
13
Designated Router/Backup DR
  • All LSA sent to DR/BDR instead of to every single
    router
  • Reduces overhead of LSA updates
  • Standard on multi-access networks
  • DR is single point of failure solution is BDR

14
DR/BDR
  • Once a DR is established, a new router with a
    higher priority or router ID will NOT become the
    DR or BDR.
  • If DR fails, BDR takes over as DR and selection
    process for new BDR begins.

15
Backup Designated Router
  • Listens, but doesnt 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.

16
DR/BDR selection
  • To suit the topology used the network
    administrator will want to choose DR/BDR
  • DR/BDR election based on OSPF priority
  • Highest priorityDR
  • 2nd highest priorityBDR
  • Priority of 0 DROTHER (ensures will not be DR)
  • Default priority 1
  • Router(config-if)ip ospf priority number
  • Routershow ip ospf interface type number

17
OSPF Loopback Address
  • For OSPF to function there must always be an
    active interface
  • Physical interfaces e.g. serial/Ethernet may not
    always be active routing would fail
  • Configure virtual loopback interface as
    solution
  • Subnet mask will always be 255.255.255.255
  • Router(config)interface loopback number
  • Router(config-if)ip address ip-address
    subnet-mask

18
Drothers All Other OSPF Routers
  • All other routers, DROTHER, establish adjacencies
    with DR and BDR only.
  • LSAs are multicast to DR and BDR only
  • (224.0.0.6 - all DR routers)
  • DR sends LSA to all adjacent neighbors
  • (224.0.0.5 - all OSPF routers)

19
OSPF basic commands
  • Router(config)router ospf process-id
  • Router(config-router)network address
    wildcard-mask area area-id
  • EXAMPLE
  • Router(config)router ospf 2
  • Router(config-router)network 172.16.10.0
    0.0.0.255 area 2
  • NOTES
  • process-id can be a value between 0 and 65,535
  • Wildcard mask NOT subnet mask used with network
    command

20
Basic OSPF Configuration
21
Configuring OSPF Authentication within a Single
Area
  • Rtr(config) router ospf process-id
  • Rtr(config-router)network address wildcard-mask
    area area-id
  • Rtr(config-router) area area authentication
    message-digest
  • Rtr(config) interface type slot/port
  • Rtr(config-if) ip ospf priority lt0-255gt
  • RTB(config-if) ip ospf cost cost
  • Rtr(config-if) ip ospf hello-interval seconds
  • Rtr(config-if) ip ospf dead-interval seconds
  • Rtr(config-if) ip ospf message-digest-key key-id
    md5 encryption-type password

22
Steps to OSPF Operation
  • 1. Establishing router adjacencies
  • 2. Electing DR and BDR
  • 3. Discovering Routes
  • 4. Choosing Routes
  • 5. Maintaining Routing Information

23
Router States
  • down
  • init
  • 2 way
  • exstart
  • exchange
  • loading
  • full

Good neighbors, no LSA sharing.
Sharing route via LSAs.
24
Reaching 2-Way
25
Electing a DR/BDR
26
1.Establishing Adjacencies
  • An OSPF router tries to form an adjacency with
    at least one neighbor for each IP network its
    connected to.

27
2.Electing a DR and BDR
  • On point-to-point links adjacencies are
    established with all neighbors, because there is
    only one neighbor.
  • On multi-access networks,OSPF elects a DR and BDR
    to limit the number of adjacencies.
  • Reduce routing update traffic

28
3.Discovering Routes
  • EXSTART state - prepare for initial database
    exchange of Database Description Packets (DBDs)
  • master/slave relationship decided (higher router
    id)
  • EXCHANGE state - routers exchange one or more
    DBDs (Database Description) packets, which is a
    summary of the link-state database
  • send LSAcks to verify
  • compares DBD with its own database

29
3.Discovering Routes
  • LOADING STATE - When a slave router receives a
    DBD it
  • Acknowledges receipt of the DBD by sending an
    LSAck
  • Compares the information it received with the
    information it has by checking the LSA sequence
    number
  • If the DBD has a more up-to-date link-state
    entry, the slave router sends a link state
    request (LSR) to the master
  • The master responds with a link state update
    (LSU).

30
3.Discovering Routes
  • When all LSRs have been satisfied for a given
    router, the adjacent routers are considered to be
    synchronized and in a FULL STATE.
  • At this point all routers within the network
    should have identical link-state databases.

31
4.Choosing Routes
  • OSPF bases routing metrics on cost.
  • Cisco routers, cost 108/BW
  • BW is the configured bandwidth for an interface
    and may be changed using the ip ospf cost
    command. The bandwidth command can also be used
    to change the bandwidth metric on an interface.
  • ip ospf cost is used when converting the metric
    between routers from different vendors.

32
Choosing Routes
  • SPF, Shortest Path First calculations use the
    Dijkstra algorithm, placing itself as the root
    and creating a tree diagram of the network

33
5.Maintaining Routing Info
  • Flooding process
  • When there is a state change in one of the
    connected links, as soon as the router learns of
    this change it floods it to all adjacent
    neighbors (224.0.0.6 - all DR/BDRs).
  • Only the changed link information is flooded, not
    the entire database.
  • DR sends LSU (LSA) to others on the network, area
    (224.0.0.5 all SPF routers)
  • Router which receives LSU updates links-state
    database, computes the SPF algorithm, and
    generates a new routing table
  • LSAs are aged at 30 minutes and flooded every 30
    minutes

34
Additional Configuration
  • Network administrators can also configure
  • LSA update authentication
  • OSPF Priority at the interface
  • Hello Dead interval timers
  • Default route to routers outside the
    area/autonomous system

35
Configuring OSPF Loopback Address and Router
Priority
36
Setting OSPF Priority
The priorities can be set to any value from 0 to
255. A value of 0 prevents that router from being
elected. A router with the highest OSPF priority
will win the election for DR.
37
Modifying OSPF Cost Metric
38
Configuring OSPF Authentication
The encryption setting of 7 is Cisco proprietary
and will not work properly. Use 5 for MD5
hash instead.
39
  • Configuring timers
  • Rtr(config-if) ip ospf hello-interval seconds
  • Rtr(config-if) ip ospf dead-interval seconds
  • For OSPF routers to be able to exchange
    information, the must have the same hello
    intervals and dead intervals.
  • By default, the hello interval is 4 times the
    dead interval, so the a router has four chances
    to send a hello packet being declared dead. (not
    required)
  • Defaults
  • On broadcast networks hello interval 10
    seconds, dead interval 40 seconds.
  • On non-broadcast networks hello interval 30
    seconds, dead interval 120 seconds.

40
Configuring OSPF Timers Example
41
OSPF - Propagating a Default Route
Default routes are used if the destination
network is not in the routing table. The border
router (Router B) is the default router. Router B
must use the command default-information
originate to propagate default information to
the rest of the OSPF network.
42
OSPF Default Router Example
  • Router(config) int s0/0
  • Router(config-if) ip address 172.16.16.2
    255.255.255.252
  • Router(config-if) no shut
  • Router(config-if) exit
  • Router(config) ip route 0.0.0.0 0.0.0.0
    172.16.16.1
  • Router(config) router ospf 1
  • Router(config-router) network 192.168.1.0
    0.0.0.3 area 0
  • Router(config-router) network 192.168.1.128
    0.0.0.63 area 0
  • Router(config-router) default-information
    originate

Notice the 172. network is not included in the
OSPF configuration because you are not running
OSPF to the Internet provider.
43
OSPF Areas
  • Every OSPF router must belong to at least one
    area
  • Every OSPF network must have an Area 0 (backbone
    area)
  • All other Areas should touch Area 0
  • There are exceptions to this rule
  • Routers in the same area have the same link-state
    information

44
OSPF uses Areas
  • Hierarchical routing enables you to separate
    large internetworks (autonomous system) into
    smaller internetworks that are called areas.
  • With this technique, routing still occurs between
    the areas (called inter-area routing), but many
    of the smaller internal routing operations, such
    as recalculating the database, are restricted
    within an area.

45
OSPF Areas
46
OSPF Router Types
47
OSPF Router Types
  • Internal Routers with all their interfaces
    within the same area
  • Backbone Routers with at least one interface
    connected to area 0
  • ASBR (Autonomous System Boundary Router)
    Routers that have at least one interface
    connected to an external internetwork (another
    autonomous system)
  • ABR (Area Border Router) Routers with
    interfaces attached to multiple areas.

48
Area Types
  • Standard
  • Backbone
  • Stub
  • Stub
  • Totally Stubby Area (TSA)
  • Not-so-stubby-area (NSSA)

49
Area Types
50
Stub, Totally Stubby and Not-so-stubby
  • A stub area does not accept information about
    routes external to the AS
  • A totally stubby area, which is a Cisco specific
    feature, blocks external Type 5 LSAs and summary,
    Type 3 and Type 4, LSAs from entering the area.
  • An NSSA does not allow Type 5 LSAs but does allow
    Type 7 LSAs, which can carry external routing
    information and be flooded throughout the NSSA.

51
Area Types
  • Key difference between area types
  • How they handle external routes (E1 and E2).
  • External routes are injected into OSPF by ASBR
  • Type 1 (E1) cost metric increments as route is
    passed through OSPF domain
  • Type 2 (E2) cost metric remains the same as
    route is passed through OSPF domain

52
LSA Types
53
LSA Types (cont)
  • Type 6 MOSPF (Multicast OSPF) Not supported by
    Cisco.
  • MOSPF enhances OSPF by letting routers use their
    link-state databases to build multicast
    distribution trees for the forwarding of
    multicast traffic.

54
LSA Types (cont)
  • Type 7 NSSA External Link Entry
  • Originated by an ASBR connected to an NSSA.
  • Type 7 messages can be flooded throughout NSSAs
    and translated into LSA Type 5 messages by ABRs.
    Routes learned via Type-7 LSAs are denoted by
    either a N1 or and N2 in the routing table.
    (Compare to E1 and E2).

55
Multi-area Example
ABR
RIP
ASBR
56
Stub Example
ABR
No Type 5 LSAs
Route to 0.0.0.0/0 via RTB
ASBR
57
Totally Stubby Example
no summary
ABR
Totally Stubby Area
No Type 3, 4, or 5 LSAs
Route to 0.0.0.0/0 via RTB (no more IA routes)
ASBR
58
NSSA Example
ABR
No Type 5 LSAs Type 7 okay
ASBR
59
NSSA Example
no summary
ABR
No Type 3, 4 or 5 LSAs Type 7 okay
ASBR
60
Configuring Summary Routes
  • Interarea route summarization
  • (at ABR)
  • Router(config-router) area area-id range
    address mask
  • Router(config-router) area 1 range 192.168.16.0
    255.255.252.0
  • External route summarization
  • (at ASBR)
  • Router(config-router) summary-address
    address mask
  • Router(config-router) summary-address
    200.9.0.0 255.255.0.0

61
Virtual Links
  • A virtual link has the following two
    requirements
  • It must be established between two routers that
    share a common area.
  • One of these two routers must be connected to the
    backbone.

62
Virtual Links
  • RTA(config)router ospf 1
  • RTA(config-router)network 192.168.0.0 0.0.0.3
    area 51
  • RTA(config-router)network 192.168.1.0 0.0.0.3
    area 3
  • RTA(config-router)area 3 virtual-link 10.0.0.1
  • ...
  • RTB(config)router ospf 1
  • RTB(config-router)network 192.168.1.0 0.0.0.3
    area 3
  • RTB(config-router)network 192.168.2.0 0.0.0.3
    area 0
  • RTB(config-router)area 3 virtual-link 10.0.0.2

63
Why Virtual Link?
  • Temporary fix when two existing OSPF networks
    merge (company merger, etc.)
  • Backup path

64
Common OSPF Configuration Issues
65
  • OSPF Interface Information
  • Rtr 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 000000
  • 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 000004

66
Verifying OSPF Configuration
  • show ip protocol
  • show ip route
  • show ip ospf interface
  • shop ip ospf
  • show ip ospf neighbor detail
  • show ip ospf database

67
The debug and clear Commands for OSPF Verification
68
NBMA
  • Non-Broadcast Multi-access Access Networks.
  • Frame Relay
  • X.25
  • Without broadcasts and multicasts, DR/BDR
    election is problematic

69
NBMA Networks and OSPF
  • Network Types
  • Cisco routers can treat NBMA interfaces using any
    of the following
  • Non-Broadcast
  • OSPF is aware that multicast packets cannot be
    sent over the interface and sends OSPF packets
    directly to neighbors using unicast addresses.
  • DR and BDR are not elected by default
  • DR represent the NBMA cloud as a transit network,
    using network LSAs
  • Suitable only for when the VCs are fully meshed
  • Broadcast
  • OSPF treats the interface as belonging to a
    broadcast segment, thus using multicasts to send
    OSPF packets.
  • DR and BDR are elected
  • Suitable only for when the VCs are fully meshed.

70
NBMA Point-to-Point and Multipoint Networks
  • Network Types
  • Cisco routers can treat NBMA interfaces using any
    of the following
  • Point-to-multipoint
  • OSPF treats the interface as a placeholder for a
    set of point-to-point adjacencies.
  • No DR/BDR is elected
  • Very much like point-to-point interfaces, except
    that every router announces a host route to its
    own IP address.
  • Point-to-point
  • OSPF treats the interface as a set of
    point-to-point adjacencies
  • No DR/BDR is elected.

71
NBMA Solution
  • Full mesh

The OSPF neighbor command tells a router about
the IP addresses of its neighbors so that it can
exchange routing information without multicasts.
  • Full Mesh network
  • is on one subnet

72
NBMA Solution
  • Point-to-point uses subinterfaces
  • Point-to-point networks are all on different
    subnets

73
NMBA Solution
  • Point-to-multipoint

The broadcast keyword permits the router to send
broadcasts by way of the specified DLCI to the
mapped neighbor or neighbors.
  • Point-to-Multipoint network is on one subnet
Write a Comment
User Comments (0)
About PowerShow.com