Linux网桥模式配置

转:https://www.cnblogs.com/mangoVic/p/6599930.html

 

linux网关模式下将有线LAN和无线LAN共享网段实现局域网内互联:

思路其实很简单:就是将虚拟出一个bridge口,将对应的有线LAN和无线LAN都绑定在这个虚拟bridge口上,并给这个bridge口分配一个地址,其他子网微机配置网关为bridge口的地址便可以了。当然,因为是设备是网关模式,路由和nat也是必须的了。如果设备本身便是网桥模式,那么路由和nat便可以省掉了。

    brctl addbr bridge

    brctl addif bridge eth0

    brctl addif bridge ath0

    ifconfig eth0  0.0.0.0

    ifconfig bridge 10.0.0.1 netmask 255.255.255.0 up

    添加iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 192.168.2.173

    将有线和无线都设置为10.0.0.*网段,即可通过网上邻居进行访问

 

当然了,要是Linux可以工作在网桥模式,必须安装网桥工具bridge-utils,运行命令:

yum install bridge-utils

或者下载bridge-utils-1.4.tar.gz进行安装,步骤如下:

编译安装bridge-utils

(1)进入到/usr/src 目录下,下载bridge-utils-1.4.tar.gz :

#cd /usr/src

#wget http://launchpad.net/bridgeutils/

main/1.4/+download/bridge-utils-

1.4.tar.gz

(2)解压缩:

#tar zxvf bridge-utils-1.4.tar.gz

进入bridge-utils-1.4目录:

 

#cd bridge-utils-1.4

(3)编译安装:

#autoconf

生成configure文件:

#./configure

#make

#make install

编译安装完成。最后将命令brctl复制到/sbin下:

#cp/usr/local/sbin/brctl/sbin

 

=========================================================================

 

 

下面是参考的一片文章:

 

有五台主机。其中一台主机装有linux ,安装了网桥模块,而且有四块物理网卡,分别连接同一网段的其他主机。我们希望其成为一

 

个网桥,为其他四台主机(IP分别为192.168.1.2 ,192.168.1.3,192.168.1.4,192.168.1.5) 之间转发数据包。同时,为了方便管

 

理,希望网桥能够有一个IP(192.168.1.1),那样管理员就可以在192.168.1.0/24网段内的主机上telnet到网桥,对其进行配置,

 

实现远程管理。

前一节中提到,网桥在同一个逻辑网段转发数据包。针对上面的拓扑,这个逻辑网段就是192.168.1.0/24网段。我们为这个逻辑网段一个名称,br0。首先需要配置这样一个逻辑网段。

 

# brctl addbr br0                    (建立一个逻辑网段,名称为br0)

实际上,我们可以把逻辑网段192.168.1.0/24看作使一个VLAN ,而br0则是这个VLAN的名称。

 

建立一个逻辑网段之后,我们还需要为这个网段分配特定的端口。在Linux中,一个端口实际上就是一个物理网卡。而每个物理网卡

 

的名称则分别为eth0,eth1,eth2,eth3。我们需要把每个网卡一一和br0这个网段联系起来,作为br0中的一个端口。

 

# brctl addif br0 eth0               (让eth0成为br0的一个端口)

# brctl addif br0 eth1               (让eth1成为br0的一个端口)

# brctl addif br0 eth0               (让eth2成为br0的一个端口)

# brctl addif br0 eth3               (让eth3成为br0的一个端口)

 

网桥的每个物理网卡作为一个端口,运行于混杂模式,而且是在链路层工作,所以就不需要IP了。

 

# ifconfig eth0 0.0.0.0

# ifconfig eth1 0.0.0.0

# ifconfig eth2 0.0.0.0

# ifconfig eth3 0.0.0.0

 

然后给br0的虚拟网卡配置IP:192.168.1.1。那样就能远程管理网桥。

 

# ifconfig br0 192.168.1.1

 

给br0配置了IP之后,网桥就能够工作了。192.168.1.0/24网段内的主机都可以telnet到网桥上对其进行配置。

 

以上配置的是一个逻辑网段,实际上Linux网桥也能配置成多个逻辑网段(相当于交换机中划分多个VLAN)。

 

 

 

另外一篇有助理解的文章:http://www.2cto.com/os/201202/118320.html

=====================================================================

[root@xenserver ~]# brctl --help

Usage: brctl [commands]

commands:

        addbr           <bridge>                add bridge

        delbr           <bridge>                delete bridge

        addif           <bridge> <device>       add interface to bridge

        delif           <bridge> <device>       delete interface from bridge

        setageing       <bridge> <time>         set ageing time

        setbridgeprio   <bridge> <prio>         set bridge priority

        setfd           <bridge> <time>         set bridge forward delay

        sethello        <bridge> <time>         set hello time

        setmaxage       <bridge> <time>         set max message age

        setpathcost     <bridge> <port> <cost>  set path cost

        setportprio     <bridge> <port> <prio>  set port priority

        show                                    show a list of bridges

        showmacs        <bridge>                show a list of mac addrs

        showstp         <bridge>                show bridge stp info

        stp             <bridge> {on|off}       turn stp on/off

 

====================================================================

        addbr bridge的名称  #添加bridge;

        delbr bridge的名称              #删除bridge;

        addif bridge的名称device的名称#添加接口到bridge;

        delif bridge的名称device的名称#从bridge中删除接口

        setageing bridge的名称时间     #设置老化时间,即生存周期

        setbridgeprio bridge的名称 优先级#设置bridge的优先级

        setfd bridge的名称时间         #设置bridge转发延迟时间

        sethello bridge的名称时间      #设置hello时间

        setmaxage bridge的名称时间     #设置消息的最大生命周期

        setpathcost bridge的名称 端口 权重#设置路径的权值

        setportprio bridge的名称 端口 优先级#设置端口的优先级

        show     #显示bridge列表

        showmacs bridge的名称  #显示MAC地址

        showstp  bridge的名称           #显示bridge的stp信息

        stp bridge的名称{on|off}       #开/关stp

 

设置linux让网桥运行    配置网桥

1.我们需要让linux知道网桥,首先告诉它,我们想要一个虚拟的以太网桥接口:(这将在主机bridge上执行,不清楚的看看测试场景)

root@bridge:~> brctl addbr br0

2.其次,我们不需要STP(生成树协议)等。因为我们只有一个路由器,是绝对不可能形成一个环的。我们可以关闭这个功能。(这样也可以减少网络环境的数据包污染):

root@bridge:~> brctl stp br0 off

3.经过这些准备工作后,我们终于可以做一些立竿见影的事了。我们添加两个(或更多)以太网物理接口,意思是:我们将他们附加到刚生成的逻辑(虚拟)网桥接口br0上。

root@bridge:~> brctl addif br0 eth0

root@bridge:~> brctl addif br0 eth1

4.现在,原来我们的两个以太网物理接口变成了网桥上的两个逻辑端口。那两个物理接口过去存在,未来也不会消失。要不信的话,去看看好了。.现在他们成了逻辑网桥设备的一部分了,所以不再需要IP地址。下面我们将这些IP地址释放掉

root@bridge:~> ifconfig eth0 down

root@bridge:~> ifconfig eth1 down

root@bridge:~> ifconfig eth0 0.0.0.0 up

root@bridge:~> ifconfig eth1 0.0.0.0 up

 

好了!我们现在有了一个任何IP地址都没有的box w/o了。好了,这下如果你想通过TP配置你的防火墙或路由器的话,你就只能通过本地的控制端口了。你不会告诉我你的机器上连串行端口都没有吧?

注:上面红色部分其实是可选的,在试验中,我发现,就算不把原有的网卡地址释放掉,网桥也能工作!但是,为了更规范,或者说

 

为了避免有什幺莫名其妙的问题,最好还是按要求做,执行这四步吧!

 

5.最后,启用网桥root@bridge:~> ifconfig br0 up

可选:    我们给这个新的桥接口分配一个IP地址

root@bridge:~> ifconfig br0 10.0.3.129

或者把最后这两步合成一步:

root@bridge:~> ifconfig br0 10.0.3.129 up

就是多一个up!

 

这下我们做完了 。

 

关闭网桥命令

 

     brctl delif ena eth1;

     brctl delif ena eth0;

     ifconfig ena down;

     brctl delbr ena;

 

 

摘自 zjl_1026_2001的专栏

 

什么是网桥

网桥是一种在链路层实现中继,对帧进行转发的技术,根据MAC分区块,可隔离碰撞,将网络的多个网段在数据链路层连接起来的网络设备。

Linux 网桥配置命令:brctl

在Linux中配置网络一般使用 brctl 命令,使用此命令首先要安装:bridge-utils软件包。

[inbi@debian~]#apt-get install bridge-utils

[inbi@debian~]#modprobe bridge

[inbi@debian~]#echo "1">/proc/sys/net/ipv4/ip_forward

#安装bridge-utils软件包,并加载bridge模块和开启内核转发。

[inbi@debian~]#brctl

#直接输入brctl命令将显示帮助信息!

Usage: brctl [commands]

commands:

addbr

<bridge>

add bridge

delbr

<bridge>

delete bridge

addif

<bridge> <device>

add interface to bridge

delif

<bridge> <device>

delete interface from bridge

setageing

<bridge> <time>

set ageing time

setbridgeprio

<bridge> <prio>

set bridge priority

setfd

<bridge> <time>

set bridge forward delay

sethello

<bridge> <time>

set hello time

setmaxage

<bridge> <time>

set max message age

setpathcost

<bridge> <port> <cost>

set path cost

setportprio

<bridge> <port> <prio>

set port priority

show

 

show a list of bridges

showmacs

<bridge>

show a list of mac addrs

showstp

<bridge>

show bridge stp info

stp

<bridge> {on|off}

turn stp on/off

 

增加网桥

 

[inbi@debian~]#brctl addbr br0

#增加一个网桥

[inbi@debian~]#ifconfig eth0 0.0.0.0 promisc

[inbi@debian~]#ifconfig eth1 0.0.0.0 promisc

[inbi@debian~]#brctl addif br0 eth0 eth1

#将两块已有的网卡添加到网桥,此时这两个网卡工作于混杂模式,所以不需要IP了,因为网桥是工作在链路层的。

[inbi@debian~]#brctl show

#查看已有网桥

 

你也可以为 br0 设置一个IP,已访问这台机器。

[inbi@debian~]#ifconfig br0 10.10.1.1 netmask 255.255.0.0 up

删除网桥

[inbi@debian~]#brctl delif br0 eth0 eth1

#增加网桥中的接口

[inbi@debian~]#brctl delbr br0

#删除网桥

关闭生成树

 

[inbi@debian~]#brctl stp br0 off

#关闭生成树协议,减少数据包污染,因为我这里只有一个路由器哦!

配置桥开机激活

 

 

[inbi@debian~]#echo "modprobe bridge">>/etc/rc.local

#开机加载 bridge 模块,或者echo "bridge">>/etc/modules

[inbi@debian~]#cp /etc/network/interfaces /etc/network/interfaces.default

#备份下,方便以后使用啊!

[inbi@debian~]#vim /etc/network/interfaces

auto lo eth0 eth1 br0

iface lo inet loopback

iface br0 inet static

    address 10.10.10.1

    netmask 255.255.0.0

    gateway 10.10.10.254

    pre-up ip link set eth0 promisc on

    pre-up ip link set eth1 promisc on

    pre-up echo "1">/proc/sys/net/ipv4/ip_forward

    bridge_ports eth0 eth1

#配置eth0 eth1 br0开机启动,eth0,eth1未设置IP信息,在启动br0网卡时,开启了eth0,eth1的混杂模式,并桥接了它们。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
深入理解Linux络内幕(英文) 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 (NIe 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 inchoosing one solution over another. A large number of flowcharts and other diagrams enhance the book's understandability. Part I: General Background 背景知识 Chapter 1. Introduction 简介 Section 1.1. Basic Terminology 基础技术 Section 1.2. Common Coding Patterns 通用程序模式 Section 1.3. User-Space Tools 用户空间的工具 Section 1.4. Browsing the Source Code 浏览代码 Section 1.5. When a Feature Is Offered as a Patch 一些特性什么时候以补丁的形式提供 Chapter 2. Critical Data Structures 重要数据结构 Section 2.1. The Socket Buffer: sk_buff Structure 套接字缓存:sk_buff结构 Section 2.2. net_device Structure net_device结构 Section 2.3. Files Mentioned in This Chapter 本章所涉及的到的(代码)文件 Chapter 3. User-Space-to-Kernel Interface 从用户空间到内核态的接口 Section 3.1. Overview 简介 Section 3.2. procfs Versus sysctl Section 3.3. ioctl Section 3.4. Netlink 络链接 Section 3.5. Serializing Configuration Changes 不断的配置变化 Part II: System Initialization 系统初始化 Chapter 4. Notification Chains (消息)通知链 Section 4.1. Reasons for Notification Chains 通知链的原因 Section 4.2. Overview 简介 Section 4.3. Defining a Chain 定义一个链 Section 4.4. Registering with a Chain 注册链 Section 4.5. Notifying Events on a Chain 在链上标记事件 Section 4.6. Notification Chains for the Networking Subsystems 络子层的标记链 Section 4.7. Tuning via /proc Filesystem Section 4.8. Functions and Variables Featured in This Chapter 本章所涉及的到的函数与变量 Section 4.9. Files and Directories Featured in This Chapter 本章所涉及的到的(代码)文件 Chapter 5. Network Device Initialization 络设备的组织 Section 5.1. System Initialization Overview 简介 Section 5.2. Device Registration and Initialization 设备注册与初始化 Section 5.3. Basic Goals of NIC Initialization NIC初始化的基本目标 Section 5.4. Interaction Between Devices and Kernel 设备与内核的交互 Section 5.5. Initialization Options 初始化选项 Section 5.6. Module Options 模块选项 Section 5.7. Initializing the Device Handling Layer: net_dev_init 设备处理层的初始化 Section 5.8. User-Space Helpers 用户空间的帮助 Section 5.9. Virtual Devices 虚拟设备 Section 5.10. Tuning via /proc Filesystem Section 5.11. Functions and Variables Featured in This Chapter Section 5.12. Files and Directories Featured in This Chapter Chapter 6. The PCI Layer and Network Interface Cards PCI层的卡 Section 6.1. Data Structures Featured in This Chapter 本章的数据结构 Section 6.2. Registering a PCI NIC Device Driver PIC NIC设备驱动的注册 Section 6.3. Power Management and Wake-on-LAN 电源管理以及LAN唤醒 Section 6.4. Example of PCI NIC Driver Registration 示例 Section 6.5. The Big Picture 框架图 Section 6.6. Tuning via /proc Filesystem Section 6.7. Functions and Variables Featured in This Chapter Section 6.8. Files and Directories Featured in This Chapter Chapter 7. Kernel Infrastructure for Component Initialization 组件初始化的底层内核(实现) Section 7.1. Boot-Time Kernel Options 内核启动选项 Section 7.2. Module Initialization Code 模块初始化 Section 7.3. Optimized Macro-Based Tagging 基于标记的模块优化 Section 7.4. Boot-Time Initialization Routines 启动时的初始化例程 Section 7.5. Memory Optimizations 内存优化 Section 7.6. Tuning via /proc Filesystem Section 7.7. Functions and Variables Featured in This Chapter Section 7.8. Files and Directories Featured in This Chapter Chapter 8. Device Registration and Initialization 设备的注册与初始化 Section 8.1. When a Device Is Registered 什么时候注册一个设备 Section 8.2. When a Device Is Unregistered Section 8.3. Allocating net_device Structures 给XX结构分配内存 Section 8.4. Skeleton of NIC Registration and Unregistration NIC注册与反注册的框架 Section 8.5. Device Initialization 设备初始化 Section 8.6. Organization of net_device Structures XX结构的组织 Section 8.7. Device State 设备状态 Section 8.8. Registering and Unregistering Devices Section 8.9. Device Registration Section 8.10. Device Unregistration Section 8.11. Enabling and Disabling a Network Device 络设备的使能与去使能 Section 8.12. Updating the Device Queuing Discipline State 更新设备的?? Section 8.13. Configuring Device-Related Information from User Space 从用户空间配置与设备相关的信息 Section 8.14. Virtual Devices Section 8.15. Locking 查找 Section 8.16. Tuning via /proc Filesystem Section 8.17. Functions and Variables Featured in This Chapter Section 8.18. Files and Directories Featured in This Chapter Part III: Transmission and Reception 传输与接收 Chapter 9. Interrupts and Network Drivers 络设备的中断 Section 9.1. Decisions and Traffic Direction 数据流的方向与决策 Section 9.2. Notifying Drivers When Frames Are Received 在数据帧接收到时通知驱动 Section 9.3. Interrupt Handlers 中断处理 Section 9.4. softnet_data Structure XX数据结构 Chapter 10. Frame Reception 帧接收 Section 10.1. Interactions with Other Features 与其它特性交互 Section 10.2. Enabling and Disabling a Device 设备的使能与去使能 Section 10.3. Queues 队列 Section 10.4. Notifying the Kernel of Frame Reception: NAPI and netif_rx 帧接收时通知内核 Section 10.5. Old Interface Between Device Drivers and Kernel: First Part of netif_rx 内核到设备驱动之间的老的接口 Section 10.6. Congestion Management 阻塞管理 Section 10.7. Processing the NET_RX_SOFTIRQ: net_rx_action Chapter 11. Frame Transmission 帧传输 Section 11.1. Enabling and Disabling Transmissions Chapter 12. General and Reference Material About Interrupts 中断的常识和和参考 Section 12.1. Statistics 统计 Section 12.2. Tuning via /proc and sysfs Filesystems Section 12.3. Functions and Variables Featured in This Part of the Book Section 12.4. Files and Directories Featured in This Part of the Book Chapter 13. Protocol Handlers 协议处理 Section 13.1. Overview of Network Stack Section 13.2. Executing the Right Protocol Handler Section 13.3. Protocol Handler Organization Section 13.4. Protocol Handler Registration Section 13.5. Ethernet Versus IEEE 802.3 Frames Section 13.6. Tuning via /proc Filesystem Section 13.7. Functions and Variables Featured in This Chapter Section 13.8. Files and Directories Featured in This Chapter Part IV: Bridging Chapter 14. Bridging: Concepts Section 14.1. Repeaters, Bridges, and Routers 中继器,和路由器 Section 14.2. Bridges Versus Switches 与交换机 Section 14.3. Hosts 服务器 Section 14.4. Merging LANs with Bridges 聚合LAN和 Section 14.5. Bridging Different LAN Technologies Section 14.6. Address Learning 寻址 Section 14.7. Multiple Bridges 多 Chapter 15. Bridging: The Spanning Tree Protocol ,生成树协议 Section 15.1. Basic Terminology 基础技术 Section 15.2. Example of Hierarchical Switched L2 Topology 分级交换机的二层拓扑示例 Section 15.3. Basic Elements of the Spanning Tree Protocol 生成树协议的基本元素 Section 15.4. Bridge and Port IDs 和端口ID Section 15.5. Bridge Protocol Data Units (BPDUs) 交换机协议数据单元 Section 15.6. Defining the Active Topology Section 15.7. Timers 计时器 Section 15.8. Topology Changes Section 15.9. BPDU Encapsulation Section 15.10. Transmitting Configuration BPDUs Section 15.11. Processing Ingress Frames Section 15.12. Convergence Time 时间收敛 Section 15.13. Overview of Newer Spanning Tree Protocols Chapter 16. Bridging: Linux Implementation 接:Linux的实现 Section 16.1. Bridge Device Abstraction Section 16.2. Important Data Structures Section 16.3. Initialization of Bridging Code Section 16.4. Creating Bridge Devices and Bridge Ports Section 16.5. Creating a New Bridge Device Section 16.6. Bridge Device Setup Routine Section 16.7. Deleting a Bridge Section 16.8. Adding Ports to a Bridge Section 16.9. Enabling and Disabling a Bridge Device Section 16.10. Enabling and Disabling a Bridge Port Section 16.11. Changing State on a Bridge Port Section 16.12. The Big Picture Section 16.13. Forwarding Database Section 16.14. Handling Ingress Traffic Section 16.15. Transmitting on a Bridge Device Section 16.16. Spanning Tree Protocol (STP) Section 16.17. netdevice Notification Chain Chapter 17. Bridging: Miscellaneous Topics 接:其它的主题 Section 17.1. User-Space Configuration Tools Section 17.2. Tuning via /proc Filesystem Section 17.3. Tuning via /sys Filesystem Section 17.4. Statistics Section 17.5. Data Structures Featured in This Part of the Book Section 17.6. Functions and Variables Featured in This Part of the Book Section 17.7. Files and Directories Featured in This Part of the Book Part V: Internet Protocol Version 4 (IPv4) IP协议(V4) Chapter 18. Internet Protocol Version 4 (IPv4): Concepts Section 18.1. IP Protocol: The Big Picture Section 18.2. IP Header Section 18.3. IP Options Section 18.4. Packet Fragmentation/Defragmentation Section 18.5. Checksums Chapter 19. Internet Protocol Version 4 (IPv4): Linux Foundations and Features Section 19.1. Main IPv4 Data Structures Section 19.2. General Packet Handling Section 19.3. IP Options Chapter 20. Internet Protocol Version 4 (IPv4): Forwarding and Local Delivery Section 20.1. Forwarding Section 20.2. Local Delivery Chapter 21. Internet Protocol Version 4 (IPv4): Transmission Section 21.1. Key Functions That Perform Transmission Section 21.2. Interface to the Neighboring Subsystem Chapter 22. Internet Protocol Version 4 (IPv4): Handling Fragmentation Section 22.1. IP Fragmentation Section 22.2. IP Defragmentation Chapter 23. Internet Protocol Version 4 (IPv4): Miscellaneous Topics Section 23.1. Long-Living IP Peer Information Section 23.2. Selecting the IP Header's ID Field Section 23.3. IP Statistics Section 23.4. IP Configuration Section 23.5. IP-over-IP Section 23.6. IPv4: What's Wrong with It? Section 23.7. Tuning via /proc Filesystem Section 23.8. Data Structures Featured in This Part of the Book Section 23.9. Functions and Variables Featured in This Part of the Book Section 23.10. Files and Directories Featured in This Part of the Book Chapter 24. Layer Four Protocol and Raw IP Handling Section 24.1. Available L4 Protocols Section 24.2. L4 Protocol Registration Section 24.3. L3 to L4 Delivery: ip_local_deliver_finish Section 24.4. IPv4 Versus IPv6 Section 24.5. Tuning via /proc Filesystem Section 24.6. Functions and Variables Featured in This Chapter Section 24.7. Files and Directories Featured in This Chapter Chapter 25. Internet Control Message Protocol (ICMPv4) Section 25.1. ICMP Header Section 25.2. ICMP Payload Section 25.3. ICMP Types Section 25.4. Applications of the ICMP Protocol Section 25.5. The Big Picture Section 25.6. Protocol Initialization Section 25.7. Data Structures Featured in This Chapter Section 25.8. Transmitting ICMP Messages Section 25.9. ICMP Statistics Section 25.10. Passing Error Notifications to the Transport Layer Section 25.11. Tuning via /proc Filesystem Section 25.12. Functions and Variables Featured in This Chapter Section 25.13. Files and Directories Featured in This Chapter Part VI: Neighboring Subsystem Chapter 26. Neighboring Subsystem: Concepts Section 26.1. What Is a Neighbor? Section 26.2. Reasons That Neighboring Protocols Are Needed Section 26.3. Linux Implementation Section 26.4. Proxying the Neighboring Protocol Section 26.5. When Solicitation Requests Are Transmitted and Processed Section 26.6. Neighbor States and Network Unreachability Detection (NUD) Chapter 27. Neighboring Subsystem: Infrastructure Section 27.1. Main Data Structures Section 27.2. Common Interface Between L3 Protocols and Neighboring Protocols Section 27.3. General Tasks of the Neighboring Infrastructure Section 27.4. Reference Counts on neighbour Structures Section 27.5. Creating a neighbour Entry Section 27.6. Neighbor Deletion Section 27.7. Acting As a Proxy Section 27.8. L2 Header Caching Section 27.9. Protocol Initialization and Cleanup Section 27.10. Interaction with Other Subsystems Section 27.11. Interaction Between Neighboring Protocols and L3 Transmission Functions Section 27.12. Queuing Chapter 28. Neighboring Subsystem: Address Resolution Protocol (ARP) Section 28.1. ARP Packet Format Section 28.2. Example of an ARP Transaction Section 28.3. Gratuitous ARP Section 28.4. Responding from Multiple Interfaces Section 28.5. Tunable ARP Options Section 28.6. ARP Protocol Initialization Section 28.7. Initialization of a neighbour Structure Section 28.8. Transmitting and Receiving ARP Packets Section 28.9. Processing Ingress ARP Packets Section 28.10. Proxy ARP Section 28.11. Examples Section 28.12. External Events Section 28.13. ARPD Section 28.14. Reverse Address Resolution Protocol (RARP) Section 28.15. Improvements in ND (IPv6) over ARP (IPv4) Chapter 29. Neighboring Subsystem: Miscellaneous Topics Section 29.1. System Administration of Neighbors Section 29.2. Tuning via /proc Filesystem Section 29.3. Data Structures Featured in This Part of the Book Section 29.4. Files and Directories Featured in This Part of the Book Part VII: Routing Chapter 30. Routing: Concepts Section 30.1. Routers, Routes, and Routing Tables Section 30.2. Essential Elements of Routing Section 30.3. Routing Table Section 30.4. Lookups Section 30.5. Packet Reception Versus Packet Transmission Chapter 31. Routing: Advanced Section 31.1. Concepts Behind Policy Routing Section 31.2. Concepts Behind Multipath Routing Section 31.3. Interactions with Other Kernel Subsystems Section 31.4. Routing Protocol Daemons Section 31.5. Verbose Monitoring Section 31.6. ICMP_REDIRECT Messages Section 31.7. Reverse Path Filtering Chapter 32. Routing: Li nux Implementation Section 32.1. Kernel Options Section 32.2. Main Data Structures Section 32.3. Route and Address Scopes Section 32.4. Primary and Secondary IP Addresses Section 32.5. Generic Helper Routines and Macros Section 32.6. Global Locks Section 32.7. Routing Subsystem Initialization Section 32.8. External Events Section 32.9. Interactions with Other Subsystems Chapter 33. Routing: The Routing Cache Section 33.1. Routing Cache Initialization Section 33.2. Hash Table Organization Section 33.3. Major Cache Operations Section 33.4. Multipath Caching Section 33.5. Interface Between the DST and Calling Protocols Section 33.6. Flushing the Routing Cache Section 33.7. Garbage Collection Section 33.8. Egress ICMP REDIRECT Rate Limiting Chapter 34. Routing: Routing Tables Section 34.1. Organization of Routing Hash Tables Section 34.2. Routing Table Initialization Section 34.3. Adding and Removing Routes Section 34.4. Policy Routing and Its Effects on Routing Table Definitions Chapter 35. Routing: Lookups Section 35.1. High-Level View of Lookup Functions Section 35.2. Helper Routines Section 35.3. The Table Lookup: fn_hash_lookup Section 35.4. fib_lookup Function Section 35.5. Setting Functions for Reception and Transmission Section 35.6. General Structure of the Input and Output Routing Routines Section 35.7. Input Routing Section 35.8. Output Routing Section 35.9. Effects of Multipath on Next Hop Selection Section 35.10. Policy Routing Section 35.11. Source Routing Section 35.12. Policy Routing and Routing Table Based Classifier Chapter 36. Routing: Miscellaneous Topics Section 36.1. User-Space Configuration Tools Section 36.2. Statistics Section 36.3. Tuning via /proc Filesystem Section 36.4. Enabling and Disabling Forwarding Section 36.5. Data Structures Featured in This Part of the Book Section 36.6. Functions and Variables Featured in This Part of the Book Section 36.7. Files and Directories Featured in This Part of the Book About the Authors Colophon Index

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值