<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>网络转发模型 - 系列 - Hugo笔记</title>
        <link>http://lovelycabin.dpdns.org/blog/series/%E7%BD%91%E7%BB%9C%E8%BD%AC%E5%8F%91%E6%A8%A1%E5%9E%8B/</link>
        <description>网络转发模型 - 系列 - Hugo笔记</description>
        <generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>ein_crimson@163.com (lilac)</managingEditor>
            <webMaster>ein_crimson@163.com (lilac)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Tue, 29 Oct 2024 10:30:45 &#43;0800</lastBuildDate><atom:link href="http://lovelycabin.dpdns.org/blog/series/%E7%BD%91%E7%BB%9C%E8%BD%AC%E5%8F%91%E6%A8%A1%E5%9E%8B/" rel="self" type="application/rss+xml" /><item>
    <title>网络转发模型</title>
    <link>http://lovelycabin.dpdns.org/blog/posts/series/network-forwarding/</link>
    <pubDate>Thu, 14 Apr 2022 10:32:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/posts/series/network-forwarding/</guid>
    <description><![CDATA[]]></description>
</item><item>
    <title>网络基础</title>
    <link>http://lovelycabin.dpdns.org/blog/20220414/1649904780/</link>
    <pubDate>Thu, 14 Apr 2022 10:53:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220414/1649904780/</guid>
    <description><![CDATA[<h2 id="ip地址" class="headerLink">
    <a href="#ip%e5%9c%b0%e5%9d%80" class="header-mark"></a>7 IP地址</h2><h3 id="ip选路" class="headerLink">
    <a href="#ip%e9%80%89%e8%b7%af" class="header-mark"></a>7.1 IP选路</h3><p>网络设备（如路由器）根据目标IP地址自动决定数据包的最佳转发路径。这是大多数网络中使用的标准方法，动态计算和选择路径，以优化数据传输。</p>]]></description>
</item><item>
    <title>VLAN总结</title>
    <link>http://lovelycabin.dpdns.org/blog/20220415/1650005940/</link>
    <pubDate>Fri, 15 Apr 2022 14:59:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220415/1650005940/</guid>
    <description><![CDATA[<h2 id="概念" class="headerLink">
    <a href="#%e6%a6%82%e5%bf%b5" class="header-mark"></a>22 概念</h2><p>虚拟局域网（Virtual Local Area Network），LAN（局域网）指某一区域内由多台计算机组成的网络，受物理位置限制。而VLAN则是将一个物理LAN在逻辑上划分成多个广播域的通信技术，每一个VLAN就是一个广播域。</p>]]></description>
</item><item>
    <title>二层、三层转发</title>
    <link>http://lovelycabin.dpdns.org/blog/20220415/1650013800/</link>
    <pubDate>Fri, 15 Apr 2022 17:10:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220415/1650013800/</guid>
    <description><![CDATA[<h2 id="二层转发" class="headerLink">
    <a href="#%e4%ba%8c%e5%b1%82%e8%bd%ac%e5%8f%91" class="header-mark"></a>7 二层转发</h2><h3 id="概念" class="headerLink">
    <a href="#%e6%a6%82%e5%bf%b5" class="header-mark"></a>7.1 概念</h3><p>二层转发中二层指的是OSI七层模型中的第二层（数据链路层），二层转发是指在同一网段中，基于MAC地址转发数据包。</p>
<h3 id="相关机制" class="headerLink">
    <a href="#%e7%9b%b8%e5%85%b3%e6%9c%ba%e5%88%b6" class="header-mark"></a>7.2 相关机制</h3><ol>
<li>ARP</li>
</ol>
<ul>
<li>
<p>概述：ARP（Address Resolution Protocol），即地址解析协议，主要作用是把IP地址解析成MAC地址。主机或三层转发设备上维护有ARP表。</p>]]></description>
</item><item>
    <title>协议解析记录</title>
    <link>http://lovelycabin.dpdns.org/blog/20220829/1661748540/</link>
    <pubDate>Mon, 29 Aug 2022 12:49:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220829/1661748540/</guid>
    <description><![CDATA[<h2 id="ppp" class="headerLink">
    <a href="#ppp" class="header-mark"></a>16 PPP</h2><p>作为一种链路层协议，通常用于点对点连接，比如串行链路或虚拟专用网络（VPN）。</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">text</p>]]></description>
</item><item>
    <title>Linux 网络设备</title>
    <link>http://lovelycabin.dpdns.org/blog/20220723/1658572980/</link>
    <pubDate>Sat, 23 Jul 2022 18:43:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220723/1658572980/</guid>
    <description><![CDATA[<p><a href="https://mp.weixin.qq.com/s?__biz=MzkxNTU4NjQ3MA==&amp;mid=2247483726&amp;idx=1&amp;sn=ca7cb4076acc09ee9aad09722bb0f2c2&amp;chksm=c15dad87f62a2491f03c2c8cbffede4ce063f7f7c7e0c0281c582d1cff97185c27020f98d3b8&amp;scene=178&amp;cur_album_id=3142867025011146754#rd" title="Linux 网络设备 - TUN/TAP" target="_blank" rel="noopener noreferrer">Linux 网络设备 - TUN/TAP</a></p>
<p><a href="https://mp.weixin.qq.com/s?__biz=MzkxNTU4NjQ3MA==&amp;mid=2247483738&amp;idx=1&amp;sn=9151e28f3d2d8f3f7c6d5d0fc233e162&amp;chksm=c15dad93f62a24853a5c3e269cd63812909fad90b1742eac56d429cbb48ca85fea008202d3a9&amp;scene=178&amp;cur_album_id=3142867025011146754#rd" title="Linux 网络设备 - Bridge &amp; Veth Pair" target="_blank" rel="noopener noreferrer">Linux 网络设备 - Bridge &amp; Veth Pair</a></p>
<p><a href="https://mp.weixin.qq.com/s?__biz=MzkxNTU4NjQ3MA==&amp;mid=2247483747&amp;idx=1&amp;sn=18253e70d075ea2da552c33d15922509&amp;chksm=c15dadaaf62a24bc4822d4d78dd43ff2180aeff511eb399e9428f4401098e86eb802654f821f&amp;scene=178&amp;cur_album_id=3142867025011146754#rd" title="Linux 网络设备 - Bridge 详解" target="_blank" rel="noopener noreferrer">Linux 网络设备 - Bridge 详解</a></p>
<p><a href="https://zhuanlan.zhihu.com/p/670836822" title="网桥实现" target="_blank" rel="noopener noreferrer">网桥实现</a></p>]]></description>
</item><item>
    <title>UDP协议</title>
    <link>http://lovelycabin.dpdns.org/blog/20220830/1661806140/</link>
    <pubDate>Tue, 30 Aug 2022 04:49:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220830/1661806140/</guid>
    <description><![CDATA[<h2 id="引言" class="headerLink">
    <a href="#%e5%bc%95%e8%a8%80" class="header-mark"></a>4 引言</h2><p>UDP是一个简单的面向数据报的运输层协议。它把应用程序传给IP层的数据发送出去，但是并不保证它们能到达目的地。结构图如下：</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">text</p>]]></description>
</item><item>
    <title>转发模型</title>
    <link>http://lovelycabin.dpdns.org/blog/20220831/1661892540/</link>
    <pubDate>Wed, 31 Aug 2022 04:49:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220831/1661892540/</guid>
    <description><![CDATA[<h2 id="pipline模型" class="headerLink">
    <a href="#pipline%e6%a8%a1%e5%9e%8b" class="header-mark"></a>1 Pipline模型</h2><p>一件事情，分开干</p>
<h2 id="rtc模型" class="headerLink">
    <a href="#rtc%e6%a8%a1%e5%9e%8b" class="header-mark"></a>2 RTC模型</h2><p>一件事情做到底，重复做</p>
<h2 id="lpm算法" class="headerLink">
    <a href="#lpm%e7%ae%97%e6%b3%95" class="header-mark"></a>3 LPM算法</h2><h2 id="精确匹配" class="headerLink">
    <a href="#%e7%b2%be%e7%a1%ae%e5%8c%b9%e9%85%8d" class="header-mark"></a>4 精确匹配</h2><p>hash匹配</p>
<h2 id="acl算法" class="headerLink">
    <a href="#acl%e7%ae%97%e6%b3%95" class="header-mark"></a>5 ACL算法</h2><p>ACL + 过滤 = 包过滤</p>
<h2 id="报文分发" class="headerLink">
    <a href="#%e6%8a%a5%e6%96%87%e5%88%86%e5%8f%91" class="header-mark"></a>6 报文分发</h2><h2 id="napi机制" class="headerLink">
    <a href="#napi%e6%9c%ba%e5%88%b6" class="header-mark"></a>7 NAPI机制</h2><h2 id="rss" class="headerLink">
    <a href="#rss" class="header-mark"></a>8 RSS</h2><h2 id="flow-director" class="headerLink">
    <a href="#flow-director" class="header-mark"></a>9 Flow Director</h2>]]></description>
</item><item>
    <title>VxLAN</title>
    <link>http://lovelycabin.dpdns.org/blog/20220422/1650620580/</link>
    <pubDate>Fri, 22 Apr 2022 17:43:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220422/1650620580/</guid>
    <description><![CDATA[<h2 id="需求场景" class="headerLink">
    <a href="#%e9%9c%80%e6%b1%82%e5%9c%ba%e6%99%af" class="header-mark"></a>13 需求场景</h2><ol>
<li>二层扩展：虚拟化/云计算集群内允许虚拟机任意迁移，原来二层互通的虚拟机需要横跨三层网络进行互联。</li>
<li>多租户隔离：云化场景一般支持多租户，即不同用户共享物理资源。租户可能配置相同的MAC和IP地址（共同使用一张物理接口卡），要考虑物理网络承载隔离问题。</li>
</ol>
<h3 id="解决传统网络的问题" class="headerLink">
    <a href="#%e8%a7%a3%e5%86%b3%e4%bc%a0%e7%bb%9f%e7%bd%91%e7%bb%9c%e7%9a%84%e9%97%ae%e9%a2%98" class="header-mark"></a>13.1 解决传统网络的问题</h3><ol>
<li>虚拟机规模受限
每台设备都需要有大规格的MAC表。同时VM的数量巨大增加，介入测二层设备的MAC地址表规格较小，不能满足快速增长的VM数量</li>
<li>网络隔离能力限制
VLAN的Tag只有12bit，仅能表示4096个逻辑单元，而大型数据中心的租户规模远大于该数目</li>
<li>虚拟机迁移范围受限
由于虚拟机跨三层迁移时IP地址会发生改变，而导致客户端掉线</li>
</ol>
<h3 id="为什么选择vxlan" class="headerLink">
    <a href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%80%89%e6%8b%a9vxlan" class="header-mark"></a>13.2 为什么选择VxLAN？</h3><p>优点：</p>]]></description>
</item><item>
    <title>OSPF路由协议</title>
    <link>http://lovelycabin.dpdns.org/blog/20220726/1658838480/</link>
    <pubDate>Tue, 26 Jul 2022 20:28:00 &#43;0800</pubDate><author>
        <name>lilac</name>
    </author><guid>http://lovelycabin.dpdns.org/blog/20220726/1658838480/</guid>
    <description><![CDATA[<h2 id="简介" class="headerLink">
    <a href="#%e7%ae%80%e4%bb%8b" class="header-mark"></a>1 简介</h2><p>链路状态路由协议，是目前业内使用非常广泛的IGP协议之一。
针对IPv4协议使用的是OSPF Version（RFC2328） 2；针对IPv6协议使用OSPF Version 3（RFC2740）。
运行OSPF路由器之间交互的是LS（Link State，链路状态）信息，OSPF路由器将网络中的LS信息收集起来，存储在LSDB中，路由器都清楚区域内的网络拓扑结构，有助于计算无环路径。
采用SPF算法计算达到目的地最短路径。</p>]]></description>
</item></channel>
</rss>
