Skip to content

Routing_protocols

Chapter 14: Routing Protocols - Complete Deep Dive

Section titled “Chapter 14: Routing Protocols - Complete Deep Dive”

Routing protocols are essential for determining how packets travel across networks. This comprehensive chapter covers all major routing protocols in detail.


Understanding the different types of routing protocols is crucial for network design.

+------------------------------------------------------------------+
| Routing Protocol Classification Deep Dive |
+------------------------------------------------------------------+
IGP (Interior Gateway Protocols):
+------------------------------------------------------------------+
Used within a single Autonomous System (AS)
Characteristics:
- Fast convergence
- Used for enterprise networks
- Examples: RIP, OSPF, EIGRP, IS-IS
- Designed for moderate scale
EGP (Exterior Gateway Protocols):
+------------------------------------------------------------------+
Used between Autonomous Systems
Characteristics:
- Internet-scale
- Policy-based routing
- Examples: BGP (Border Gateway Protocol)
- Designed for inter-AS routing
Routing Protocol Types by Algorithm:
+------------------------------------------------------------------+
DISTANCE VECTOR:
+------------------------------------------------------------------+
Characteristics:
- Uses hop count as metric
- Shares entire routing table with neighbors
- Simple to configure
- Slow convergence
- Susceptible to routing loops
- Examples: RIP, IGRP
How Distance Vector Works:
+------------------------------------------------------------------+
1. Each router knows only its directly connected networks
2. Router advertises its routing table to neighbors
3. Neighbors add distance (hop count +1) and update table
4. Process repeats periodically
Problems:
- Count to infinity
- Routing loops
- Slow convergence
Solution: Maximum hop count (RIP max = 16)
LINK STATE:
+------------------------------------------------------------------+
Characteristics:
- Maintains complete network topology
- Uses SPF (Shortest Path First) algorithm
- Fast convergence
- More CPU/memory intensive
- More scalable
- Examples: OSPF, IS-IS
How Link State Works:
+------------------------------------------------------------------+
1. Each router discovers neighbors
2. Router creates Link State Advertisement (LSA)
3. LSA flooded throughout area
4. Each router builds identical topology database
5. Each router runs SPF to calculate best path
Advantages:
- Faster convergence
- No routing loops
- More scalable
- Better for large networks
PATH VECTOR:
+------------------------------------------------------------------+
Characteristics:
- Like distance vector but with path attributes
- Used for BGP
- No metric, uses policies
- Can prevent loops with AS_PATH
- Scalable to Internet size
Comparison Table:
+------------------------------------------------------------------+
| Feature | Distance Vector | Link State | Path Vector |
|--------------|----------------|--------------|--------------|
| Metric | Hop count | Cost (bandwidth)| Policy |
| Convergence | Slow | Fast | Variable |
| Scalability | Limited | Good | Excellent |
| Complexity | Low | High | High |
| Loop-prone | Yes | No | No |
| Examples | RIP | OSPF, IS-IS | BGP |
+------------------------------------------------------------------+

RIP is the simplest distance vector protocol, useful for small networks.

+------------------------------------------------------------------+
| RIP Complete Guide |
+------------------------------------------------------------------+
RIP Versions:
+------------------------------------------------------------------+
RIP Version 1:
+------------------------------------------------------------------+
| - Classful routing (no VLSM) |
| - No authentication |
| - Broadcast updates |
| - Maximum hop count: 15 |
| - No IPv6 support |
+------------------------------------------------------------------+
RIP Version 2:
+------------------------------------------------------------------+
| - Classless routing (supports VLSM/CIDR) |
| - Multicast updates (224.0.0.9) |
| - Authentication (MD5) |
| - Route summarization |
| - IPv6: RIPng |
+------------------------------------------------------------------+
RIP Timers:
+------------------------------------------------------------------+
| Timer | Value | Purpose |
|----------------|---------|------------------------------------------|
| Update | 30 sec | How often to send updates |
| Invalid | 180 sec| Time before route marked invalid |
| Holddown | 180 sec| Stabilization period after route change |
| Flush | 240 sec| Time before removing invalid route |
RIP Metrics:
+------------------------------------------------------------------+
Hop Count:
+------------------------------------------------------------------+
- Each router = 1 hop
- Maximum 15 hops
- 16 hops = unreachable
Metric Calculation:
+------------------------------------------------------------------+
Network A (1 hop)
|
v
Router 1 ------> Router 2 ------> Network B
To reach Network B from A: 2 hops
RIP Limitations:
+------------------------------------------------------------------+
1. Maximum 15 hops
2. Slow convergence (30 second updates)
3. No load balancing across equal-cost paths
4. No VLSM support in v1
5. Simple metric doesn't consider bandwidth
RIP Configuration (Quagga):
+------------------------------------------------------------------+
# Install quagga
sudo pacman -S quagga
# /etc/quagga/ripd.conf
router rip
version 2
network 192.168.1.0/24
network 10.0.0.0/8
timers basic 30 180 120
passive-interface default
no passive-interface eth0
!
# Authentication (optional)
key chain RIP
key 1
key-string MySecretKey
interface eth0
ip rip authentication key-chain RIP
ip rip authentication mode md5
# Enable service
sudo systemctl enable ripd
sudo systemctl start ripd
RIP Route Selection:
+------------------------------------------------------------------+
When multiple routes to same destination exist:
+------------------------------------------------------------------+
1. Lower hop count wins
2. If equal, load balances (up to 4 paths in Cisco)
Example:
+------------------------------------------------------------------+
R1: 192.168.1.0/24 via 10.0.0.2 (2 hops)
R2: 192.168.1.0/24 via 10.0.0.3 (3 hops)
R1 route is preferred
Split Horizon:
+------------------------------------------------------------------+
Prevents routing loops by not advertising routes back to the interface they came from.
Example:
+------------------------------------------------------------------+
Router A learns 192.168.1.0 from Router B
Router A will NOT advertise 192.168.1.0 back to Router B
Poison Reverse:
+------------------------------------------------------------------+
Advertises route with infinite metric (16 hops) to prevent loops.
Example:
+------------------------------------------------------------------+
Router A learns 192.168.1.0 from Router B
Router A advertises 192.168.1.0 with metric 16 to Router B
+------------------------------------------------------------------+

OSPF is the most popular interior gateway protocol for enterprise networks.

+------------------------------------------------------------------+
| OSPF Complete Deep Dive |
+------------------------------------------------------------------+
OSPF Features:
+------------------------------------------------------------------+
- Link-state protocol
- Fast convergence
- VLSM/CIDR support
- Multi-path routing
- Area-based hierarchy
- Load balancing
- Authentication
- Cisco proprietary origins (now open standard)
OSPF Areas:
+------------------------------------------------------------------+
AREA 0 (Backbone Area):
+------------------------------------------------------------------+
- All other areas connect to Area 0
- Required for inter-area routing
- Contains all ABRs (Area Border Routers)
- Must be contiguous
REGULAR AREAS:
+------------------------------------------------------------------+
- Connect to Area 0 via ABR
- Can be small or large
- Reduce SPF calculation overhead
AREA TYPES:
+------------------------------------------------------------------+
| Area Type | Description |
|------------------|--------------------------------------------------|
| Backbone (Area 0)| Central area, connects all areas |
| Standard | Regular area |
| Stub | No external routes, uses default route |
| Totally Stub | No external or inter-area routes |
| NSSA | Not-So-Stubby, allows limited external |
| NSSA Totally Stub| NSSA without inter-area routes |
OSPF Router Types:
+------------------------------------------------------------------+
INTERNAL ROUTER:
+------------------------------------------------------------------+
| - All interfaces in same area |
| - Only runs SPF within single area |
+------------------------------------------------------------------+
AREA BORDER ROUTER (ABR):
+------------------------------------------------------------------++
| - Connects multiple areas |
| - Maintains LSDB for each area |
| - Summarizes routes between areas |
| - Belongs to multiple areas |
+------------------------------------------------------------------+
AS BOUNDARY ROUTER (ASBR):
+------------------------------------------------------------------+
| - Connects to external AS (redistributes routes) |
| - Can be in any area |
| - Connects OSPF to RIP, BGP, etc. |
+------------------------------------------------------------------+
BACKBONE ROUTER:
+------------------------------------------------------------------+
| - Router in Area 0 |
| - Can be internal, ABR, or ASBR |
+------------------------------------------------------------------+
OSPF LSA Types:
+------------------------------------------------------------------+
| Type | Name | Description |
|------|-------------------|------------------------------------------|
| 1 | Router LSA | Router's links within an area |
| 2 | Network LSA | Multi-access network (DR election) |
| 3 | Summary LSA | Network summaries from ABR |
| 4 | Summary LSA | ASBR summary from ABR |
| 5 | External LSA | External routes from ASBR |
| 6 | Group LSA | Multicast group membership (MOSPF) |
| 7 | NSSA External | External from NSSA area |
| 8 | External LSA | Opaque (OSPF extensions) |
| 9-11 | Opaque LSA | Various OSPF extensions |
OSPF States:
+------------------------------------------------------------------+
1. DOWN:
+------------------------------------------------------------------+
| Initial state, no hellos received |
+------------------------------------------------------------------+
2. INIT:
+------------------------------------------------------------------+
| Received hello but own router ID not in hello |
+------------------------------------------------------------------+
3. 2WAY:
+------------------------------------------------------------------+
| Bidirectional communication established |
| On multi-access: DR/BDR election occurs |
+------------------------------------------------------------------+
4. EXSTART:
+------------------------------------------------------------------+
| Master/Slave election for DBD exchange |
| Establish sequence number |
+------------------------------------------------------------------+
5. EXCHANGE:
+------------------------------------------------------------------+
| DBD (Database Description) packets exchanged |
+------------------------------------------------------------------+
6. LOADING:
+------------------------------------------------------------------+
| LSR (Link State Request) for missing LSAs |
| LSU (Link State Update) with requested LSAs |
+------------------------------------------------------------------+
7. FULL:
+------------------------------------------------------------------+
| LSDB synchronized |
| Ready for routing |
+------------------------------------------------------------------+
OSPF Cost Calculation:
+------------------------------------------------------------------+
Formula:
+------------------------------------------------------------------+
Cost = Reference Bandwidth / Interface Bandwidth
Default Reference Bandwidth: 100 Mbps
Cost Examples:
+------------------------------------------------------------------+
| Interface | Bandwidth | Calculation | Cost |
|--------------|------------|---------------|-------|
| Serial | 1.544 Mbps | 100 / 1.544 | 64 |
| Ethernet | 10 Mbps | 100 / 10 | 10 |
| Fast Ethernet| 100 Mbps | 100 / 100 | 1 |
| Gigabit | 1 Gbps | 100 / 1000 → 1| 1 |
| 10 Gigabit | 10 Gbps | 100 / 10000 →1| 1 |
Custom Reference Bandwidth:
+------------------------------------------------------------------+
router ospf 1
auto-cost reference-bandwidth 10000 ! For 10G/40G/100G links
OSPF DR/BDR Election:
+------------------------------------------------------------------+
On multi-access networks (like Ethernet), DR and BDR are elected:
1. Highest OSPF Priority wins (0-255, default=1)
2. If tie, highest Router ID wins
Election Process:
+------------------------------------------------------------------+
1. Wait for Dead Timer
2. All routers complete waiting
3. BDR first (highest priority/ID)
4. Then DR (excluding BDR)
Roles:
+------------------------------------------------------------------+
- DR (Designated Router): Collects LSAs, sends to all
- BDR (Backup DR): Watches DR, takes over if DR fails
- DROTHER: Regular router, doesn't collect LSAs
OSPF Configuration (Quagga):
+------------------------------------------------------------------+
# /etc/quagga/ospfd.conf
router ospf 1
ospf router-id 1.1.1.1
network 192.168.1.0/24 area 0.0.0.0
network 10.0.0.0/8 area 0.0.0.1
area 0.0.0.1 stub
!
interface eth0
ip ospf cost 10
ip ospf hello-interval 10
ip ospf dead 40
ip ospf priority 100
!
interface eth1
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 MySecretKey
!
log-adjacency-changes
OSPF Network Types:
+------------------------------------------------------------------+
| Type | DR/BDR | Hello Timer | Use Case |
|----------------|------------|-------------|------------------------|
| Broadcast | Yes | 10 sec | Ethernet |
| Point-to-point | No | 10 sec | Serial, Frame Relay |
| NBMA | Yes | 30 sec | Frame Relay |
| Point-to-multipoint| No | 30 sec | Partial mesh |
OSPF Convergence:
+------------------------------------------------------------------+
How OSPF Achieves Fast Convergence:
+------------------------------------------------------------------+
1. LSA flooding: Immediate notification of changes
2. SPF calculation: Fast path computation
3. Partial SPF: Only recalculate affected area
4. Incremental SPF: For small changes
Timers:
+------------------------------------------------------------------+
- Hello: 10 seconds (30 on NBMA)
- Dead: 4 × Hello (40 seconds default)
- Wait: 40 seconds (DR/BDR wait)
- Retransmit: 5 seconds
+------------------------------------------------------------------+

14.4 EIGRP (Enhanced Interior Gateway Routing Protocol)

Section titled “14.4 EIGRP (Enhanced Interior Gateway Routing Protocol)”

EIGRP is Cisco’s advanced hybrid protocol.

+------------------------------------------------------------------+
| EIGRP Complete Deep Dive |
+------------------------------------------------------------------+
EIGRP Overview:
+------------------------------------------------------------------+
- Hybrid protocol (best of distance vector and link state)
- Cisco proprietary
- Fast convergence
- Unequal-cost load balancing
- Multiple network layer support (IP, IPX, AppleTalk)
EIGRP Tables:
+------------------------------------------------------------------+
NEIGHBOR TABLE:
+------------------------------------------------------------------+
| Neighbor IP | Holdtime | Uptime | SRTT | RTO | Queue |
|-------------|----------|--------|------|-----|-------|
| 10.0.0.2 | 10 sec | 1d 2h | 5 ms | 50 | 0 |
Fields:
- Neighbor IP: Address of EIGRP neighbor
- Holdtime: Time until neighbor considered down
- Uptime: How long neighbor has been up
- SRTT: Smooth Round Trip Time
- RTO: Retransmission Timeout
TOPOLOGY TABLE:
+------------------------------------------------------------------+
| Network | Successor | Feasible Successor | FD | RD |
|---------------|-----------|---------------------|-------|--------|
| 192.168.1.0/24| 10.0.0.2 | 10.0.0.3 | 28160 | 25600 |
Fields:
- Successor: Best route
- Feasible Successor: Backup route
- FD (Feasible Distance): Best metric to destination
- RD (Reported Distance): Neighbor's distance to destination
ROUTING TABLE:
+------------------------------------------------------------------+
Best routes from topology table (successors)
EIGRP Metrics (K Values):
+------------------------------------------------------------------+
| K Value | Metric Component | Default |
|---------|------------------|---------|
| K1 | Bandwidth | 1 |
| K2 | Load | 0 |
| K3 | Delay | 1 |
| K4 | Reliability | 0 |
| K5 | MTU | 0 |
Default Metric (K1=K3=1, others=0):
+------------------------------------------------------------------+
Metric = (K1 × Bandwidth) + (K2 × Bandwidth)/(256-Load) + (K3 × Delay)
Simplified (default):
+------------------------------------------------------------------+
Metric = Bandwidth + Delay
Bandwidth Calculation:
+------------------------------------------------------------------+
Bandwidth = 10^7 / Lowest bandwidth on path (in kbps)
Example:
+------------------------------------------------------------------+
Path: RouterA (FastEth) -> RouterB (1G) -> RouterC (Serial)
Lowest: FastEthernet = 100 Mbps
Bandwidth = 10^7 / 100,000 = 100
Delay Calculation:
+------------------------------------------------------------------+
Delay = Sum of delays on path (in tens of microseconds)
Example:
+------------------------------------------------------------------+
Path: RouterA (1000 us) -> RouterB (20000 us) -> RouterC (2000 us)
Total: 1000 + 20000 + 2000 = 23,000
Metric = 100 + 23 = 123 (scaled by 256)
= 31,488
DUAL Algorithm:
+------------------------------------------------------------------+
Diffusing Update Algorithm ensures loop-free paths:
1. SUCCESSOR: Best path (lowest FD)
2. FEASIBLE SUCCESSOR: Backup path meeting feasibility condition
Feasibility Condition:
+------------------------------------------------------------------+
RD (Reported Distance) < FD (Feasible Distance)
Example:
+------------------------------------------------------------------+
Route to Network X:
- Via RouterA: FD=1000, RD=500
- Via RouterB: FD=1200, RD=800
- Via RouterC: FD=1500, RD=2000
Successor: RouterA (FD=1000)
Feasible Successor: RouterB (RD=800 < FD=1000)
NOT Feasible: RouterC (RD=2000 > FD=1000)
EIGRP Packet Types:
+------------------------------------------------------------------+
| Type | Name | Purpose |
|------|--------------|---------------------------------------------|
| 1 | Hello | Neighbor discovery and maintenance |
| 2 | Update | Send route updates |
| 3 | Query | Ask neighbors for route information |
| 4 | Reply | Response to query |
| 5 | ACK | Acknowledge reliable packets |
EIGRP Timers:
+------------------------------------------------------------------+
- Hello: 5 seconds (60 on NBMA)
- Hold: 15 seconds (180 on NBMA)
- SIA Query: 90 seconds
- SIA Reply: 180 seconds
EIGRP Configuration:
+------------------------------------------------------------------+
router eigrp 1
eigrp router-id 1.1.1.1
network 192.168.1.0 0.0.0.255
network 10.0.0.0 0.255.255.255
passive-interface default
no passive-interface eth0
!
! MD5 Authentication
key chain EIGRP-KEY
key 1
key-string MySecretKey
!
interface eth0
ip authentication mode eigrp 1 md5
ip authentication key-chain eigrp 1 EIGRP-KEY
Unequal-Cost Load Balancing:
+------------------------------------------------------------------+
router eigrp 1
variance 2
Allows load balancing over paths up to 2× the best metric.
EIGRP vs OSPF:
+------------------------------------------------------------------+
| Feature | EIGRP | OSPF |
|-----------------|--------------|---------------------------|
| Type | Hybrid | Link State |
| Convergence | Very Fast | Fast |
| Scalability | Good | Excellent |
| Vendor | Cisco Only | Multi-vendor |
| Metric | Complex | Bandwidth |
| Areas | Yes | Yes |
| Load Balancing | Unequal | Equal only |
+------------------------------------------------------------------+

BGP is the protocol that runs the Internet.

+------------------------------------------------------------------+
| BGP Complete Deep Dive |
+------------------------------------------------------------------+
BGP Overview:
+------------------------------------------------------------------+
- Path vector protocol
- Used between Autonomous Systems (eBGP)
- Used within AS (iBGP)
- TCP port 179
- Designed for Internet-scale
- Policy-based routing
BGP Characteristics:
+------------------------------------------------------------------+
1. Path Vector: Maintains AS path to prevent loops
2. TCP-based: Reliable delivery
3. Incremental Updates: Not periodic
4. Large Scale: Millions of routes
5. Policy-based: Can implement complex policies
BGP Sessions:
+------------------------------------------------------------------+
eBGP (External BGP):
+------------------------------------------------------------------+
- Between different AS
- Typically directly connected
- TTL = 1 (security)
- Routes advertised to neighbors
iBGP (Internal BGP):
+------------------------------------------------------------------+
- Within same AS
- Can be multiple hops away
- Routes from iBGP don't get advertised to other iBGP peers
- Requires IGP for reachability between iBGP peers
BGP Message Types:
+------------------------------------------------------------------+
1. OPEN:
+------------------------------------------------------------------+
| - Establishes BGP session |
| - Contains: AS number, hold time, BGP ID, optional parameters |
+------------------------------------------------------------------+
2. KEEPALIVE:
+------------------------------------------------------------------+
| - Keep session alive (60 seconds default) |
| - No data in message |
+------------------------------------------------------------------+
3. UPDATE:
+------------------------------------------------------------------+
| - Advertise new routes |
| - Withdraw unreachable routes |
| - Contains: NLRI, path attributes, withdrawals |
+------------------------------------------------------------------+
4. NOTIFICATION:
+------------------------------------------------------------------+
| - Error notification |
| - Closes BGP session |
+------------------------------------------------------------------+
BGP States:
+------------------------------------------------------------------+
1. IDLE:
+------------------------------------------------------------------+
| Initial state, preparing to connect |
+------------------------------------------------------------------+
2. CONNECT:
+------------------------------------------------------------------+
| Waiting for TCP connection to complete |
+------------------------------------------------------------------+
3. ACTIVE:
+------------------------------------------------------------------+
| Trying to establish TCP connection |
+------------------------------------------------------------------+
4. OPEN SENT:
+------------------------------------------------------------------+
| Open message sent, waiting for reply |
+------------------------------------------------------------------+
5. OPEN CONFIRM:
+------------------------------------------------------------------+
| Open message received, waiting for Keepalive |
+------------------------------------------------------------------+
6. ESTABLISHED:
+------------------------------------------------------------------+
| Session established, exchanging updates |
+------------------------------------------------------------------+
BGP Path Attributes:
+------------------------------------------------------------------+
WELL-KNOWN MANDATORY (must be in every update):
+------------------------------------------------------------------+
- ORIGIN: How route learned (IGP, EGP, Incomplete)
- AS_PATH: AS numbers route has traversed
- NEXT_HOP: Next hop IP address
WELL-KNOWN DISCRETIONARY:
+------------------------------------------------------------------+
- LOCAL_PREF: Local preference (higher = preferred)
- ATOMIC_AGGREGATE: Indicates route was aggregated
OPTIONAL TRANSITIVE:
+------------------------------------------------------------------+
- AGGREGATOR: AS and IP of aggregator
- COMMUNITY: Tagging routes
OPTIONAL NON-TRANSITIVE:
+------------------------------------------------------------------+
- MED (Multi-Exit Discriminator): Which way to enter AS
- CLUSTER_LIST: Route reflector clusters
- ORIGINATOR_ID: Router ID of originator
Attribute Comparison:
+------------------------------------------------------------------+
| Attribute | Type | Scope | Description |
|---------------|----------|------------|--------------------------|
| ORIGIN | Well-known | Global | Route source |
| | Mandatory | | |
| AS_PATH | Well-known | Global | AS path |
| | Mandatory | | |
| NEXT_HOP | Well-known | Global | Next hop IP |
| | Mandatory | | |
| LOCAL_PREF | Well-known | Local | Outbound preference |
| | Discretion| | |
| MED | Optional | Neighboring| Inbound preference |
| | Transitive| AS | |
BGP Decision Process:
+------------------------------------------------------------------+
When multiple paths to same destination exist:
1. Highest LOCAL_PREF wins (default = 100)
2. Shortest AS_PATH wins
3. Lowest ORIGIN wins (IGP < EGP < Incomplete)
4. Lowest MED wins (if from same AS)
5. eBGP over iBGP
6. Lowest IGP metric to NEXT_HOP
7. Lowest router ID
BGP Route Selection Example:
+------------------------------------------------------------------+
Route 192.168.1.0/24 available via multiple paths:
Path 1: AS_PATH = 65001 65002, LOCAL_PREF = 100, MED = 100
Path 2: AS_PATH = 65001, LOCAL_PREF = 100, MED = 200
Path 3: AS_PATH = 65001 65003, LOCAL_PREF = 200, MED = 50
Selection: Path 3 (highest LOCAL_PREF)
BGP Configuration (Quagga):
+------------------------------------------------------------------+
# /etc/quagga/bgpd.conf
router bgp 65001
bgp router-id 1.1.1.1
neighbor 192.168.1.2 remote-as 65002
neighbor 192.168.1.2 description eBGP Peer
neighbor 192.168.1.2 update-source lo0
!
! Address family
address-family ipv4 unicast
network 192.168.1.0/24
neighbor 192.168.1.2 activate
neighbor 192.168.1.2 soft-reconfiguration inbound
neighbor 192.168.1.2 route-map RM-IMPORT in
!
! For iBGP
neighbor 10.0.0.2 remote-as 65001
neighbor 10.0.0.2 next-hop-self
!
route-map RM-IMPORT permit 10
match as-path AS-SET
set local-preference 200
BGP Route Aggregation:
+------------------------------------------------------------------+
aggregate-address 192.168.0.0/16 summary-only
aggregate-address 192.168.0.0/16 as-set
BGP Security:
+------------------------------------------------------------------+
1. Route Filtering:
+------------------------------------------------------------------+
ip as-path access-list 10 permit ^65001$
router bgp 65001
neighbor 192.168.1.2 filter-list 10 in
2. Route Maps:
+------------------------------------------------------------------+
route-map DENY-EXPORT deny 10
match community NO-EXPORT
!
ip community-list 1 permit 65001:100
route-map PERMIT-EXPORT permit 10
match community 1
3. TTL Security:
+------------------------------------------------------------------+
neighbor 192.168.1.2 ttl-security hops 1
BGP Table:
+------------------------------------------------------------------+
BGP Routing Information Base (RIB):
- Adj-RIBs-In: Routes received from neighbors
- Loc-RIB: Local routing table
- Adj-RIBs-Out: Routes to advertise
- Best Path: Selected routes
Show Commands:
+------------------------------------------------------------------+
show ip bgp ! BGP table
show ip bgp summary ! BGP neighbors
show ip bgp 10.0.0.0/8 ! Specific route
show ip bgp neighbors ! Neighbor details
+------------------------------------------------------------------+

+------------------------------------------------------------------+
| Routing Protocol Comparison |
+------------------------------------------------------------------+
| Feature | RIP | OSPF | EIGRP | BGP |
|----------------|-----------|-----------|-----------|------------|
| Type | Distance | Link State| Hybrid | Path Vector|
| Metric | Hop count | Cost | Bandwidth+| AS_PATH |
| | | | Delay | |
| Max Hops | 15 | Unlimited | Unlimited | Unlimited |
| Convergence | Slow | Fast | Very Fast | Variable |
| Scalability | Small | Large | Large | Internet |
| Vendor | Multi | Multi | Cisco | Multi |
| Complexity | Low | Medium | Medium | High |
| Load Balance | Equal | Equal | Unequal | Policy |
When to Use Each Protocol:
+------------------------------------------------------------------+
RIP:
+------------------------------------------------------------------+
| - Very small networks (< 15 routers) |
| - Simple requirements |
| - Legacy equipment |
+------------------------------------------------------------------+
OSPF:
+------------------------------------------------------------------+
| - Medium to large enterprise networks |
| - Multi-vendor environments |
| - Hierarchical network design |
| - Fast convergence required |
+------------------------------------------------------------------+
EIGRP:
+------------------------------------------------------------------+
| - Cisco-only environments |
| - Networks with mixed link speeds |
| - Very fast convergence critical |
| - Unequal-cost load balancing needed |
+------------------------------------------------------------------+
BGP:
+------------------------------------------------------------------+
| - ISP networks |
| - Multi-homed connections |
| - Connecting to internet |
| - Large enterprise with multiple AS |
+------------------------------------------------------------------+
+------------------------------------------------------------------+

In this comprehensive chapter, you learned:

  • Routing protocol classification - IGP vs EGP, algorithm types
  • RIP - configuration, timers, limitations
  • OSPF - areas, LSA types, DR/BDR, cost calculation
  • EIGRP - DUAL algorithm, metrics, neighbor tables
  • BGP - path attributes, message types, configuration

This knowledge is essential for network design and troubleshooting.


Chapter 15: Firewalls


Last Updated: February 2026