Understanding Linux Network Internals - Christian Benvenuti

Understanding Linux Network Internals

Christian Benvenuti

出版时间

2005-12-29

ISBN

9780596002558

评分

★★★★★
书籍介绍
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 Author Christian Benvenuti, an operating system designer specializing in networking, explains much more than how Linux code works. He shows the purposes of major networking features and the trade-offs involved in choosing one solution over another. A large number of flowcharts and other diagrams enhance the book's understandability.
AI导读
核心看点
  • 深入解析Linux内核网络栈底层实现
  • 结合C代码剖析IP、ARP及网桥协议
  • 涵盖数据包收发、路由及邻居子系统
适合谁读
  • Linux内核开发者及网络协议研究员
  • 从事路由器或防火墙底层开发工程师
  • 希望深入理解TCP/IP底层机制的极客
读前提醒
  • 基于旧版内核,部分API可能已变更
  • 内容侧重三层以下,不含TCP详细实现
  • 建议配合源码阅读,需具备C语言基础
读者共识
  • 经典之作,对底层原理剖析极为详尽
  • 部分章节叙述冗长,阅读门槛较高
  • 适合硬核钻研,非通用网络编程指南

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "Few C programmers like the goto statement. Without getting into the history of the goto (one of the longest and most famous controversies in computer programming), I'll summarize some of the reasons the goto is usually deprecated, but why the Linux kernel uses it anyway. Any piece of code that uses "
  • "NETDEV_TX_OK* The transmission succeeded. The buffer is not released yet (kfree_skb is not issued). We will see in the section “Processing the NET_TX_SOFTIRQ: net_tx_ action” that the driver does not release the buffer itself but asks the kernel to do so by means of the NET_TX_SOFTIRQ softirq. This "
  • "• The root bridge is the only bridge that generates BPDUs. The other bridges transmit BPDUs only when they receive one (i.e., they revise the information they receive by simply updating a couple of fields). • The root bridge makes sure each bridge in the network comes to know about a topology change"
  • "Source Routing is a multibyte option in which the source node lists IP addresses to be used on subsequent hops. Of course, if one of the routers in the list goes down, the source-routed packet will not be able to benefit from any dynamic rerouting done on routing protocols. Usually, when a router go"
  • "In the very worst case, the two packets could have the same length and the overlapping could corrupt the payload without corrupting the L4 headers. The IP checksum cov- ers only the IP header and therefore cannot detect this condition. Depending on the application, the consequences could be serious."
  • "It should be noted that the algorithm always shrinks the PMTU, it never increases it. However, the entries of the routing cache whose PMTU is derived from an ingress ICMP FRAGMENTATION NEEDED message expire after some time, which is equivalent to going back to the (bigger) default PMTU. See the same"
  • "Nevertheless, one has to admit that a better design of related protocols could remove some of the overhead imposed by features that overlap in the proto- cols at different layers. Because most L2 and L4 protocols provide checksums, hav- ing it at L3 as well is not strictly necessary. For exactly thi"
  • "The minimum MTU associated with a route is in fact 68, which comes from RFC 791. Since the IP header can be up to 60 bytes long (20+40) and the minimum frag- ment length (with the exception of the last one) is 8 bytes, it follows that every IP router must be able to forward an IP packet of 68 bytes "
Z-Library
收藏