<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《理解Docker单机容器网络》的评论</title>
	<atom:link href="http://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Wed, 25 Mar 2026 09:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：kamzhuyuqing</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-7469</link>
		<dc:creator>kamzhuyuqing</dc:creator>
		<pubDate>Wed, 29 Jul 2020 03:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-7469</guid>
		<description>帅气</description>
		<content:encoded><![CDATA[<p>帅气</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：dracula</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-7406</link>
		<dc:creator>dracula</dc:creator>
		<pubDate>Wed, 04 Dec 2019 07:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-7406</guid>
		<description>博主在之后一篇博文里引用了 IBM 一篇关于 bridge 实现的博文，里面某种程度上解释了在 container to container 的场景下，为什么 docker0 会进行三层的处理而不是二层的转发，应该是由于 docker 0 被分配了 IP 的缘故。
https://www.ibm.com/developerworks/cn/linux/1310_xiawc_networkdevice/</description>
		<content:encoded><![CDATA[<p>博主在之后一篇博文里引用了 IBM 一篇关于 bridge 实现的博文，里面某种程度上解释了在 container to container 的场景下，为什么 docker0 会进行三层的处理而不是二层的转发，应该是由于 docker 0 被分配了 IP 的缘故。<br />
<a href="https://www.ibm.com/developerworks/cn/linux/1310_xiawc_networkdevice/" rel="nofollow">https://www.ibm.com/developerworks/cn/linux/1310_xiawc_networkdevice/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：秋枫鹤泣</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-7186</link>
		<dc:creator>秋枫鹤泣</dc:creator>
		<pubDate>Tue, 17 Apr 2018 06:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-7186</guid>
		<description>2016/11/04：
没看明白一点：container对container通信，在虚拟交换机上直接通过mac地址表直接交换就可以了，为什么还要通过docker0接口上升到三层？

这个问题，找到标准答案了不？有的话，回复一下！</description>
		<content:encoded><![CDATA[<p>2016/11/04：<br />
没看明白一点：container对container通信，在虚拟交换机上直接通过mac地址表直接交换就可以了，为什么还要通过docker0接口上升到三层？</p>
<p>这个问题，找到标准答案了不？有的话，回复一下！</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：大大王</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1864</link>
		<dc:creator>大大王</dc:creator>
		<pubDate>Tue, 14 Mar 2017 08:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1864</guid>
		<description>为什么我看到的 6、10.10.126.187 to container， 这一类请求，其实是发往宿主，然后通过DNAT改变 目的ip为 container的 172.17.0.2 吧？ “由于187上增加了container1的路由”  好像docker本身并不会这样做把。</description>
		<content:encoded><![CDATA[<p>为什么我看到的 6、10.10.126.187 to container， 这一类请求，其实是发往宿主，然后通过DNAT改变 目的ip为 container的 172.17.0.2 吧？ “由于187上增加了container1的路由”  好像docker本身并不会这样做把。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：小猫钓鱼君</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1671</link>
		<dc:creator>小猫钓鱼君</dc:creator>
		<pubDate>Fri, 25 Nov 2016 00:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1671</guid>
		<description>博主你好，文章写的很好，原理写的很细，这里有个问题想请教一下。关于实例：6、10.10.126.187 to container  中另一台宿主机访问容器，有增加路由，可否提供一下详细怎么写吗？我是初学者，添加到容器主机的静态路由也无法ping通。不知道是否有其它地方还需要配置。在10.10.126.187上配置的静态路由为：route add -host 172.17.0.2 gw eth0  ，能得到解答无比感谢。</description>
		<content:encoded><![CDATA[<p>博主你好，文章写的很好，原理写的很细，这里有个问题想请教一下。关于实例：6、10.10.126.187 to container  中另一台宿主机访问容器，有增加路由，可否提供一下详细怎么写吗？我是初学者，添加到容器主机的静态路由也无法ping通。不知道是否有其它地方还需要配置。在10.10.126.187上配置的静态路由为：route add -host 172.17.0.2 gw eth0  ，能得到解答无比感谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1614</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Fri, 04 Nov 2016 13:51:23 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1614</guid>
		<description>十分感谢关注。不过目前我从表象的理解只能理解到这了，有空可以深入代码分析。如果您有更好的理解，可以在这里留言，我也学习一下:)</description>
		<content:encoded><![CDATA[<p>十分感谢关注。不过目前我从表象的理解只能理解到这了，有空可以深入代码分析。如果您有更好的理解，可以在这里留言，我也学习一下:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：邹董</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1613</link>
		<dc:creator>邹董</dc:creator>
		<pubDate>Fri, 04 Nov 2016 10:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1613</guid>
		<description>就算这样，感觉也说不通，数据包的destination mac是container2的接口地址，不是docker0的接口地址，docker0接口开启混杂模式，由于mac地址和docker0的mac地址不一样，docker0接口也应该在二层转发的，不应该上升到三层。只有数据包的目的mac地址是docker接口的mac地址，才进一步上升到三层，由iptables规则来确定IP数据报是应该转发还是再继续往上层协议传递。</description>
		<content:encoded><![CDATA[<p>就算这样，感觉也说不通，数据包的destination mac是container2的接口地址，不是docker0的接口地址，docker0接口开启混杂模式，由于mac地址和docker0的mac地址不一样，docker0接口也应该在二层转发的，不应该上升到三层。只有数据包的目的mac地址是docker接口的mac地址，才进一步上升到三层，由iptables规则来确定IP数据报是应该转发还是再继续往上层协议传递。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：邹董</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1612</link>
		<dc:creator>邹董</dc:creator>
		<pubDate>Fri, 04 Nov 2016 10:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1612</guid>
		<description>谢谢解答，这么认真负责回复的博主不多了。我关注你博客了，再次感谢。</description>
		<content:encoded><![CDATA[<p>谢谢解答，这么认真负责回复的博主不多了。我关注你博客了，再次感谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：邹德明</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1611</link>
		<dc:creator>邹德明</dc:creator>
		<pubDate>Fri, 04 Nov 2016 10:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1611</guid>
		<description>疑惑未释，不过还是感谢你的解答。有机会可以认识一下，我的微信：2202086749</description>
		<content:encoded><![CDATA[<p>疑惑未释，不过还是感谢你的解答。有机会可以认识一下，我的微信：2202086749</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2016/01/15/understanding-container-networking-on-single-host/#comment-1610</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Fri, 04 Nov 2016 09:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1930#comment-1610</guid>
		<description>两个veth(container中的veth0和“插”在docker0上的veth1)将两个network namespace连接起来，一个是container的namespace，一个是host的network namespace。内核对veth0上进入的数据的处理方&gt;式就是简单传给veth1，从而触发docker0上的data recv event，该事件引发内核的处理。内核究竟如何处理的，细节我也不清楚。但从iptable的日志来看，内核是将数据包做了很多诸多判断，并最终将数据包发回docker0的另外一个veth2口上。</description>
		<content:encoded><![CDATA[<p>两个veth(container中的veth0和“插”在docker0上的veth1)将两个network namespace连接起来，一个是container的namespace，一个是host的network namespace。内核对veth0上进入的数据的处理方&gt;式就是简单传给veth1，从而触发docker0上的data recv event，该事件引发内核的处理。内核究竟如何处理的，细节我也不清楚。但从iptable的日志来看，内核是将数据包做了很多诸多判断，并最终将数据包发回docker0的另外一个veth2口上。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
