2013/10/28

INE R&S ATC068 ~ ATC080 - OSPF

068 - OSPF Overview
069 - Establishing OSPF Adjacencies, Understanding the OSPF Database
070 - OSPF Network Type Broadcast, OSPF DRBDR Election, OSPF over NBMA, OSPF Network Type Non-Broadcast and Point-to-Multipoint
071 - OSPF Network Type Point-to-Point, OSPF Network Type Mismatch
072 - OSPF Network Type Point-to-Multipoint Non-Broadcast, OSPF Per Neighbor Cost
073 - OSPF Network Type Loopback
074 - OSPF Path Selection
075 - OSPF Convergence Timers
076 - OSPF Authentication
077 - OSPF Summarization
078 - OSPF Stub Areas, OSPF Totally Stubby Areas, OSPF NSSAs, OSPF Totally NSSAs
079 - Controlling OSPF NSSA Redistribution
080 - OSPF Type 7 to 5 Translator Election, OSPF LSA Type 3 Filter, OSPF Forwarding Address Suppression


OSPF Overview

• Open Standards Based
  – RFC 2328 “OSPF Version 2”
• Classless Link-State Protocol
  – Uses DijkstraSPF algorithm
  – Maintains active adjacencies
  – Supports VLSM
  – Supports both topology and NLRI summarization

Enabling OSPF

• Enable the global process
  – router ospf [process-id]
    • Process-id locally significant
  – Must be an “up/up” interface running IP
    • Used for OSPF Router-ID
• Enable the interface process
  – network [address] [wildcard] area [area]
  – ip ospf [process-id] area [area]
 
OSPF Network Statement

• Enables OSPF on the interface
  – Wildcard mask does not relate to subnet mask
• Most specific match wins
  – network 0.0.0.0 255.255.255.255 area 0
  – network 1.0.0.0 0.255.255.255 area 1
  – network 1.2.0.0 0.0.255.255 area 2
  – network 1.2.3.0 0.0.0.255 area 3
  – network 1.2.3.4 0.0.0.0 area 4

Neighbor & Topology Discovery

• Like EIGRP, OSPF uses “hello” packets to discover neighbors
  – Transport via IP protocol 89 (OSPF)
  – Sent as multicast to 224.0.0.5 or 224.0.0.6, or unicast
• Hello packets contain attributes that neighbors must agree on to form “adjacency”
• Once adjacency is negotiated, LSDB is exchanged

Negotiating OSPF Adjacencies

• Neighbors must agree on attributes to form adjacency
  – Not all OSPF neighbors actually form adjacency
  – Most OSPF configuration problems happen at this stage
• Unique attributes include…
  – Local Router-ID
  – Local Interface IP Address

Negotiating OSPF Adjacencies

• Common attributes include…
– Interface Area-ID
– Hello interval & dead interval
– Interface network address
– Interface MTU
– Network Type
– Authentication
– Stub Flags
– Other optional capabilities

VerifyingOSPF

• Verify OSPF is enabled
– show ip ospf
– show ip ospf interface [brief]
• Verify OSPF adjacencies
– show ip ospf neighbor
– debug ip ospf adj
• Verify OSPF database
– show ip ospf database [router | network | summary | … ]

OSPF Media Dependencies

• OSPF behavior changes based on media
  – e.g. Ethernet vs. Frame Relay vs. PPP
• Different media uses different “network types” to control…
  – How updates are sent
  – Who forms adjacency
  – How next-hop is calculated

OSPF Network Types

• Broadcast
• Non-Broadcast
• Point-to-Point
• Point-to-Multipoint
• Point-to-Multipoint Non-Broadcast
• Loopback

OSPF Network Broadcast

• ip ospf network broadcast
• Default on multi-access broadcast medias
  – Ethernet, Token Ring, & FDDI
• Sends hellos and updates as multicast
  – 224.0.0.5 (All SPFRouters)
  – 224.0.0.6 (All DRouters)
• Performs Designated Router (DR) & Backup Designated Router (BDR) Election

DR / BDR Overview

• Designated Router (DR)
  – Used on broadcast links to
    • Minimize adjacencies
    • Minimize LSA replication
• Backup Designated Router (BDR)
  – Used for redundancy of DR
• DROthers
  – All other routers on link
  – Form full adjacency with DR & BDR
  – Stop at 2-Way adjacency with each other
• DR / BDR chosen through election process

DR / BDR Election

• Election based on…
  – Priority
    • 0 –255
    • Higher better
    • 0 = never
  – Router-ID
    • Highest loopback / interface IP
    • Can be statically set
    • Higher better
• No preemption unlike IS-IS’s DIS

OSPF Network Non-Broadcast

• ip ospf network non-broadcast
• Default on multipoint NBMA medias
  – Frame Relay & ATM
• Sends hellos as unicast
  – Manually defined addresses with neighbor command
  – Performs DR/BDR Election

OSPF Network Point-to-Point

• ip ospf network point-to-point
• Default on point-to-point medias
  – HDLC / PPP
• Sends hellos as multicast
  – 224.0.0.5
• No DR/BDR Election
• Supports only two neighbors on the link

OSPF Network Point-to-Multipoint

• ip ospf network point-to-multipoint
• Treats network as a collection of point-to-point links
• Sends hellos as multicast
  – 224.0.0.5
• No DR/BDR Election
• Special next-hop processing
• Usually the best design option for partial mesh NBMA networks

Point-to-Multipoint Non-Broadcast

• ip ospf network point-to-multipoint non-broadcast
• Same as point-to-multipoint, but sends hellos as unicast
  – Manually defined addresses with neighbor command
  – Allows for per-VC OSPF cost over NBMA
• No DR/BDR Election
• Special next-hop processing

OSPF Network Loopback

• Special case for Loopback and Looped-back interfaces
• Advertises link as /32 stub host route
• ip ospfnetwork point-to-pointused to disable this behavior

OSPF Path Selection

• Once databases are synchronized, path selection begins
• Each router’s LSAs include a “cost” attribute for each described link
• Best path to that link is lowest end-to-end cost
• Cisco’s implementation uses bandwidth based cost, but per RFC it is arbitrary
  – Default Cisco Cost = 100Mbps / Link Bandwidth
  – Reference bandwidth can be modified to accommodate higher speed links (e.g. GigabitEthernet)

OSPF Path Selection Order

• Per RFC, OSPF path selection state machine prefers…
– Intra Area Routes (O)
– Inter Area Routes (O IA)
– External Type 1 (E1)
– External Type 2 (E2)
– NSSA Type 1 (N1)
– NSSA Type 2 (N2)
• Cannot be modified with metric or distance

Modifying OSPF Path Selection

• OSPF uses bandwidth based cost
  – COST = Reference_BW/ Interface_BW
• Cost can be modified with
  – Interface bandwidth
  – Interface ip ospf cost
  – Process auto-cost
  – Process neighbor [address] cost

OSPF Convergence Timers

• Convergence based on hello and dead timer
  – Supportssub-second timers
• Different timers for different network types
  – show ip ospf interface
• Changing hello time automatically adjusts dead time
  – ip ospf hello-interval
  – ip ospf dead-interval

OSPF Authentication

• OSPF supports 3 types of authentication
  – 0 = Null
  – 1= Clear Text
  – 2 = MD5
• Can be enabled
  – On all linksin the area
  – On a per link basis
• Key is always applied at link level
  – Virtual-Links are Area 0 interfaces

OSPF Summarization

• All devices within the area must have the same LSDB
• Implies summarization can only occur
  – Between areas
    • area [source area] range [address][mask]
  – During redistribution
    • summary-address [address][mask]
• Automatically generates discard route
  – Disabledwith no discard route [internal | external]
• Can be used for TE via longest match routing

OSPF Filtering Overview

• OSPF is a link-state routing protocol
  – To calculate identical SPTs everyone must have the same input to SPF (the LSDB)
  – Implies that filtering cannot be configured within an area
• Inter-area filtering through
  – Stub areas
  – LSA 3 filter

OSPF Stub Areas

• Stub areas used to limit type of LSAs allowed to enter an area
  – Intra Area routes (O)
    • LSA 1 & 2
  – Inter Area routes (O IA)
    • LSA 3 & 4
  – External routes (E1 & E2)
    • LSA 5
  – NSSA external routes (N1 & N2)
    • LSA 7
• All routers in the area must agree on the stub flag

OSPF Stub Areas

• Stub Area
  – Removes External routes (LSA 5)
  – Removes ASBR advertisement (LSA 4)
  – ABR originates Inter-Area default route (LSA 3)
• Enabled on all routers in the area
  – area [area] stub

OSPF Stub Areas

• Totally Stubby Area
  – Removes External routes (LSA 5)
  – Removes ASBR advertisement (LSA 4)
  – Removes Inter-Arearoutes (LSA 3)
  – ABR originates Inter-Area default route (LSA 3)
• Stub enabled on all routers in the area
  – area [area] stub
• Totally Stubby enabled on ABR(s) of the area
  – area [area] stub no-summary

OSPF Stub Areas

• Not-So-Stubby Area (NSSA)
  – Allows NSSA External generation (LSA 7)
  – Removes External routes (LSA 5)
  – Removes ASBR advertisement (LSA 4)
• All routers must agree on NSSA
  – area [area] nssa
• ABR does not originate default automatically
  – Can be configured to generate LSA 7 default
  – area [area] nssa default-information-originate

OSPF Stub Areas

• Not-So-Totally-Stubby Area
  – Allows NSSA External generation (LSA 7)
  – Removes External routes (LSA 5)
  – Removes ASBR advertisement (LSA 4)
  – Removes Inter-Area routes (LSA 3)
  – ABR originates Inter-Area default route (LSA 3)
• NSSA enabled on all routers in the area
  – area [area] nssa
• Totally Stubby enabled on ABR(s) of the area
  – area [area] nssa no-summary

Controlling NSSA Redistribution

• Redistributed routes on an NSSA router are originated as LSA 7
• If NSSA ASBR is also an ABR…
  – Type 7 originated into NSSA
  – Type 5 originated into Area 0
• Type 7 origination can be suppressed
  – area [area] nssano-redistribution
  – Send Type 5 to area 0 but not Type 7 to NSSA

NSSA Translator Election

• NSSA ABR translates Type 7 LSAs into Type 5 for Area 0 advertisement
• If multiple ABRs, only one of them performs translation
  – NSSA Translator Election chooses ABR with higher Router-ID
• If Forwarding Address is non-zero, ABR need not be in the transit path

LSA 3 Filter

• Stub areas can only filter on LSA type
• ABRs can filter which Summary LSAs (LSA 3) they generate between areas
• Applied to process level of ABR
  – area [area] filter-list prefix [prefix-list] [in | out]
  – In/out allows for control of ABRs with more than 2 areas

OSPF Virtual-Links

• OSPF area 0 must be contiguous to ensure LSA propagation
• Discontiguousarea 0 can be connected with logical virtual-link area 0 adjacency
• “area [transit_area] virtual-link [abr_rid]”

OSPF over GRE

• OSPF virtual link cannot transit stub area
• Transit area must have all LSAs to avoid black-hole
• In the case that the transit area is a stub area OSPF can be tunneled over
• GRE
• IPIP
• Interface must have an IP address with a

Miscellaneous OSPF Features

• OSPF Demand Circuit
  – Don’t send periodic hellos over DDR links
  – Also sets DNAflag
• OSPF Flood Reduction
  – Set Do Not Age flag (DNA) in LSAs
  – Eliminateparanoid update

沒有留言:

張貼留言