You are previewing Policy Routing Using Linux®.
O'Reilly logo
Policy Routing Using Linux®

Book Description

Traditional IPv4 routing is summarized as "All routing is a destination driven process". When a router looks at an IPv4 packet it cares only about the destination address in the header of the packet. It uses this destination address to make a decision on where to forward the packet. But what if you want to route packets differently depending not only on the destination addresses but also on other packet fields such as source address, IP protocol, transport protocol ports or even packet payload? This is Policy Routing and this book tells you how to do it.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Introduction
  6. Theory, Usage, and Utilities
    1. Basic IPv4 Routing
      1. Traditional IPv4 Routing
      2. UNIX Configuration Commands
      3. Cisco IOS Configuration Commands
      4. IPv4 Dynamic Routing
      5. UNIX routed and Cisco RIP Configurations
      6. Sample Linux Router Setup
    2. Policy Routing Theory
      1. Defining "Policy" in Policy Routing
      2. Common IPv4 Routing Problems and Solutions
      3. Policy Routing Structure
      4. Summary
    3. Linux Policy Routing Structures
      1. The Triad Elements—Address, Route, Rule
      2. RPDB—The Linux Policy Routing Implementation
      3. System Packet Paths—IPChains/NetFilter
      4. Summary
    4. IPROUTE2 Utility for Linux
      1. Obtaining and Compiling IPROUTE2
      2. General Command Structure
      3. ip link—Network Device Configuration
      4. ip address—Protocol Address Management
      5. ip neighbour—neighbour/ARP Table Management
      6. ip route—Routing Table Management
      7. ip rule—Routing Policy Database Management
      8. ip tunnel—IP Tunnelling Configuration
      9. ip monitor and rtmon—Route State Monitoring
      10. Summary
  7. Policy Routing Implementations
    1. Simple Network Examples
      1. IP Addressing
      2. IP Routes
      3. IP Rules
      4. Multiple Route Tables
      5. All Together Now
      6. Summary
    2. Complex Network Examples
      1. Local Service Segregation
      2. Bounce Table Walking
      3. Tag Routing with TOS and fwmark
      4. Interactions with Packet Filters
      5. Summary
    3. Dynamic Routing Interactions
      1. Realms and Information Bases
      2. gated and Zebra
      3. Rules and Dynamic Structure
      4. Summary
    4. NAT Functions
      1. Standard NAT Defined
      2. Policy Routing NAT
      3. NetFilter NAT
      4. Interactions Between FastNAT and NetFilter
      5. Summary
    5. IPv6
      1. Theory and History
      2. Policy Routing Usage
      3. Summary
    6. Future Musings
      1. Policy Routing Triad
      2. The Protocols: IPv4, IPv6, and IPSec
      3. Security and Commerce
      4. Summary
  8. Appendixes
    1. Glossary of Terms
      1. Glossary
    2. Source Code Listings and Locations
      1. Kernel Configuration and Patches
      2. NetFilter Patches
      3. Software Versions
      4. PakSecured Installation and Configuration
  9. Index