<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Network Cookbook</title>
    <link>/</link>
    <description>Recent content on Network Cookbook</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Sun, 17 Dec 2023 00:00:00 +0000</lastBuildDate>
    
        <atom:link href="/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>关于本站</title>
      <link>/about/</link>
      <pubDate>Wed, 01 Jan 2020 00:49:32 -0500</pubDate>
      
      <guid>/about/</guid>
      <description>网络和计算机管理菜谱 我们的口号是：不讲道理，只贴配置 为了提高平时配置各种系统的效率，我们在此把日常的经验整理成文档和代码，方便自己方便他人。</description>
    </item>
    
    <item>
      <title>OSPF IPv4 Unnumbered 在以太网环境中的配置</title>
      <link>/2023/12/ospf-unnumbered-ethernet/</link>
      <pubDate>Sun, 17 Dec 2023 00:00:00 +0000</pubDate>
      
      <guid>/2023/12/ospf-unnumbered-ethernet/</guid>
      <description>先说结论 可以在点对点以太网环境中，配置基于 IP Unnumbered OSPF，可以达到节约 IPv4 地址、简化配置、即插即用的目的。 而 IPv6 场景中路由协议会充分利用接口上的 Link-local</description>
    </item>
    
    <item>
      <title>Flashing Dell PowerEdge T30 to Precision T3620</title>
      <link>/2021/05/flashing-dell-poweredge-t30-to-precision-t3620/</link>
      <pubDate>Thu, 27 May 2021 00:00:00 +0000</pubDate>
      
      <guid>/2021/05/flashing-dell-poweredge-t30-to-precision-t3620/</guid>
      <description>Every PowerEdge T30 user hates Dell for taking away functionality with firmware updates. This article provides instructions on flashing PowerEdge T30 to Precision T3620 to get full functionality.
Tools &amp;amp; Materials  Dell Precision T3620 BIOS region dump (ver. 1.2.0) Intel CSME System Tools v11 Intel CSME 11.0 Repository  Firmware Dump In normal mode, you cannot dump the entire firmware. There is a 2-pin jumper plug plugged into the PSWD jumper.</description>
    </item>
    
    <item>
      <title>Aruba Console 定义</title>
      <link>/2021/05/aruba-console/</link>
      <pubDate>Sat, 15 May 2021 00:00:00 +0000</pubDate>
      
      <guid>/2021/05/aruba-console/</guid>
      <description>4 PIN header 如果你拿到的型号是 1xx / 2xx / 3xx 等型号的 Aruba AP，那么的 Console 一组 UART PINOUT 按照 Console 文字方向的线序依次为 #PIN Name 1 GND 2 TX 3 RX 4 3.3V https://community.arubanetworks.com/community-home/digestviewer/viewthread?MID=17312#bm8b7a050f-bbbd-49c2-b31e-8d8949de581f https://support.arubanetworks.com/Documentation/tabid/77/DMXModule/512/Command/Core_Download/Default.aspx?EntryId=25047 microUSB 如果你拿到的型号是 5xx 等</description>
    </item>
    
    <item>
      <title>部署 Windows Deployment Services 用于 PXE 启动</title>
      <link>/2021/04/windows-wds-deployment/</link>
      <pubDate>Mon, 19 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>/2021/04/windows-wds-deployment/</guid>
      <description>今天打算给平板洗系统的时候发现找不到 U 盘，于是快进到家里部署 PXE。于是顺路装了个 Windows Deployment Services。 首先 Windows Deployment Services 现在已经不强制需要 AD 了，本</description>
    </item>
    
    <item>
      <title>Cisco IOS 使用 IP SLA 状态作为静态路由的开关</title>
      <link>/2020/11/cisco-ios-ip-sla-track/</link>
      <pubDate>Sun, 15 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/11/cisco-ios-ip-sla-track/</guid>
      <description>Cisco IOS 和 IOS XE 作为最普及的路由器和交换机操作系统，内建强大的状态跟踪联动能力。 我们配置网络设备时，希望设备能主动发现网络故障，及时作出相应调整，</description>
    </item>
    
    <item>
      <title>Cisco CSR1000V 虚拟路由器载入初始配置</title>
      <link>/2020/11/cisco-csr1000v-init-config/</link>
      <pubDate>Mon, 09 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/11/cisco-csr1000v-init-config/</guid>
      <description>从 QCOW2 镜像启动的 CSR1000V 会自行生成一个并不好用的默认配置，通过光盘镜像提供 iosxe_config.txt 文件，可以将其中配置应用到新创建的 CSR1000V 虚拟路由器中。 步骤 创建 iosxe_config.txt 文件，可使用</description>
    </item>
    
    <item>
      <title>Juniper SRX 端口转发</title>
      <link>/2020/10/juniper-srx-port-forwarding/</link>
      <pubDate>Wed, 07 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/10/juniper-srx-port-forwarding/</guid>
      <description># 如果开启了 persistent-nat，建议避开需要端口转发的端口 set security nat source pool-default-port-range 4096 to 63487 # 设置目标地址和端口号 set security nat destination pool RDP-terminal-server address 192.168.1.2/32 port 3389 # 设置转发规则</description>
    </item>
    
    <item>
      <title>Aruba APBoot 模式下的升级</title>
      <link>/2020/08/aruba-apboot/</link>
      <pubDate>Mon, 24 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/08/aruba-apboot/</guid>
      <description>进入 APBoot 模式 接上 Console APBoot 1.2.8.1 (build 34939) Built: 2012-08-17 at 12:54:18 Model: AP-13x CPU: 88F6560 A0 (DDR3) Clock: CPU 1600MHz, L2 533MHz, SysClock 533MHz, TClock 200MHz DRAM: 256MB POST1: passed Flash: 16 MB Power: 802.3at POE LAN: done PHY: done PEX 0: RC, link up, x1 bus.dev fn venID devID class rev MBAR0 MBAR1 MBAR2 MBAR3 00.00 00 11ab 6560 00005 02 f1000000 00000000 00000000</description>
    </item>
    
    <item>
      <title>思科 Catalyst 系列交换机（IOS）入门配置指南</title>
      <link>/2020/07/catalyst-switch-initial-setup/</link>
      <pubDate>Thu, 30 Jul 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/07/catalyst-switch-initial-setup/</guid>
      <description>重置系统配置 del flash:/vlan.dat write erase reload 如果系统提醒你配置没有保存，选择不要保存配置。 初始化设定 系统服务 no service config service internal service unsupported-transceiver no ip http-server no ip http secure-server no spanning-tree vlan 1-4094 no errdisable detect cause gbic-invalid vtp mode off lldp</description>
    </item>
    
    <item>
      <title>VMware ESXi 笔记</title>
      <link>/2020/06/vmware-esxi/</link>
      <pubDate>Sat, 27 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/06/vmware-esxi/</guid>
      <description>使用代理 默认情况下仅允许 3128 端口进行外部访问 如果需要使用非 3128 端口 HTTP 代理更新需要禁用防火墙 # disable firewall esxcli network firewall unload # enable firewall esxcli network firewall load 补丁包 https://my.vmware.com/group/vmware/patch # update from depot esxcli software vib update -d</description>
    </item>
    
    <item>
      <title>Hyper-V 建立 VLAN Trunk 接口</title>
      <link>/2020/06/hyperv-vlan-trunking/</link>
      <pubDate>Thu, 11 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/06/hyperv-vlan-trunking/</guid>
      <description>众所周知，如果你在 Hyper-V GUI 里面去掉 VLAN tagging 选项，那么你会获得一个 untagged access 接口，也就是说所有带着 VLAN tag 的帧就进不来了。但是其实 Hyper-V 是支持把一个接口作为真正的 VLAN</description>
    </item>
    
    <item>
      <title>Hyper-V 直通 PCIe 设备（如网卡）到虚拟机</title>
      <link>/2020/06/hyperv-dda/</link>
      <pubDate>Thu, 04 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/06/hyperv-dda/</guid>
      <description>编者按：SR-IOV 和 PCIe 设备直通属于非常新的技术，且大部分民用设备有非常严重的兼容性问题。在使用前，请务必和你的平台与设备厂商确认兼容性。使</description>
    </item>
    
    <item>
      <title>JunOS 开票</title>
      <link>/2020/05/junos-open-ticket/</link>
      <pubDate>Sun, 31 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/junos-open-ticket/</guid>
      <description>JunOS 开票流程如下 进入系统以后，使用 # 获取 &amp;quot;RSI&amp;quot; 文件 request support information | save /var/tmp/rsi.log # 打包日志 file archive compress source /var/log/* destination /var/tmp/rsi-log.tgz 将 rsi.log 和 rsi-log.tgz 提交给 JNCIE 或 代理商 参考 https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/sftp-server-configuration.html https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-support-information.html</description>
    </item>
    
    <item>
      <title>Juniper SRX 家用路由器配置</title>
      <link>/2020/05/junos-home-setup/</link>
      <pubDate>Fri, 29 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/junos-home-setup/</guid>
      <description>恢复出厂设置 如果登录不了，可能需要 重置 root 密码 或者从 loader 安装系统以格式化硬盘。 进入系统以后，使用 request system zeroize 恢复出厂设置。 设置 root 密码 设备启动以后，使用</description>
    </item>
    
    <item>
      <title>JunOS 更新</title>
      <link>/2020/05/junos-upgrading/</link>
      <pubDate>Fri, 29 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/junos-upgrading/</guid>
      <description>准备工作 准备一个容量小于等于 4GB 的 U 盘，建立 MBR 分区表（一定要有），创建一个 FAT32 分区并格式化。把系统镜像直接装入分区根目录。如果找不到这样的 U 盘的</description>
    </item>
    
    <item>
      <title>网络设备 SSH 使用公钥进行用户认证的配置</title>
      <link>/2020/05/ssh-public-key-authentication/</link>
      <pubDate>Sat, 23 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/ssh-public-key-authentication/</guid>
      <description>Cisco IOS 使用以下命令之一，列出 SSH 公钥对的哈希 ssh-add -l -E md5 ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub 再将上述命令的结果使用管道输出到下列命令 sed -e &#39;s/.*MD5:\([0-9a-f:]*\) \(.*\)(.*)/key-hash ssh-rsa \1 \2/&#39; -e &#39;s/://g 上述命令提取出每一条记录</description>
    </item>
    
    <item>
      <title>清理网络设备命令历史</title>
      <link>/2020/05/clear-command-history/</link>
      <pubDate>Fri, 22 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/clear-command-history/</guid>
      <description>RouterOS 通过 SSH 或 Webfig 的 Terminal，执行 /console clear-history Cisco IOS 修改当前会话的命令历史数量 Router# terminal history size &amp;lt;0-256&amp;gt; 禁用当前会话的命令历史记录和回放 Router# terminal no history 修改特定 Terminal line 的命令历</description>
    </item>
    
    <item>
      <title>交换机上的以太网链路聚合配置</title>
      <link>/2020/05/switch-link-aggregation-control-protocol/</link>
      <pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/switch-link-aggregation-control-protocol/</guid>
      <description>本文只介绍 LACP 的聚合方式，如无特殊要求，不应当使用静态聚合。因为静态聚合配置下，接口是否在聚合组中被选中依赖的是接口的 line protocol 状态，在连接了一些不</description>
    </item>
    
    <item>
      <title>JunOS Archive - GitHub Bridge</title>
      <link>/2020/05/junos-archive/</link>
      <pubDate>Sat, 16 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/junos-archive/</guid>
      <description>JunOS Archive - GitHub Bridge 众所周知 JunOS 是一个有状态的系统，意外掉电会直接炸掉 primary 分区 掉进 backup 分区里面启动（老配置），但是你又回不去 所以我就做了一个 https://github.com/NiceLabs/juniper-archive-agent 利用 Backing Up Configurations to an</description>
    </item>
    
    <item>
      <title>Cisco IOS XE NAT 基础</title>
      <link>/2020/05/cisco-ios-xe-nat-basics/</link>
      <pubDate>Wed, 06 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/05/cisco-ios-xe-nat-basics/</guid>
      <description>开始之前，建议先把这些打上： ip nat translation max-entries 2147483647 no ip nat service sip tcp port 5060 no ip nat service sip udp port 5060 理论知识 IOS XE 对 NAT 是按 flow 处理的，即如果进来的包源地址执行了某个变换操作，</description>
    </item>
    
    <item>
      <title>为 VyOS 配置 Cymru BGP Fullbogon 会话</title>
      <link>/2020/02/vyos-cymru-fullbogon/</link>
      <pubDate>Tue, 25 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/02/vyos-cymru-fullbogon/</guid>
      <description>Cymru 通过 BGP 分发动态的 Bogon IP 列表。其官网提供了许多示例配置。 本文基本上只是把示例配置翻译到 VyOS 语法。 set policy community-list cymru rule 1 regex 65332:888 set policy community-list cymru rule 1 action permit set policy prefix-list deny-all rule 10 action &#39;deny&#39;</description>
    </item>
    
    <item>
      <title>多 ISP 环境下的源地址 NAT/PAT 配置</title>
      <link>/2020/02/multi-isp-source-nat/</link>
      <pubDate>Mon, 10 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/02/multi-isp-source-nat/</guid>
      <description>经常遇到多个一个路由器上有多个 ISP 的互联网访问，需要使得从不同接口流出的流量源地址进行地址转换（NAT）。 然而如果使用基于 access-list 的 ip nat inside source 选项，则</description>
    </item>
    
    <item>
      <title>盛科交换机将第一个 40Gbps 接口分成四个（板载） 10Gbps 接口</title>
      <link>/2020/01/centec-split-1st-40gig-iface/</link>
      <pubDate>Sun, 19 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/01/centec-split-1st-40gig-iface/</guid>
      <description>适用于盛科 E580-20Q4Z 交换机 此交换机默认配置情况下只有 20 个 40Gbps QSFP+ 接口，中间夹着 4 个 100Gbps 接口可降速为 40Gbps 接口来使用。 在这些接口之前另有 4 个一起的 SFP+ 接口，内部连</description>
    </item>
    
    <item>
      <title>强制 macOS 上的 Microsoft Office 套件使用指定语言（与系统语言不同）</title>
      <link>/2020/01/override-msoffice-lang-macos/</link>
      <pubDate>Fri, 17 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>/2020/01/override-msoffice-lang-macos/</guid>
      <description>命令行/终端里输入这样几条即可 defaults write com.microsoft.Excel AppleLanguages &#39;(&amp;quot;zh-CN&amp;quot;)&#39; defaults write com.microsoft.Word AppleLanguages &#39;(&amp;quot;zh-CN&amp;quot;)&#39; defaults write com.microsoft.Powerpoint AppleLanguages &#39;(&amp;quot;zh-CN&amp;quot;)&#39;</description>
    </item>
    
    <item>
      <title>在 Windows 和 Linux 系统上禁用 LLMNR 以及 NetBIOS</title>
      <link>/2019/12/disable-llmnr-netbios/</link>
      <pubDate>Mon, 30 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/disable-llmnr-netbios/</guid>
      <description>什么是 LLMNR LLMNR （Link-Local Multicast Name Resolution、链路多播本地名称解析、mDNS）是一个基于 DNS 格式的名称解析协议。支持 LLMNR 的主机可以在</description>
    </item>
    
    <item>
      <title>在思科 IOS 设备上创建命令脚本</title>
      <link>/2019/12/create-script-on-ios/</link>
      <pubDate>Mon, 30 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/create-script-on-ios/</guid>
      <description>由于经典 IOS 没有提供类似 JunOS 的 commit 机制，任何配置指令都会立即生效，这使得调整接口 VRF、设置路由协议 passive-interface default 等配置可能产生破坏性影响，例如中断当前的终</description>
    </item>
    
    <item>
      <title>PPPoE 的 IPv6 前缀下发（Prefix-delegation）配置</title>
      <link>/2019/12/pppoe-ipv6-pd/</link>
      <pubDate>Mon, 23 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/pppoe-ipv6-pd/</guid>
      <description>在以太网环境下，DHCPv6-PD 比较容易配置和理解，而在 PPPoE 环境中，需要在 Dialer 接口配置中添加如下指令 ipv6 enable ipv6 dhcp client pd hint ::/56 ipv6 dhcp client pd &amp;lt;GENERAL_PREFIX_NAME&amp;gt; 其中 GENERAL_PREFIX_NAME 是一个自定</description>
    </item>
    
    <item>
      <title>AAA 新模型配置</title>
      <link>/2019/12/aaa-new-model/</link>
      <pubDate>Sun, 22 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/aaa-new-model/</guid>
      <description>Cisco IOS/IOS XE 在启用 aaa new-model 之前，务必小心，防止把远程操作的自己锁在外面。参考 avoid-lockout 一文进行操作。 在启用之前，还需要配置一个或多个本地用户，即使要使用 TACACS+ 或是</description>
    </item>
    
    <item>
      <title>思科设备的主机名和域名设置</title>
      <link>/2019/12/hostname-domainname/</link>
      <pubDate>Sun, 22 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/hostname-domainname/</guid>
      <description>Cisco IOS，IOS XE hostname &amp;lt;主机名&amp;gt; ip domain-name &amp;lt;域名&amp;gt; 注意：在 IOS 设备里，SSH 服务器依赖 RSA 密钥对的生成，而 RSA 密钥对的生成，依赖本</description>
    </item>
    
    <item>
      <title>本地用户的配置</title>
      <link>/2019/12/local-user-management/</link>
      <pubDate>Sun, 22 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/local-user-management/</guid>
      <description>适用于 Cisco IOS/IOS XE username &amp;lt;用户名&amp;gt; privilege 15 algorithm-type scrypt secret &amp;lt;用户密码&amp;gt; 其中 privilege 后面的数字 15 代表权限级别，15 对应 Cisco IOS 中的最高管理权限。 scrypt 是加密</description>
    </item>
    
    <item>
      <title>远程配置时防止把自己锁在外面</title>
      <link>/2019/12/avoid-lockout/</link>
      <pubDate>Sun, 22 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>/2019/12/avoid-lockout/</guid>
      <description>适用于 Cisco IOS 在使用 in-band 远程访问思科设备时，很有可能由于规划不当，导致当前的管理会话被安全策略阻挡，而设备本身距离管理站又很远，不方便本地修复。如</description>
    </item>
    
  </channel>
</rss>
