6-6 - Network Layer - OSPF and BGP Notes
Network Layer Functionality Recap
- Data Plane vs Control Plane
- Data Plane: Handles packet forwarding based on a forwarding table.
- Control Plane: Manages routing by implementing routing protocols and algorithms.
Routing and its Challenges
Routing Algorithms
- Common algorithms include Dijkstra's and Bellman-Ford.
- Idealized assumptions:
- All routers are identical.
- Network is “flat.”
- Real-world limitations:
- Storage capacity of routing tables.
- Excessive link-state information exchange can overload links.
Administrative Autonomy
- The Internet consists of multiple autonomous networks (Autonomous Systems - AS) managed independently.
- Each AS may enforce its own routing policies affecting routing scalability.
Autonomous Systems (AS)
- Definition
- An AS is a collection of routers under a common administration, also referred to as a domain.
- Routing Types:
- Intra-AS Routing: Routing within a single AS.
- Inter-AS Routing: Routing between different ASes.
Intra-AS Routing
- Requires all routers in an AS to use the same intra-domain protocol.
- Gateway routers connect the AS to other ASes and manage routing to external networks.
Inter-AS Routing
- Gateway routers handle external traffic and enforce routing policies based on administrative control.
OSPF (Open Shortest Path First)
A link-state routing protocol.
Characteristics:
- OSPF is an open and publicly available protocol.
- Routers exchange link-state advertisements (LSAs) directly over IP.
- Each router maintains a complete view of the topology within the AS and uses Dijkstra’s algorithm for path computation.
- Supports different metrics for link costs (e.g., bandwidth, delay).
- Security measures include authenticating OSPF messages to prevent malicious activity.
Scalability:
- OSPF uses a hierarchical structure to enhance scalability:
- Backbone and Areas: Link-state advertisements are contained within specific areas rather than flooding the entire AS, thus limiting routing update traffic.
BGP (Border Gateway Protocol)
The protocol used for inter-domain routing in the Internet.
Types of BGP:
- External BGP (eBGP): Communicates between different ASes, exchanging reachability information.
- Internal BGP (iBGP): Distributes reachability information among routers within a single AS.
Path Vector Protocol:
- BGP advertises routes by providing a list of ASes (AS-PATH) through which data will travel, allowing routers to make policy-based routing decisions.
BGP Attributes include:
- Prefix: The destination being advertised.
- AS-PATH: The journey through which the advertisement has traveled.
- NEXT-HOP: The specified router for the next segment of the journey.
BGP Policies vs OSPF
- Policy-oriented Routing:
- Inter-AS routing (BGP) gives administrative control over how traffic is routed and can prioritize certain paths based on policy rather than just performance.
- In contrast, intra-AS routing focuses primarily on optimizing performance.
OSPF vs BGP Comparison
| Feature | OSPF | BGP |
|---|---|---|
| Type | Interior Gateway Protocol | Exterior Gateway Protocol |
| Speed of Convergence | Fast | Slow |
| Scalability | Suitable for smaller networks | Designed for large-scale networks |
| Best Route | Shortest path preferred via Dijkstra | Policy dependent |
Example Setup
- All area routers run OSPF, while only selected routers connect with BGP to manage inter-AS communication.
- Area Border Routers (ABRs) and AS Border Routers (ASBRs) play key roles in facilitating communication between different areas and ASes respectively.
Conclusion
- Understand the distinctions between OSPF for intra-domain routing and BGP for inter-domain routing.
- Recognize how hierarchical routing adds structure and helps manage the complexity and scalability of large-scale networks.
- Stay familiar with BGP's dependence on policy for routing decisions as opposed to the performance-focused approach of OSPF.