OSPF - Basic Operation Flashcards
There is a large OSPF domain with over 10,000 LSAs in the network. What could be done with the group pacing interval to help on this network?
The group pacing interval could be decreased, default is 240 seconds. Means not waiting as long for group of LSAs.
A route is tagges as IA in the routing table.
What does this mean?
Its an OSPF Inter Area route
What is the difference between a direct Ack and a delayed Ack?
Direct Ack is sent immediately to ack an LSA while a delayed Ack waits up to the retransmit timer to Ack multiple LSAs in a single LSAck packet.
Direct ACk are always unicast while delayed Ack may be multicast depending on the network type.
Flooding is OSPF is considered reliable, what does this mean?
Every LSA sent must be acknowledged
How can the source router be identified in an OSPF packet header?
Header includes router ID of originating router and area ID
True of False?
OSPF will still use a router ID for a physical interface after a physical interface fails or is deleted?
True
__Why does OSPF need areas?
- Areas reduce amount of routers
- reduce flooding of LSA, so less CPU intensive
- less DB interaction
- SPF algorithm less intensive
What command is used to find a routers OSPF neighbours?
Show ip ospf neighbors
Why use Network LSAs in OSPF, would router LSAs not suffice?
Network LSAs are used in a multi access network and describe all routers in the multi access network in one LSA to the rest of the network . If using router LSA, would need multiple LSAs to describe the multi access network.
Not scalable, Eg. 100 routers in multi access network all would send router LSAs throughout the OSPF domain instead of just to the DR
What does the link state ID field signify within a link state request packet?
The ID depends on the LSA type which is also defined in the link state request
Eg. Type 1 LSA, ID is router ID
Eg. Type 2 LSA, ID is network
Based on the diagram, what path would a network attached to router A take to reach the external subnet if the external network was redistributed as a type 1 route and a type 2 route.
Type 1 - A -> B -> D
Type 2 - A -> C -> D
External Cost is 30 B -> D, 20 C -> D
What command is used to show type 4 LSA in an OSPF LSDB?
show ip ospf database asbr-summary
What does the summary mean ina network summary LSA? Does it summarize routes?
No it doesn’t summarize routes. It summarizes the type 1 & type 2 LSAs for a particular network to a single LSA advertisement for that network outside the area.
Router Decisions on receiving LSA
- If it already exists
- If doesn’t exist
- Compare seq numbers
- if same then ignore
- if higher add to LSDB, send ack, flood, re-run SPF
- if lower, send LSU to source with updated LSA info
- Add to LSDB, send ack, flood, run SPF
What is the link state ID of a network LSA?
IP address of the interface of the DR that connects to the multi access network
What is the default behaviour for a Type 7 LSA when it reaches an ABR?
The ABR will not translate / flood these LSAs to any attched area.
If an OSPF paket has an AuType of 2, what does this mean and what would you expect to see in the Authentication field?
MD5 Authentication
Expect to see in Authentication field:
- Key ID
- Authentication Data Length
- CryptoSequence Number
How does the master / slave know DB exchange process is complete?
When both routers have sent and received DD packet with M bit set to 0
In a broadcast network DROther sends an LS Update to DR / BDR. Does the BDR flood it?
No, BDR listens for updates on 224.0.0.6 like the DR but only records LS Updates. It does not reflood or ack them unless DR fails.
What are the two ways to acknowledge an LSA update?
- Explicit Ack - send LSAck with LSA header back to neighbour
- Implicit Ack - Update packet received with exact same instance of LSA - neither is more recent than the other
What happens when a non ABR receives a network summary LSA?
As it is a network summary LSA, it does not run SPF algorithm
Adds cost in LSA to cost to get to ABR
Route added to routing table along with calculated cost - distance vector behaviour (no shortest path tree for outside area)
In which OSPF neighbour state is a DR / BDR election?
Two-Way
Describe the OSPF neighbour Full state?
- Neighbours fully adjacent
- Adjacencies appear in router LSAs and network LSAs
LSA Flooding
- Explain the concept of LSA flooding?
- What types of LSA packets are flooded?
- Are LSAs flooded outside of the area they originate?
- Flooding means sending the packet throughout area, could be point to point links, broadcast network etc. but means router just sends out to its adjacencies and then next router sends it to theirs
- LS Updates and LS Acks
- No
There is a very small OSPF domain, what could be done with the group pacing interval to make the network more efficient?
Increase the group pacing interval, default is 240 seconds. More LSAs in less updates by incrceasing.
What type of LSA does the image display?
Type 2 Network LSA
What is the name of the algorithm OSPF uses to calculate the shortest path tree from LSAs in LSDB?
Djikstra’s Algorithm
What is the attached router field in a network LSA?
Lists Router IDs of all routers on multiaccess network that are fully adjacent with the DR
What is the name for a Type 7 LSA?
NSSA External LSA
Link state updates which are sent due to a retransmission. Are they potentially multicast (based on network type) like the original LSA?
No they are always unicast no matter what network type
In a broadcast network who does a DR router form adjacencies with?
All routers on the multi-access network
Is the hello interval interface specific or router specific?
Interface specific.
Can be configured with command ip ospf hello interval
In an OSPF broadcast network a DROther sends an LSA to a DR / BDR. The LSA isn’t acked within the retransmission time so the DROther needs to send to the DR again. What address does it use?
It sends the LSU unicast to the DR and not multicast as it did originally.
How are LS Updates sent for each network type?
- Point to Point - Multicast on 224.0.0.5
- Point to Multipoint - Unicast
- Virtual Link - Unicast
- Broadcast - sent to DR / BDR on 224.0.0.6, DR sends to DrOthers on 224.0.0.5 and DROthers send out all their other OSPF enabled interfaces
- NBMA - Unicas to DR / BDR, DR unicasts to all adjacent neighbours
What factors dictate the size of an OSPF area?
What is a good guide for the max umber of routers depending on the above factors?
- Number of Links
- Stability of Topology
- Memory & CPU of routers
- Use of summarization
- Number of LSAs entering the area.
30 - 200 routers
What are the duties of a DR on an OSPF broadcast network?
- Represent the multi-access network and its attached routers to the rest of the OSPF area
- Manage the flooding process on the multi-access network
For acknowleging LS Updates is implicit or explicit acks more efficient?
Implicit - if neighbour is already sending back an LS Update then can include that LSA to be acked in the update instead of sending an explicit LS Ack.
In determining the most recent LSA, why if the sequence numbers are the same are checksums compared next and can they garauntee the latest LSA?
Checksums offer a tiebreak, without it two LSAs could live in network til next refresh in 30 mins
They cannot garauntee the most recent LSA
They provide OSPF a consistent way to always reach a decision
Provides vendor interop
On a multi-access network who do routers form an adjacency with?
Both DR & BDR
Of the below LSA types, which ones would you see in a totally stubby area?
- Type 1
- Type 2
- Type 3
- Type 4
- Type 5
- Type 7
- Type 1
- Type 2
- Single Type 3 for default route
- No Type 4
- No Type 5
- No Type 7
How many bits is an area and how can it be represented?
An area is 32 bits and can be represented as dotted decimal or a decimal number.
Eg. Area 271 = 0.0.0.15
What is the command to show router LSAs in LSDB?
show ip ospf database router
What is a partitioned area?
Is it a problem?
An area where a link failure causes one part of the area to become isolated from the other.
Not a problem for non backbone area, treated now as two separate areas, as long as both areas still have an ABR. Traffic between these new areas will now traverse via the backbone.
Partition of backbone is a problem, creates two isolated OSPF domains. Better design required to prevent it.
Two routers in a stub area fail to form an adjacency, what is most likely the issue?
One router is configured as a stub and the other isn’t
E bit set to 0 in hello packet of stub router, if one not configured as stub then mismatch hellos
All routers within stub area must be configured as stub
What is the major concern if an OSPF packet is configured with AuType = 1?
This is clear text password
It is transferred in the authentication field of the OSPF packet
If receving router interface is configured with same password then packet is accepted
Problem: Attacker could join OSPF network with router by sniffing out password in OSPF packets and configuring router with the same details
What are the 8 fields in an LSA header?
- Age
- Options
- Type
- Link State ID
- Advertising Router
- Sequence Number
- Checksum
- Length
What are the 4 restrictions on creating a stub area?
- All routers in area must be stub (E bit set in hellos)
- Virtual Links cannot be configured or transit a stub area
- No router in stub area can be ASBR
- Stub area can have more than one ABR but they will all source default route so cannot determine optimal gateway
What is the TTL of an OSPF packet?
Where is this TTL defined?
1
In the IP header (outer encapsulation of OSPF packet)
What is a network summary LSA?
What command is used to see them in a LSDB?
Means by which ABR tells internal routers to tehir area of destinations on attached area
show ip ospf database summary
In an OSPF packet header, there are 5 values for Type. What does type signify and what are the possible values?
Type defines the type of OSPF packet
1 byte
There are 5 possible values 1 - 5
- Hello
- Database Descriptor
- Link State Request
- Link State Update
- Link State Ack
What is the OSPF MD5 authentication process?
- Router creates a hash with OSPF packet data and password
- Sends the hash in the OSPF packet
- Receiving router knows the location of the hash based on the authentication data length, strips off the hash
- Receiving router has same password, calculates hash again against the packet
- if hash values are identical then packet source has been authenticated
How does a router inform other routers that it is an ASBR?
The E bit in the router LSA is set if it is an ASBR
What OSPF network types require a DR / BDR?
- Broadcast
- NBMA
The LSA refresh timer is every 30 minutes but an LSA isn’t flushed from an LSDB for 1 hour. Why is there such a difference in times?
The group pacing interval can be set up to 30 minutes on a router. So even though the refresh is every 30 minutes, if the pacing interval was set to max then a packet may not arrive on a router for close to 30 minutes after being sent by originating router
Once the DB sync process (all DD packets sent) has completed which state does OSPF transition to?
- If entries still on link state request list then Loading
- If no entries left on link state request list then Full
What is the link state ID in a router LSA?
Router ID of originating router
What is a good use case for configuring an area as a stub area?
An area that has a single exit via the ABR and one that has a lot of Type 5 external routes.
ABR will source a default route and no Type 5s will be required in the area
If an OSPF packet has an AuType of 0, what does that mean?
No authentication
Authentication field not examined
All OSPF networks fall into two types, what are they?
- Transit
- Stub
BGP routes are redistributed into OSPF, no metric is defined. What will the cost of these redistributed routes be in OSPF?
Cost of 1
Direct Ack
- What is a direct Ack?
- What situations is it used?
A direct ack is when an ack is sent immediately and unicast
It is used when:
- a duplicate LSA is received from a neighbour, possibly indicating neighbour never received original ack.
- LSAs age is Max Age, no instance of LSA in receiving routers LSDB
What criteria must satisfy ECMP for a destination?
Equal cost, equal path type
What is a network LSA and where is it flooded?
What command is used to see the network LSAs in the LSDB?
- LSA sent by DR in multi access network
- Lists all attached routers including DR in multi access network (treated as one virtual router) along with network and subnet mask
- Flooded within area only
- show ip ospf database network
Is there an adjacency formed between DROther routers in a broadcast / NBMA network?
No
What does the IP address in the DR / BDR field of an OSPF hello packet represent?
Represents the interface of the DR / BDR on the network
Not the router ID of the DR / BDR
What are the four OSPF path types?
- Intra Area
- Inter Area
- Type 1 External
- Type 2 External
What LSA type number does an ASBR originate is a NSSA area?
Type 7
True or False?
DR & BDR are elected, another router joins multiaccess network and has a higher priority than DR / BDR. It will become DR / BDR.
False
If DR / BDR already elected then no new re-election and DR / BDR continue
What command is used to check all details related to an OSPF enabled interface?
show ip ospf interface
If a network designer wanted packets to leave the OSPF network at the closest exit point to the external destination.
Which network path type would they choose and why?
External Type 2
Just takes into account the cost of external route and not internal cost to ASBR
An OSPF packet is only exchanged with a directly connected neighbour, how does it garauntee this in an OSPF packet?
TTL is 1 for all OSPF packets
What does a network Summary LSA advertise and to who?
Advertises destinations outside an area into that area
ABR learns routes from other area(s) it is attached to and advertises them into an area
What is the order used for OSPF to select a router ID?
- Manual Configuration
- Highest IP address on any loopback
- Highest IP address on any physical interface
How does OSPF track an LSA to make sure it is acknowledged?
- Router sends LSA
- LSA added to link state retransmission list for every neighbour it has been sent to
- If no ack within retrasnmission interval (5 seconds default) then router resends LSA
- Once LSA is acked it is removed from link state retransmission list
What area is an AS External LSA associated with?
It is associated with no area, only LSA that isn’t
Link State Refresh
- What is a link state refresh?
- What two characteristics of an LSA are altered as part of a refresh?
- How often does it take place?
- What does a receiving router do with the LSA?
- Originating router refreshes his originating LSAs and re-floods them.
- Sequence number incremented and age set to 0
- Every 30 minutes
- Replaces the old LSA and starts to age the new LSA
What is the age field in an LSA?
How is it incremented?
The time in seconds since an LSA was originated
Incremented by InfTransDelay at every router it exits (default value for Cisco 1 second)
Incremented also when in DB
What are the 10 pieces of information in a hello packet?
- Originating Router ID
- Area ID of router interface
- Address mask or router interface
- Authentication Info
- Hello Interval
- Dead Interval
- Router Priority
- DR / BDR
- Flags
- Router IDs of originating routers neighbours
An OSPF hello packet must match subnet mask, area ID, hello interval, dead interval, options and authentication for it to be accepted. MTU must match, why is that not considered here?
MTU is defined in the DD packet
If MTU mismatched here then adjacency doesn’t move past exstart
Router LSA
What does a router LSA describe?
Where is it flooded to?
What command do you use to see router LSAs?
- Describes all of a router’s links, their outgoing cost etc. and OSPF neighbours on those links
- Flooded within area only
- show ip ospf database router
What mechanism does OSPF use to make sure that its link state DB is not corrupted?
It verifies the checksum every 5 minutes in the LSDB to ensure LSAs have not been corrupted.
Is a Network Summary LSA propogated outside of the area it is advertised into? If not, then how do other areas learn about the routes from the network summary LSA?
It is not advertised outside of the area it is advertised into
It is regenerated by other ABRs and propogated into other areas
Database Description Packet
- What is the purpose of a database description packet?
- What does it contain in its body?
- Provides a summary description of the LSDB of a router
- Packet contains LSA headers only, enough information for receiving router to decide whether it has the latest copy of LSAs in its own database
In the diagram, how will packets route from R3 to R5?
Via R1 (area 0) and not direct via R4
Distance vector behaviour outside area and not link state (shortest path tree)
How does OSPF choose the best route if multiple entries for the same route exist?
Eg. Destination = 172.16.64.205
Routes in routing table:
- 16.64.0/18
- 16.64.0/24
- 16.64.192/27
Will use longest match
Chooses 172.16.64.192/27
What is the one characteristic required of OSPF databases in an area?
show ip ospf database database-summary
What is a virtual link?
Why would you need a virtual link?
Is it good design practice?
Which router type is a virtual link configured between?
- Provides link to backbone through non backbone area, essetially a tunnel.
- Area doesn’t have direct access to backbone or fix issue with partitioned backbone
- Poor design practice, should design to avoid potential partitioned backbone (redundant links) or area not directly connecting to the backbone.
- Configured between ABRs, they are considered neighbours on virtual link.
Of the below LSA types, which ones would you see in a not-so-stubby area?
- Type 1
- Type 2
- Type 3
- Type 4
- Type 5
- Type 7
- Type 1
- Type 2
- Single Type 3 for default route
- Type 4
- No Type 5
- Type 7
What is a type 1 LSA?
Router LSA
What OSPF network types use multicast?
- Point to Point
- Broadcast
What is the purpose of an ABR?
Gateway for inter-area traffic via the backbone. Summarizes its information into the backbone. Backbone then propogates to other areas.
DD Master / Slave Negotiation
- Which OSPF state does the master / slave negotiation happen in?
- How is it decided which router becomes master?
- What happens once DD negotiation complete?
- Exstart
- Negotiation Process:
- Both neighbours claim to be master
- Both send empty DD packet with MS bit set
- DD seq number set by both neighbours independently
- Nieghbour with higher router ID becomes master
- Seq number set to masters seq number
- Router OSPF process moves to exchange state
NBMA Networks
- Give examples of NBMA networks?
- What is NBMA and how does it differ to broadcast?
- Is there a DR / BDR?
- Are packets unicast or multicast?
- Frame Relay / ATM
- NBMA is two or more routers but no broadcast capability
- Yes, DR / BDR elected
- All packets are unicast
If a network designer wanted the closest exit point from OSPF too external networks.
Which network path type would they choose and why?
External Type 1
Cost to external route includes internal cost to ASBR
In a type 4 LSA what is the subnet mask address?
Mask is 0
It is advertising a router (ASBR) and not a network
Uses same LSA format as Type 3 so mask needs to be set to something
What is the default external path type in OSPF?
E2
What is an OSPF packet set to for QoS?
110b (Internetwork Control)
High Precedence
An OSPF packet has a value of 5 in its type field. What type of OSPF packet is it?
Link State Ack
Describe the OSPF neighbour Loading state?
- router sends link state requests to neighbours requesting most recent LSAs, process started in Exchange state but not yet finished so Loading
- A router needs to flush an LSA from all router databases, how does it achieve this?
- Can this be done by any router?
- Originating router sets the age of an LSA to Max Age (3600)
- A router can only prematurely age an LSA that it originates
What is the value of the DR / BDR field in an OSPF hello packet if the network type does not require a DR / BDR?
0.0.0.0
What does an AS Extrenal LSA advertise and who advertises them?
Advertises routes external to OSPF AS or default routes external to OSPF AS
Sourced by ASBR
What defines an OSPF internal router?
All OSPF interfaces belong to the same area
What is the command to see all LSAs in a LSDB?
Does this command show the full LSA details?
show ip ospf database
Two routes have equal cost, 1 is an E1 route and the other is an E2 route.
Will they load balance traffic between them?
No, ECMP will only work for equal cost, equal path-type.
If both E1 or both E2 then yes they would load balance
What is a type 4 LSA?
ASBR Summary LSA
Does a link state request packet support requesting multiple LSAs in one packet?
Yes
What is the purpose of an ASBR?
Gateway for external traffic
Inject routes into OSPF learned from other protocols
ASBR can be internal, backbone or ABR
How does Djikstra’s algorithm generate a shortest path for a network?
- Based on cost
- cost associated with each interface
- route cost is sum of outgoing interfaces to destination
Describe the OSPF neighbour init state?
- Hello packet sent
- Two way communication not formed yet
- router lists all its neighbour IDs in its hello packet
Why are DRs / BDRs required in broadcast networks?
- Too many LSAs and adjacencies required in network [n(n-1)/2) adjacencies]
- Two many copies of same LSA in network as receiving router forwards to all its neighbours and the same for the next and so on (n2 LSAs)
Why is router 2 considered a DROther when it has a higher priority than router 1?
Router 1 was configured 1st
Once BDR is elected, a router with higher priority cannot take over
In the diagram, what issue does an ASBR Summary LSA resolve?
Which router in the diagram sources the ASBR Summary LSA?
R4 is redistributing RIP routes into OSPF.
R2 will receive the routes as type 5 LSAs with the next hop as R4 as next hop is not altered as route distributed accross areas.
ASBR Summary LSA is sent into area 1 (to R2) to tell it to get to the ASBR to go via R5.
R5 sources the ASBR Summary LSA
What is a NSSA External LSA?
Type 7 LSA
Almost identical to Type 5
Type 7 only flooded within NSSA area it was sourced, Type 5 flooded through OSPF AS
Router Priority
- What does it do?
- What are the range of values?
- What is the default router priority for Cisco?
- What does router priority of 0 mean?
- What command is used to change the router priority?
- Each OSPF enable router interface has a router priority. Used for DR / BDR election in multi-access networks.
- Range: 0 - 255. Higher better
- Default for Cisco devices is 1
- 0 means interface is not eigible for DR / BDR election. Set if you don’t want router becoming DR / BDR
- Changed at a per interface level: ip ospf priority
A hello packet contains router IDs of neighbours over what time period?
Within the last router dead interval
In OSPF why is the backbone area (area 0) required?
All areas connect to area 0
Essentially hub and spoke with areas
Prevents route loops - distance vector protocols prone to route loops. If all routees go through area 0 then this can be avoided.
What is the command to configure a NSSA totally stubby area?
area x nssa no-summary
What is a not-so-stubby area and why may it be required?
A NSSA area allows external routes to be advertised into OSPF AS while retaining characteristics of stuf area to rest of the AS
A virtual link is configured but isn’t coming up. It looks like the problem may be with the transit area. What may be the issue?
- Transit area may be configured as stub (area must have full routing information), this is not allowed when configuring a virtual link
What is a stub area?
An area where external LSAs are not flooded (no Type 5 LSAs)
ABR sends type 3 LSA to advertise single default route to stub area
Type 3 LSA not flooded outside area, default behaviour
Delayed Ack
- What is a delayed Ack?
- What is the advantage of it?
- How does it work on a broadcast network where multiple neighbours send LSAs to DR?
- WHat is the length of time an Ack can be delayed to wait for more LSAs to be acked together?
- A delayed ack delays the length of time before acknowledging so that more LSAs can be acknowledged in a single LSAck packet.
- Advantage is that is more efficient. Less LSAck packets being sent.
- LSAs from multiple neighbours can be acked in a single multicast packet in a broadcast network
- Can be delayed less than the retransmit time which is 5 seconds by default
DB Sync Process
- Who controls synchronisation?
- How many DD packets can be outstanding at a time?
- How does the slave ack a DD packet?
- What happens if master doesn’t receive ack from slave?
- True / False? Slave only send DD packets as responce to master?
- Master
- 1
- Slave acks by sending DD packet back but with same seq number
- If master doesn’t receive ack within retransmit time (5 seconds) then it resends the DD packet
- True
How is a link state update packet flooded through an OSPF area?
Originating router sends to its directly connected neighbours
They re-encapsulate the packet and send it to their neighbours
So on until every router in the area has the LSU
What is the purpose of the crypto sequence number in an OSPF Authentication field in a packet header?
Provides non decreasing sequence number
Prevents replay attacks when MD5 authentication is used
Does a stub area still have routes to networks in different OSPF?
Yes, stub area still allows Type 3 LSA routes, blocks routes coming from outside OSPF AS (Type 5)
What is the default hello interval on an OSPF broadcast network?
10 seconds
What is an OSPF network destination type?
Network address where packets can be routed
Destinations entered in routing table