<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title><![CDATA[Oneself]]></title> 
<atom:link href="https://mod.lyxx.top/rss.php" rel="self" type="application/rss+xml" />
<description><![CDATA[一个摆子]]></description>
<link>https://mod.lyxx.top/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
    <title>米哈游API</title>
    <link>https://mod.lyxx.top/?post=32</link>
    <description><![CDATA[<p><strong>API连接：<a href="https://lyxx.top:5000">https://lyxx.top:5000</a></strong><br />
原神角色攻略<br />
<strong>请求：</strong>/Genshin<br />
返回角色攻略图片</p>
<table>
<thead>
<tr>
<th style="text-align: center;">参数</th>
<th style="text-align: center;">值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">name</td>
<td style="text-align: center;">角色名称</td>
</tr>
</tbody>
</table>
<p><strong>请求：</strong>/wytz</p>
<table>
<thead>
<tr>
<th style="text-align: center;">参数</th>
<th style="text-align: center;">值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">wytz</td>
<td style="text-align: center;">url</td>
</tr>
</tbody>
</table>]]></description>
    <pubDate>Tue, 27 May 2025 10:22:32 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=32</guid>
</item>
<item>
    <title>IOS微信</title>
    <link>https://mod.lyxx.top/?post=29</link>
    <description><![CDATA[<p>IOS默认统一发送消息，接收消息慢，更换国内DNS即可解决<br />
<a href="https://lyxx.top/?resource_alias=rA40suODa4TnMAOv">IOS DNS证书</a><br />
下载证书后根据提示安装即可</p>]]></description>
    <pubDate>Fri, 23 May 2025 09:30:10 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=29</guid>
</item>
<item>
    <title>DVWA-Command injection</title>
    <link>https://mod.lyxx.top/?post=28</link>
    <description><![CDATA[<h1>一、什么是命令注入</h1>
<p>命令注入是一种安全漏洞，发生在未对用户输入做出限制而直接拼接用户输入，攻击者可以利用命令注入漏洞执行任意命令，使用特殊符号（&amp;、&amp;&amp;、|和||）绕过预期命令并执行其他命令</p>
<h1>二、命令注入实践（DVWA）</h1>
<h2>1、级别Low</h2>
<p>查看源码,发现这段代码在ping语句后面未做任何监测<br />
<img src="https://lyxx.top/content/uploadfile/202505/f9291747832206.png" alt="" /><br />
使用命令<code>ping 127.0.0.1 &amp; whoami</code>测试，在执行ping127.0.0.1的同时执行后面拼接的命令<br />
<img src="https://lyxx.top/content/uploadfile/202505/dad71747832206.png" alt="" /></p>
<h2>2、级别Medium</h2>
<p>查看源码，发现这么段代码对输入做了简单的防护，把<code>&amp;&amp;</code>和<code>;</code>转换成空格，使命令失效，但并未对<code>||</code>和<code>|</code>做防护，所有可以使用<code>||</code>或<code>|</code><br />
<img src="https://lyxx.top/content/uploadfile/202505/a7971747832206.png" alt="" /><br />
使用命令<code>127.0.0.1 | whoami</code>测试，直接执行<code>whoami</code><br />
<img src="https://lyxx.top/content/uploadfile/202505/45931747832206.png" alt="" /></p>
<h2>3、级别High</h2>
<p>查看源码，增加被限制的特殊符号，但在<code>|</code>处多了一个空格<br />
<img src="https://lyxx.top/content/uploadfile/202505/a57e1747832206.png" alt="" /><br />
使用命令<code>127.0.0.1 |whoami</code>测试，仍然能执行whoami（<strong>注意空格</strong>）<br />
<img src="https://lyxx.top/content/uploadfile/202505/58f21747832206.png" alt="" /></p>
<h2>4、级别Impossible</h2>
<p>查看源码，这段代码拆分了用户输入的IP地址，并分别判断每位是否是数字且是否有其他参数，然后再组合成IP地址执行相关操作，规避注入的风险。<br />
<img src="https://lyxx.top/content/uploadfile/202505/35ea1747833226.png" alt="" /></p>]]></description>
    <pubDate>Wed, 21 May 2025 20:42:47 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=28</guid>
</item>
<item>
    <title>Linux重置root密码</title>
    <link>https://mod.lyxx.top/?post=27</link>
    <description><![CDATA[<p>一、在启动菜单处按E进入内核编辑<br />
<img src="https://lyxx.top/content/uploadfile/202505/0e7a1747706994.png" alt="" /><br />
二、在Linux开头那行末尾(end快速定位）添加rd.break，<br />
<img src="https://lyxx.top/content/uploadfile/202505/dc951747706994.png" alt="" /><br />
<img src="https://lyxx.top/content/uploadfile/202505/283d1747706994.png" alt="" /><br />
三、ctrl+x启动系统，并输入以下命令重置密码</p>
<pre><code>mount -o remount,rw /sysroot
chroot /sysroot
passwd root
touch .autorelabel
exit
exit
exit</code></pre>
<p><img src="https://lyxx.top/content/uploadfile/202505/c2291747706994.png" alt="" /><br />
交流群：</p>
<style>
.img-margin{
margin-right:666px
}
</style>
<p class='img-margin'>
<img src="https://lyxx.top/content/uploadfile/202505/thum-a4101746670795.jpg" width="200" height="200" >
</p>]]></description>
    <pubDate>Tue, 20 May 2025 10:12:44 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=27</guid>
</item>
<item>
    <title>OSPF高级特性</title>
    <link>https://mod.lyxx.top/?post=26</link>
    <description><![CDATA[<p>1.OSPF快速收敛</p>
<p>1}PFC（部分路由计算）</p>
<p>2类LSA携带拓扑结构，只要2类LSA不改变，之计算计算（广播网络类型中）；在p2p网络中，通过1类LSA描述拓扑信息，1类LSA（网络类型）</p>
<p>2}智能定时器</p>
<p>LSA更新、接收定时器；呈指数的增加；网络出现频繁的up，则每次更新间隔，不断增加</p>
<p>华为：缺省情况下，是用智能定时器Intelligent-timer，更新LSA 的最长间隔时间是max-interval为5000毫秒，初始间隔时间start-interval为500毫秒，基数间隔时间hold-interval为1000毫秒（以毫秒为的那位的时间间隔）</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/88471747666191.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-88471747666191.png" alt="" /></a></p>
<p>3}IP FRR快速重路由</p>
<p>提前计算备用路径；有条件的计算备用路径</p>
<p>临时链路，过渡性链路</p>
<p>基于思路：以可提供本分链路的邻居为过根节点，利用SPF算法计算出到目的节点的最短距离。然后，按照不等式计算出开销最小且无环的备份链路</p>
<p>4}BFD</p>
<p>OSPF邻居，若直接链路之间有交换机设备，发生非直连故障。需等待邻居超时时间</p>
<p>工作流程</p>
<p>1.OSPF邻居建立</p>
<p>2.BFD会话根据邻居物理地址自动建立</p>
<p>3.BFD发现故障，通知OSPF故障</p>
<p>BFD联动实验</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/641d1747666210.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-641d1747666210.png" alt="" /></a></p>
<p><a href="https://lyxx.top/content/uploadfile/202505/e86b1747666222.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-e86b1747666222.png" alt="" /></a></p>
<p><a href="https://lyxx.top/content/uploadfile/202505/0bd11747666239.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-0bd11747666239.png" alt="" /></a></p>
<p>IP FRR实验</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/31a71747666256.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-31a71747666256.png" alt="" /></a></p>
<p>按照图示更改接口cost，ospf全宣告即可</p>
<p>开启frr</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/56be1747666267.png"><img src="https://lyxx.top/content/uploadfile/202505/56be1747666267.png" alt="" /></a></p>
<p>R1未开启后关于4.4.4.4路由frr的状态</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/27ac1747666280.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-27ac1747666280.png" alt="" /></a><br />
R1开启frr后关于4.4.4.4路由的状态</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/b6131747666291.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-b6131747666291.png" alt="" /></a></p>
<p>2.OSPF路由控制</p>
<p>1.等价路由</p>
<p>当路由表中存在到达同一目的地址，且同一路由协议发现的多条路由时，若开销值也相同，那么这些路由就是等价的，可以实现负载分担</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/8f651747666308.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-8f651747666308.png" alt="" /></a></p>
<p>华为下设置负载分担的等价路由的命令以及最大条数</p>
<p>2.缺省路由</p>
<p>情况1</p>
<p>有区域边界路由器发布3类LSA，用来指导区域内路由器进行区域之间报文的转发</p>
<p>情况2</p>
<p>由自治系统边界路由器发布5/7leiLSA，用来指导OSPF路由器域内路由器进行域外报文的转发</p>
<table>
<thead>
<tr>
<th>区域类型</th>
<th>产生条件</th>
<th>发布方式</th>
<th>产生LSA类型</th>
<th>泛洪范围</th>
</tr>
</thead>
<tbody>
<tr>
<td>普通区域</td>
<td>通过default-route-advertise</td>
<td>ASBR发布</td>
<td>5类LSA</td>
<td>普通区域</td>
</tr>
<tr>
<td>Stub区域和Totally Stub区域</td>
<td>自动产生</td>
<td>ABR发布</td>
<td>3类LSA</td>
<td>Stub区域</td>
</tr>
<tr>
<td>NSSA区域</td>
<td>通过nssa default-route-advertise</td>
<td>ASBR发布</td>
<td>7类LSA</td>
<td>NSSA区域</td>
</tr>
<tr>
<td>Totally NSSA区域</td>
<td>自动产生</td>
<td>ASBR发布</td>
<td>3类LSA</td>
<td>NSSA区域</td>
</tr>
</tbody>
</table>
<p>3.对发送的LSA进行过滤</p>
<p>对OSPF接口出方向的LSA进行过滤</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/25f91747666333.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-25f91747666333.png" alt="" /></a></p>
<p>对ABR3类LSA继续过滤</p>
<p>配置对区域内出/入方向的3类LSA进行过滤<br />
<a href="https://lyxx.top/content/uploadfile/202505/19681747666357.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-19681747666357.png" alt="" /></a></p>
<p>OSPF Dadabase Overflew</p>
<p>限制OSPF数据库中的五类LSA最大数目</p>
<p>3.其他特性</p>
<p>1.OSPF多进程</p>
<p>主要应用于VPN场景中</p>
<p>2.OSPF与BGP联动</p>
<p>问题：新设备加入网络或有设备重启，可能会出现在BGP收敛期间内网络流量丢失的现象。这就是IGP收敛比BGP块造成的</p>
<p>解决：使能OSPF与BGP联动特性的设备的会在设定的联动时间内保持为Stub路由器，该设备发布的LSA中的链路度量值为最大值（65535），从而告知其他OSPF设备不要使用这个路由器来转发数据；在特性设备上使能联动，在BGP收敛完成之前，不会有流量转发到该设备上，而是使用备份设备来转发直到该设备上的BGP路由收敛完成</p>
<p>3.OSPF转发地址FA</p>
<p>是属于5/7类LSA中包含的一个特别的字段LSA。是对到达所通告的目的地址数据包应该被转发到的地址，如果为0.0.0.0，那么数据包将被转发到始发ASBR上；FAde引入使得OSPF某些场景下可以避免次优路径问题</p>
<p>FA的取值</p>
<p>5类LSA中FA字段为0，那么数据包将被转发到始发ASBR上；若不为0则表示数据包应该发往这个FA所标识的设备</p>
<p>非0的条件</p>
<p>1.ASBR在其连接外部网络的接口激活OSPF</p>
<p>2.该接口没有被设置为静默接口</p>
<p>3.该接口的OSPF网络类型为广播或NBMA帧中继</p>
<p>4.该接口的IP地址在OSPF配置的network命令指定的网段范围内</p>
<p>5.到达FA地址的路由必须是OSPF区域内部路由或区域间路由，这样接收到该外部LSA的路由器才能够加载到LSA进入路由表，加载的外部LSA生成的路由条目下一跳与到达FA地址的下一跳相同</p>
<p>4.GR（平滑重启）</p>
<p>OSPF通过新增Grace-LSA来支持GR功能，这种LSA用于在开始FR退出GR时向邻居通告GR的时间、原因以及接口地址等内容</p>
<p>TLV类型</p>
<p>Grace Period TLV：Type=1，长度为4字节，表示邻居设备进入GR Helper处理流程的最长保持时间。如果超过这段时间GR Restarter还没有完成GR处理流程，则周边邻居不再担任GR</p>
<p>Graceful Restart Reason TLV：Type=2，长度为1字节，<br />
告知邻居设备GR Restarter的重启原因。（必须携带）<br />
 Value=0，表示原因未知；<br />
 Value=1，表示软件重启；<br />
 Value=2，表示软件重新加载（升级）；<br />
 Value=3，表示GR Restarter进行主备倒换。</p>
<p>IP Interface Address TLV：Type=3，长度为4字节，用来告知发送Grace LSA的接口的IP地址，在网络上需要用该IP地址来唯一标识一台重启设备</p>
<p>GR中的概念</p>
<p>GR Restarter：GR重启路由器，指由管理员或故障触发而协议重启的设备，它需要具备GR能力。可以通过配置支持完全GR或者部分GR。<br />
• GR Helper：协助重启路由器，即GR Restarter的邻居，能协助重启的GR Restarter保持路由关系的稳定，它也需要具备GR能力。可以通过配置支持有计划GR、非计划GR或者通过策略有选择支持GR。<br />
• GR Session：GR会话，是GR Restarter和GR Helper之间的能力协商过程，包括协议重启通告，协议重启过程中的信息交互等。通过该会话，GR Restarter和GR Helper可以掌握彼此的GR能力。<br />
• GR的持续时间：GR持续时间最长不超过1800秒。GR成功或失败都可以提前退出，不必等到超时才退出</p>
<p>GR的过程</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/95871747666374.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-95871747666374.png" alt="" /></a><img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/301baf3e-c064-4a3f-a278-131622154402/677a30a7-09bc-42b7-a5d1-f8a52f5616ef/Untitled.png" alt="Untitled" /></p>
<p>GR的退出</p>
<table>
<thead>
<tr>
<th>GR执行情况</th>
<th>GR Restarter</th>
<th>GR Helper</th>
</tr>
</thead>
<tbody>
<tr>
<td>GR成功</td>
<td>Restarter在GR超时前与主备倒换前的所有邻居都重</td>
</tr>
<tr>
<td>新建立好邻居关系。</td>
<td>收到Restarter发送的Age为3600秒的Grace-LSA时</td>
</tr>
<tr>
<td>与Restarter的邻居关系为Full状态。</td>
</tr>
<tr>
<td>GR失败</td>
<td>• GR超时并且邻居关系尚未完全恢复。</td>
</tr>
</tbody>
</table>
<p>• Helper发送的Router-LSA或Network-LSA导致<br />
Restarter端进行双向检查时失败。<br />
• Restarter接口状态变化。<br />
• Restarter收到同一网段上另一台路由器产生的<br />
Grace-LSA。同一网段同一时间只能有一台路由器<br />
做GR。<br />
• Restarter同一个网段的邻居之间存在DR/BDR不一<br />
致的情况（即拓扑变化） | • 在邻居关系超时前没有收到Restarter发送的GraceLSA。<br />
• Helper接口状态发生变化。<br />
• 收到其它路由器发送的与Helper本地数据库不一致<br />
的LSA。（可以通过配置不进行严格LSA检查排除这<br />
种情况。）<br />
• 同一网段上同一时间收到两台路由器发送的GraceLSA。<br />
• 与其它路由器邻居关系变化 |</p>
<p>配置OSPF GR</p>
<p>1.使能opaque-LSA特性</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/47b51747666389.png"><img src="https://lyxx.top/content/uploadfile/202505/47b51747666389.png" alt="" /></a></p>
<p>2.Restarter端使能OSPF GR特性,并配置相应参数</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/217c1747666400.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-217c1747666400.png" alt="" /></a><br />
period period：指定平滑重启的周期。整数形式，取值范围是1～1800，单位是秒。缺省值是120秒。<br />
planned-only：指定路由器仅支持Planned GR。缺省情况下，路由器支持Planned GR和Unplanned GR。<br />
partial：指定路由器支持Partial GR。缺省情况下，路由器支持Totally GR</p>
<p>3.配置设备重启Helper模式，并配置参数</p>
<p><a href="https://lyxx.top/content/uploadfile/202505/ac241747666413.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-ac241747666413.png" alt="" /></a>、</p>
<p>period period：指定GR的周期。整数形式，取值范围是1～1800，单位是秒。缺省值是120秒。<br />
planned-only：指定设备仅支持Planned GR。缺省情况下，设备支持Planned GR和Unplanned GR。<br />
partial：指定设备支持Partial GR。缺省情况下，设备支持Totally GR。<br />
ip-prefix ip-prefix-name：地址前缀列表名称。<br />
acl-number acl-number：基本访问控制列表号。ACL参数用来配置过滤策略，只有通过过滤器策略后才能进入Helper模式。<br />
acl-name acl-name：指定访问控制列表名称。<br />
ignore-external-lsa：用来配置Helper不对Type5 LSA和Type7 LSA进行检查。缺省情况下，执行外部LSA检查。<br />
never：指定设备不支持Helper模式</p>
<p>5.NSR.</p>
<p>高可靠性的解决方案包括不间断转发（Non-Stopping Forwarding，NSF）和不间断路由Non-Stopping Routing，NSR）</p>
<p>NSF：</p>
<p>通过协议的GR机制，支持系统主备倒换时，转发业务不中断。<br />
▫ 当由于某种原因系统发生故障时，在系统重启过程中，转发平面（业务）不中断。<br />
▫ 系统恢复后，设备能够重新建立邻居关系，从邻居处获取路由信息并重建路由表</p>
<p>NSR：</p>
<ul>
<li>通过协议备份机制，实现主备倒换时控制平面（路由）和转<br />
发平面（业务）均不中断。<br />
• 在设备发生倒换的过程中，路由处理不中断，因为：<br />
▫ 邻居和拓扑信息不丢失；<br />
▫ 邻居关系不中断。<br />
• 优点：<br />
▫ 不依赖也不影响对端设备，没有互通问题；<br />
▫ 路由的收敛速度要比NSF快</li>
</ul>
<p>NSR原理</p>
<p> 批量备份：NSR功能使能后，备板重启时，主用主控板将路由<br />
信息和转发信息批量备份到备用主控板上。批量备份过程在实时备份过程之前进行，此时NSR无法实施主备倒换过程。<br />
 实时备份：当批量备份过程结束后，系统进入实时备份阶段。任何在控制平面和转发平面的改变都将实时从主用主控板备份到备用主控板上。在该阶段，备用主控板能够随时代替主用主<br />
控板工作。<br />
 主备倒换：在已经完成备份的NSR系统主用主控板发生故障时，备用主控板会通过硬件状态感知到主用主控板故障，并成为新的主用主控板。备用主控板升主后，该单板会切换接口板的报文上送通道。由于倒换时间足够短，路由协议在主备切换的过程中不会和邻居节点断连。</p>
<p>控制平面路由协议实时备份路由信息；硬件通道感知主用主控板异常，通知备用主控板升主，同时切换接口班上送报文通道</p>
<p>NSR批量备份过程</p>
<p>NSR功能使能后，备板重启时，主用主控板上的业务进程<br />
会收到备用主控板上线的消息。业务进程开始进行内部数据的批量备份。<br />
 批量数据备份完毕后，系统进入冗余保护状态。进入该状态后，如果主控板出现故障，备板升主后就可以利用之前从主板备份过来的数据进行升主，恢复业务。<br />
 如果业务批量备份尚未结束时，主控板故障，备板升主后可能会因为业务数据不全而导致无法升主，因此这个种状态下无法完成NSR倒换，设备会整机重启，恢复故障前状态</p>
<ol>
<li>备板启动完成。</li>
<li>各业务进程通过HA通道开始批量备份路由等业务数据，系统进入批量备份阶段。</li>
<li>业务进程全部批量备份完成后，系统进入冗余保护状态</li>
</ol>
<p>NSR实时备份过程</p>
<p>完成批量备份后，系统进入实时备份阶段，在该阶段当邻居状态或路由信息发生变化时，主用主控板会实时将变化信息备份到备用主控板</p>
<p>1.邻居状态变化或路由变化</p>
<p>2.主用主控板将变化信息通过HA通道备份到备用主控板</p>
<p>3.备用主控板答复主要主控板确认信息</p>
<p>NSR倒换升主过程</p>
<p>·完成批量备份，进入冗余保护状态的系统，当主用主控板发生软件或硬件故障后，备用主控板会从底层硬件感知到主用主控板的故障，并自行升主。<br />
·升主后业务进程会使用之前从主用主控板备份来的数据进行工作。同时接口板也会向新的主控板发送平滑倒换期间变化的信息。实现真正的路由不中断，转发不中断。</p>
<ol>
<li>硬件通道感知主用主控板异常，通知备用主控板升主，同时切换接口板上送报文通道。</li>
<li>备用主控板升主后，接口板会向新的AMB发送平滑倒换期间的状态变化</li>
<li>倒换升主完成后，新的主用主控板会向新的备用主控板进行NSR备份。</li>
</ol>
<p>配置NSR</p>
<p>配置命令：switchover mode nonstop-routing | nonstop-forwarding</p>
<p>设置系统HA的工作模式。缺省情况下，系统HA的工作模式为NSF模式。<br />
nonstop-routing：指定系统HA的工作模式为不间断路由NSR模式。系统处于NSR模式时，能够实现路由处理及转发业务不中断。<br />
nonstop-forwarding：指定系统HA的工作模式为不间断转发NSF模式。系统处于NSF模式时，能够大幅减少转发业务中断时间</p>]]></description>
    <pubDate>Mon, 19 May 2025 22:45:45 +0800</pubDate>
    <dc:creator>咸鱼不烦神</dc:creator>
    <guid>https://mod.lyxx.top/?post=26</guid>
</item>
<item>
    <title>SR-MPLS-TE/policy-新华三</title>
    <link>https://mod.lyxx.top/?post=25</link>
    <description><![CDATA[<p><a href="https://lyxx.top/content/uploadfile/202505/f1f81747550661.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-f1f81747550661.png" alt="" /></a><br />
TE-流量工程，只针对站点之间的流量<br />
松散路径：使用prefix-sid来标识<br />
显示路径：使用adjacency-sid来标识，严格定义了出接口；华三默认不开启<br />
开启adjcency<br />
[<img src="https://lyxx.top/content/uploadfile/202505/ecf61747550379.png" alt="" />](<a href="https://lyxx.top/conten1">https://lyxx.top/conten1</a>. 1. t/uploadfile/202505/ecf61747550379.png)<br />
开启 te<br />
mpls te<br />
查看mpls lsp标签<br />
<a href="https://lyxx.top/content/uploadfile/202505/5d901747550410.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-5d901747550410.png" alt="" /></a><br />
路径规划<br />
1-2-3-4<br />
<a href="https://lyxx.top/content/uploadfile/202505/53551747550862.png"><img src="https://lyxx.top/content/uploadfile/202505/53551747550862.png" alt="" /></a><br />
创建隧道<br />
<a href="https://lyxx.top/content/uploadfile/202505/be0f1747551197.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-be0f1747551197.png" alt="" /></a><br />
创建隧道策略<br />
<a href="https://lyxx.top/content/uploadfile/202505/25f61747551904.png"><img src="https://lyxx.top/content/uploadfile/202505/25f61747551904.png" alt="" /></a><br />
VPN实例引用<br />
<a href="https://lyxx.top/content/uploadfile/202505/c05a1747551590.png"><img src="https://lyxx.top/content/uploadfile/202505/c05a1747551590.png" alt="" /></a><br />
设备互联接口开启mpls te 功能<br />
mpls  te enable<br />
查看实例路由表<br />
<a href="https://lyxx.top/content/uploadfile/202505/7e791747551928.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-7e791747551928.png" alt="" /></a><br />
路径查看<br />
<a href="https://lyxx.top/content/uploadfile/202505/92a11747552070.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-92a11747552070.png" alt="" /></a><br />
没有11002是数据到达11002时会弹出11002的标签所以再查时只有三层标签；末二跳弹出机制<br />
显示路径配置<br />
接口标签规划<br />
<a href="https://lyxx.top/content/uploadfile/202505/75481747552821.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-75481747552821.png" alt="" /></a><br />
标签都是由指向性的<br />
接口定义标签<br />
<a href="https://lyxx.top/content/uploadfile/202505/6c651747553355.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-6c651747553355.png" alt="" /></a><br />
手动优于自动<br />
路径更改<br />
<a href="https://lyxx.top/content/uploadfile/202505/9c2e1747554102.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-9c2e1747554102.png" alt="" /></a><br />
抓包查看路径<br />
<a href="https://lyxx.top/content/uploadfile/202505/38521747554163.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-38521747554163.png" alt="" /></a><br />
当TE隧道失效时，华三会自动根据路由表进行切换到BE隧道<br />
TE缺点<br />
无法区分到达同一个节点业务<br />
无法实现多PE的热备份<br />
Policy实现<br />
通过BGP扩展团体属性，给BGP路由进行染色 0:x<br />
业务着色-VPNV4、EVPN<br />
隧道着色，不同业务走不同的隧道<br />
拓扑<br />
<a href="https://lyxx.top/content/uploadfile/202505/bd821747555552.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-bd821747555552.png" alt="" /></a><br />
配置为显示路径<br />
路由着色-使用路由策略抓取路由并染色<br />
<a href="https://lyxx.top/content/uploadfile/202505/7a061747555749.png"><img src="https://lyxx.top/content/uploadfile/202505/7a061747555749.png" alt="" /></a><br />
路由策略<br />
route-policy color permit node 10<br />
if-match ip address prefix-list A<br />
apply extcommunity color 00:10<br />
route-policy color permit node 20<br />
if-match ip address prefix-list B<br />
apply extcommunity color 00:20<br />
route-policy color permit node 30<br />
引用策略<br />
address-family ipv4 unicast<br />
peer 172.16.1.1 enable<br />
peer 172.16.1.1 route-policy color import--接收路由时进行染色<br />
路由检查-PE1<br />
dis bgp route-table vpnv4 10.1.10.1<br />
10.1.10.1<br />
BGP local router ID: 1.1.1.1<br />
Local AS number: 100<br />
Route distinguisher: 1:1(vpn1)<br />
Total number of routes: 1<br />
Paths:   1 available, 1 best<br />
BGP routing table information of 10.1.10.0/24:<br />
From            : 4.4.4.4 (4.4.4.4)<br />
Rely nexthop    : 12.1.1.2<br />
Original nexthop: 4.4.4.4<br />
Out interface   : GigabitEthernet0/0/1<br />
Route age       : 00h01m10s<br />
OutLabel        : 1151<br />
Ext-Community   : &lt;RT: 1:1&gt;, &lt;CO-Flag:Color(00:10)&gt;<br />
RxPathID        : 0x0<br />
TxPathID        : 0x0<br />
AS-path         : 65002<br />
Origin          : igp<br />
Attribute value : MED 0, localpref 100, pref-val 0<br />
State           : valid, internal, best<br />
Source type     : local<br />
IP precedence   : N/A<br />
QoS local ID    : N/A<br />
Traffic index   : N/A<br />
Tunnel policy   : s1-s2<br />
Rely tunnel IDs : 268435457<br />
dis bgp route-table vpnv4 10.1.10.1<br />
10.1.20.1<br />
BGP local router ID: 1.1.1.1<br />
Local AS number: 100<br />
Route distinguisher: 1:1(vpn1)<br />
Total number of routes: 1<br />
Paths:   1 available, 1 best<br />
BGP routing table information of 10.1.20.0/24:<br />
From            : 4.4.4.4 (4.4.4.4)<br />
Rely nexthop    : 12.1.1.2<br />
Original nexthop: 4.4.4.4<br />
Out interface   : GigabitEthernet0/0/1<br />
Route age       : 00h01m39s<br />
OutLabel        : 1151<br />
Ext-Community   : &lt;RT: 1:1&gt;, &lt;CO-Flag:Color(00:20)&gt;<br />
RxPathID        : 0x0<br />
TxPathID        : 0x0<br />
AS-path         : 65002<br />
Origin          : igp<br />
Attribute value : MED 0, localpref 100, pref-val 0<br />
State           : valid, internal, best<br />
Source type     : local<br />
IP precedence   : N/A<br />
QoS local ID    : N/A<br />
Traffic index   : N/A<br />
Tunnel policy   : s1-s2<br />
Rely tunnel IDs : 268435457<br />
隧道为之前配置无需关心<br />
PE1删除所有TE配置<br />
删除实例下的隧道调用<br />
删除tunnel1<br />
删除路径<br />
业务A访问路径<br />
进入到<br />
[PE1]segment-routing<br />
[PE1-segment-routing]traffic-engineering<br />
[PE1-sr-te]segment-list 名字<br />
主路径<br />
PE1-PE2-PE3-PE4<br />
segment-list AM<br />
index 10 mpls label 15010<br />
index 20 mpls label 15020<br />
index 30 mpls label 15020<br />
备路径<br />
PE1-PE2-PE4<br />
segment-list AS<br />
index 10 mpls label 15010<br />
index 20 mpls label 15010<br />
策略配置<br />
policy YWA<br />
color 10 end-point ipv4 4.4.4.4<br />
candidate-paths<br />
preference 50<br />
explicit segment-list AS<br />
preference 100<br />
explicit segment-list AM<br />
业务B访问路径<br />
主路径<br />
PE1-PE3-PE2-PE4<br />
segment-list BM<br />
index 10 mpls label 15020<br />
index 20 mpls label 15030<br />
index 30 mpls label 15010<br />
备路径<br />
PE1-PE3-PE4<br />
segment-list BS<br />
index 10 mpls label 15020<br />
index 20 mpls label 15020<br />
策略配置<br />
policy YWB<br />
color 20 end-point ipv4 4.4.4.4<br />
candidate-paths<br />
preference 50<br />
explicit segment-list BS<br />
preference 100<br />
explicit segment-list BM<br />
Tun-policy配置<br />
tunnel-policy ywab//名字<br />
select-seq sr-policy sr-lsp load-balance-number 1//首先Policy，BE做逃生通道<br />
路由查看<br />
dis ip routing-table vpn-instance  vpn1<br />
<a href="https://lyxx.top/content/uploadfile/202505/a30a1747741057.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-a30a1747741057.png" alt="" /></a><br />
业务访问路径查看<br />
CE1访问10.1.10.1<br />
主路径<br />
<a href="https://lyxx.top/content/uploadfile/202505/49341747741233.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-49341747741233.png" alt="" /></a><br />
CE1访问10.1.20.1<br />
主路径<br />
<a href="https://lyxx.top/content/uploadfile/202505/65f51747741519.png"><img src="https://lyxx.top/content/uploadfile/202505/thum-65f51747741519.png" alt="" /></a><br />
配置SBFD<br />
全局开启mpls bfd<br />
mpls bfd enable<br />
进入到SR中<br />
sr-policy sbfd enable<br />
sr-policy sbfd timer min-tx-interval 600<br />
业务A<br />
backup hot-standby enable<br />
sbfd enable remote 100001<br />
业务B<br />
backup hot-standby enable<br />
sbfd enable remote 100001<br />
对端PE配置<br />
sbfd local-discriminator 1000001</p>]]></description>
    <pubDate>Sun, 18 May 2025 14:27:39 +0800</pubDate>
    <dc:creator>咸鱼不烦神</dc:creator>
    <guid>https://mod.lyxx.top/?post=25</guid>
</item>
<item>
    <title>Linux扩容文件系统（LVM）</title>
    <link>https://mod.lyxx.top/?post=24</link>
    <description><![CDATA[<p>一、查看现有磁盘分区<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747494773.png" alt="" /><br />
二、查看现有PV、VG、LV<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747494900.png" alt="" /><br />
三、查看现有设备基本信息<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747494948.png" alt="" /><br />
四、查看磁盘占用<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496199.png" alt="" /><br />
五、添加一块新磁盘<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496248.png" alt="" /><br />
六、查看新增磁盘在系统中的编号<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496286.png" alt="" /><br />
七、初始化新增磁盘<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496604.png" alt="" /><br />
八、扩容VG<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496646.png" alt="" /><br />
九、扩容LV<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747496769.png" alt="" /><br />
十、扩容文件系统<br />
<img src="https://lyxx.top/content/uploadfile/202505/3dd81747497107.png" alt="" /></p>
<p>交流群：</p>
<style>
.img-margin{
margin-right:666px
}
</style>
<p class='img-margin'>
<img src="https://lyxx.top/content/uploadfile/202505/thum-a4101746670795.jpg" width="200" height="200" >
</p>]]></description>
    <pubDate>Sun, 18 May 2025 00:04:25 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=24</guid>
</item>
<item>
    <title>SR-MPLS</title>
    <link>https://mod.lyxx.top/?post=23</link>
    <description><![CDATA[<p>项目拓扑<br />
<img src="https://lyxx.top/content/uploadfile/202505/f4581747064372.png" alt="项目拓扑" title="项目拓扑" /><br />
简要描述<br />
使用SR-MPSL代替传统的MPLS-LDP分发标签，使其传递私网路由，并达成互通<br />
前提：传统MPLS-LDP标签分发不固定，同时还要考虑LDP会话建立过程，管理，排错不易；利用SR-MPLS可以定义标签空间；同一域内可以使用相同标签值。设置好偏移量即可<br />
1.底层网络使用OSPF打通；指定RID，宣告环回口；使能SR，设定标签值；此时OSPF会借助10类LSA扩散该标签<br />
以PE1为例<br />
OSPF关键配置<br />
ospf 1 router-id 1.1.1.1<br />
segment-routing global-block 11000 12000//设定标签值范围<br />
segment-routing mpls//使能SR-MPLS<br />
opaque-capability enable //使能10类LSA能力<br />
area 0.0.0.0<br />
network 1.1.1.1 0.0.0.0<br />
network 12.1.1.1 0.0.0.0<br />
network 13.1.1.1 0.0.0.0<br />
#<br />
mpls lsr-id 1.1.1.1 //开启mpls功能<br />
2.配置VPN实例；本案列中不考虑Hub&amp;Spoke的场景故rd&amp;rt两端PE保持一致即可<br />
ip vpn-instance vpn1//vpn实例名称<br />
route-distinguisher 1:1<br />
vpn-target 1:1 import-extcommunity<br />
vpn-target 1:1 export-extcommunity<br />
3.配置BGP，与对端PE建立VPNV4的邻居，与CE建立VPNV4邻居；注意华三设备视图<br />
bgp 100<br />
peer 4.4.4.4 as-number 100<br />
peer 4.4.4.4 connect-interface LoopBack0<br />
address-family ipv4 unicast<br />
peer 4.4.4.4 enable<br />
address-family vpnv4<br />
peer 4.4.4.4 enable<br />
ip vpn-instance vpn1<br />
peer 192.168.10.1 as-number 65001<br />
address-family ipv4 unicast<br />
peer 192.168.10.1 enable<br />
4.配置偏移量<br />
interface LoopBack0<br />
ip address 1.1.1.1 255.255.255.255<br />
ospf 1 prefix-sid index 1//偏移量设置<br />
5.各设备接口使能MPLS功能<br />
interface GigabitEthernet0/0/1<br />
port link-mode route<br />
combo enable copper<br />
ip address 12.1.1.1 255.255.255.0<br />
mpls enable//使能MPLS<br />
6.对接CE端接口绑定实例<br />
interface GigabitEthernet0/0/0<br />
port link-mode route<br />
combo enable copper<br />
ip binding vpn-instance vpn1<br />
ip address 192.168.10.2 255.255.255.0<br />
7.CE端接入并宣告本地子网路由<br />
bgp 65001<br />
peer 192.168.10.2 as-number 100<br />
#<br />
address-family ipv4 unicast<br />
network 192.168.10.0 255.255.255.0<br />
peer 192.168.10.2 enable<br />
8.CE端路由查看<br />
<img src="https://lyxx.top/content/uploadfile/202505/c8ce1747065575.png" alt="" /><br />
9.PE端查看路由以及标签<br />
<img src="https://lyxx.top/content/uploadfile/202505/97b31747065635.png" alt="" /><br />
<img src="https://lyxx.top/content/uploadfile/202505/ea801747065772.png" alt="lsp标签-外层标签" title="lsp标签-外层标签" /><br />
<img src="https://lyxx.top/content/uploadfile/202505/3a191747065811.png" alt="内层标签" title="内层标签" /><br />
抓包验证<br />
<img src="https://lyxx.top/content/uploadfile/202505/77aa1747065941.png" alt="数据包标签查看" title="数据包标签查看" /></p>]]></description>
    <pubDate>Sun, 11 May 2025 21:57:04 +0800</pubDate>
    <dc:creator>咸鱼不烦神</dc:creator>
    <guid>https://mod.lyxx.top/?post=23</guid>
</item>
<item>
    <title>centos配置网络yum源和epel源</title>
    <link>https://mod.lyxx.top/?post=22</link>
    <description><![CDATA[<p>1、备份</p>
<pre><code>cd /etc/yum.repos.d/ &amp;&amp; mkdir bak
mv * ./bak</code></pre>
<p>2、配置yum源</p>
<pre><code>wget -O /etc/yum.repos.d/Centps-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache</code></pre>
<p>3、配置epel源</p>
<pre><code>wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache</code></pre>
<p>交流群：</p>
<style>
.img-margin{
margin-right:666px
}
</style>
<p class='img-margin'>
<img src="https://lyxx.top/content/uploadfile/202505/thum-a4101746670795.jpg" width="200" height="200" >
</p>]]></description>
    <pubDate>Thu, 01 May 2025 18:35:20 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=22</guid>
</item>
<item>
    <title>K8S字段选择算符</title>
    <link>https://mod.lyxx.top/?post=21</link>
    <description><![CDATA[<p>“字段选择算符（Field selectors)&quot;允许你根据一个或多个资源字段的值筛选K8S对象，如</p>
<pre><code>metadata.name=my-service
metadata.namespace!=default
status.phase=Pending</code></pre>
<p>下面这个<code>kubectl</code>命令将筛选出<code>status.phase</code>字段值为<code>Running</code>的所有Pod：</p>
<pre><code>kubectl get pods --field-selector status.phase=Running</code></pre>
<p>说明：<br />
字段选择算符本质上是资源“过滤器（Filters）”。默认情况下，字段选择算符/过滤器是未被应用的，这意味着指定类型的所有资源都会被筛选出来。这使得<code>kubectl get pods</code>和<code>kubectl get pods --field-selector""</code>这两个<code>kubectl</code>查询时等价的。<br />
<strong>支持的字段</strong><br />
不同的K8S资源类型支持不同的字段选择算符。所有资源类型都支持<code>metadata.name</code>和<code>metadata.namespace</code>字段。使用不被支持的字段选择算符会产生错误，如：</p>
<pre><code>kubectl get ingress --field-selector foo.bar=baz</code></pre>
<pre><code>Error from server (BadRequest): Unable to find "ingresses" that match label selector "", field selector "foo.bar=baz": "foo.bar" is not a known field selector: only "metadata.name", "metadata.namespace"</code></pre>
<table>
<thead>
<tr>
<th style="text-align: center;"><strong>支持字段列表</strong></th>
<th style="text-align: center;">类别</th>
<th>字段</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">spec.nodeName</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">spec.restartPolicy</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">spec.schedulerName</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">spec.serviceAccountName</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">spec.hostNetwork</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">status.phase</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">status.podIP</td>
</tr>
<tr>
<td style="text-align: center;">Pod</td>
<td style="text-align: center;">status.nominatedNodeName</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.kind</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.namespace</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.name</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.uid</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.apiVersion</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.resourceVersion</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">involvedObject.fieldPath</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">reason</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">reportingComponent</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">source</td>
</tr>
<tr>
<td style="text-align: center;">Event</td>
<td style="text-align: center;">type</td>
</tr>
<tr>
<td style="text-align: center;">Secret</td>
<td style="text-align: center;">type</td>
</tr>
<tr>
<td style="text-align: center;">Namespace</td>
<td style="text-align: center;">status.phase</td>
</tr>
<tr>
<td style="text-align: center;">ReplicaSet</td>
<td style="text-align: center;">status.replicas</td>
</tr>
<tr>
<td style="text-align: center;">ReplicationController</td>
<td style="text-align: center;">status.replicas</td>
</tr>
<tr>
<td style="text-align: center;">Job</td>
<td style="text-align: center;">status.successful</td>
</tr>
<tr>
<td style="text-align: center;">Node</td>
<td style="text-align: center;">spec.unschedulable</td>
</tr>
<tr>
<td style="text-align: center;">CertificateSigningRequest</td>
<td style="text-align: center;">spec.signeerName</td>
</tr>
</tbody>
</table>
<p><strong>自定义资源字段</strong><br />
所有自定义资源类型都支持<code>metadata.name</code>和<code>metadata.namespace</code>字段<br />
此外，CustomResourceDefinition的<code>spec.versions[*].selectableFields</code>字段声明了自定义资源中那些其他字段可以用于字段选择算符。<br />
<strong>支持的操作符</strong><br />
可以在字段选择算符中使用<code>=</code>、`==``和<code>!=</code>(<code>=</code>和<code>==</code>的意义是相同的)操作符。，例如，下面这个<code>kubectl</code>命令将筛选所有不属于<code>default</code>命名空间的K8S服务：</p>
<pre><code>kubectl get services --all-namespaces --field-selector metadata.namespace!=default</code></pre>
<p>说明：<br />
基于集合的操作符（<code>in</code>、<code>notin</code>、<code>exists</code>）不支持字段选择算符<br />
<strong>链式选择算符</strong><br />
同标签和其他选择算符一样，字段选择算符可以通过使用都好分隔的列表组成一个选择链。下面这个<code>kubectl</code>命令将筛选<code>status.phase</code>字段不等于<code>Running</code>同时<code>spec.restartPolicy</code>字段等于<code>Always</code>的所有Pod：</p>
<pre><code>kubectl get pods --field-selector=status.phase!=Running,spec.restartPolicy=Always</code></pre>
<p><strong>多种资源类型</strong><br />
字段选择算符也可以跨多种资源类型来使用，下面这个``kubectl<code>命令将筛选出所有不在</code>default```命名空间中的StatefulSet和Service</p>
<pre><code>kubectl get statefulsets,services --all-namespaces --field-selector metadata.namespace!=default</code></pre>
<p>交流群：</p>
<style>
.img-margin{
margin-right:666px
}
</style>
<p class='img-margin'>
<img src="https://lyxx.top/content/uploadfile/202505/thum-a4101746670795.jpg" width="200" height="200" >
</p>]]></description>
    <pubDate>Wed, 30 Apr 2025 15:18:26 +0800</pubDate>
    <dc:creator>一个摆子</dc:creator>
    <guid>https://mod.lyxx.top/?post=21</guid>
</item></channel>
</rss>