Skip to Content
可编程网络自动化
book

可编程网络自动化

by Jason Edelman, Scott S. Lowe, Matt Oswalt
January 2023
Intermediate to advanced
458 pages
14h 16m
Chinese
Posts & Telecom Press
Content preview from 可编程网络自动化
Linux
高级联网
413
络,支持第三方网络插件。
Docker
联网在
Docker 1.12
(该版本引入了
Swarm
模式”和内建的
VXLAN
多主机覆盖
网络)发布的时候再次发生了变化。第三方网络插件都需要重写,截至撰写本书之时,这
个过程仍在进行中。
什么是
ipvlan
接口
本节讨论了以下几种逻辑接口:
VLAN
接口、
macvlan
接口和
veth pair
ipvlan
接口目前还没有讨论过,这种接口类似于
macvlan
接口
,区别在于前者是在
3
层,使用
IP
地址,而后者是在第
2
层,使用
MAC
地址。不过对
ipvlan
接口的支持也就是最近的事,该接口实际上仅在容器联网中有所应用。
由于
Docker
的多主机联网功能还在飞速变化,这里将重点介绍其提供的默认桥接网络。
大多数
Docker
默认桥接网络配置涉及修改
Docker
守护进程启动时所传入的选项
,这可以
通过修改
DOCKER_OPTS
环境变量或守护进程启动文件来实现。部分可用的配置选项如下。
-b
--bridge
选项允许指定
Docker
使用的网桥名称。可以通过设置该选项,使用
docker0
之外的网桥。
--bip
选项允许指定分配给网桥接口的
IP
地址。
--iptables=true
选项允许
Docker
自动添加适合的
iptables
规则来执行
NAT
除了这些守护进程范围的设置,还有一些联网选项(尤其是公开端口)是以单个容器为基
础的。公开端口可以在以下两个地方找到。
容器的
Dockerfile
中的
EXPOSE
语句可能包含一个或多个端口,该语句会告诉 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

弱监督学习实用指南

弱监督学习实用指南

Wee Hyong Tok, Amit Bahree, Senja Filipi
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115606181