Understanding Linux Network Internals (Paperback)
暫譯: 理解 Linux 網路內部原理 (平裝本)
Christian Benvenuti
- 出版商: O'Reilly
- 出版日期: 2006-02-07
- 定價: $2,280
- 售價: 8.0 折 $1,824
- 語言: 英文
- 頁數: 1066
- 裝訂: Paperback
- ISBN: 0596002556
- ISBN-13: 9780596002558
-
相關分類:
Linux
-
相關翻譯:
深入理解 Linux 網絡技術內幕 (Understanding Linux Network Internals) (簡中版)
Linux 網路原理 (Understanding Linux Network Internals) (繁中版)
立即出貨 (庫存 < 4)
買這商品的人也買了...
-
$680$537 -
$490$382 -
$890$703 -
$1,742Linux Device Drivers, 3/e (Paperback)
-
$680$646 -
$880$695 -
$880$695 -
$490$417 -
$580$493 -
$390$332 -
$2,080Understanding the Linux Kernel, 3/e (Paperback)
-
$580$458 -
$650$507 -
$890$757 -
$780$741 -
$450$383 -
$780$663 -
$680$578 -
$390$332 -
$650$507 -
$980$774 -
$680$537 -
$720$569 -
$1,200$948 -
$600$480
相關主題
商品描述
Description
If you've ever wondered how Linux carries out the complicated tasks assigned to it by the IP protocols -- or if you just want to learn about modern networking through real-life examples -- Understanding Linux Network Internals is for you.
Like the popular O'Reilly book, Understanding the Linux Kernel, this book clearly explains the underlying concepts and teaches you how to follow the actual C code that implements it. Although some background in the TCP/IP protocols is helpful, you can learn a great deal from this text about the protocols themselves and their uses. And if you already have a base knowledge of C, you can use the book's code walkthroughs to figure out exactly what this sophisticated part of the Linux kernel is doing.
Part of the difficulty in understanding networks -- and implementing them -- is that the tasks are broken up and performed at many different times by different pieces of code. One of the strengths of this book is to integrate the pieces and reveal the relationships between far-flung functions and data structures. Understanding Linux Network Internals is both a big-picture discussion and a no-nonsense guide to the details of Linux networking. Topics include:
- Key problems with networking
- Network interface card (NIC) device drivers
- System initialization
- Layer 2 (link-layer) tasks and implementation
- Layer 3 (IPv4) tasks and implementation
- Neighbor infrastructure and protocols (ARP)
- Bridging
- Routing
- ICMP
Table of Contents
Preface
Part I. General Background
1. Introduction
Basic Terminology
Common Coding Patterns
User-Space Tools
Browsing the Source Code
When a Feature Is Offered as a Patch2. Critical Data Structures
The Socket Buffer: sk_buff Structure
net_device Structure
Files Mentioned in This Chapter3. User-Space-to-Kernel Interface
Overview
procfs Versus sysctl
ioctl
Netlink
Serializing Configuration ChangesPart II. System Initialization
4. Notification Chains
Reasons for Notification Chains
Overview
Defining a Chain
Registering with a Chain
Notifying Events on a Chain
Notification Chains for the Networking Subsystems
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This Chapter5. Network Device Initialization
System Initialization Overview
Device Registration and Initialization
Basic Goals of NIC Initialization
Interaction Between Devices and Kernel
Initialization Options
Module Options
Initializing the Device Handling Layer: net_dev_init
User-Space Helpers
Virtual Devices
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This Chapter6. The PCI Layer and Network Interface Cards
Data Structures Featured in This Chapter
Registering a PCI NIC Device Driver
Power Management and Wake-on-LAN
Example of PCI NIC Driver Registration
The Big Picture
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This Chapter7. Kernel Infrastructure for Component Initialization
Boot-Time Kernel Options
Module Initialization Code
Optimized Macro-Based Tagging
Boot-Time Initialization Routines
Memory Optimizations
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This Chapter8. Device Registration and Initialization
When a Device Is Registered
When a Device Is Unregistered
Allocating net_device Structures
Skeleton of NIC Registration and Unregistration
Device Initialization
Organization of net_device Structures
Device State
Registering and Unregistering Devices
Device Registration
Device Unregistration
Enabling and Disabling a Network Device
Updating the Device Queuing Discipline State
Configuring Device-Related Information from User Space
Virtual Devices
Locking
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This ChapterPart III. Transmission and Reception
9. Interrupts and Network Drivers
Decisions and Traffic Direction
Notifying Drivers When Frames Are Received
Interrupt Handlers
softnet_data Structure10. Frame Reception
Interactions with Other Features
Enabling and Disabling a Device
Queues
Notifying the Kernel of Frame Reception: NAPI and netif_rx
Old Interface Between Device Drivers and Kernel: First Part of netif_rx
Congestion Management
Processing the NET_RX_SOFTIRQ: net_rx_action11. Frame Transmission
Enabling and Disabling Transmissions12. General and Reference Material About Interrupts
Statistics
Tuning via /proc and sysfs Filesystems
Functions and Variables Featured in This Part of the Book
Files and Directories Featured in This Part of the Book13. Protocol Handlers
Overview of Network Stack
Executing the Right Protocol Handler
Protocol Handler Organization
Protocol Handler Registration
Ethernet Versus IEEE 802.3 Frames
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This ChapterPart IV. Bridging
14. Bridging: Concepts
Repeaters, Bridges, and Routers
Bridges Versus Switches
Hosts
Merging LANs with Bridges
Bridging Different LAN Technologies
Address Learning
Multiple Bridges15. Bridging: The Spanning Tree Protocol
Basic Terminology
Example of Hierarchical Switched L2 Topology
Basic Elements of the Spanning Tree Protocol
Bridge and Port IDs
Bridge Protocol Data Units (BPDUs)
Defining the Active Topology
Timers
Topology Changes
BPDU Encapsulation
Transmitting Configuration BPDUs
Processing Ingress Frames
Convergence Time
Overview of Newer Spanning Tree Protocols16. Bridging: Linux Implementation
Bridge Device Abstraction
Important Data Structures
Initialization of Bridging Code
Creating Bridge Devices and Bridge Ports
Creating a New Bridge Device
Bridge Device Setup Routine
Deleting a Bridge
Adding Ports to a Bridge
Enabling and Disabling a Bridge Device
Enabling and Disabling a Bridge Port
Changing State on a Bridge Port
The Big Picture
Forwarding Database
Handling Ingress Traffic
Transmitting on a Bridge Device
Spanning Tree Protocol (STP)
netdevice Notification Chain17. Bridging: Miscellaneous Topics
User-Space Configuration Tools
Tuning via /proc Filesystem
Tuning via /sys Filesystem
Statistics
Data Structures Featured in This Part of the Book
Functions and Variables Featured in This Part of the Book
Files and Directories Featured in This Part of the BookPart V. Internet Protocol Version 4 (IPv4)
18. Internet Protocol Version 4 (IPv4): Concepts
IP Protocol: The Big Picture
IP Header
IP Options
Packet Fragmentation/Defragmentation
Checksums19. Internet Protocol Version 4 (IPv4): Linux Foundations and Features
Main IPv4 Data Structures
General Packet Handling
IP Options20. Internet Protocol Version 4 (IPv4): Forwarding and Local Delivery
Forwarding
Local Delivery21. Internet Protocol Version 4 (IPv4): Transmission
Key Functions That Perform Transmission
Interface to the Neighboring Subsystem22. Internet Protocol Version 4 (IPv4): Handling Fragmentation
IP Fragmentation
IP Defragmentation23. Internet Protocol Version 4 (IPv4): Miscellaneous Topics
Long-Living IP Peer Information
Selecting the IP Header's ID Field
IP Statistics
IP Configuration
IP-over-IP
IPv4: What's Wrong with It?
Tuning via /proc Filesystem
Data Structures Featured in This Part of the Book
Functions and Variables Featured in This Part of the Book
Files and Directories Featured in This Part of the Book24. Layer Four Protocol and Raw IP Handling
Available L4 Protocols
L4 Protocol Registration
L3 to L4 Delivery: ip_local_deliver_finish
IPv4 Versus IPv6
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This Chapter25. Internet Control Message Protocol (ICMPv4)
ICMP Header
ICMP Payload
ICMP Types
Applications of the ICMP Protocol
The Big Picture
Protocol Initialization
Data Structures Featured in This Chapter
Transmitting ICMP Messages
Receiving ICMP Messages
ICMP Statistics
Passing Error Notifications to the Transport Layer
Tuning via /proc Filesystem
Functions and Variables Featured in This Chapter
Files and Directories Featured in This ChapterPart VI. Neighboring Subsystem
26. Neighboring Subsystem: Concepts
What Is a Neighbor?
Reasons That Neighboring Protocols Are Needed
Linux Implementation
Proxying the Neighboring Protocol
When Solicitation Requests Are Transmitted and Processed
Neighbor States and Network Unreachability Detection (NUD)27. Neighboring Subsystem: Infrastructure
Main Data Structures
Common Interface Between L3 Protocols and Neighboring Protocols
General Tasks of the Neighboring Infrastructure
Reference Counts on neighbour Structures
Creating a neighbour Entry
Neighbor Deletion
Acting As a Proxy
L2 Header Caching
Protocol Initialization and Cleanup
Interaction with Other Subsystems
Interaction Between Neighboring Protocols and L3 Transmission Functions
Queuing28. Neighboring Subsystem: Address Resolution Protocol (ARP)
ARP Packet Format
Example of an ARP Transaction
Gratuitous ARP
Responding from Multiple Interfaces
Tunable ARP Options
ARP Protocol Initialization
Initialization of a neighbour Structure
Transmitting and Receiving ARP Packets
Processing Ingress ARP Packets
Proxy ARP
Examples
External Events
ARPD
Reverse Address Resolution Protocol (RARP)
Improvements in ND (IPv6) over ARP (IPv4)29. Neighboring Subsystem: Miscellaneous Topics
System Administration of Neighbors
Tuning via /proc Filesystem
Data Structures Featured in This Part of the Book
Files and Directories Featured in This Part of the BookPart VII. Routing
30. Routing: Concepts
Routers, Routes, and Routing Tables
Essential Elements of Routing
Routing Table
Lookups
Packet Reception Versus Packet Transmission31. Routing: Advanced
Concepts Behind Policy Routing
Concepts Behind Multipath Routing
Interactions with Other Kernel Subsystems
Routing Protocol Daemons
Verbose Monitoring
ICMP_REDIRECT Messages
Reverse Path Filtering32. Routing: Linux Implementation
Kernel Options
Main Data Structures
Route and Address Scopes
Primary and Secondary IP Addresses
Generic Helper Routines and Macros
Global Locks
Routing Subsystem Initialization
External Events
Interactions with Other Subsystems33. Routing: The Routing Cache
Routing Cache Initialization
Hash Table Organization
Major Cache Operations
Multipath Caching
Interface Between the DST and Calling Protocols
Flushing the Routing Cache
Garbage Collection
Egress ICMP REDIRECT Rate Limiting34. Routing: Routing Tables
Organization of Routing Hash Tables
Routing Table Initialization
Adding and Removing Routes
Policy Routing and Its Effects on Routing Table Definitions35. Routing: Lookups
High-Level View of Lookup Functions
Helper Routines
The Table Lookup: fn_hash_lookup
fib_lookup Function
Setting Functions for Reception and Transmission
General Structure of the Input and Output Routing Routines
Input Routing
Output Routing
Effects of Multipath on Next Hop Selection
Policy Routing
Source Routing
Policy Routing and Routing Table Based Classifier36. Routing: Miscellaneous Topics
User-Space Configuration Tools
Statistics
Tuning via /proc Filesystem
Enabling and Disabling Forwarding
Data Structures Featured in This Part of the Book
Functions and Variables Featured in This Part of the Book
Files and Directories Featured in This Part of the BookIndex
商品描述(中文翻譯)
**描述**
如果你曾經想知道 Linux 如何執行 IP 協議所指派的複雜任務,或者你只是想通過實際範例來學習現代網路,Understanding Linux Network Internals 這本書就是為你而寫的。
這本書像是受歡迎的 O'Reilly 書籍 Understanding the Linux Kernel,清楚地解釋了底層概念,並教你如何跟隨實際的 C 代碼來實現這些概念。雖然對 TCP/IP 協議有一些背景知識會有幫助,但你可以從這本書中學到很多關於這些協議及其用途的知識。如果你已經具備 C 語言的基礎知識,你可以利用書中的代碼逐步解析,確切了解 Linux 核心的這個複雜部分在做什麼。
理解網路的困難之一在於,任務被拆分並由不同的代碼片段在不同的時間執行。這本書的一大優勢在於整合這些片段,揭示遙遠函數和數據結構之間的關係。Understanding Linux Network Internals 是一個大局觀的討論,也是 Linux 網路細節的實用指南。主題包括:
- 網路的關鍵問題
- 網路介面卡 (NIC) 設備驅動程式
- 系統初始化
- 第 2 層 (鏈路層) 任務和實現
- 第 3 層 (IPv4) 任務和實現
- 鄰居基礎設施和協議 (ARP)
- 橋接
- 路由
- ICMP
**目錄**
- 前言
**第一部分:一般背景**
1. 介紹
- 基本術語
- 常見編碼模式
- 用戶空間工具
- 瀏覽源代碼
- 當功能作為補丁提供時
2. 關鍵數據結構
- 套接字緩衝區:sk_buff 結構
- net_device 結構
- 本章提到的文件
3. 用戶空間與內核接口
- 概述
- procfs 與 sysctl
- ioctl
- Netlink
- 序列化配置變更
**第二部分:系統初始化**
4. 通知鏈
- 通知鏈的原因
- 概述
- 定義鏈
- 在鏈上註冊
- 在鏈上通知事件
- 網路子系統的通知鏈
- 通過 /proc 檔案系統進行調整
- 本章提到的函數和變數
- 本章提到的文件和目錄
5. 網路設備初始化
- 系統初始化概述
- 設備註冊和初始化
- NIC 初始化的基本目標
- 設備與內核之間的互動
- 初始化選項
- 模組選項
- 初始化設備處理層:net_dev_init
- 用戶空間輔助工具
- 虛擬設備
- 通過 /proc 檔案系統進行調整
- 本章提到的函數和變數
- 本章提到的文件和目錄
6. PCI 層和網路介面卡
- 本章提到的數據結構
- 註冊 PCI NIC 設備驅動程式
- 電源管理和 Wake-on-LAN
- PCI NIC 驅動程式註冊範例
- 大局觀
- 通過 /proc 檔案系統進行調整
- 本章提到的函數和變數
- 本章提到的文件和目錄
7. 組件初始化的內核基礎設施
- 啟動時內核選項
- 模組初始化代碼
- 優化的宏基標記
- 啟動時初始化例程
- 記憶體優化
- 通過 /proc 檔案系統進行調整
- 本章提到的函數和變數
- 本章提到的文件和目錄
8. 設備註冊和初始化
- 設備註冊時
- 設備取消註冊時
- 分配 net_device 結構
- NIC 註冊和取消註冊的骨架
- 設備初始化
- net_device 結構的組織
- 設備狀態
- 註冊和取消註冊設備
- 設備註冊
- 設備取消註冊
- 啟用和禁用網路設備
- 更新設備排隊規則狀態
- 從用戶空間配置設備相關信息
- 虛擬設備
- 鎖定
- 通過 /proc 檔案系統進行調整
- 本章提到的函數和變數
- 本章提到的文件和目錄
**第三部分:傳輸和接收**
9. 中斷和網路驅動程式
- 決策和流量方向
- 當幀被接收時通知驅動程式
- 中斷處理程序
- softnet_data 結構