Lecture 10
OSPF Network Architecture
Hierarchical Routing
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003101949.png)
2 levels of areas
Area 0 is the backbone
Every other area are called limbs
All data has to go through the backbone
Between areas sit ABRs (Area Border Routers)
They summarise the cost of the areas they route to
E.g. summarise area 1 to advertise to area 0 and the other way around
To keep routing tables smaller
Virtual Links
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003102204.png)
Every area needs to be connected to the backbone
But it might not be possible to physically connect to it
Instead, use a virtual link
Use an ABR in a nonzero area to extend the reach of area 0
"unnumbered point-to-point link"
No need to define a new subnet, gets added into area 4 in the above example
Only meant to be used as a temporary fix, engineers rather try to get a physical connection
Areas through a virtual link still need their own ABR
Inter Area Summary (IAS)
The information advertised between the connected areas by ABRs
Makes use of hub and spoke topology
Hub: area 0
Spokes: ABRs of other areas
ABR: if you want to reach a prefix outside this area, I know how to do it and the cost is 10
Router Roles
Backbone router: a router that has at least one interface in area 0
Internal router: a router with all interfaces within a single area
Only have routing information on their own router
Area Border Router (ABR): has an interface inside area 0 and one or more in other areas
Provides summaries of the other side
Autonomous System Boundary Router (ASBR): participates in other (external) routing protocols
Area Border Router (ABR)
Attaches to multiple areas
Areas can have
ABRs can be shared between areas
Separate database and protocol for each area
Receives summarised data on other areas from the backbone
Forwards this data to its attached areas
Summarises area data towards the backbone
Might be aggregated for efficiency (when possible)
ASBR
Can be part of any area
Interfaces with other routing protocols: BGP, RIP, IS-IS, ...
Can run both protocols at the same time
Injects external routes into OSPD
ASBR notion is independent of backbone, internal, ABR, ... definitions
Internal router can also be an ASBR
Stub(by) areas
A stubby area is an area in which no external routing information is injected by the ABRs
Uses a default area for all external destinations, which is injected by all ABRs
Useful when there are lots of prefixes, but all data has to go through the ABR itself anyway. Instead, just advertise a default gateway and go from there
A totally stubby area is a stubby area in which not even inter-area summaries are injected
One default route for internal AND external
A not so stubby router is a stubby area inside which certain external information is originated and flooded locally
OSPF Packets
Routers use a collection of IP addresses
One for each interface
And a loopback for each router
In OSPF, each router should also have a router ID
Unique across the AS
Either through manual config, or based on the highest IP on normal/loopback interface
Router Roles in Packet Exchange
In LANs, many routers share the same segment
Creates risk of overhead & congestion if all routers exchange Link State Advertisements (LSAs) with one another
Solution: DR/BDR election to optimise flooding
Go from full mesh to hub and spoke inside the area (above sections are hub and spoke between areas)
Designated Router (DR)
Forms adjacencies with all routers on the segment
Acts as a hub for LSAs
Maintains full Link State DataBase (LSDB) of the segment
Generates a network LSA summarising the connected routers
Backup Designated Router (BDR)
Stays in standby
Takes over if the DR fails
Other Router (DROther)
Form adjacencies with the DR and BDR
Send updates to the DR (and BDR)
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003104520.png)
Wait for 40 seconds before electing a DR
Election is based on highest OSPF priority (0-255) field and then highest router ID
Second highest becomes BDR
Priority 0 means it becomes a DROther and does not participate in election
Roles are sticky
If a new node with higher priority joins the segment, the current DR remains
OSPF Packets
Header
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003104753.png)
Header fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003104809.png)
Packet types:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003104831.png)
Link State Request: a request for a specific update you are missing
Link State Update: a.k.a. Link State Advertisement
Link State Acknowledgement: don't confuse this with LSA, these are just ACKs for LSAs
Hello Packets
Send periodic hello packets
Find and maintain neighbours
Elect DR and BDR
Exchange info about timers, DR, BDR and neighbours
Hello and Dead interval need to match to form an adjacency
Hello: how often to send the hello packet
Dead: how long a neighbour has to be silent before we declare it dead
Packet:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105159.png)
Packet fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105222.png)
Neighbours are shared to determine that both parties consider one another a neighbour
Database Description (DD) and Link State Request (LSR) packets
After a connection has been formed, the database needs to be synchronised
Two routers exchange Database Description (DD) packets, describing their LSDB
Contains only the headers of LSAs to reduce traffic
After exchanging DDs, two routers know which LSAs of the peer they are missing
Then, send LSR packets to request the full content of the missing LSAs
DD Packet:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105537.png)
DD Fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105553.png)
Also need to agree on the MTU to form an adjacency
Otherwise, a router might send LSAs that are too big for the other to receive
LSR packet:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105613.png)
LSR Fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003105636.png)
These fields are part of the LSA header
No specification of age or sequence number
LS Update packet:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003111930.png)
LS Update fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003111950.png)
Contain complete, specific instances
LSAs have variable length, based on LS type
LS Ack: sends back a list of LSA headers
Link State Advertisements (LSAs)
Define the reachability and const of routers, networks or external routes (may be summarised)
A Link State Update packet may contain multiple LSAs
Every LSA contains:
LSA header (20 bytes)
LSA type-specific content (variable lenght)
LSA header:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003112624.png)
LSA header fields:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003112640.png)
LS types:
%20Inter-Networking%20and%20Routing/Attachments/Pasted%20image%2020251003112658.png)
LSA Types
Router LSA: the router announces its presence and lists the links to other routers or networks in the same area, together with the metrics to them
Network LSA: the designated router (DR) on a broadcast segment (e.g., Ethernet) lists which routers are joined together by the segment.
Summary LSA and ASBR-Summary LSA:
An Area Border Router (ABR) takes information it has learned on one of its attached areas and summarises it before sending it out on other areas it is connected to.
An ABR floods the information for the router (i.e., the Autonomous System) where the type 5 (AS External LSA) originated.
about 60000 other packets and headers
Flooding stopped when routers receive the same LSA with higher age, they just discard it
Study edge cases and election algorithms
OSPF for IPv6 (aka OSPFv3)
Only does IPv6
Later extensions also do IPv4
Since it includes breaking changes to v2, it was called v3
Basics are the same: flooding, areas, SPT, (B)DRs, ...
Important changes:
- Addressing semantics moved to LSA payload
- In v2, adjacency was per subnet
- It is now per-link (even without a matching subnet, adjacencies can be formed)
- Introduces a new link-LSA
- Introduces explicit flooding scope
- Link scope, area scope, AS scope
- Removes auth from packet header
- Use IPSec from IPv6 instead
Routers and Network LSAs
Do not contain address info anymore
Only topological connectivity
No IPv6 prefix
Network protocol independent
Prefix information was put into new:
intra-area-prefix-LSA
link-LSA
IS-IS
Intermediate System to Intermediate System
Link-state protocol for intra-domain routing
Runs on L2, instead of L3
IS-IS routers have hierarchical levels instead of areas
Level-1 intra-area (like inside an area)
Level-2 inter-area (like area 0 to others)
Level-1-2: does both
Less chatty, can support larger networks