# 路由交换技术

# 思科路由器对指定IP限流

show process cpu sorted | ex 0.00  
  
发现CPU负载接近100%  
  
  
sh ip nat statistics  
show ip cache flow 查看ip是否有异常流量  
发现192.168.0.21有大量异常流量  
全局限制连接数  
ip nat translation max-entri all-host 1000 限制单一IP连接数为1000  
NAT 会话长时间不释放会导致 NAT 表膨胀，增加 CPU 负担。降低超时时间可以缓解：  
ip nat translation timeout 120  
ip nat translation tcp-timeout 300  
ip nat translation udp-timeout 60  
ip nat translation finrst-timeout 30  
**120 秒**：全局 NAT 连接超时。  
**300 秒**：TCP 连接超时（默认 86400 秒）。  
**60 秒**：UDP 连接超时。  
**30 秒**：TCP FIN/RST 连接超时，加速 NAT 连接回收。  
  
禁用0.21上网后，cpu负载降下来，然后取消禁用  
  
禁用上网命令，已取消  
access-list 121 deny ip host 192.168.0.21 any  
access-list 121 permit ip any any  
interface GigabitEthernet0/1  
ip access-group 121 in  
  
对0.21进行QOS限流，限速1024kbps  
  
  
  
access-list 21 permit ip host 192.168.0.21 any  
  
  
class-map match-any LIMIT\_021  
match access-group 21  
  
policy-map POLICE\_021  
class LIMIT\_021  
 police 1024000 conform-action transmit exceed-action drop  
  
interface GigabitEthernet0/1  
service-policy input POLICE\_021

# 思科 C3945 路由器高可用方案

思科 C3945 路由器高可用方案  
  
思科 C3945 路由器支持 HSRP（Hot Standby Router Protocol），可用于配置主备高可用。你可以使用 HSRP 或 VRRP 方案，其中 HSRP 是思科私有协议，而 VRRP 是开源标准协议。  
方案 1：HSRP（推荐）  
  
HSRP（热备份路由协议） 允许两个或多个路由器共享 虚拟 IP，当主路由器（Active）故障时，备用路由器（Standby）自动接管。  
网络架构  
  
 主路由器（Active）：C3945，IP 192.168.11.251  
 备份路由器（Standby）：C3945，IP 192.168.11.252  
 虚拟网关 IP（给客户端使用）：192.168.11.254  
 优先级：主路由器 120（默认 100），副路由器默认 100  
  
HSRP 配置（主路由器 192.168.11.251）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.251 255.255.255.0  
standby 1 ip 192.168.11.254 # 设置虚拟 IP  
standby 1 priority 120 # 设置高优先级  
standby 1 preempt # 允许故障恢复后重新成为主设备  
standby 1 authentication md5 key-string cisco # HSRP 认证  
  
HSRP 配置（备份路由器 192.168.11.252）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.252 255.255.255.0  
standby 1 ip 192.168.11.254  
standby 1 priority 100 # 低于主路由器  
standby 1 preempt  
standby 1 authentication md5 key-string cisco  
  
测试与验证  
  
 查看 HSRP 状态  
  
show standby brief  
  
 主路由器（Active）应显示 "Active"  
 备份路由器（Standby）应显示 "Standby"  
  
模拟主路由器故障  
  
 关闭主路由器的接口：  
  
 interface GigabitEthernet0/1  
 shutdown  
  
 在备份路由器上运行 show standby brief，确认它变为 "Active"。  
  
 恢复主路由器  
 如果 preempt 启用，主路由器恢复后会重新成为主设备。  
  
方案 2：VRRP（开源标准协议，可跨厂商）  
  
VRRP（Virtual Router Redundancy Protocol） 功能类似 HSRP，不同点：  
  
 HSRP：思科私有协议，只能在 Cisco 设备 上使用。  
 VRRP：开源协议，可用于 Cisco、华为、H3C 等设备。  
  
VRRP 配置（主路由器 192.168.11.251）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.251 255.255.255.0  
vrrp 1 ip 192.168.11.254 # 设置虚拟 IP  
vrrp 1 priority 120 # 设置高优先级  
vrrp 1 preempt # 允许故障恢复后重新成为主设备  
  
VRRP 配置（备份路由器 192.168.11.252）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.252 255.255.255.0  
vrrp 1 ip 192.168.11.254  
vrrp 1 priority 100 # 低于主路由器  
vrrp 1 preempt  
  
方案 3：GLBP（负载均衡 + 高可用）  
  
GLBP（Gateway Load Balancing Protocol） 允许多个路由器共同承担负载，而不是主备切换，适用于负载均衡需求。  
GLBP 配置（主路由器 192.168.11.251）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.251 255.255.255.0  
glbp 1 ip 192.168.11.254 # 设置虚拟 IP  
glbp 1 priority 120 # 设置优先级  
glbp 1 preempt  
glbp 1 load-balancing round-robin # 负载均衡策略  
  
GLBP 配置（备份路由器 192.168.11.252）  
  
interface GigabitEthernet0/1  
ip address 192.168.11.252 255.255.255.0  
glbp 1 ip 192.168.11.254  
glbp 1 priority 100 # 低于主路由器  
glbp 1 preempt  
  
最佳方案选择  
方案 适用场景 主要优点 主要缺点  
HSRP 思科环境，简单高可用 配置简单，主备切换快 仅适用于思科  
VRRP 跨厂商设备，兼容性强 适用多厂商设备 仅支持主备  
GLBP 需要负载均衡 + 高可用 支持多台路由器负载均衡 思科专有，配置复杂  
  
建议  
  
 如果 只需要高可用，推荐使用 HSRP（思科专有）或 VRRP（跨厂商）。  
 如果 需要负载均衡 + 高可用，使用 GLBP（仅思科支持）。  
  
总结  
  
你可以使用 HSRP（推荐）、VRRP 或 GLBP 在两台 Cisco 3945 路由器上实现高可用。  
  
 HSRP/VRRP 适用于 主备切换  
 GLBP 适用于 负载均衡 + 高可用  
  
如果你的网络中 可能引入非 Cisco 设备，使用 VRRP 以保证兼容性。

# 在 Cisco 3560E 交换机上，使用 debug 命令查看实时流量的常用方法

在 Cisco 3560E 交换机上，使用 debug 命令查看实时流量的常用方法如下。不过需要注意，debug 命令可能会对交换机的性能造成较大的影响，尤其是在高负载的环境中。建议在测试环境中或非生产时段使用，并且只启用需要的选项。  
  
以下是一些常用的调试命令：  
1\. 查看接口的流量  
  
 直接查看接口状态和统计信息，结合 debug 进行详细分析：  
  
show interfaces {interface\_id}  
  
示例：  
  
show interfaces GigabitEthernet0/1  
  
启用调试特定接口的数据流：  
  
debug interface {interface\_id}  
  
示例：  
  
 debug interface GigabitEthernet0/1  
  
2\. 调试 IP 数据包  
  
 调试与 IP 数据包相关的流量：  
  
debug ip packet  
  
过滤特定的 ACL（访问控制列表）匹配的流量：  
  
 debug ip packet detail  
  
3\. 调试交换机的 MAC 地址表  
  
 查看实时的 MAC 地址学习和老化信息：  
  
 debug ethernet mac  
  
4\. 调试 VLAN 流量  
  
 查看 VLAN 流量：  
  
 debug vlan packet  
  
5\. 调试生成树协议（STP）相关流量  
  
 如果需要查看生成树协议的报文：  
  
 debug spanning-tree events  
  
6\. 调试与 ACL 匹配的流量  
  
 对 ACL（访问控制列表）匹配的流量进行调试：  
  
 debug ip access-list  
  
7\. 查看当前所有启用的调试选项  
  
show debugging  
  
8\. 关闭调试命令  
  
在调试后，记得关闭所有调试，以免影响交换机性能：  
  
undebug all  
  
或者：  
  
no debug all  
  
注意事项：  
  
 在生产环境中，尽量避免使用 debug 命令来调试高流量接口，因为这可能导致 CPU 占用率过高，进而影响设备性能。  
 配合日志系统（如 logging buffer 或远程 syslog）来记录调试信息，避免因输出过多导致控制台被阻塞。

# 新华三H3C AC Ldap认证配置

\# 创建 LDAP 服务器 ldap，并进入 LDAP 服务器视图。  
\[H3C\] ldap server ldap //创建 ldap 服务器  
\# 配置具有管理员权限的用户 DN。  
\[H3C-ldap-server-ldap\] login-dn cn=admin,cn=users,dc=shuncom,dc=local //配置用户 DN  
\# 配置查询用户的起始目录。  
\[H3C-ldap-server-ldap\] search-base-dn dc=shuncom,dc=local //配置查询用户的目录  
\# 配置 LDAP 认证服务器的 IP 地址。  
\[H3C-ldap-server-ldap\] ip 192.168.0.5 //配置 ldap 服务器的 ip  
\# 配置具有管理员权限的用户密码。  
\[H3C-ldap-server-ldap\] login-password simple XXXXXXXXXX //配置具有管理员权限的用户密码  
\# 创建 LDAP 方案 ldap，并进入 LDAP 方案视图。  
\[H3C\] ldap scheme ldap //创建 ldap 方案  
\# 配置 LDAP 认证服务器。  
\[H3C-ldap-ldap\] authentication-server ldap //调用 ladp 服务  
  
\# 创建 ISP 域 ldap，并进入 ISP 域视图。  
\[H3C\] domain ldap //创建域  
\# 为 Portal 用户配置 AAA 认证方法为 LDAP 认证、不授权、不计费。  
\[H3C-isp-ldap\]authentication portal ldap-scheme ldap //配置认证调用 ldap 方案  
\[H3C-isp-ldap\] authorization portal none //配置授权为无  
\[H3C-isp-ldap\] accounting portal none //配置计费为无  
\# 指定 ISP 域 ldap 下的用户闲置切断时间为 15 分钟，闲置切断时间内产生的流量为 1024 字节。  
\[H3C-isp-ldap\] authorization-attribute idle-cut 15 1024 //设置闲置流量切断时间  
  
\# 配置 Portal Web 服务器的 URL 为 [http://192.168.10.21](http://192.168.10.21/) /portal。  
\[H3C\] portal web-server newpt //创建 portal web 服务  
\[H3C-portal-websvr-newpt\] url [http://192.168.10.21/portal](http://192.168.10.21/portal) //配置 url 地址  
\# 创建本地 Portal Web 服务器，进入本地 Portal Web 服务器视图，并指定使用 HTTP 协议和客户  
端交互认证信息。  
\[H3C\] portal local-web-server http //创建本地 portal wen 服务，指定 http 协议  
\#配置本地 Portal Web 服务器提供认证页面文件为 xxx.zip（设备的存储介质的根目录下必须已存在  
该认证页面文件，否则功能不生效）。  
提示：设备自带压缩包 defaultfile.zip，也可以使用该压缩包。  
\[H3C–portal-local-websvr-http\] default-logon-page defaultfile.zip //调用认证的 web 页面文件  
\[H3C–portal-local-websvr-http\] quit  
  
\[H3C\] wlan service-template shuncom-wk-ac //创建无线服务  
\[H3C-wlan-st-shuncom-wk-ac\] ssid service //配置 wifi 名字  
\[H3C-wlan-st-shuncom-wk-ac\] vlan 1 //绑定业务 vlan  
\# 使能直接方式的 Portal 认证。  
\[H3C-wlan-st-shuncom-wk-ac\] portal enable method direct //使用直接方式的 portal 认证  
\# 配置接入的 Portal 用户使用认证域为 ldap。  
\[H3C-wlan-st-shuncom-wk-ac\] portal domain ldap //调用 portal 认证域  
\# 在服务模板上引用名称为 newpt 的 Portal Web 服务器作为用户认证时使用的 Web 服务器。  
\[H3C-wlan-st-shuncom-wk-ac\] portal apply web-server newpt //调用 portal web 服务器  
\# 使能无线服务模板。  
\[H3C-wlan-st-shuncom-wk-ac\] service-template enable //使能服务模板  
  
\#查看AP型号，序列号  
\[H3C\] dis wlan ap all  
AP name APID State Model Serial ID  
a069-d95e-5620 1 R/M WAP922 219801A2VSXXXXXXCX  
  
\# 配置 AP  
\[H3C\] wlan ap a069-d95e-5620 model WAP922 //进入 AP 视图  
\[H3C-wlan-ap-a069-d95e-5620\] serial-id 219801A2VSXXXXXXCX //绑定 AP 序列号  
\[H3C-wlan-ap-a069-d95e-5620\] radio 2 //进入射频配置视图  
\[H3C-wlan-ap-officeap-radio-2\] service-template shuncom-wk-ac //绑定服务模板  
\[H3C-wlan-ap-officeap-radio-2\] radio enable //使能射频接口

# OpenWrt/ImmortalWrt插件对照表中文说明，全部218款插件详细介绍及分类说明

这个插件列表，我直呼好家伙！这哪是路由器系统，为了让大家不迷路，我直接按功能分类，把每个插件都安排得明明白白。文章略长，建议搭配Ctrl+F食用更佳～

[![image.png](https://bost.lesrec.cn/uploads/images/gallery/2025-05/scaled-1680-/iDSYYdXFKETmtKEp-vP3image.png)](https://bost.lesrec.cn/uploads/images/gallery/2025-05/iDSYYdXFKETmtKEp-vP3image.png)

一、网络管控全家桶   
1、 上网管控   
Luci-app-accesscontrol：断网小能手，精确到分钟控制设备上网时间   
Luci-app-appfilter：按协议/端口精准封杀，比如禁用所有P2P下载   
Luci-app-timecontrol：定时断网神器，到点自动掐网线

2、 DNS特种部队   
Luci-app-smartdns：DNS智能分流，油管走代理、B站直连   
Luci-adblock：全网广告狙击手，连APP开屏广告都干碎   
Luci-dnscrypt-proxy：防DNS污染神器，告别"网页不存在"

3、 认证客户端大全   
Luci-app-mentohust：锐捷校园网克星   
Luci-airwhu：武大校园网专属   
Luci-scutclient：华南理工定制版   
Luci-cd8021x：企业级802.1X认证   
二、安全防护  
1、 防火墙全家桶   
Luci-app-banip：动态拉黑恶意IP   
Luci-app-bcp38：防IP地址伪造攻击   
Luci-app-fwknopd：单包授权技术，黑客连端口都找不到

2、 隐私保护套件   
Luci-app-https-dns-proxy：强制DNS加密传输   
Luci-app-polipo/privoxy：匿名上网二件套   
Luci-app-“师夷长技以制夷”系列：科学上网全家桶（含Trojan/Xray/Hysteria等协议）  
三、下载/存储  
1、 下载工具大全   
Luci-app-aria2：磁力/BT/直链通吃   
Luci-transmission：低功耗PT保种神器   
Luci-amule：电驴遗产保护工具

2、 网盘/同步专家   
Luci-alist：聚合挂载阿里云盘/OneDrive   
Luci-rclone：自动同步Google Drive   
Luci-verysync：自建私有版"坚果云"

3、 存储管理   
Luci-diskman：支持Btrfs/RAID磁盘阵列   
Luci-cifs：把NAS挂载成本地硬盘   
Luci-ksmbd：内核级Samba加速   
四、影音娱乐中心   
1、 家庭媒体库   
Luci-minidlna：打造私人Netflix   
Luci-mjpg-streamer：旧手机变监控摄像头   
Luci-udpxy：IPTV直播转网络流

2、 音乐特权   
Luci-unblockneteasemusic：解锁网易云灰色歌曲   
Luci-airplay2：老旧音箱秒变AirPlay设备   
五、virtual/穿透全家福   
1、 内网穿透   
Luci-zerotier：自组虚拟局域网   
Luci-frpc/frps：内网穿透黄金搭档   
Luci-nps：比花生壳更自由的穿透工具

2、 virtual协议大全   
Luci-openvirtual系列：传统virtual方案   
Luci-wireguard：新时代速度王者   
Luci-ipsec系列：企业级加密隧道   
六、极客  
1、 网络黑科技   
Luci-mwan3：多线多拨叠带宽   
Luci-turboacc：开启BBR加速+硬件NAT   
Luci-nft-qos：基于nftables的精准流控

2、 开发者工具箱   
Luci-docker/dockerman：路由器跑容器服务   
Luci-ttyd：网页SSH终端   
Luci-commands：网页版执行Linux命令

3、 硬件改造   
Luci-oled：给路由器加装状态屏   
Luci-cpufreq：超频/降频调教CPU   
Luci-hd-idle：机械硬盘自动休眠   
七、冷门但好用  
Luci-vlmcsd：自建KMS激活服务器   
Luci-watchcat：断网自动重启救星   
Luci-ser2net：远程管理串口设备   
Luci-dump1090：航空ADS-B信号接收（需SDR设备）   
Luci-ps3netsrv：PS3游戏网络共享   
Luci-ramfree：内存清理小工具   
八、校园网/企业网专属   
Luci-minieap：EAP认证通用方案   
Luci-bitsrunlogin-go："比特奔跑"认证   
Luci-sysuh3c：中山大学定制客户端   
Luci-njitclient：南京工程学院专版   
九、网络诊断/监控   
Luci-netdata：实时性能监控仪表盘   
Luci-nlbwmon：按设备统计流量   
Luci-cshark：网页版tcpdump抓包   
Luci-diag-core：Ping/Traceroute一键检测   
十、你可能用不到的但很有趣   
Luci-bmx6/bmx7：自组无线Mesh网络   
Luci-cjdns：加密IPv6暗网   
Luci-bird系列：BGP路由实验工具   
Luci-yggdrasil：去中心化IPv6网络   
以上为博主精选分类的部分插件及介绍，详细的全部插件在下面  
Openwrt ImmortalWrt 插件应用说明介绍

Luci-app-accesscontrol  
网络访问控制，用于限制设备的上网时间和访问权限。

Luci-app-acl  
网络访问控制列表（ACL），用于配置防火墙规则。

Luci-app-acme  
自动申请和管理 Let's Encrypt SSL 证书。

Luci-app-adblock  
基于 DNS 的广告过滤工具。

Luci-app-adbyby-plus  
基于规则的广告屏蔽工具（支持 Adbyby+ 引擎）。

Luci-app-advanced-reboot  
高级重启功能（支持安全模式、强制重启等）。

Luci-app-advancedsetting  
系统高级设置（部分固件自定义功能）。

Luci-app-ahcp  
Ad-Hoc 网络配置协议（用于自组织网络）。

Luci-app-airplay2  
支持 AirPlay 2 协议（音频流媒体投送）。

Luci-app-airwhu  
武汉大学校园网认证客户端。

Luci-app-aliddns  
阿里云 DDNS 动态域名解析服务。

Luci-app-alist  
多网盘聚合管理工具（支持挂载阿里云盘、OneDrive 等）。

Luci-app-amule  
eMule 电驴下载工具。

Luci-app-appfilter  
应用程序流量过滤（基于协议或端口）。

Luci-app-argon-config  
Argon 主题的个性化配置界面。

Luci-app-aria2  
Aria2 多协议下载工具（支持 HTTP/BT/磁力链接）。

Luci-app-arpbind  
IP-MAC 地址绑定（防止 ARP 欺骗）。

Luci-app-attendedsysupgrade  
自动检测并升级固件的工具。

Luci-app-autoreboot  
定时自动重启路由器。

Luci-app-babeld  
Babel 路由协议（用于自组织网络）。

Luci-app-baidupcs-web  
百度网盘 Web 客户端。

Luci-app-banip  
IP 黑名单管理（动态拦截恶意 IP）。

Luci-app-bcp38  
防止 IP 源地址欺骗（RFC 2827 过滤）。

Luci-app-beardropper  
基于日志分析的动态防火墙规则生成（拦截恶意 IP）。

Luci-app-bird1-ipv4  
BIRD 路由守护进程（支持 IPv4）。

Luci-app-bird1-ipv6  
BIRD 路由守护进程（支持 IPv6）。

Luci-app-bitsrunlogin-go  
校园网认证客户端（如“比特奔跑”）。

Luci-app-bmx6  
BMX6 无线网格网络协议。

Luci-app-bmx7  
BMX7 无线网格网络协议。

Luci-app-brook-server  
Brook 代理服务器配置。

Luci-app-cd8021x  
802.1X 认证客户端（如企业网络认证）。

Luci-app-cifs  
CIFS/SMB 网络共享挂载工具。

Luci-app-cifs-mount  
CIFS/SMB 网络共享挂载工具（增强版）。

Luci-app-cjdns  
加密的 IPv6 网状网络协议。

Luci-app-clamav  
病毒扫描工具（ClamAV 集成）。

Luci-app-commands  
自定义命令执行工具（通过 Web 界面）。

Luci-app-cpufreq  
CPU 频率调节（节能/性能模式）。

Luci-app-cpulimit  
CPU 使用率限制工具。

Luci-app-cshark  
网络流量分析工具（类似 tcpdump）。

Luci-app-dawn  
分布式无线网络感知工具（用于 Mesh 网络）。

Luci-app-dcwapd  
未知功能（可能为特定设备驱动）。

Luci-app-ddns  
动态 DNS 服务配置（支持多种提供商）。

Luci-app-ddns-go  
动态 DNS 服务配置（Go 语言实现）。

Luci-app-diag-core  
系统诊断工具（网络测试、日志分析）。

Luci-app-diskman  
磁盘管理工具（支持分区、Btrfs/RAID）。

Include btrfs-progs  
Btrfs 文件系统工具。

Include lsblk  
磁盘信息查看工具。

Include mdadm  
RAID 管理工具。

Luci-app-dnscrypt-proxy  
DNS 加密代理（防劫持）。

Luci-app-dnsforwarder  
DNS 转发服务（支持规则过滤）。

Luci-app-docker  
Docker 容器管理界面。

Luci-app-dockerman  
Docker 容器管理界面（增强版）。

Luci-app-dump1090  
航空 ADS-B 信号接收（需硬件支持）。

Luci-app-dynapoint  
动态 virtual\*\* 端点管理。

Luci-app-eoip  
Ethernet over IP 隧道协议。

Luci-app-eqos  
基于 IP 的带宽限速（QoS）。

Luci-app-fileassistant  
文件管理工具（上传/下载/共享文件）。

Luci-app-filebrowser  
网页版文件管理器。

Luci-app-filetransfer  
文件传输工具（通过 Web 界面）。

Luci-app-firewall  
防火墙配置（端口转发、流量规则）。

Luci-app-frpc  
Frp 内网穿透客户端。

Luci-app-frps  
Frp 内网穿透服务端。

Luci-app-fwknopd  
单包授权防火墙（SPA 安全协议）。

Luci-app-gost  
GO 语言实现的代理隧道工具。

Luci-app-gowebdav  
WebDAV 文件共享服务。

Luci-app-guest-wifi  
访客 Wi-Fi 网络隔离与管理。

Luci-app-haproxy-tcp  
HAProxy 负载均衡（TCP 层配置）。

Luci-app-hd-idle  
硬盘休眠控制（节能管理）。

Luci-app-hnet  
家庭网络自动化配置（HomeNet 协议）。

Luci-app-https-dns-proxy  
HTTPS DNS 代理（如 Cloudflare DNS-over-HTTPS）。

Luci-app-ipsec-virtual\*\*d  
IPSec virtual\*\* 客户端配置。

Luci-app-ipsec-virtual\*\*server-manyusers  
IPSec virtual\*\* 服务端（支持多用户）。

Luci-app-iptvhelper  
IPTV 组播转单播工具。

Luci-app-kcptun  
KCP 加速隧道协议（降低延迟）。

Luci-app-kodexplorer  
可道云（在线文件管理/协同工具）。

Luci-app-ksmbd  
内核级 SMB 文件共享服务。

Luci-app-ledtrig-rssi  
LED 指示灯触发规则（基于信号强度）。

Luci-app-ledtrig-switch  
LED 指示灯触发规则（基于交换机状态）。

Luci-app-ledtrig-usbport  
LED 指示灯触发规则（基于 USB 状态）。

Luci-app-lxc  
LXC 容器管理工具。

Luci-app-mentohust  
锐捷校园网认证客户端。

Luci-app-microsocks  
轻量级 SOCKS5 代理服务器。

Luci-app-minidlna  
DLNA 媒体服务器（流媒体共享）。

Luci-app-minieap  
校园网 EAP 认证客户端。

Luci-app-mjpg-streamer  
摄像头视频流服务器（支持 MJPG 格式）。

Luci-app-msd-lite  
轻量级 IPTV 组播代理。

Luci-app-mtk  
MTK 芯片路由器的无线驱动配置。  
Luci-app-mtwifi-cfg  
MTK 芯片路由器的无线驱动配置（增强版）。  
Luci-app-music-remote-center  
音乐播放远程控制（可能依赖 UPnP/DLNA）。  
Luci-app-mwan3  
多线多拨与负载均衡。  
Luci-app-mwan3helper  
多线多拨助手（增强版）。  
Luci-app-mwol  
局域网唤醒（Wake-on-LAN）工具。  
Luci-app-n2n  
N2N 点对点 virtual\*\* 工具。  
Luci-app-naiveproxy  
NaiveProxy 代理协议（抗审查）。  
Luci-app-natmap  
NAT 类型检测与端口映射。  
Luci-app-netdata  
实时性能监控仪表盘。  
Luci-app-nextdns  
NextDNS 隐私 DNS 服务。  
Luci-app-nfs  
NFS 网络文件系统共享。  
Luci-app-nft-qos  
基于 nftables 的流量控制（QoS）。  
Luci-app-nginx-pingos  
Nginx 流媒体服务器（特定分支）。  
Luci-app-ngrokc  
Ngrok 内网穿透客户端。  
Luci-app-njitclient  
南京工程学院校园网认证客户端。  
Luci-app-nlbwmon  
网络带宽监控（按设备统计流量）。  
Luci-app-nps  
NPS 内网穿透服务器。  
Luci-app-ntpc  
NTP 时间同步客户端。  
Luci-app-nut  
UPS 不间断电源管理。  
Luci-app-ocserv  
Cisco AnyConnect 兼容的 virtual\*\* 服务器。  
Luci-app-oled  
OLED 屏幕显示控制（需硬件支持）。  
Luci-app-olsr  
OLSR 网格网络协议。  
Luci-app-olsr-services  
OLSR 网格网络服务配置。  
Luci-app-olsr-viz  
OLSR 网格网络可视化工具。  
Luci-app-omcproxy  
组播代理工具（用于 IPTV）。  
Luci-app-open克拉斯  
克拉斯 代理工具的图形化配置。  
Luci-app-openvirtual\*\*  
Openvirtual\*\* 客户端配置。  
Luci-app-openvirtual\*\*-server  
Openvirtual\*\* 服务端配置。  
Luci-app-opkg  
软件包管理界面（安装/卸载插件）。  
Luci-app-oscam  
智能卡共享服务（用于卫星电视解密）。  
Luci-app-p910nd  
网络打印服务器（支持 RAW 打印）。  
Luci-app-pagekitec  
Pagekite 内网穿透客户端。  
Luci-app-“师夷长技以制夷”  
多协议代理工具（支持 SS/Trojan/Xray 等）。  
Luci-app-polipo  
HTTP 缓存代理（支持转换 SOCKS 代理）。  
Luci-app-pppoe-relay  
PPPoE 中继（用于宽带共享）。  
Luci-app-pppoe-server  
PPPoE 服务器（用于宽带共享）。  
Luci-app-privoxy  
隐私增强的 HTTP 代理。  
Luci-app-ps3netsrv  
PS3 游戏网络共享服务。  
Luci-app-qbittorrent  
qBittorrent BT 下载工具。  
Luci-app-qos  
流量质量控制（传统 QoS 配置）。  
Luci-app-radicale  
CalDAV/CardDAV 服务器（日程同步）。  
Luci-app-radicale2  
CalDAV/CardDAV 服务器（增强版）。  
Luci-app-ramfree  
内存清理工具（释放空闲内存）。  
Luci-app-rclone  
Rclone 网盘同步工具（支持 Google Drive 等）。  
Include rclone-webui  
Rclone 的 Web 管理界面。  
Include rclone-ng  
Rclone 的另一种 Web 管理界面。  
Luci-app-rp-pppoe-server  
Roaring Penguin PPPoE 服务器。  
Luci-app-samba4  
Samba 文件共享服务（SMB/CIFS 协议）。  
Luci-app-scutclient  
华南理工大学校园网认证客户端。  
Luci-app-ser2net  
串口转网络工具（远程访问串口设备）。  
Luci-app-“师夷长技以制夷”s-libev  
“师夷长技以制夷”s 代理工具。  
Luci-app-shairplay  
AirPlay 音频接收器（支持旧版协议）。  
Luci-app-siitwizard  
IPv6 转换工具（SIIT 协议）。  
Luci-app-simple-adblock  
简化版广告过滤工具。  
Luci-app-smartdns  
SmartDNS 智能 DNS 解析（分流/防污染）。  
Luci-app-smstool  
短信管理工具（需 4G 模块支持）。  
Luci-app-snmpd  
SNMP 服务（网络设备监控）。  
Luci-app-socat  
网络数据转发工具（端口映射）。  
Luci-app-softether  
SoftEther virtual\*\* 服务器（旧版）。  
Luci-app-softethervirtual\*\*  
SoftEther virtual\*\* 服务器（新版）。  
Luci-app-softethervirtual\*\*5  
SoftEther virtual\*\* 服务器（增强版）。  
Luci-app-speederv2  
UDP 加速工具（用于游戏/视频传输）。  
Luci-app-splash  
强制门户认证（如公共 Wi-Fi 登录页）。  
Luci-app-sqm  
智能队列管理（QoS 流量整形）。  
Luci-app-squid  
Squid 代理缓存服务器。  
Luci-app-“师夷长技以制夷”-libev-server  
“师夷长技以制夷”sR 服务端配置。  
Luci-app-“师夷长技以制夷”-mudb-server  
“师夷长技以制夷”sR 服务端配置（多用户支持）。  
Luci-app-“师夷长技以制夷”-plus  
“师夷长技以制夷”sR 增强版（支持更多协议）。  
Include china-dns-NG  
防污染 DNS 解析（国内直连/歪果代理）。  
Include Hysteria  
Hysteria 代理协议（抗审查）。  
Include ipt2socks  
将 iptables 流量转为 SOCKS5 代理。  
Include Kcptun  
KCP 加速隧道协议（降低延迟）。  
Include NaiveProxy  
NaiveProxy 代理协议（抗审查）。  
Include “师夷长技以制夷”s2  
“师夷长技以制夷”s2 代理工具（支持 TCP/UDP）。  
Include “师夷长技以制夷”s Simple obfs Plugin  
“师夷长技以制夷”s 简单混淆插件。  
Include “师夷长技以制夷”s “师夷长技以制夷” Plugin  
“师夷长技以制夷”s “师夷长技以制夷” 插件。  
Include “师夷长技以制夷”sR Libev Client  
“师夷长技以制夷”sR 客户端（Libev 版）。  
Include “师夷长技以制夷”sR Libev Server  
“师夷长技以制夷”sR 服务端（Libev 版）。  
Include Trojan  
Trojan 代理协议。  
Include tuic-client  
Tuic 代理协议客户端。  
Luci-app-“师夷长技以制夷”server-python  
“师夷长技以制夷”sR 服务端（Python 版）。  
Luci-app-statistics  
系统资源监控（CPU/内存/网络流量）。  
Luci-app-syncdial  
多拨助手（用于单线多拨）。  
Luci-app-syncthing  
Syncthing 去中心化文件同步工具。  
Luci-app-sysuh3c  
中山大学校园网认证客户端。  
Luci-app-timecontrol  
定时任务控制（如限时上网）。  
Luci-app-timewol  
定时网络唤醒（计划任务触发 WOL）。  
Luci-app-tinyproxy  
轻量级 HTTP 代理服务器。  
Luci-app-transmission  
Transmission BT 下载工具。  
Luci-app-travelmate  
旅行路由器模式（自动切换 Wi-Fi 网络）。  
Luci-app-trojan-server  
Trojan 代理服务器。  
Luci-app-ttyd  
网页版终端（通过浏览器访问 SSH）。  
Luci-app-turboacc  
网络加速（Fast Path/硬件 NAT）。  
Enable BBR CCA  
启用 BBR 拥塞控制算法。  
Luci-app-udp2raw  
UDP 伪装加速工具（防 QoS 限制）。  
Luci-app-udpxy  
IPTV 组播转 HTTP 单播。  
Luci-app-uhttpd  
uHTTPd Web 服务器配置  
Luci-app-unblockneteasemusic  
解锁网易云音乐灰色歌曲。  
Luci-app-unbound  
Unbound DNS 解析器（递归 DNS 服务）。  
Luci-app-upnp  
UPnP 自动端口映射（支持游戏/P2P 应用）。  
Luci-app-usb-printer  
USB 打印机共享服务。  
Luci-app-usb3disable  
禁用 USB 3.0 接口（减少射频干扰）。  
Luci-app-uugamebooster  
UU 游戏加速器插件。  
Luci-app-“师夷长技以制夷”-server  
“师夷长技以制夷” 代理服务端配置。  
Luci-app-“师夷长技以制夷”a  
“师夷长技以制夷” 代理服务端管理界面。  
Luci-app-verysync  
Verysync 文件同步工具（类似 Resilio Sync）。  
Luci-app-vlmcsd  
KMS 激活服务器（Windows/Office 激活）。  
Luci-app-vnstat  
网络流量统计工具（按接口/时间汇总）。  
Luci-app-vnstat2  
网络流量统计工具（增强版）。  
Luci-app-virtual\*\*-policy-routing  
virtual\*\* 策略路由（按规则分流流量）。  
Luci-app-virtual\*\*bypass  
virtual\*\* 绕过规则（直连特定 IP/域名）。  
Luci-app-vsftpd  
FTP 服务器配置。  
Luci-app-v“师夷长技以制夷”  
“师夷长技以制夷”sR 增强版（支持更多协议）。  
Include Hysteria  
Hysteria 代理协议（抗审查）。  
Include Kcptun  
KCP 加速隧道协议（降低延迟）。  
Include “师夷长技以制夷”sR Libev Server  
“师夷长技以制夷”sR 服务端（Libev 版）。  
Include Trojan  
Trojan 代理协议。  
Include Xray  
Xray 代理协议（“师夷长技以制夷” 的增强版）。  
Include “师夷长技以制夷”s Xray Plugin  
“师夷长技以制夷”s Xray 插件。  
Luci-app-watchcat  
网络监控与自动恢复（断网检测）。  
luci-app-webadmin  
Web 管理界面增强工具。  
luci-app-webrestriction  
网页访问限制（基于关键词/URL）。  
luci-app-weburl  
自定义 Web 界面快捷方式。  
luci-app-wechatpush  
微信推送通知（系统事件提醒）。  
luci-app-wifischedule  
Wi-Fi 定时开关。  
luci-app-wireguard  
WireGuard virtual\*\* 配置。  
luci-app-wol  
局域网唤醒（Wake-on-LAN）。  
luci-app-xinetd  
扩展型超级守护进程（管理网络服务）。  
luci-app-xlnetacc  
迅雷快鸟宽带加速插件。  
luci-app-yggdrasil  
Yggdrasil 去中心化 IPv6 网络协议。  
luci-app-zerotier  
ZeroTier 内网穿透工具。  
插件食用指南   
1、 同类插件选一个就好   
广告过滤：Adblock或Adbyby+   
DNS服务：SmartDNS或DNSForwarder   
下载工具：Aria2/QBittorrent二选一

2、 硬件性能决定上限   
老设备避开Docker/虚拟机类插件   
512MB内存以下慎用Alist/Rclone

3、 敏感功能谨慎使用   
科学上网插件建议配合「虚拟专线」使用   
KMS激活工具仅限测试环境

4、 插件命名冷知识   
带「Plus/Go」后缀的是增强版（如Adbyby-plus）   
带「-server」的是服务端配置（如Frps）   
中文名插件多是定制功能（如各种校园网客户端）   
从限制熊孩子到组建私人CDN，从科学上网到航空追踪，这些插件彻底榨干了路由器的每一滴性能！下次谁再说路由器只能上网，就把这篇糊他脸上～

# cisco路由器nat回流解决办法--NVI

<div id="bkmrk-%E5%9B%B0%E6%89%B0%E5%B7%B2%E4%B9%85%E7%9A%84%E8%B7%AF%E7%94%B1%E5%99%A8%E6%98%A0%E5%B0%84%E7%9A%84%E5%9B%9E%E6%B5%81%E9%97%AE%E9%A2%98%E7%BB%88%E4%BA%8E%E8%A7%A3%E5%86%B3%E4%BA%86">困扰已久的路由器映射的回流问题终于解决了。</div><div id="bkmrk-%E5%9B%9E%E6%B5%81%EF%BC%8C%E7%AE%80%E5%8D%95%E7%9A%84%E8%AF%B4%E5%B0%B1%E6%98%AF%E5%86%85%E7%BD%91%E7%BB%88%E7%AB%AF%E9%80%9A%E8%BF%87%E6%98%A0%E5%B0%84%E5%90%8E%E7%9A%84%E5%85%AC">回流，简单的说就是内网终端通过映射后的公网地址访问内网服务。</div><div id="bkmrk-%E9%80%9A%E5%B8%B8%E9%85%8D%E7%BD%AE%E7%9A%84inside-outside%E6%A8%A1">通常配置的inside-outside模式的nat是无法实现回流的，</div>[![image.png](https://bost.lesrec.cn/uploads/images/gallery/2025-05/scaled-1680-/SLMIcR5dellMF8da-OsWimage.png)](https://bost.lesrec.cn/uploads/images/gallery/2025-05/SLMIcR5dellMF8da-OsWimage.png)

<div id="bkmrk-cisco%E7%9A%84domainless-nat">Cisco的domainless NATDomainless就是说不再区分inside和outside，只是单纯地做NAT，用一个叫做NAT Virtual Interface的虚拟接口来实现，这样有什么好处呢？说实话，从界面上看不出来，但是从其实现角度，就可以通过路由的方式将带有ip nat enable配置的接口进来的包全部导入这个虚拟接口NVI0中。然后用数据包的源地址和目标地址分别查询SNAT表和DNAT表，根据结果进行NAT操作，随后进入真正的路由查询。</div><div id="bkmrk-%E4%B8%8D%E7%AE%A1%E6%96%B9%E5%90%91%EF%BC%8C%E4%B8%8D%E7%AE%A1%E8%B7%AF%E7%94%B1%EF%BC%8C%E5%8F%AA%E8%A6%81%E6%95%B0%E6%8D%AE%E5%8C%85%E8%BF%9B%E5%85%A5%E4%BA%86%E4%B8%80%E5%9D%97">不管方向，不管路由，只要数据包进入了一块带有ip nat enable配置的物理网卡，就会进行NAT匹配以及匹配成功后的操作，不管是SNAT和DNAT都在这里进行。这个实现虽然很豪放，但是却解决了所有问题。</div><div id="bkmrk-%E6%95%B0%E6%8D%AE%E5%8C%85%E5%9C%A8%E8%BF%9B%E5%85%A5%E7%9C%9F%E6%AD%A3%E7%9A%84%E8%B7%AF%E7%94%B1%E6%9F%A5%E8%AF%A2%E5%89%8D%EF%BC%8Cnat%E5%B0%B1%E5%B7%B2">数据包在进入真正的路由查询前，NAT就已经完成了，在路由器看来，NAT操作被藏起来了，就好像数据包本来就是那个样子一样。当然Domainless的NAT也不再和任何其它操作关联，ACL，VPN感兴趣流匹配，policy routing等都和NAT无关。</div>[![image.png](https://bost.lesrec.cn/uploads/images/gallery/2025-05/scaled-1680-/gfD89F7XIAfj2qQs-Zp8image.png)](https://bost.lesrec.cn/uploads/images/gallery/2025-05/gfD89F7XIAfj2qQs-Zp8image.png)

<div id="bkmrk-%E5%A6%82%E4%BB%A5%E4%B8%8A%E6%8B%93%E6%89%91%EF%BC%8C">如以上拓扑，</div><div id="bkmrk-%E5%B0%86r3%E7%9A%8480%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84%E5%88%B0%E5%A4%96%E7%BD%91%EF%BC%8C%E9%82%A3%E4%B9%88r2%E5%B0%86%E6%97%A0">将R3的80端口映射到外网，那么R2将无法使用公网地址访问R3</div><div id="bkmrk-%E8%AF%A5%E6%96%B9%E5%BC%8F%E7%9A%84%E4%BC%A0%E7%BB%9F%E7%9A%84%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84%E4%B8%BA%EF%BC%9A">该方式的传统的端口映射为：</div><div id="bkmrk--2">  
</div><div id="bkmrk-ip-nat-inside-source">ip nat inside source static tcp 10.1.12.2 80 61.128.1.1 8000</div><div id="bkmrk-ip-nat-inside-source-1">ip nat inside source static tcp 10.1.12.2 80 61.128.1.3 80</div><div id="bkmrk-ip-nat-inside-source-2">ip nat inside source list NAT interface e0/0 overload</div><div id="bkmrk-interface-e0%2F0">interface e0/0</div><div id="bkmrk-ip-nat-outside">ip nat outside</div><div id="bkmrk-interface-e0%2F1">interface e0/1</div><div id="bkmrk-ip-nat-inside">ip nat inside</div><div id="bkmrk--3"></div><div id="bkmrk-%E6%9B%B4%E6%94%B9%E4%B8%BAnvi-nat%EF%BC%9A">更改为NVI NAT：</div><div id="bkmrk--4"></div><div id="bkmrk-ip-nat-source-static">ip nat source static tcp 10.1.12.2 80 61.128.1.1 8000</div><div id="bkmrk-ip-nat-source-static-1">ip nat source static tcp 10.1.12.2 80 61.128.1.3 80</div><div id="bkmrk-ip-nat-source-list-n">ip nat source list NAT interface e0/0 overload</div><div id="bkmrk-interface-e0%2F0-1">interface e0/0</div><div id="bkmrk-ip-nat-enable">ip nat enable</div><div id="bkmrk-interface-e0%2F1-1">interface e0/1</div><div id="bkmrk-ip-nat-enable-1">ip nat enable</div><div id="bkmrk--5"></div><div id="bkmrk-%E6%9B%B4%E6%94%B9%E4%B8%BAnvi-nat%E5%8F%AF%E8%83%BD%E5%86%85%E7%BD%91%E8%BF%98%E6%98%AF%E6%97%A0%E6%B3%95%E9%80%9A%E8%BF%87">更改为NVI NAT可能内网还是无法通过公网地址访问内网服务器，此时有个重要的一点是要关闭端口的重定向功能：</div><div id="bkmrk--6"></div><div id="bkmrk-interface-e0%2F0-2">interface e0/0</div><div id="bkmrk-no-ip-redirects">no ip redirects</div><div id="bkmrk-interface-e0%2F1-2">interface e0/1</div><div id="bkmrk-no-ip-redirects-1">no ip redirects</div><div id="bkmrk--7"></div><div id="bkmrk-%E8%BF%99%E6%A0%B7%E9%85%8D%E7%BD%AE%E5%8D%B3%E5%8F%AF%E5%AE%8C%E6%88%90%EF%BC%8C%E6%A3%80%E6%9F%A5%E7%8A%B6%E6%80%81%E5%91%BD%E4%BB%A4%E4%B8%BA%EF%BC%9Asho">这样配置即可完成，检查状态命令为：show ip nat nvi translations</div><div id="bkmrk--8"></div><div id="bkmrk-sh-ip-nat-nvi-transl">sh ip nat nvi translations</div><div id="bkmrk-pro-source-global%C2%A0-%C2%A0">Pro Source global Source local Destin local Destin global</div><div id="bkmrk-tcp-61.128.1.1%3A28909">tcp 61.128.1.1:28909 10.1.11.2:28909 61.128.1.3:80 10.1.12.2:80</div><div id="bkmrk-tcp-61.128.1.1%3A8000%C2%A0">tcp 61.128.1.1:8000 10.1.12.2:80 --- ---</div><div id="bkmrk-%E8%AE%BF%E9%97%AE%E6%B5%8B%E8%AF%95ok%E3%80%82%E5%90%8C%E6%97%B6%E4%B9%9F%E8%83%BD%E7%9C%8B%E5%88%B0%EF%BC%8C%E7%8E%B0%E5%9C%A8%E5%86%85%E9%83%A8%E7%BB%88%E7%AB%AF">访问测试OK。同时也能看到，现在内部终端R2通过公网地址访问R3的时候，源地址也被nat为出口路由器的公网地址。</div>

# 思科路由器cisco3945 flash下所有文件批量导出命令

archive tar /create flash:all\_files\_backup.tar flash:

copy flash:all\_files\_backup.tar tftp:

**<span style="font-family: 宋体;">如果因路由器剩余空间不足，无法完成全部文件打包</span>**

**<span style="font-family: 宋体;">解决方法：将</span>U<span style="font-family: 宋体;">盘格式化成</span><span style="font-family: Calibri;">FAT</span><span style="font-family: 宋体;">格式，最大支持</span><span style="font-family: Calibri;">4G</span><span style="font-family: 宋体;">，插入路由器执行以下命令：</span>**

**tar /create usbflash0:allfile.tar flash<span style="font-family: Calibri;">:</span>**

# 思科路由器创建ACL禁止单IP外网

要禁止 `192.168.30.63` 访问 `192.168.11.254` 这一路由器的 IP 地址，可以使用 **访问控制列表（ACL）** 来实现，阻止从 `192.168.30.63` 到 `192.168.11.254` 的流量。

### 配置步骤：

1. **创建 ACL 规则**，禁止 `192.168.30.63` 访问 `192.168.11.254`。
2. **应用 ACL 到接口** `GigabitEthernet0/1` 的进入流量（`in` 方向）。

### 步骤 1：创建 ACL

首先，创建一个 IPv4 的 **标准 ACL**，只针对单一 IP 地址进行匹配。

```bash
ip access-list standard Block-30.63
 deny host 192.168.30.63
 permit any

```

- `deny host 192.168.30.63`：禁止来自 `192.168.30.63` 的流量。
- `permit any`：允许其他所有流量。

### 步骤 2：将 ACL 应用到接口

接下来，在 `GigabitEthernet0/1` 接口上应用这个 ACL，确保它对进入该接口的流量生效。

```bash
interface GigabitEthernet0/1
 ip access-group Block-30.63 in

```

- `ip access-group Block-30.63 in`：在接口 `GigabitEthernet0/1` 上应用 ACL `Block-30.63`，并指定方向为 **进入**（`in`）。这意味着 ACL 会过滤从 `192.168.30.63` 进入路由器的流量。

### 配置验证：

1. **查看接口配置**：
    
    ```bash
    show running-config interface GigabitEthernet0/1
    
    ```
    
    确保 `ip access-group Block-30.63 in` 出现在接口配置中。
2. **检查 ACL 配置**：
    
    ```bash
    show access-lists Block-30.63
    
    ```
    
    这将显示已配置的 ACL 规则，确保 `deny` 规则生效。
3. **测试**：
    
    
    - 从 `192.168.30.63` 设备进行 ping 测试，尝试访问 `192.168.11.254`（路由器）。如果配置正确，应该无法访问。
    - 从其他 IP 设备进行测试，确保其他设备可以正常访问。

### 小结：

通过创建 ACL 并将其应用于路由器的接口，您成功地阻止了 `192.168.30.63` 访问路由器 IP `192.168.11.254`。

# NAT规则缺失导致返回数据不完整排查思路

[![bf7578dd623441d93dcb882a92e6a7be.png](https://bost.lesrec.cn/uploads/images/gallery/2025-08/scaled-1680-/itPOusWqA941T4VC-bf7578dd623441d93dcb882a92e6a7be.png)](https://bost.lesrec.cn/uploads/images/gallery/2025-08/itPOusWqA941T4VC-bf7578dd623441d93dcb882a92e6a7be.png)

现象描述：<span style="color: rgb(38, 38, 38); font-family: quote-cjk-patch, Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, Cantarell, 'Helvetica Neue', Oxygen, 'Open Sans', sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(239, 246, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">车间设备192.168.1.64端口9988——通过路由器A——路由器B——服务器192.168.10.3端口8988 服务器能收到车间设备全部数据包，但车间设备只能收到少量的服务器返回数据包</span>

根据您描述的网络拓扑和现象，车间设备与服务器之间通信不对称的问题可能由以下原因导致：

\---

\### \*\*一、常见原因分析\*\*

\#### 1. \*\*路由器/NAT配置问题\*\*  
\- \*\*路由器A/B的NAT规则不完整\*\*：  
\- 可能只配置了从车间设备到服务器的正向转发规则，但缺少完整的反向路由规则  
\- 检查路由器B上的端口映射：是否将服务器8988端口的响应正确映射回路由器A的对应端口  
\- \*\*ACL限制\*\*：  
\- 路由器B可能设置了单向访问控制列表（ACL），仅允许192.168.1.64→192.168.10.3的流量，未放行反向流量

\#### 2. \*\*防火墙拦截\*\*  
\- \*\*服务器端防火墙\*\*：  
 ```bash  
 # 检查服务器防火墙规则（以Linux为例）  
 sudo iptables -L -n | grep 8988  
 sudo firewall-cmd --list-ports # CentOS  
 ```  
\- 可能仅允许入站流量（设备→服务器），未放行出站响应流量  
\- \*\*车间设备本地防火墙\*\*：  
\- 可能丢弃了来自非信任IP（如192.168.10.3）的响应包

\#### 3. \*\*非对称路由（Asymmetric Routing）\*\*  
\- 请求路径：`设备 → 路由器A → 路由器B → 服务器`  
\- 响应路径：`服务器 → 路由器B → 直接出口（未经过路由器A）`  
\- \*\*检查方法\*\*：  
 ```bash  
 # 在服务器上跟踪返回路径  
 traceroute 192.168.1.64  
 ```

\#### 4. \*\*MTU/MSS问题\*\*  
\- 若返回数据包较大，可能因MTU不匹配被丢弃：  
\- \*\*诊断方法\*\*：  
 ```bash  
 # 在车间设备上测试：  
 ping -s 1472 -M do 192.168.10.3 # 逐步减小-s值测试  
 ```

\#### 5. \*\*会话表超时\*\*  
\- 路由器/NAT设备的会话表（Connection Tracking）超时时间过短：  
\- \*\*检查建议\*\*：  
\- 登录路由器A/B，检查NAT会话超时时间（通常TCP默认为5-30分钟）

\---

\### \*\*二、排查步骤建议\*\*

\#### 第一步：基础检查  
1\. \*\*在服务器上抓包确认响应是否发出\*\*：  
 ```bash  
 sudo tcpdump -i any host 192.168.1.64 and port 8988 -w /tmp/server\_response.pcap  
 ```  
\- 如果抓包显示服务器已发出响应，问题出在传输路径上

2\. \*\*在车间设备抓包验证接收情况\*\*：  
 ```bash  
 tcpdump -i any host 192.168.10.3 and port 9988 -w /tmp/device\_receive.pcap  
 ```

\#### 第二步：路径验证  
1\. \*\*检查路由跳数\*\*：  
 ```bash  
 # 从服务器执行：  
 traceroute -n -T -p 9988 192.168.1.64  
 ```

2\. \*\*测试双向连通性\*\*：  
 ```bash  
 # 从服务器测试到设备端口的连通性：  
 nc -zv 192.168.1.64 9988  
 ```

\#### 第三步：设备级检查  
1\. \*\*检查路由器A/B的配置\*\*：  
\- 确认NAT规则包含双向转换：  
 ```cisco  
 ! 示例（Cisco风格）：  
 ip nat inside source static tcp 192.168.1.64 9988 192.168.10.3 8988  
 ip nat outside source static tcp 192.168.10.3 8988 192.168.1.64 9988  
 ```  
\- 检查ACL是否放行双向流量

2\. \*\*检查车间设备本地设置\*\*：  
\- 确认9988端口未被其他进程占用  
\- 检查本地防火墙规则（Windows/Linux/设备OS）

\---

\### \*\*三、解决方案建议\*\*

\#### 1. \*\*修复NAT/路由配置\*\*  
\- 在路由器B上添加明确的端口映射：  
 ```  
 外部IP:8988 → 192.168.10.3:8988  
 ```  
\- 在路由器A上确保返回路径可达

\#### 2. \*\*调整防火墙规则\*\*  
 ```bash  
 # 服务器端放行响应流量（示例）：  
 sudo iptables -A OUTPUT -p tcp --sport 8988 -j ACCEPT  
 ```

\#### 3. \*\*优化网络参数\*\*  
\- 统一设置MTU（建议1500或更低）：  
 ```bash  
 # 在服务器和车间设备上：  
 ifconfig eth0 mtu 1400  
 ```  
\- 调整NAT会话超时时间（如延长至1小时）

\#### 4. \*\*协议层优化\*\*  
\- 如果使用TCP协议，检查是否有RST包干扰：  
 ```bash  
 sudo tcpdump -i any 'tcp\[tcpflags\] &amp; (tcp-rst) != 0'  
 ```  
\- 考虑改用UDP协议（如果应用允许）

\---

\### \*\*四、高级诊断工具\*\*  
1\. \*\*可视化路径分析\*\*：  
 ```bash  
 mtr -n --tcp --port 9988 192.168.1.64  
 ```  
2\. \*\*NAT会话监控\*\*：  
\- 在路由器上查看实时NAT转换：  
 ```cisco  
 show ip nat translations  
 ```

建议从\*\*服务器抓包\*\*和\*\*路由器NAT检查\*\*开始，逐步缩小问题范围。如果问题仍无法解决，需要提供更详细的网络拓扑和设备配置片段。

# 思科路由器上配置端口映射只允许特定IP访问

明白 ✅，你是要在 **Cisco 3945 路由器** 上做 **NAT 端口映射 (外网 → 内网)**，并且加 **访问控制**，只允许 `122.144.131.26` 访问。

内网服务器：

- IP：`192.168.0.5`
- 端口：`389`

外网：

- 公网映射端口：`44389`
- 允许访问的公网 IP：`122.144.131.26`

---

## 配置步骤

### 1. 定义 ACL，限制访问源 IP

```cisco
ip access-list extended LDAP-ACCESS
 permit tcp host 122.144.131.26 any eq 44389
 deny   ip any any

```

这里：

- 只允许源 IP `122.144.131.26` 访问本路由器的 `44389` 端口
- 其他来源一律拒绝

---

### 2. 配置 NAT 静态端口映射

假设路由器的公网接口是 `GigabitEthernet0/0`，公网 IP 是 `X.X.X.X`：

```cisco
ip nat inside source static tcp 192.168.0.5 389 interface GigabitEthernet0/0 44389

```

作用：

- 把 **外网 X.X.X.X:44389** 转发到 **内网 192.168.0.5:389**

---

### 3. 接口应用 ACL

在公网出口接口（例如 `GigabitEthernet0/0`）入方向应用 ACL：

```cisco
interface GigabitEthernet0/0
 ip access-group LDAP-ACCESS in

```

---

## 配置汇总

最终配置大致如下：

```cisco
ip access-list extended LDAP-ACCESS
 permit tcp host 122.144.131.26 any eq 44389
 deny   ip any any

interface GigabitEthernet0/0
 ip address X.X.X.X 255.255.255.0
 ip nat outside
 ip access-group LDAP-ACCESS in

interface GigabitEthernet0/1
 ip address 192.168.0.1 255.255.255.0
 ip nat inside

ip nat inside source static tcp 192.168.0.5 389 interface GigabitEthernet0/0 44389

```

---

## 验证

1. 从允许的公网 IP 测试：

```bash
telnet X.X.X.X 44389

```

应能连接成功。

2. 从其他公网 IP 测试应被拒绝。

---

要不要我顺便帮你写一个 **完整的安全加固配置（比如限制最大连接数、防止暴力破解）**，这样你的 389/44389 服务就更安全？

# 思科路由器无法清理正被占用的nat translation

看到您在删除静态NAT条目时遇到了“Static entry in use, cannot remove”的提示。这是因为该静态NAT转换条目当前正处于活跃状态，系统为了防止中断现有连接，不允许直接删除。

要解决这个问题，核心思路是\*\*先清除活跃的NAT转换表项，再删除静态配置\*\*。您可以参考以下流程操作。

```mermaid  
flowchart TD  
 A\[开始\] --&gt; B\[清除活跃的NAT转换\]  
 B --&gt; C{清除成功?}  
 C --o|是| D\[删除静态NAT配置\]  
 C --x|否&lt;br&gt;条目被持续重建| E\[临时禁用NAT功能\]  
 E --&gt; F\[清除NAT转换\]  
 F --&gt; G\[删除静态NAT配置\]  
 G --&gt; H\[恢复接口NAT功能\]  
 D --&gt; I\[操作成功\]  
 H --&gt; I  
```

\### 💡 具体操作步骤

\*\*第一步：清除活跃的NAT转换\*\*  
首先，请退回特权模式，尝试清除所有动态NAT转换。这对于静态映射虽然不能直接删除配置，但可以清除其产生的活跃会话状态。  
```  
zb-c3945-11.254(config)#exit  
zb-c3945-11.254#clear ip nat translation \*  
```

执行后，请\*\*立即\*\*再次尝试删除静态条目：  
```  
zb-c3945-11.254#configure terminal  
zb-c3945-11.254(config)#no ip nat inside source static udp 192.168.4.6 500 interface Dialer1 500  
```

\*\*第二步：如果条目被持续重建\*\*  
如果上述操作后条目被网络中的活跃流量迅速重建，导致仍然无法删除，则需要采取更彻底的措施——临时禁用NAT功能以阻止新连接建立。

1\. \*\*确定并禁用NAT接口\*\*：找到配置了`ip nat inside`和`ip nat outside`的接口，并暂时取消其NAT角色。  
 ```  
 zb-c3945-11.254(config)#interface \[您的inside接口号，如GigabitEthernet0/0\]  
 zb-c3945-11.254(config-if)#no ip nat inside  
 zb-c3945-11.254(config-if)#exit  
 zb-c3945-11.254(config)#interface Dialer1  
 zb-c3945-11.254(config-if)#no ip nat outside  
 zb-c3945-11.254(config-if)#exit  
 ```  
2\. \*\*再次清除转换表\*\*：此时NAT功能已暂停，可以安全地清除所有表项。  
 ```  
 zb-c3945-11.254(config)#do clear ip nat translation \*  
 ```  
3\. \*\*删除静态配置\*\*：现在可以顺利删除静态NAT条目了。  
 ```  
 zb-c3945-11.254(config)#no ip nat inside source static udp 192.168.4.6 500 interface Dialer1 500  
 ```  
4\. \*\*恢复接口NAT功能\*\*：不要忘记重新启用接口的NAT角色。  
 ```  
 zb-c3945-11.254(config)#interface \[您的inside接口号\]  
 zb-c3945-11.254(config-if)#ip nat inside  
 zb-c3945-11.254(config-if)#exit  
 zb-c3945-11.254(config)#interface Dialer1  
 zb-c3945-11.254(config-if)#ip nat outside  
 zb-c3945-11.254(config-if)#end  
 ```

\### 💎 重要提醒

\* \*\*谨慎操作\*\*：临时禁用NAT功能会导致所有依赖NAT的网络连接中断，请在业务低峰期进行操作。  
\* \*\*确认结果\*\*：操作完成后，可以使用 `show ip nat translations` 命令确认特定的NAT条目已消失。

希望这些详细的步骤能帮助您成功解决问题。如果操作中遇到其他困难，欢迎随时追问。

# 在 Windows Server 2019 上配置环回网卡和自带软路由

在 Windows Server 2019 上配置环回网卡和自带软路由，让 Hyper-V 虚拟机通过宿主机上网，核心思路是：添加环回网卡作为虚拟机的网关，然后开启宿主机的路由功能。下面我为你整理了详细步骤。

\# 🛠️ Windows Server 2019 环回网卡与软路由配置指南

接下来，我将分步说明如何在 Windows Server 2019 上安装环回网卡、配置 Hyper-V 虚拟交换机，并开启宿主机的路由功能，最终实现 Hyper-V 虚拟机通过宿主机上网。

\## 步骤一：安装环回网卡

1\. \*\*以管理员身份运行命令提示符 (cmd)\*\*，输入 `hdwwiz` 并回车，启动硬件安装向导。  
2\. 在向导中，选择 \*\*"手动从列表选择硬件"\*\* 。  
3\. 硬件类型选择 \*\*"网络适配器"\*\* 。  
4\. 厂商选择 \*\*"Microsoft"\*\*，在网络适配器列表中选择 \*\*"Microsoft KM-TEST 环回适配器"\*\* (在 Windows Server 2012 及更新系统中此名称替代了旧的 "Microsoft Loopback Adapter")，完成安装。

\## 步骤二：配置环回网卡

1\. 打开 \*\*"网络和共享中心"\*\* &gt; \*\*"更改适配器设置"\*\*，找到新安装的环回适配器（建议重命名，例如 "realserver"）。  
2\. 右键点击该适配器选择 \*\*"属性"\*\*，然后双击 \*\*"Internet 协议版本 4 (TCP/IPv4)"\*\* 。  
3\. 按下图配置IP地址，此IP将作为Hyper-V虚拟机的网关：  
 \* \*\*IP 地址\*\*：填写一个你规划的虚拟网络网关地址，例如 `192.168.137.1`。  
 \* \*\*子网掩码\*\*：填写 `255.255.255.0`。  
 \* 其他项留空。

\## 步骤三：配置 Hyper-V 虚拟交换机

1\. 打开 \*\*Hyper-V 管理器\*\*，在右侧操作中点击 \*\*"虚拟交换机管理器"\*\*。  
2\. 创建一个连接至环回网卡的虚拟交换机：  
 \* 选择 \*\*"外部"\*\* 类型的虚拟交换机。  
 \* 将其绑定到刚才安装的 \*\*"KM-TEST 环回适配器"\*\* 。  
3\. \*\*重要\*\*：为了让数据能在宿主机物理网卡和环回网卡之间正确转发，需要启用弱主机模式。\*\*以管理员身份运行命令提示符\*\*，执行以下命令（将"以太网"和"环回网卡名称"替换为你的实际连接名称）：  
 ```cmd  
 netsh interface ipv4 set interface "以太网" weakhostreceive=enabled  
 netsh interface ipv4 set interface "以太网" weakhostsend=enabled  
 netsh interface ipv4 set interface "环回网卡名称" weakhostreceive=enabled  
 netsh interface ipv4 set interface "环回网卡名称" weakhostsend=enabled  
 ```

\## 步骤四：启用并配置路由和远程访问 (RRAS)

1\. 打开 \*\*服务器管理器\*\*，点击 \*\*"添加角色和功能"\*\*。  
2\. 在 \*\*"服务器角色"\*\* 中，勾选 \*\*"远程访问"\*\* 。  
3\. 在 \*\*"角色服务"\*\* 中，勾选 \*\*"路由"\*\* ，完成安装。  
4\. 安装后，通过 \*\*开始菜单\*\* 打开 \*\*"路由和远程访问"\*\* 控制台。  
5\. 在左侧窗格右键点击你的服务器名，选择 \*\*"配置并启用路由和远程访问"\*\* 。  
6\. 在配置向导中：  
 \* 选择 \*\*"网络地址转换 (NAT)"\*\* 。  
 \* 在 \*\*"NAT Internet 连接"\*\* 界面，选择宿主机连接外网的\*\*物理网络适配器\*\*（例如，连接互联网的以太网卡）。  
 \* 在 \*\*"网络选择"\*\* 界面，选择你创建的连接至环回网卡的 \*\*Hyper-V 虚拟交换机\*\* 对应的网络连接（通常是名为 `vEthernet` 的连接）作为专用网络接口。

\## 步骤五：配置 Hyper-V 虚拟机网络

1\. 在 Hyper-V 管理器中，选择你的虚拟机，右键进入 \*\*"设置"\*\*。  
2\. 在网络适配器配置中，将 \*\*"虚拟交换机"\*\* 选择为你在\*\*步骤三\*\*中创建的、关联了环回网卡的虚拟交换机。  
3\. 启动虚拟机，配置其网络：  
 \* 可以将IP地址设置为与环回网卡同网段的静态IP（例如 `192.168.137.10`），网关和DNS均指向环回网卡的IP地址（例如 `192.168.137.1`）。  
 \* 或者将网络设置为自动获取IP地址（DHCP）。

完成以上所有步骤后，你的 Hyper-V 虚拟机应该就能通过 Windows Server 2019 宿主机的软路由功能访问互联网了。如果在配置过程中遇到问题，可以重点检查路由和远程访问 (RRAS) 服务的配置，以及弱主机模式的设置是否正确。希望这些信息能帮助你顺利完成配置！

# 锐捷 S6220-48XS6QXS-H 的完整配置命令脚本

非常好的规划 👍  
你这个配置目标非常清晰，核心是让锐捷 **S6220-48XS6QXS-H** 实现三层交换，并为两台路由器提供独立 VLAN 出口，同时保留 VLAN30 作为管理 VLAN。

下面给出**完整配置命令示例**（基于锐捷常见CLI风格，类似Cisco风格，但带有Ruijie特征）。

---

## 🧱 一、配置目标概览

<table id="bkmrk-vlan-%E7%BD%91%E6%AE%B5-%E4%BD%9C%E7%94%A8-%E9%BB%98%E8%AE%A4%E7%BD%91%E5%85%B3-%E6%8E%A5%E5%8F%A3%E7%94%A8%E9%80%94"><thead><tr><th>VLAN</th><th>网段</th><th>作用</th><th>默认网关</th><th>接口用途</th></tr></thead><tbody><tr><td>VLAN10</td><td>10.2.2.0/24</td><td>路由器1侧网络（服务器群1）</td><td>10.2.2.254</td><td>接口45–46接路由器1 LAN</td></tr><tr><td>VLAN20</td><td>10.2.3.0/24</td><td>路由器2侧网络（服务器群2）</td><td>10.2.3.254</td><td>接口47–48接路由器2 LAN</td></tr><tr><td>VLAN30</td><td>10.3.3.0/24</td><td>管理网</td><td>—</td><td>用于交换机管理登录</td></tr></tbody></table>

---

## ⚙️ 二、锐捷 S6220 配置命令

```bash
# 进入全局配置模式
enable
configure terminal

# 创建 VLAN
vlan 10
 name ROUTER1_NET
 exit

vlan 20
 name ROUTER2_NET
 exit

vlan 30
 name MGMT_NET
 exit

# 为 VLAN 配置三层接口 (SVI)
interface vlan 10
 ip address 10.2.2.1 255.255.255.0
 description "Gateway interface for VLAN10"
 exit

interface vlan 20
 ip address 10.2.3.1 255.255.255.0
 description "Gateway interface for VLAN20"
 exit

interface vlan 30
 ip address 10.3.3.1 255.255.255.0
 description "Switch Management VLAN"
 exit

# 启用三层转发功能（如默认未启用）
ip routing

# VLAN10：接口45-46为access口，连接路由器1
interface range gigabitEthernet 1/0/45-46
 switchport mode access
 switchport access vlan 10
 description "To Router1 LAN"
 exit

# VLAN20：接口47-48为access口，连接路由器2
interface range gigabitEthernet 1/0/47-48
 switchport mode access
 switchport access vlan 20
 description "To Router2 LAN"
 exit

# 管理 VLAN30：假设通过管理口或上联接口访问
interface vlan 30
 ip address 10.3.3.1 255.255.255.0
 exit

# 为交换机自身设置管理网关（用于远程登录）
ip default-gateway 10.3.3.254

# 对 VLAN10、VLAN20 设置各自默认路由
ip route-static 0.0.0.0 0.0.0.0 10.2.2.254 vlan 10
ip route-static 0.0.0.0 0.0.0.0 10.2.3.254 vlan 20

# 保存配置
write

```

---

## 📘 三、逻辑说明

1. **VLAN10 &amp; VLAN20**
    
    
    - 交换机相当于二层转发设备；
    - 默认网关交由各自的路由器（10.2.2.254 / 10.2.3.254）负责；
    - 若路由器已开启NAT，则VLAN10和VLAN20的主机可直接访问外网。
2. **VLAN30 管理网段**
    
    
    - 独立于业务网络；
    - 只允许通过 10.3.3.0/24 登录交换机；
    - 可在管理电脑或堡垒机上配置 IP 10.3.3.x/24。
3. **三层转发（ip routing）**
    
    
    - 启用后，交换机可在不同VLAN间路由（若你希望隔离，可不启用或通过ACL限制）。
4. **默认网关设置**
    
    
    - `ip default-gateway` 仅影响交换机自身；
    - `ip route-static` 用于三层转发的流量路由。

---

## 🔒 四、可选安全优化

```bash
# 禁止管理 VLAN 被业务 VLAN 访问
acl number 3000
 rule 5 deny ip source 10.2.2.0 0.0.0.255 destination 10.3.3.0 0.0.0.255
 rule 10 deny ip source 10.2.3.0 0.0.0.255 destination 10.3.3.0 0.0.0.255
 rule 20 permit ip
quit

# 应用ACL到VLAN接口
interface vlan 30
 packet-filter 3000 inbound
exit

```

---

## ✅ 五、最终验证命令

```bash
# 查看 VLAN 列表
show vlan brief

# 查看接口配置
show running-config interface vlan 10
show running-config interface vlan 20
show running-config interface vlan 30

# 查看静态路由
show ip route static

# 验证连通性
ping 10.2.2.254
ping 10.2.3.254
ping 10.3.3.254

```

---

是否希望我帮你继续画出这套配置的**拓扑图（带VLAN颜色分区、网关与交换机关系）**？  
图形化后你可以直接用于文档或部署审查。

非常清晰的拓扑要求 ✅  
你要实现的是一个**多VLAN三层隔离网络**，其中：

- **VLAN10 / VLAN20** 为两组业务网络，分别接两个不同的路由器上网。
- **VLAN30** 为交换机与服务器管理 VLAN，完全与业务 VLAN 隔离。

下面是适用于 **锐捷 S6220-48XS6QXS-H** 的**完整配置命令脚本**，遵循你的参数要求。

---

## 🔧 一、网络规划表

<table id="bkmrk-vlan-%E7%BD%91%E6%AE%B5-svi%E7%BD%91%E5%85%B3-%E9%BB%98%E8%AE%A4%E4%B8%8A%E6%B8%B8%E8%B7%AF%E7%94%B1"><thead><tr><th>VLAN</th><th>网段</th><th>SVI网关</th><th>默认上游路由</th><th>用途</th></tr></thead><tbody><tr><td>VLAN10</td><td>10.2.2.0/24</td><td>10.2.2.1</td><td>10.2.2.254</td><td>服务器1业务网络（路由器1）</td></tr><tr><td>VLAN20</td><td>10.2.3.0/24</td><td>10.2.3.1</td><td>10.2.3.254</td><td>服务器2业务网络（路由器2）</td></tr><tr><td>VLAN30</td><td>10.3.3.0/24</td><td>10.3.3.254</td><td>无</td><td>管理网络（隔离）</td></tr></tbody></table>

---

## ⚙️ 二、完整配置命令

```bash
enable
configure terminal

# 创建 VLAN
vlan 10
 name VLAN10_ROUTER1
 exit
vlan 20
 name VLAN20_ROUTER2
 exit
vlan 30
 name VLAN30_MANAGEMENT
 exit

# 配置三层接口（SVI）
interface vlan 10
 ip address 10.2.2.1 255.255.255.0
 description "Gateway for VLAN10 (Router1 LAN)"
 exit

interface vlan 20
 ip address 10.2.3.1 255.255.255.0
 description "Gateway for VLAN20 (Router2 LAN)"
 exit

interface vlan 30
 ip address 10.3.3.254 255.255.255.0
 description "Management VLAN"
 exit

# 启用三层转发功能
ip routing

# VLAN10 接口配置
interface range gigabitEthernet 1/0/1-10
 switchport mode access
 switchport access vlan 10
 description "Server1 NIC1 - VLAN10"
 exit

interface range gigabitEthernet 1/0/45-46
 switchport mode access
 switchport access vlan 10
 description "To Router1 LAN (10.2.2.254)"
 exit

# VLAN20 接口配置
interface range gigabitEthernet 1/0/11-20
 switchport mode access
 switchport access vlan 20
 description "Server2 NIC1 - VLAN20"
 exit

interface range gigabitEthernet 1/0/47-48
 switchport mode access
 switchport access vlan 20
 description "To Router2 LAN (10.2.3.254)"
 exit

# VLAN30 接口配置
interface range gigabitEthernet 1/0/21-30
 switchport mode access
 switchport access vlan 30
 description "Server1 NIC2 + Server2 NIC2 (Management)"
 exit

# 设置默认网关（用于交换机自身远程管理）
ip default-gateway 10.3.3.254

# 设置业务 VLAN 各自的默认上游路由
ip route-static 0.0.0.0 0.0.0.0 10.2.2.254 vlan 10
ip route-static 0.0.0.0 0.0.0.0 10.2.3.254 vlan 20

# VLAN30 与 VLAN10、VLAN20 完全隔离
# 方法1：禁用 VLAN 间互通
# 删除或不配置 VLAN 间路由（ACL方式更灵活）

# 方法2（推荐）：使用 ACL 阻断 VLAN30 与其他 VLAN 通信
acl number 3000
 rule 5 deny ip source 10.3.3.0 0.0.0.255 destination 10.2.2.0 0.0.0.255
 rule 10 deny ip source 10.3.3.0 0.0.0.255 destination 10.2.3.0 0.0.0.255
 rule 20 deny ip source 10.2.2.0 0.0.0.255 destination 10.3.3.0 0.0.0.255
 rule 25 deny ip source 10.2.3.0 0.0.0.255 destination 10.3.3.0 0.0.0.255
 rule 30 permit ip
quit

# 应用ACL到VLAN接口，确保管理网络隔离
interface vlan 30
 packet-filter 3000 inbound
exit

# 保存配置
write

```

---

## ✅ 三、验证命令

```bash
show vlan brief
show interface status
show ip interface brief
show ip route
ping 10.2.2.254 vlan 10
ping 10.2.3.254 vlan 20
ping 10.3.3.3 vlan 30

```

---

## 📘 四、逻辑说明

- **服务器1**
    
    
    - NIC1 → VLAN10 → 出 Router1
    - NIC2 → VLAN30 → 管理用
- **服务器2**
    
    
    - NIC1 → VLAN20 → 出 Router2
    - NIC2 → VLAN30 → 管理用
- **VLAN30 与 VLAN10/20 物理隔离 + ACL隔离**  
    管理口只用于 SSH / Web 登录，不允许被业务 VLAN 访问。
- **VLAN10 和 VLAN20 各自拥有独立的上网路径**，互不影响。

---

是否希望我帮你生成一张对应的**网络拓扑图（含VLAN分色、路由器与服务器连接示意）**？  
那样可以直观看出 VLAN 隔离与网关流向。

# 双网关同 VLAN 场景确实极易引发 ARP 异常甚至 ARP 风暴，排查思路

非常好的问题，你描述的这种**双网关同 VLAN 场景**确实**极易引发 ARP 异常甚至 ARP 风暴**，这正是造成堡垒机、SSH 连接卡顿、间歇掉线的高危结构之一。下面我会从**原理 → 症状判断 → 排查命令 → 验证与优化方案**四个角度带你系统分析。

---

## 一、原理分析：为什么会出现问题？

在\*\*同一 VLAN（L2 广播域）\*\*中接入了两台路由器（LAN 口），例如：

<table id="bkmrk-%E8%AE%BE%E5%A4%87-ip-%E7%BD%91%E5%85%B3%E8%A7%92%E8%89%B2-router1-1"><thead><tr><th>设备</th><th>IP</th><th>网关角色</th></tr></thead><tbody><tr><td>Router1</td><td>10.2.2.253</td><td>默认网关 A</td></tr><tr><td>Router2</td><td>10.2.2.254</td><td>默认网关 B</td></tr><tr><td>VM1</td><td>10.2.2.11</td><td>默认网关 10.2.2.253</td></tr><tr><td>VM2</td><td>10.2.2.12</td><td>默认网关 10.2.2.254</td></tr><tr><td>Switch</td><td>VLAN 10</td><td>同一广播域</td></tr></tbody></table>

这种情况下：

- 两台路由器都会收到广播（ARP、DHCP、NetBIOS 等）；
- 如果虚拟机数量多（尤其是几十台 Hyper-V 虚机），每台虚机在 ARP 解析时会广播；
- 两个路由器的 ARP 缓存中都会出现同一网段的大量 IP；
- 如果路由器或虚机错误响应了对方的 ARP 请求，就会出现：
    
    > **“ARP 抢答”或“错误网关 MAC 映射”**  
    > 导致部分主机发出的流量走错路由，从而时通时断。

---

## 二、症状判断：ARP 风暴或 ARP 异常的典型表现

<table id="bkmrk-%E7%97%87%E7%8A%B6-%E5%8F%AF%E8%83%BD%E5%8E%9F%E5%9B%A0-ssh%2F%E8%BF%9C%E7%A8%8B%E8%BF%9E%E6%8E%A5%E5%BB%B6%E8%BF%9F%E5%89%A7%E7%83%88"><thead><tr><th>症状</th><th>可能原因</th></tr></thead><tbody><tr><td>SSH/远程连接延迟剧烈波动</td><td>广播/ARP 占用链路</td></tr><tr><td>`ping` 丢包率高且无规律</td><td>同网段多设备争答 ARP</td></tr><tr><td>`arp -a` 结果频繁变化，MAC 地址不稳定</td><td>存在 ARP 抢答或冲突</td></tr><tr><td>交换机 CPU 使用率高</td><td>广播/组播风暴</td></tr><tr><td>路由器的 ARP 表闪烁、频繁老化</td><td>网络中 ARP 过多</td></tr></tbody></table>

---

## 三、排查方法与命令

### 1️⃣ 在堡垒机上查看 ARP 表动态变化

```bash
arp -n

```

观察一段时间：

- 若同一 IP 的 MAC 地址在几秒内频繁变化 → **ARP 冲突**。

Linux 可用：

```bash
watch -n 1 "ip neigh show dev eth0"

```

---

### 2️⃣ 在交换机上查看广播情况（锐捷命令）

进入特权模式：

```bash
enable
show interface gigabitEthernet 0/45

```

或：

```bash
show mac-address-table count
show cpu-usage
show interface counters errors

```

重点看是否有以下特征：

- 接口广播包数量极高；
- MAC 地址表频繁刷新；
- CPU 占用偏高。

---

### 3️⃣ 在交换机上查看广播风暴统计（如支持）

锐捷设备可以查看：

```bash
show storm-control interface all

```

---

### 4️⃣ 抓包验证（建议在堡垒机上）

```bash
tcpdump -i eth0 arp

```

如屏幕中连续滚动大量 ARP 请求（Request）和应答（Reply），说明网络广播严重。

---

## 四、验证与优化建议

### ✅ 验证是否 ARP 风暴

1. 抓包中看到同一 IP 有不同 MAC 地址答复；
2. `arp -n` 中 MAC 地址频繁变化；
3. ping 某个目标时出现间歇通；
4. CPU 利用率升高；  
    → **基本可以确认是 ARP 风暴/ARP 混乱。**

---

## 五、解决与优化方案（建议由易到难）

### **方案 1：隔离 VLAN（强烈推荐）**

- Router1、Router2 各自放入不同 VLAN，例如：
    
    
    - VLAN 10 → Router1 + VM组1
    - VLAN 20 → Router2 + VM组2
- 由交换机三层互通（或路由策略）控制。

✅ 优点：根除 ARP 冲突，彻底隔离广播域。  
⚠️ 缺点：需要调整虚拟机网段规划。

---

### **方案 2：启用静态 ARP 绑定**

在路由器和关键服务器上绑定固定的 IP-MAC：

```bash
arp -s 10.2.2.254 xx:xx:xx:xx:xx:xx

```

这样即使网络中有错误 ARP 也不会污染表项。

---

### **方案 3：开启锐捷的风暴抑制**

```bash
interface range gigabitEthernet 0/1-48
storm-control broadcast level 1.00
storm-control multicast level 1.00
storm-control unicast level 1.00

```

---

### **方案 4：使用 LACP 绑定网口提升带宽，而非增加路由器**

如果你的初衷是“增加出口带宽”，应考虑：

- **LACP 链路聚合** 或
- **双上联负载均衡（ECMP）**

而不是在同 VLAN 下增加路由器。

---

### **方案 5：监控验证恢复**

确认优化后再使用：

```bash
ping -f <目标IP>
arp -n
show interface counters

```

若延迟稳定、ARP 不再闪烁、CPU 降低 → 问题解决。

---

## ✅ 总结建议

<table id="bkmrk-%E9%97%AE%E9%A2%98-%E5%8E%9F%E5%9B%A0-%E6%9C%80%E4%BC%98%E8%A7%A3-ssh-%E5%BB%B6%E8%BF%9F%E3%80%81%E8%BF%9E%E6%8E%A5%E5%9B%B0"><thead><tr><th>问题</th><th>原因</th><th>最优解</th></tr></thead><tbody><tr><td>SSH 延迟、连接困难</td><td>同 VLAN 双网关引起 ARP 竞争</td><td>**拆分 VLAN，分别绑定各路由器**</td></tr><tr><td>间歇性断开</td><td>ARP 抢答或错误路由响应</td><td>静态 ARP + 广播风暴抑制</td></tr><tr><td>链路不稳定</td><td>广播风暴或 MAC 抖动</td><td>storm-control / VLAN 隔离</td></tr></tbody></table>

---

如果你愿意，我可以帮你：

- 画出你当前拓扑图；
- 给出基于锐捷交换机的**三 VLAN 规划+防风暴配置模板**；
- 并附上 **堡垒机上 tcpdump 分析脚本**，快速判断是否 ARP 风暴。

是否要我帮你生成这套完整分析方案？

好，**你在堡垒机上看到 ARP 表（MAC）没有变化**，这一步很重要 — 它基本上把「ARP 抢答 / ARP 风暴」作为**主要原因**排除掉了（至少对堡垒机自身来说它看到的网关 MAC 是稳定的）。下面我把可能的原因按优先级列清楚，并给出逐步、可执行的排查命令与判断要点 —— 你按顺序跑一遍并把关键输出贴回来，我可以帮你解读并给出解决措施。

---

## 一行结论（先给结论样式）

> **ARP 风暴可能性低**（堡垒机看到的 MAC 稳定）。现在需检查：交换机/端口级别的 MAC 表与错误计数、路由路径对称性（asymmetric routing）、连接追踪/防火墙表耗尽、虚拟化网络（Hyper-V）和 SSH 服务本身负载/限制。

---

## 二、排查步骤（按优先级执行）

### A. 在堡垒机（Linux）上排查 — 快速检测本机是否成为瓶颈

1. 查看 CPU / 内存 / IO 是否饱和（SSH 卡顿常见原因）

```bash
uptime
top -b -n1 | head -n 12
vmstat 1 5
iostat -x 1 3   # 若未安装 sysstat: apt install sysstat

```

**异常判断**：CPU 长期 &gt;80%、大量 iowait、swap 使用高 → 性能瓶颈。

2. 查看 sshd 日志与系统日志

```bash
sudo tail -n 200 /var/log/auth.log
sudo journalctl -u ssh -n 200
sudo dmesg | tail -n 50

```

**异常判断**：有大量 `sshd: unable to fork`、`connection reset`、权限错误等 → sshd 问题或资源耗尽。

3. 查看网络错误/丢包/速率

```bash
cat /proc/net/dev
# 或用 ip -s link
ip -s link show eth0
ethtool -S eth0   # 某些驱动支持，看错误计数

```

**异常判断**：RX/TX errors、drops 非常多 → 物理链路/驱动/duplex 问题。

4. 实时抓包观察 SSH 交互是否被丢包或 reset

```bash
sudo tcpdump -i eth0 tcp port 22 -w /tmp/ssh_capture.pcap
# 在出现问题时停止并分析：tcpdump -r /tmp/ssh_capture.pcap -tt -n
# 或用实时观察：
sudo tcpdump -i eth0 -n 'tcp port 22 and (tcp[tcpflags] & (tcp-rst) != 0 or tcp[tcpflags] & (tcp-ack) != 0)'

```

**观察点**：是否有大量 TCP RST、重复 ACK、长时间没有响应等。

5. 检查 conntrack / nf\_conntrack（若 NAT 较多会影响）

```bash
sudo apt-get install -y conntrack   # 若未安装
sudo conntrack -S
sudo conntrack -L | wc -l
cat /proc/sys/net/netfilter/nf_conntrack_max

```

**异常判断**：表接近或已满（entries=接近 max）→ 连接被拒或重置，尤其在 NAT-heavy 场景。

6. 检查 IP 层设置（rp\_filter 等）

```bash
sysctl net.ipv4.conf.all.rp_filter
sysctl net.ipv4.conf.eth0.rp_filter
sysctl net.ipv4.tcp_syncookies

```

若开启严格 rp\_filter（=1），某些不对称路由返回包会被丢弃；可临时设为 0 测试：

```bash
sudo sysctl -w net.ipv4.conf.all.rp_filter=0

```

---

### B. 在交换机上排查（锐捷 / 或你当前交换机） — 检查 L2 层是否异常

> 目标：确认没有 MAC table flapping、接口错误、广播风暴、STP 问题

1. **查看 MAC 地址表中关键 MAC 是否稳定**（查看堡垒机 IP/MAC 与两台路由器 MAC）

```text
# 锐捷风格示例
show mac-address-table dynamic
show mac-address-table address <MAC地址>

```

**观察点**：是否同一 MAC 在不同端口间频繁切换（flapping）。

2. **查看接口错误 / 带宽利用 / 广播计数**

```text
show interface gigabitethernet 1/0/45   # 路由器1连接口
show interface gigabitethernet 1/0/46   # 路由器1另口（若有）
show interface counters errors
show interface utilization
show cpu-usage

```

**异常判断**：接口错误（CRC、FCS）、高丢包、接口上下线或高 CPU → 物理链路或风暴。

3. **检查 STP / loop**

```text
show spanning-tree

```

若网内有loop或STP频繁变更，会出现间歇性通信问题。

4. **开启或查看 storm-control / port-security 配置**  
    如果没有风暴抑制，建议开启（取决设备语法）。

---

### C. 在路由器上排查 — 路由/ARP/策略

> 目标：确认两台路由器不会互相“抢答”或路由方向导致不对称

1. **核对路由器 ARP 表与 MAC**（确认路由器看到的下一跳）  
    在两台路由器上分别看 ARP、CAM：

```bash
show arp
show mac-address-table

```

2. **检查是否有 proxy-arp、NAT 会话或策略**  
    如果路由器做了 proxy-arp 或代理，会影响主机的出/入流向。
3. **检查路由器是否对某些会话做了策略路由或 NAPT／连接跟踪**  
    大量 NAT 表或连接跟踪满会导致会话中断。

---

### D. 在 Hyper-V / 服务器上排查虚拟化网络（关键）

> Hyper-V 下一般是虚拟交换机、vNIC、MAC 模式或 MAC spoofing 导致 MAC 表跳动或桥接问题

1. 在 Hyper-V 宿主机上检查 vSwitch、网卡绑定和 team 配置（PowerShell）

```powershell
Get-VMSwitch
Get-VMNetworkAdapter -VMName <VM名> | Select VMName, SwitchName, MacAddress, MacAddressSpoofing
Get-NetAdapter | Format-Table -Auto

```

**异常判断**：同一物理口上有多个桥接且开启 Mac Spoofing，或绑定多路径（错误配置）会造成 L2 异常。

2. 检查宿主机网络接口统计 `netstat -i` / `Get-NetAdapterStatistics`，看是否有异常流量或错误。

---

## 三、具体快速验证流程（按顺序，若某步发现明显异常可先修复再继续）

1. 在堡垒机执行：`top`, `ip -s link show eth0`, `conntrack -S`, `sudo tcpdump -i eth0 tcp port 22`（观察是否被重置或大量重传）  
    → 若堡垒机资源告急或有大量 RST/重传，优先处理堡垒机。
2. 在交换机执行：`show mac-address-table dynamic | include <堡垒MAC>` 与 `show interface counters errors`  
    → 若 MAC 在端口间切换或接口错误高，重点排查物理链路/虚拟交换机配置/网卡驱动。
3. 在两台路由器上查看 `show arp` 与 `show ip route`、NAT/conntrack 状态  
    → 若 conntrack 满或 NAT 表很多（/proc/net/nf\_conntrack），需要调整或增加连接数限制。
4. 在 Hyper-V 宿主机检查 vSwitch 与 Mac Spoofing  
    → 关闭不必要的 MAC 泄露与桥接配置。

---

## 四、常见可立即尝试的临时修复（安全影响小，可在线测试）

1. 在堡垒机临时关闭 rp\_filter（见上），观察连接是否稳定。
2. 检查/调整 sshd 配置：`MaxStartups`、`UseDNS no`，防止 DNS 延迟影响新连接。
3. 在交换机对服务器和路由器端口启用 storm-control（限制广播），并开启端口优先级 / policer。
4. 对路由器和关键服务器（堡垒）做静态 ARP（仅作为临时手段）：

```bash
# 在堡垒机
sudo ip neigh replace 10.2.2.254 lladdr aa:bb:cc:dd:ee:ff nud permanent dev eth0

```

（注意：静态 ARP 只适合关键节点用于短期排错）

---

## 五、你现在可以先跑的命令（把结果粘来我来判断）

请在堡垒机/交换机/路由器/Hyper-V宿主机分别运行并贴回关键输出（或至少贴部分）：

**堡垒机**

```bash
top -b -n1 | head -n 12
ip -s link show eth0
cat /proc/net/dev
sudo conntrack -S
sudo conntrack -L | wc -l
sudo tcpdump -n -i eth0 -c 200 tcp port 22 > /tmp/ssh200.pcap

```

**交换机（锐捷或等效）**

```text
show mac-address-table dynamic | include 00:13:5d:02:97:25   # 举例堡垒MAC
show interface gigabitEthernet 1/0/45   # 路由器端口
show interface counters errors
show cpu-usage
show spanning-tree

```

**两台路由器**

```text
show arp
show ip nat translations count    # 若有 NAT
show conntrack summary             # 或查看 NAT/conntrack 状态

```

**Hyper-V 宿主机（PowerShell）**

```powershell
Get-VMSwitch
Get-VMNetworkAdapter -VMName <some-vm> | Select VMName, MacAddress, MacAddressSpoofing
Get-NetAdapterStatistics -Name "Ethernet"   # 或具体物理网卡名

```

---

## 六、补充判断要点（快速帮助你判定）

- 若交换机 `show mac-address-table` 显示**同一 MAC 在不同端口不断切换** → 是 L2 问题（可能桥接/虚拟交换机误配置或loop）
- 若交换机/接口 `errors` 很多或 CRC/FCS 错误 → 是物理链路或双工错配
- 若 conntrack 数接近上限或 NAT 表大量短时连接（比如大并发外连）→ 会导致新 SSH 连接失败/重置
- 若 tcpdump 显示大量 RST 或重复 ACK → TCP 层被中断或路由返回路径不稳

---

## 七、最后的建议（若短期内要稳定）

- **最稳妥**：把两台路由器**分别放到不同 VLAN**（推荐）或使用 VRRP/负载均衡方案。
- **临时**：对堡垒机做静态 ARP、关闭 rp\_filter、检查 sshd 限制、在交换机启用 storm-control 与端口安全。
- **长期**：规划出口链路聚合或上层做多 WAN 负载/策略路由，避免在同一 L2 域并行两网关。

---

把上述命令的输出贴过来（尤其是 `ip -s link`、交换机的 `show mac-address-table dynamic` 与 `show interface 1/0/45`、以及 `conntrack -S`），我会基于这些结果给出**下一步精确修复**——比如如何调整交换机端口、是否需要静态 ARP、或配置 VRRP/策略路由。

非常好的排查数据 👍  
从你贴的这些信息可以得出几个关键结论：

---

### ✅ 一、初步判断结果

从交换机当前状态来看，**ARP 风暴或二层广播风暴的迹象目前不明显**。  
我们逐条分析：

#### 1️⃣ **MAC 地址表稳定**

```
Dynamic Address Count : 37

```

说明交换机学习到的二层设备数量正常，没有频繁波动，也没有出现同一 MAC 地址快速在不同端口间跳转（即 MAC flapping），这基本排除了大规模广播/环路的情况。

#### 2️⃣ **接口统计干净**

```
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
0 output errors, 0 collisions, 0 interface resets

```

说明链路层物理质量良好，无冲突、无丢包。

#### 3️⃣ **广播报文数量虽存在但不异常**

```
Received 18236138 broadcasts （72天内）

```

这相当于每天约 25 万个广播包，大约每秒 2~3 个广播包，对于大规模虚拟机环境是正常的。

#### ✅ **结论**：

当前时段并未发生 ARP 风暴，也未发现环路迹象。  
但问题可能**在高峰期 NAT 并发 40 万**时才触发，这种情况往往不是单纯 ARP 风暴，而是以下几种\*\*“隐性拥塞”\*\*导致。

---

### ⚠️ 二、可能的真实瓶颈方向

你描述的现象：

> 高峰期时堡垒机远程困难、SSH 延迟甚至断连  
> 而平时正常

说明瓶颈发生在**高并发 + 同一 VLAN 多路由出口环境下**。重点怀疑以下几点：

#### 1️⃣ **两台路由器同时接入同 VLAN，存在 ARP 冲突风险**

- 即使你人为区分默认网关（10.2.2.253 / 10.2.2.254），  
    但所有服务器都在 VLAN10 同一广播域内。
- 每个虚拟机会定期发 ARP 请求，如：
    
    ```
    who-has 10.2.2.254 tell 10.2.2.x
    who-has 10.2.2.253 tell 10.2.2.x
    
    ```
- 当虚拟机量很大（上百台甚至上千台）时，会造成 **ARP request 洪泛广播**。  
    若路由器的 ARP 缓存刷新周期较短（比如 60 秒），则在高并发 NAT 时会形成持续广播洪流，**CPU 飙高、ARP 表溢出、转发延迟**。

✅ 建议：

- 在两台路由器上手动固定 ARP（静态绑定）主机或堡垒机的 MAC 地址；
- 调整路由器 ARP 表老化时间（例如改为 600 秒以上）；
- 让不同网关的主机**放在不同 VLAN**（强烈建议）；
    
    > 即 VLAN10 → 走 10.2.2.254  
    > VLAN20 → 走 10.2.3.254  
    > 通过三层互通区分出网路径。

---

#### 2️⃣ **NAT 会话表溢出或 CPU 过高**

高峰期 40 万 NAT 并发属于中高强度，如果路由器 CPU/NAT 表容量不足（尤其是中低端型号），  
路由器在处理新建连接时会丢包、重传，导致堡垒机 SSH 卡顿。

✅ 建议检查：  
在两台路由器上执行：

```
show cpu
show nat session summary
show nat statistics
show log

```

关注是否有：

- NAT 会话数接近最大值；
- CPU 使用率高；
- NAT 端口耗尽；
- 出现 ICMP redirect 或 NAT 分配失败日志。

---

#### 3️⃣ **堡垒机网卡队列或 vSwitch 拥堵**

堡垒机往往是 Hyper-V 虚拟机，如果物理网卡队列、vSwitch 绑定、RSS 未调优，在高并发 ARP 或 NAT 回包时容易丢包。

✅ 建议：  
在堡垒机上运行：

```
ethtool -S eth0 | grep -E "drop|err"
ss -s
sar -n DEV 1

```

观察是否有接收丢包、延迟、socket backlog。

---

### 🧪 三、验证是否真为 ARP 风暴的方法

#### 方法1：在堡垒机上抓包

```bash
tcpdump -i eth0 arp

```

如果每秒出现大量 `who-has`，且目的 IP 涉及 10.2.2.253 / 10.2.2.254，  
说明确实存在 ARP 洪流。

#### 方法2：在交换机上统计广播包速率

```
show interface counters broadcast

```

（有的锐捷命令为 `show interface traffic`）  
若每秒广播帧数超过几百以上持续存在，则为风暴迹象。

#### 方法3：开启广播风暴抑制

如果设备支持，可执行：

```
interface range te0/1-48
storm-control broadcast level 0.5
storm-control action shutdown

```

（限制广播流量占带宽 0.5%）

---

### 🔧 四、整改建议汇总（按优先级）

<table id="bkmrk-%E4%BC%98%E5%85%88%E7%BA%A7-%E5%BB%BA%E8%AE%AE%E6%8E%AA%E6%96%BD-%E8%AF%B4%E6%98%8E-%F0%9F%94%B4-%E9%AB%98-vlan"><thead><tr><th>优先级</th><th>建议措施</th><th>说明</th></tr></thead><tbody><tr><td>🔴 高</td><td>VLAN 划分路由出口</td><td>10.2.2.x / 10.2.3.x 分离广播域</td></tr><tr><td>🔴 高</td><td>固定路由器静态 ARP / 提高老化时间</td><td>减少广播洪流</td></tr><tr><td>🟠 中</td><td>检查路由器 NAT 并发与 CPU 负载</td><td>防止性能瓶颈</td></tr><tr><td>🟠 中</td><td>堡垒机抓包验证 ARP 是否异常</td><td>实地确认是否风暴</td></tr><tr><td>🟢 低</td><td>交换机开启广播风暴抑制</td><td>预防性措施</td></tr></tbody></table>

---

如果你方便提供：

- 路由器品牌型号（或 NAT 性能参数）
- 高峰期时 `tcpdump -i eth0 arp` 的抓包数据（10秒左右）
- 路由器 CPU 与 NAT 表使用率

我可以帮你进一步判断到底是 **ARP 风暴**、**NAT 过载** 还是 **虚拟交换队列瓶颈**。  
是否希望我帮你写一套抓包+分析命令脚本（堡垒机用）来自动判断是否ARP洪流？

# 典型的跨境网络问题案例—单向丢包、本地正常、国际链路特定路径问题

这是一个非常典型的跨境网络问题。您描述的现象——\*\*单向丢包、本地正常、国际链路特定路径问题\*\*——指向了中国大陆出境网络链路的某个环节。

问题可以精确定位为：\*\*从中国大陆到越南服务器的网络路径中，某个或某些中间节点出现了拥塞或策略性限制。\*\*

以下是系统性的排查步骤，从易到难，您可以根据自身角色（用户 or 运维）选择操作：

\### 第一步：基础信息收集与初步分析

1\. \*\*确认目标IP详情\*\*：  
 \* 使用 `whois` 命令查询这个越南IP的归属信息。确认它是否属于某个知名的云服务商（如AWS、GCP、Azure、越南本地运营商如VNPT、FPT等）。这有助于后续判断问题范围。

2\. \*\*使用 `MTR` (或 `traceroute`) 进行路径追踪和持续诊断\*\*  
 \* \*\*这是最关键的一步。\*\* Ping只能告诉你“有丢包”，而MTR可以告诉你“在哪里丢包”。  
 \* \*\*在上海的网络执行：\*\*  
 ```bash  
 # Linux/macOS  
 mtr -r -c 100 &lt;越南服务器IP&gt; &gt; mtr\_report\_shanghai.txt  
 # Windows (需要安装WinMTR)  
 # 使用WinMTR图形化工具，输入目标IP，测试100次然后保存报告。  
 ```  
 \* \*\*参数解释\*\*：`-r` 表示报告模式，`-c 100` 表示发送100个包。包数越多，统计越准确。  
 \* \*\*重点分析MTR报告\*\*：  
 \* \*\*最后一跳是否丢包？\*\* 如果只有最后一跳丢包，可能是越南服务器本身的防火墙（如iptables）丢弃了ICMP包。但您在服务器上测试正常，所以这个可能性较低，但不能完全排除。  
 \* \*\*中间某几跳开始出现丢包\*\*：这是最常见的情况。注意观察丢包是从第几跳开始的，并且后续所有跳数是否都延续了这个丢包率。  
 \* \*\*如果从某一跳开始，丢包率突然出现并持续到终点\*\*：问题就出在这一跳所在的网络节点或之后的链路上。  
 \* \*\*如果只有某一跳丢包100%，但其前后跳都正常\*\*：这通常是该节点设置了不响应或限速响应ICMP请求，属于正常现象（假丢包）。\*\*关键要看最终目的地的丢包率\*\*。

\### 第二步：分析MTR报告，定位问题节点

拿到MTR报告后，你需要像侦探一样分析每个节点：

1\. \*\*识别网络运营商\*\*：  
 \* 查看每一跳的IP，用 `whois` 查询其归属。  
 \* 典型的路径可能是：`上海本地运营商 (电信/联通/移动) -&gt; 中国国际出口 -&gt; 海外运营商 (如NTT, Cogent, Telia) -&gt; 越南本地运营商 -&gt; 目标服务器`。

2\. \*\*判断问题类型\*\*：  
 \* \*\*问题出现在中国国际出口网关之后的第一、二跳\*\*：很可能是国际出口拥塞，或者你的运营商（AS）与海外运营商之间的互联点（Peering）质量不佳。这在晚高峰时段尤为常见。  
 \* \*\*问题出现在某个特定的海外运营商（如NTT）链路上\*\*：说明该中间运营商网络存在拥塞或路由问题。这是一个非常常见的原因。  
 \* \*\*问题出现在进入越南本地运营商之后\*\*：可能是越南本地运营商到其上游的互联问题。

\### 第三步：多维度交叉验证

为了进一步证实你的判断，可以进行以下测试：

1\. \*\*从不同源端测试\*\*：  
 \* 如果你有其他地方的服务器（例如北京、广州、香港、新加坡等），从这些地方同时MTR到越南服务器。如果只有上海出发的路径有问题，那么问题就锁定在“上海出境”的链路上。如果所有中国大陆节点都有问题，但香港/新加坡正常，那基本确定是中国大陆国际出口的普遍问题。

2\. \*\*使用不同协议测试\*\*：  
 \* Ping使用的是ICMP协议。有些网络设备会优先处理或限速处理ICMP包。  
 \* 可以尝试使用TCP/UDP进行测试，例如用 `tcping` 工具来测试越南服务器的某个端口（如22/SSH, 80/HTTP）。如果TCP连接不丢包，而ICMP丢包，说明链路上有针对ICMP的策略性限制。

3\. \*\*测试反向路径\*\*：  
 \* 在越南服务器上，MTR回你上海的IP地址。路径通常是不对称的，回来的路径可能完全正常。这更能证明问题是单向的，出在上海出去的方向上。

\### 第四步：解决方案与缓解措施

定位到问题后，解决方案取决于问题的根源和你的控制能力：

1\. \*\*你无法控制中间网络\*\*（大多数情况）：  
 \* \*\*优化路由\*\*：这是最有效的解决方案。联系你的服务器提供商（越南那边），询问他们是否有不同的IP段或网络优化线路（如CN2 GIA, CMI等面向中国优化的线路）。  
 \* \*\*使用中转服务器\*\*：购买一个国内访问质量好的香港、新加坡或广州的云服务器作为跳板。流量路径变为：`上海 -&gt; 中转服务器（优质线路）-&gt; 越南服务器`。  
 \* \*\*使用商用SD-WAN或加速服务\*\*：这些服务通过优化的私有网络 backbone 来承载你的跨境流量，绕过有问题的公共互联网节点。

2\. \*\*如果你是服务提供商，可以对服务器端做操作\*\*：  
 \* 联系你的上游网络提供商（越南运营商），向他们提供你从上海测试的MTR报告，告诉他们从中国访问他们的网络在某个节点（比如IP是xxx.xxx.xxx.xxx，属于NTT）有严重丢包，请求他们检查并优化路由。

\### 总结与排查流程图

你的现象：\*\*上海 -&gt; 越南丢包，越南本地正常，越南 -&gt; 上海/谷歌正常。\*\*

\*\*结论\*\*：问题几乎100%确定在 \*\*上海到越南之间的公网国际链路上\*\*。

\*\*排查行动清单\*\*：

1\. \*\*【立即执行】\*\* 在上海用 `MTR` 连续测试100次到越南IP，保存报告。  
2\. \*\*【分析】\*\* 查看MTR报告，找到\*\*第一个开始持续丢包的节点\*\*，查询该IP的归属运营商。  
3\. \*\*【验证】\*\* 用 `tcping` 测试越南服务器的TCP端口，确认是ICMP问题还是普遍丢包。  
4\. \*\*【交叉验证】\*\* 从其他地区（如有）进行MTR测试，缩小问题范围。  
5\. \*\*【解决】\*\* 根据分析结果：  
 \* 若是中间运营商问题，考虑\*\*更换越南服务器的IP段\*\*或\*\*使用中转服务器\*\*。  
 \* 若是国际出口普遍问题，只能通过\*\*网络加速服务\*\*或等待运营商自行恢复。

Start: 2025-11-06T09:31:31+0800  
HOST: ubuntu24-00 Loss% Snt Last Avg Best Wrst StDev  
 1.|-- \_gateway 0.0% 100 1.0 1.2 0.8 12.3 1.5  
 2.|-- 192.168.11.254 0.0% 100 1.1 1.4 0.8 5.3 0.7  
 3.|-- 61.173.60.1 0.0% 100 7.2 6.4 2.7 11.7 1.8  
 4.|-- 61.152.7.145 0.0% 100 2.7 3.5 2.2 46.3 4.4  
 5.|-- 61.152.24.130 91.0% 100 3.9 6.1 3.6 9.8 2.3  
 6.|-- 202.97.24.142 81.0% 100 16.4 9.0 2.7 18.8 6.4  
 7.|-- 202.97.12.182 62.0% 100 5.5 5.4 4.5 8.6 0.8  
 8.|-- 202.97.111.62 0.0% 100 29.2 29.2 28.1 38.1 1.2  
 9.|-- ??? 100.0 100 0.0 0.0 0.0 0.0 0.0  
 10.|-- localhost 30.0% 100 157.6 156.1 145.1 174.4 6.1  
 11.|-- localhost 33.0% 100 145.8 146.8 144.2 152.5 1.6  
 12.|-- 115.84.181.178 42.0% 100 152.7 147.2 141.3 155.4 4.4  
 13.|-- 115.84.180.133 34.0% 100 159.5 156.5 148.1 164.8 5.0  
 14.|-- 171.244.27.90 37.0% 100 151.0 149.3 148.1 151.8 0.9

非常好！这份MTR报告非常清晰，准确地揭示了问题所在。我们来逐跳分析一下。

\### MTR报告深度分析

\*\*核心结论：\*\* 问题出在\*\*中国电信的国际出口\*\*以及其与越南运营商（FPT）的互联点。这是一个典型的跨境网络拥塞和劣质路由问题。

\---

\#### 关键问题点定位：

1\. \*\*第5-7跳（国内骨干网节点）：\*\*  
 \* `61.152.24.130` (丢包91%) -&gt; `202.97.24.142` (丢包81%) -&gt; `202.97.12.182` (丢包62%)  
 \* \*\*分析：\*\* 这些IP都属于`ChinaNet`（中国电信骨干网）。`202.97.x.x` 这个段更是广为人知的中国电信国际出口节点。在这里出现如此高的丢包率，说明\*\*从上海到中国电信国际出口的路径上就已经出现了严重拥塞\*\*。这可能是本地城域网到骨干网的汇聚点，也可能是国际出口的入口正在实施流量整形或遇到了硬件瓶颈。

2\. \*\*第8跳及之后（国际及海外网络）：\*\*  
 \* `202.97.111.62` (丢包0%)：这是一个关键转折点。虽然这一跳不丢包，但延迟从5ms跳增至29ms，说明已经通过了国际出口网关，进入了国际传输阶段。  
 \* 第9跳 `???` (丢包100%)：这是一个匿名节点，通常是不响应ICMP的路由器，可以忽略。  
 \* \*\*第10-14跳（进入越南网络）：\*\*  
 \* 这些IP（如 `115.84.181.178`）属于越南的 \*\*FPT Telecom\*\*。  
 \* \*\*关键发现：\*\* 丢包率从第10跳的30%开始，一直持续到终点（37%）。  
 \* \*\*分析：\*\* 这说明了两个问题：  
 \* \*\*问题A（主要）：\*\* 在中国电信国际出口处已经发生了严重的丢包（第5-7跳），后续的路径只是继承了这部分丢包。  
 \* \*\*问题B（次要）：\*\* 中国电信与越南FPT的互联点（Peering）质量也非常差，可能带宽不足或拥塞，导致了额外的丢包和较高的延迟（约150ms）。

\#### 为什么越南本地测试正常？

因为从越南FPT服务器出发，访问任何目标（包括谷歌、上海DNS），走的是FPT的出站路由，可能经过的是FPT与其它运营商（如Telia, NTT）的优质互联点，或者其本地网络本身就没有拥塞。\*\*网络路径是单向的，问题仅限于“从中国电信进入越南FPT”的这个方向。\*\*

\---

\### 解决方案

既然问题根源是公网的国际路由质量，而这是你无法控制的，那么解决方案的核心就是 \*\*“绕开”\*\* 这条有问题的路径。

\#### 1. 立即尝试的缓解措施（治标）

\* \*\*更换本地运营商：\*\* 如果你的上海网络环境可以切换（例如从电信切换到中国联通或移动），请立即测试。不同运营商出国的路由完全不同，很可能联通/移动到越南FPT的路径是正常的。  
\* \*\*使用网络加速器：\*\* 在本地电脑上使用商业VPN或SD-WAN加速器。这些服务通过自己的优化网络（通常是专线或高质量中转节点）来承载你的流量，从而绕过拥堵的公共国际出口。

\#### 2. 根本性的解决方案（治本）

\* \*\*【首选】要求越南服务器提供商优化路由：\*\*  
 \* 将这份MTR报告发送给越南服务器的提供商（如果是FPT，就直接联系FPT；如果是租用的其他厂商，就联系他们）。  
 \* \*\*明确提出诉求：\*\* “从中国上海电信网络访问我们的IP `171.244.27.90`，在进入你们FPT网络之前和之后都存在严重丢包。请问是否可以为我们提供面向中国优化的线路（如CN2 GIA）？或者调整BGP路由，让我们从中国访问时走香港、新加坡等质量更好的入口？”  
 \* 专业的云服务商（如AWS、GCP）或有中国业务的公司通常会提供这种优化线路。

\* \*\*【技术方案】自建中转/跳板服务器：\*\*  
 \* 购买一台位于\*\*香港、新加坡或日本\*\*的云服务器（VPS），这些地区与中国和越南的连接通常都很好。  
 \* 配置你的应用，让所有去往越南服务器的流量都先经过这台香港服务器中转。  
 \* \*\*新路径：\*\* `上海 -&gt; (优质线路) -&gt; 香港中转服务器 -&gt; (优质线路) -&gt; 越南服务器`  
 \* 这个方法技术可控性最高，但会增加一些成本和延迟。

\* \*\*考虑更换服务器提供商：\*\*  
 \* 如果当前提供商无法解决路由问题，可以考虑换用那些明确提供“中国优化线路”的越南或东南亚云服务商。

\### 总结与行动建议

1\. \*\*定位：\*\* 问题出在 \*\*中国电信国际出口\*\* 和 \*\*中国电信-越南FPT互联链路\*\*。  
2\. \*\*验证：\*\* 立即尝试切换上海本地的网络到\*\*联通或移动\*\*，重新测试MTR，很可能问题会大大缓解或消失。  
3\. \*\*沟通：\*\* 将这份详细的MTR报告作为证据，正式向你的越南服务器供应商提出优化请求。  
4\. \*\*决策：\*\* 如果业务对网络稳定性要求高，且供应商无法快速解决，\*\*部署香港中转服务器\*\*是目前最可靠、最快速的终极解决方案。

这份MTR报告已经完美地完成了它的使命，清晰地指明了问题的“事故现场”。现在你的重点应该从“排查”转向“沟通和实施解决方案”。

# Cisco 3945 路由器兼容的IP电话型号推荐

很好的问题。你提到的是 Cisco **3945** 路由器（ISR-G2 多业务路由器）。在选择 IP 电话时，要考虑它作为语音网关（Voice Gateway） + 呼叫控制 (例如使用 **Cisco Unified Communications Manager Express, CME**) 的能力。以下是对兼容型号的分析 +一些推荐。

---

## 一、兼容性分析

1. **CME（CallManager Express） 支持情况**
    
    
    - 根据 Cisco 的 CME 9.0 兼容性矩阵 (CUCME compatibility matrix)，3945 支持 **SCCP** 和 **SIP** 电话。 ([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/requirements/guide/cme90spc.html?utm_source=chatgpt.com "CUCME compatibility Matrix 9.0 - Cisco"))
    - CME 9.0 最大支持 350 部 SIP 或 SCCP 电话（总数限制）。 ([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/requirements/guide/cme90spc.html?utm_source=chatgpt.com "CUCME compatibility Matrix 9.0 - Cisco"))
    - 在 “Phone Feature Support Guide” 中，CME 支持多种型号的 SIP 电话：3905, 6901, 6921, 8941, 7821, 9951 等。 ([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/feature/phone_feature/phone_feature_support_guide.html?utm_source=chatgpt.com "Phone Feature Support Guide for Unified CME, Unified SRST, Unified E-SRST, and Unified Secure SRST - Cisco"))
    - 对于较老型号，CME 9.x 支持 **6921 / 6941 / 6945** 等 SIP 电话。 ([思科社区](https://community.cisco.com/t5/ip-telephony-and-phones/sccp-support-for-6921-6941-6945-in-cme-9-x/td-p/2114473?utm_source=chatgpt.com "SCCP support for 6921/6941/6945 in CME 9.X - Cisco Community"))
2. **硬件能力**
    
    
    - 3945 路由器本身在语音方面有 DSP 插槽 (PVDM)，可以支持较大规模的语音会话。 ([Cisco](https://www.cisco.com/c/zh_cn/products/collateral/routers/3900-series-integrated-services-routers-isr/data-sheet-c78-553924.html?utm_source=chatgpt.com "Cisco 3900 系列集成多业务路由器 - Cisco"))
    - 根据 CME 矩阵，3945 的推荐 DRAM 是 1 GB。 ([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/requirements/guide/cme90spc.html?utm_source=chatgpt.com "CUCME compatibility Matrix 9.0 - Cisco"))

---

## 二、型号推荐

以下是一些与 3945 + CME 配合比较常见、兼容性较好的 Cisco IP 电话型号 +场景推荐：

### [Cisco 7821](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 性价比

*€131.84*

### [Cisco 7841](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 中端

*€135.45*

### [Cisco 3905](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 轻量桌面

*€42.50*

### [Cisco 6901](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 基础

*€143.35*

### [Cisco 6921](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 较旧但稳定

*€43.13*

### [Cisco 8945](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 商务

*€91.28*

### [Cisco 7965G](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 经典

*€77.35*

### [Cisco 7945G](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)

#### 经典语音

*€19.00*

下面是几个推荐型号 +说明：

- **[Cisco 7821](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    这是一个比较新的 7800 系列电话。CME 支持该型号 (SIP)。它在语音通话和功能性之间做了较好平衡。
- **[Cisco 7841](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    4 行 LCD 屏幕，适合办公室环境，功能较全。
- **[Cisco 3905](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    非常基础的 SIP 电话，在 CME 矩阵中被明确列出。([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/requirements/guide/cme90spc.html?utm_source=chatgpt.com "CUCME compatibility Matrix 9.0 - Cisco")) 适合语音量不大，但想节约成本的场合。
- **[Cisco 6901](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    紧凑型电话，适合空间有限的工位。CME 支持 6901 的 SIP 固件。([Cisco](https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/requirements/guide/cme90spc.html?utm_source=chatgpt.com "CUCME compatibility Matrix 9.0 - Cisco"))
- **[Cisco 6921](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    功能更完善一些，有较好的显示界面。CME 9.x 支持该机型。([思科社区](https://community.cisco.com/t5/ip-telephony-and-phones/sccp-support-for-6921-6941-6945-in-cme-9-x/td-p/2114473?utm_source=chatgpt.com "SCCP support for 6921/6941/6945 in CME 9.X - Cisco Community"))
- **[Cisco 8945](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    SIP 支持，界面更现代。适合对电话界面和功能有更高要求的用户。
- **[Cisco 7965G](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    经典型号，支持 SCCP 和 SIP（视固件而定），功能全面。
- **[Cisco 7945G](https://chatgpt.com/c/691fd083-37fc-8329-9160-936a6e064e2c)**  
    更旧但仍常用，适合语音办公环境。

---

## 三、建议

- **评估呼叫量和需求**：如果你的语音量不大 (比如几十部电话)，基础型号（如 3905）就足够。如果是正式办公环境，建议用 7800 或 8900 系列。
- **确定协议 (SIP vs SCCP)**：一般建议使用 SIP，因为更通用，配置灵活。确认电话固件版本支持你在 CME 上使用的协议。
- **电源**：这些电话大多数支持 PoE (802.3af)，确保你的交换机或路由器端口支持 PoE。
- **固件管理**：需要配置 TFTP 服务器，在 CME 中放置正确的固件 (SIP / SCCP) 以便电话启动时下载。

---

如果你愿意，我可以帮你选几款 **目前在德国 /中国市场比较好买 (库存充足)、性价比高** 的 Cisco IP 电话，你要我帮你看吗？

下面我直接告诉你：**在 Cisco 3945 + CME 环境中，新增 Cisco 7821 / 7841（SIP 电话）的必要配置是什么**。你的当前配置主要是 **SCCP** 固件（7921、7945、7975），所以只要新增 **SIP 电话固件的 load 配置** + **voice register** 区域即可。

---

# ✅ 一、Cisco 7821 / 7841 属于 7800 系列 —— **只支持 SIP，不支持 SCCP**

因此它们**不能用 telephony-service + ephone** 方式，需要使用：

```
voice register global
voice register pool

```

也就是 CME 的 SIP 模式。

你的 CME 里两种可以共存（SCCP 和 SIP）。

---

# ✅ 二、必须新增的配置（关键）

## **1️⃣ 在 telephony-service 下增加 SIP firmware load（仅用于 TFTP 提供固件文件）**

先把固件放入 flash:（如：`sip78xx.12-0-1SR1-1.loads`）  
然后在 telephony-service 中添加：

```
telephony-service
 load 7821 sip78xx.12-0-1SR1-1
 load 7841 sip78xx.12-0-1SR1-1
 create cnf-files

```

> 注意：7800 系列共用同一 78xx 固件系列。

### 固件文件包括：

- sip78xx.12-0-1SR1-1.loads
- term78.default.loads
- XMLDefault.cnf.xml
- 其他 .sgn、.bin 文件

放进 `flash:/` 即可。

---

## **2️⃣ 启用 SIP 电话注册（必须）**

### 新增：

```
voice register global
 mode cme
 source-address 192.168.11.254 port 5060
 max-dn 600
 max-pool 300
 authenticate register
 tftp-path flash:
 create profile

```

如果你要中文界面，还可加：

```
 create profile sync 0001

```

---

## **3️⃣ 为每部 7821 / 7841 手机分配号码（类似 ephone-dn）**

```
voice register dn 1
 number 1001
 name User1001

```

再配手机号：

```
voice register pool 1
 id mac 0011.2233.4455
 type 7821
 number 1 dn 1
 codec g711ulaw
 no vad

```

7841 类似：

```
voice register pool 2
 id mac 00AA.BBCC.DDEE
 type 7841
 number 1 dn 2
 codec g711ulaw
 no vad

```

---

# 🔧 三、你的 telephony-service 是否要删除 SCCP？

**不需要。**  
CME 可以同时提供：

- SCCP 配置（你现有的 7921 / 7945 / 7975）
- SIP 配置（你新增的 7821 / 7841）

完全兼容。

---

# 📌 四、如果你希望电话自动获取固件

确保：

```
telephony-service
 cnf-file location flash:

```

SIP 电话启动时会从：

```
http://192.168.11.254/ITS/Default/ 
tftp://192.168.11.254

```

去下载 term78.default.loads。

如果需要，我可以给你完整的 **Cisco 7821/7841 CME 固件包名列表**。

---

# 📘 五、我帮你整理好最终需要增加的配置（可直接复制）

```
! --- TFTP 固件
telephony-service
 load 7821 sip78xx.12-0-1SR1-1
 load 7841 sip78xx.12-0-1SR1-1
 create cnf-files
!

! --- SIP CME 启动
voice register global
 mode cme
 source-address 192.168.11.254 port 5060
 tftp-path flash:
 max-dn 600
 max-pool 300
 authenticate register
 create profile
!

! --- 7821 电话
voice register dn 1
 number 1001
 name User1001

voice register pool 1
 id mac 0011.2233.4455
 type 7821
 number 1 dn 1
 codec g711ulaw
 no vad
!

! --- 7841 电话
voice register dn 2
 number 1002
 name User1002

voice register pool 2
 id mac 00aa.bbcc.ddee
 type 7841
 number 1 dn 2
 codec g711ulaw
 no vad

```

---

# 📞 如你需要，我可以继续提供：

✅ 完整 Cisco 78xx 固件包名称  
✅ 完整 `XMLDefault.cnf.xml` 样例  
✅ 完整 `SEPxxxx.cnf.xml` 生成内容（自动）  
✅ 你这台 3945 的 **完整 CME 模板配置**

你需要我帮你生成吗？

# H3C配置经典全面教程，非常适合初学者

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk-%E4%B8%80%E3%80%81h3c-msr%E8%B7%AF%E7%94%B1%E5%99%A8%E3%80%81%E4%BA%A4%E6%8D%A2%E6%9C%BA%E5%9F%BA%E6%9C%AC%E8%B0%83%E8%AF%95" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; text-size-adjust: 100%;"><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: center; line-height: 1.6em; visibility: visible;"><section data-mpa-powered-by="yiban.io" data-mpa-template="t" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-size-adjust: inherit; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: -apple-system-font, system-ui, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; background-color: rgb(255, 255, 255); visibility: visible;"><section data-mpa-template="t" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;"></section></section></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px; font-weight: bold; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 16px; visibility: visible;">一、H3C MSR路由器、交换机基本调试步骤</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px; font-weight: bold; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 15px; visibility: visible;">1.1如何登陆进路由器或交换机</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">第一次使用H3C系列路由器时，只能通过配置口(Console)进行配置。 </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">1.打开电脑调试软件(CRT、Xshell或MobaXterm等)；</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">2.设置终端参数a、命名此终端 H3C或者自己想命的名；</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">选择串口 ，设置终端具体参数(波特率等)；</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">3打开路由器的电源，路由器进行启动 ；</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">4.当路由器启动完毕后，回车几下，当出现&lt;H3C&gt;时即可配置路由器。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px; font-weight: bold;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 15px;">1.2路由器基本调试命令</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">1.使用本地用户进行telnet登录的认证</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]telnet server enable 打开路由器的telnet功能</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]configure-user count <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">5</span> 设置允许同时配置路由器的用户数</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]local-user<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);"> telnet</span> 添加本地用户(此处为telnet用户登陆时使用的用户名)</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]password simple <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">h3c</span> 设置telnet用户登陆时所使用的密码</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]service-type telnet 设置本地用户的服务类型(此处为telnet)\[H3C-luser-telnet\]level 3 设置本地用户的服务级别</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]quit 退出本地用户视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]\[H3C\]user-interface vty 0 4 进入用户视图 </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-ui-vty0-4\]authentication-mode scheme 选择“scheme”认证方式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.路由器接口的配置</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">为接口配置ip地址</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\] interface serial 3/0 进入某个端口</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Serial3/0\] ip address <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">200.1.1.1 255.255.255.0 </span> 为该端口设置ip地址</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Serial3/0\] undo shutdown 对该端口进行复位</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Serial3/0\] quit 退回到系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">3.静态路由或默认路由的配置</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]ip route-static <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">192.168.1.0 255.255.255.0 192.168.0.1 </span>添加一条静态路由\[H3C\]ip route-static <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">0.0.0.0 0.0.0.0 192.168.0.1 </span> 添加一条默认路由</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">4.配置文件的管理</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">display current-configuration 显示当前的配置文件</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt;save 保存配置文件</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">display interface<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);"> GigabitEthernet 0/0</span> 查看某端口的状态</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px; font-weight: bold;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 15px;"> 1.3 交换机的基本调试命令</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">1.创建VLAN并将端口加入到vlan中</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]vlan <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">10</span> 创建vlan 10</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-vlan100\]port ethernet <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">0/1</span> 将某个端口加入到vlan中</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-vlan100\]quit 退出到系统</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.创建vlan虚接口并为接口配置ip地址</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]interface vlan-interface <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">1</span> 创建vlan虚接口</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Vlan-interface100\] ip address <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">192.168.1.1 255.255.255.0 </span> 配置ip地址备</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">3. 配置默认路由</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\] interface vlan-interface 1</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Vlan-interface10\] ip address <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">192.168.1.1 255.255.255.0</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-Vlan-interface10\] quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\] ip route-static 0.0.0.0 0.0.0.0 <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(255, 76, 65);">192.168.1.2</span> 配置缺省路由 </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">4.设置端口类型</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]interface ethernet 0/1</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]port link-type trunk 将端口类型设置为trunk</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]port trunk permit vlan all trunk端口允许所有vlan通过</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]saveTrunk可以收发多个vlan的报文，用于交换机与交换机之间的互连</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">5.交换机设置telnet登录的认证配置命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;H3C&gt; system-view 进入系统视图 </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]local-user telnet 添加本地用户(此处为telnet用户登陆时使用的用户名)</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]password simple h3c 设置telnet用户登陆时所使用的密码</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]service-type telnet 设置本地用户的服务类型(此处为telnet)\[H3C-luser-telnet\]level 3 设置本地用户的服务级别</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-luser-telnet\]quit 退出本地用户视图</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C\]\[H3C\]user-interface vty 0 4 进入用户视图 </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[H3C-ui-vty0-4\]authentication-mode scheme 选择“scheme”认证方式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px; font-weight: bold;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 16px;">二、H3C交换机基本配置命令（入门级）</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 15px; font-weight: bold;">2.1 IP地址配置命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view----进入系统配置模式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] interface Vlan-interface 1---交换机出厂默认VLAN-1</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Vlan-interface1\]ip add 192.168.X.254 255.255.255.0–配置IP地址\[Quidway-Vlan-interface1\]quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] ip route-static 0.0.0.0 0.0.0.0 192.168.0.33-配置静态路由（网关）</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.2 远程登录配置命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view----进入系统配置模式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] user-interface vty 0 4</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-ui-vty0-4\] user privilege level 3—管理权限配置</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-ui-vty0-4\] set authentication password cipher 123456 （cipher为密文密码）</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.3 配置端口速率及端口双工命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view----进入系统配置模式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]interface Ethernet 1/0/1---进入的端口</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/1\] duplex full—配置端口为“全双工状态”</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/1\] speed 100---配置端口为“100M”如果是千兆端口可以配置成1000M。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.4 划分VLAN配置命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view----进入系统配置模式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]VLAN 100---创建VLAN---ID为:100</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]VLAN 101---创建VLAN---ID为:101</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-vlan100\] port Ethernet 1/0/1 to Ethernet 1/0/10----从第1口到第10口添加到VLAN 100</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-vlan101\] port Ethernet 1/0/11 to Ethernet 1/0/24----从第11口到第24口添加到VLAN 101</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.5 配置TRUNK命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">比如一栋宿舍楼需要两个网段，划分了两个VLAN为100和101，VLAN 100作为管理VLAN</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">配置命令如下：</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view----进入系统配置模式</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]VLAN 100 ---创建VLAN---ID为:100</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]VLAN 101 ---创建VLAN---ID为:101</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-vlan100\] port Ethernet 1/0/1 to Ethernet 1/0/10</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-vlan101\] port Ethernet 1/0/11 to Ethernet 1/0/24</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] interface Vlan-interface 100</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Vlan-interface100\]ip address 192.168.100.254 255.255.255.0</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Vlan-interface100\]quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]ip route-static 0.0.0.0 0.0.0.0 192.168.100.33 配置静态路由（网关）</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">上联端口为千兆端口GigabitEthernet1/1/1</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">在配置模式下配置命令如下：</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] interface GigabitEthernet 1/1/1 --进入上联端口</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-GigabitEthernet1/1/1\] port link-type trunk --TRUNK是端口汇聚的意思\[Quidway-GigabitEthernet1/1/1\] port trunk permit（允许）vlan all </span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-GigabitEthernet1/1/1\] duplex full—配置端口为“全双工状态”</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-GigabitEthernet1/1/1\] speed 1000---配置端口为“1000M”</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.6 SNMP配置命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]snmp-agent community read 1234---SNMP读的密码</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]snmp-agent community write 4567—SNMP写的密码</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]snmp-agent sys-info version all --SNMP软件版本有V1、V2c、V3这里配置的是允许所有版本。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-weight: bold;">2.7 配置防ARP攻击命令</span></span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">&lt;Quidway&gt;system-view</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]dhcp-snooping --开启交换机DHCP Snooping 功能。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">开启VLAN 1 内所有端口的ARP 入侵检测功能。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]vlan 1\[Quidway-vlan1\]arp detection enable</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-vlan1\]quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">设置上联端口Ethernet1/0/1 为DHCP Snooping 信任端口，ARP 信任端口。\[Quidway\]interface Ethernet1/0/1</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/1\]dhcp-snooping trust</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/1\]arp detection trust</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/1\]quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">  
</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">开启端口Ethernet1/0/2 上的ARP 报文限速功能，设置ARP 报文通过的最大速率为20pps。--目的是针对用户接入口，除上联端口外，下联用户端口建议都设置该命令。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\]interface Ethernet1/0/2</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/2\]arp rate-limit enable</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/2\]arp rate-limit 20</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway-Ethernet1/0/2\]quit</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">配置端口状态自动恢复功能，恢复时间间隔为30 秒。</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] arp protective-down recover enable</span></span></section><section data-pm-slice="0 0 []" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 8px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: justify; line-height: 1.6em;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; letter-spacing: 0.034em; font-size: 14px;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">\[Quidway\] arp protective-down recover interval 30</span></span></section></div>

# 华为 USG6000E-S02 防火墙基本配置

针对华为 USG6000E-S02 防火墙，配置 WAN 口 DHCP 上网并将内网服务器端口映射到外网，主要涉及**接口配置**、**安全策略**和**NAT 策略**三个步骤。

由于你的 WAN 口是 DHCP 模式（IP 地址不固定），在配置端口映射时，我们需要使用 `interface` 关键字来绑定公网接口，而不是写死 IP 地址。

以下是基于命令行（CLI）的详细配置步骤：

### 1. 基础接口与区域配置

首先配置 LAN 口 IP，并将接口划分到对应的安全区域（Trust 为内网，Untrust 为外网）。

```bash
<Huawei> system-view
[Huawei] sysname FW1

# --- 配置 LAN 口 (假设使用 GE1/0/1) ---
[FW1] interface GigabitEthernet 1/0/1
[FW1-GigabitEthernet1/0/1] ip address 192.168.8.1 24
[FW1-GigabitEthernet1/0/1] service-manage all permit  # 允许该接口被管理(如Ping/SSH)，调试用
[FW1-GigabitEthernet1/0/1] quit

# --- 配置 WAN 口 (假设使用 GE1/0/0) ---
[FW1] interface GigabitEthernet 1/0/0
[FW1-GigabitEthernet1/0/0] ip address dhcp-alloc  # 开启 DHCP 获取公网 IP
[FW1-GigabitEthernet1/0/0] quit

# --- 将接口加入安全区域 ---
[FW1] firewall zone trust
[FW1-zone-trust] add interface GigabitEthernet 1/0/1
[FW1-zone-trust] quit

[FW1] firewall zone untrust
[FW1-zone-untrust] add interface GigabitEthernet 1/0/0
[FW1-zone-untrust] quit

```

### 2. 配置默认路由

为了让内网流量能出去，需要配置一条默认路由指向 WAN 口（DHCP 模式下通常不需要指定下一跳 IP，直接指定出接口即可，或者 DHCP 会自动下发路由，但手动添加更稳妥）。

```bash
[FW1] ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet 1/0/0

```

### 3. 配置 NAT Server (端口映射)

这是核心步骤。由于 WAN 口 IP 是动态的，我们使用 `global interface` 方式配置。这将把 WAN 口当前的公网 IP 的 6011 端口映射到服务器的 6011 端口。

```bash
[FW1] interface GigabitEthernet 1/0/0
[FW1-GigabitEthernet1/0/0] nat server protocol tcp global interface GigabitEthernet 1/0/0 6011 inside 192.168.8.48 6011
[FW1-GigabitEthernet1/0/0] quit

```

### 4. 配置安全策略 (放行流量)

华为防火墙默认拒绝所有流量。**必须**配置安全策略，允许外网（Untrust）访问内网服务器（Trust）。

注意：目的地址要填写内网服务器的真实 IP (`192.168.8.48`)，因为防火墙在处理 NAT Server 时，策略匹配是在地址转换之后进行的（或者是匹配转换后的目的地址）。

```bash
[FW1] security-policy
[FW1-policy-security] rule name Allow_WAN_to_Server
[FW1-policy-security-rule-Allow_WAN_to_Server] source-zone untrust      # 源区域：外网
[FW1-policy-security-rule-Allow_WAN_to_Server] destination-zone trust    # 目的区域：内网
[FW1-policy-security-rule-Allow_WAN_to_Server] destination-address 192.168.8.48 32  # 目的地址：服务器IP
[FW1-policy-security-rule-Allow_WAN_to_Server] service protocol tcp destination-port 6011 # 服务端口
[FW1-policy-security-rule-Allow_WAN_to_Server] action permit             # 动作：允许
[FW1-policy-security-rule-Allow_WAN_to_Server] quit
[FW1-policy-security] quit

```

### 5. 保存配置

配置完成后，务必保存，否则重启后配置会丢失。

```bash
[FW1] return
<FW1> save

```

---

### 💡 常见问题排查

1. **外网无法访问？**
    
    
    - **检查公网 IP：** 在防火墙上执行 `display ip interface brief` 查看 GE1/0/0 是否获取到了公网 IP。如果是 `10.x.x.x` 或 `100.64.x.x` 等运营商内网 IP，你需要联系运营商申请公网 IP，或者使用 IPv6。
    - **检查运营商限制：** 很多家用宽带会封锁常见的高危端口（如 80, 443, 8080 等）。虽然 6011 不是常见被封端口，但如果依然不通，可以尝试改为其他非标准端口测试。
2. **内网通过公网 IP 访问不通？**
    
    
    - 如果你在内网想通过公网 IP 访问这台服务器，还需要配置 **NAT回流 (NAT Loopback)**。需要在 `nat-policy` 中添加规则，或者直接允许域内互访。
    - *简单方案*：内网用户直接访问 `192.168.8.48:6011` 即可。
3. **Web 界面配置方法：**
    
    
    - 登录 Web 界面 -&gt; **策略** &gt; **NAT 策略** &gt; **服务器映射**。
    - 点击新建： 
        - **名称**：任意
        - **接口**：选择 WAN 口 (GE1/0/0)
        - **协议**：TCP
        - **外部端口**：6011
        - **内部 IP 地址**：192.168.8.48
        - **内部端口**：6011
    - 确定后，系统通常会自动提示或跳转去配置相应的安全策略，确保“允许”规则已生成。

要在华为 USG6000E-S02 防火墙上开启 SSH 登录并创建专用账号，你需要完成三个主要步骤：**生成本地密钥**、**配置 VTY 用户界面**以及**创建 AAA 本地用户**。

以下是基于命令行（CLI）的详细配置流程。假设你已经可以通过 Console 口或 Telnet 登录设备。

根据你提供的静态 IP 信息，我们需要修改防火墙 WAN 口的配置。

**⚠️ 重要提示：** 由于你将 WAN 口从 DHCP 改为静态 IP，之前配置的 `nat server`（端口映射）中使用的 `global interface` 方式可能会失效或不再适用。你需要将其修改为绑定具体的公网 IP (`223.241.233.98`)。

以下是完整的配置步骤，包含 **接口修改**、**路由更新** 以及 **NAT 策略修正**。

### 1. 修改 WAN 口 IP 与 DNS

假设你的 WAN 口依然是 `GigabitEthernet 1/0/0`。

```bash
<Huawei> system-view
[Huawei] interface GigabitEthernet 1/0/0
# 清除旧的 DHCP 配置（如果有）
[Huawei-GigabitEthernet1/0/0] undo ip address dhcp-alloc

# 配置新的静态 IP 和掩码
[Huawei-GigabitEthernet1/0/0] ip address 223.241.233.98 255.255.255.0

# 配置 DNS (华为防火墙通常在全局配置 DNS)
[Huawei-GigabitEthernet1/0/0] quit
[Huawei] dns resolve
[Huawei] dns server 61.132.163.68

```

### 2. 更新默认路由

将默认路由的下一跳指向你提供的新网关。

```bash
# 如果之前有默认路由，建议先删除再添加，或者直接覆盖
[Huawei] undo ip route-static 0.0.0.0 0.0.0.0
[Huawei] ip route-static 0.0.0.0 0.0.0.0 223.241.233.1

```

### 3. 修正 NAT Server (端口映射)

因为现在有了固定的公网 IP，建议将之前的 `interface` 模式改为 `ip-address` 模式，这样更稳定且规范。

**操作步骤：**

1. 进入 WAN 口视图。
2. 删除旧的 NAT 规则。
3. 添加绑定具体 IP 的新规则。

```bash
[Huawei] interface GigabitEthernet 1/0/0

# 删除旧规则 (假设之前是在这个接口做的映射)
[Huawei-GigabitEthernet1/0/0] undo nat server protocol tcp global interface GigabitEthernet 1/0/0 6011 inside 192.168.8.48 6011

# 添加新规则：将公网IP 223.241.233.98 的6011端口映射到内网服务器
[Huawei-GigabitEthernet1/0/0] nat server protocol tcp global 223.241.233.98 6011 inside 192.168.8.48 6011
[Huawei-GigabitEthernet1/0/0] quit

```

### 4. 检查安全策略

这一步通常不需要改动，除非你之前限制了源区域。但为了保险起见，请确认允许外网访问内网服务器的策略依然存在。

```bash
[Huawei] display current-configuration | include rule.*Allow_WAN_to_Server
# 确保能看到这条规则，且动作为 permit

```

### 5. 保存配置

```bash
[Huawei] return
<Huawei> save

```

---

### 📝 配置总结表

<table id="bkmrk-%E9%85%8D%E7%BD%AE%E9%A1%B9-%E8%AE%BE%E7%BD%AE%E5%80%BC-%E8%AF%B4%E6%98%8E-wan-%E6%8E%A5%E5%8F%A3-ip"><thead><tr><th align="left">配置项</th><th align="left">设置值</th><th align="left">说明</th></tr></thead><tbody><tr><td align="left">**WAN 接口 IP**</td><td align="left">`223.241.233.98 / 24`</td><td align="left">运营商分配的固定 IP</td></tr><tr><td align="left">**默认网关**</td><td align="left">`223.241.233.1`</td><td align="left">流量出口指向</td></tr><tr><td align="left">**DNS 服务器**</td><td align="left">`61.132.163.68`</td><td align="left">用于防火墙解析域名</td></tr><tr><td align="left">**NAT 映射**</td><td align="left">`223.241.233.98:6011` -&gt; `192.168.8.48:6011`</td><td align="left">外部访问入口</td></tr></tbody></table>

配置完成后，你可以尝试在外网使用 `telnet 223.241.233.98 6011` 来测试端口是否通畅。

根据你提供的静态 IP 信息，我们需要修改防火墙 WAN 口的配置。

**⚠️ 重要提示：** 由于你将 WAN 口从 DHCP 改为静态 IP，之前配置的 `nat server`（端口映射）中使用的 `global interface` 方式可能会失效或不再适用。你需要将其修改为绑定具体的公网 IP (`223.241.233.98`)。

以下是完整的配置步骤，包含 **接口修改**、**路由更新** 以及 **NAT 策略修正**。

### 1. 修改 WAN 口 IP 与 DNS

假设你的 WAN 口依然是 `GigabitEthernet 1/0/0`。

```bash
<Huawei> system-view
[Huawei] interface GigabitEthernet 1/0/0
# 清除旧的 DHCP 配置（如果有）
[Huawei-GigabitEthernet1/0/0] undo ip address dhcp-alloc

# 配置新的静态 IP 和掩码
[Huawei-GigabitEthernet1/0/0] ip address 223.241.233.98 255.255.255.0

# 配置 DNS (华为防火墙通常在全局配置 DNS)
[Huawei-GigabitEthernet1/0/0] quit
[Huawei] dns resolve
[Huawei] dns server 61.132.163.68

```

### 2. 更新默认路由

将默认路由的下一跳指向你提供的新网关。

```bash
# 如果之前有默认路由，建议先删除再添加，或者直接覆盖
[Huawei] undo ip route-static 0.0.0.0 0.0.0.0
[Huawei] ip route-static 0.0.0.0 0.0.0.0 223.241.233.1

```

### 3. 修正 NAT Server (端口映射)

因为现在有了固定的公网 IP，建议将之前的 `interface` 模式改为 `ip-address` 模式，这样更稳定且规范。

**操作步骤：**

1. 进入 WAN 口视图。
2. 删除旧的 NAT 规则。
3. 添加绑定具体 IP 的新规则。

```bash
[Huawei] interface GigabitEthernet 1/0/0

# 删除旧规则 (假设之前是在这个接口做的映射)
[Huawei-GigabitEthernet1/0/0] undo nat server protocol tcp global interface GigabitEthernet 1/0/0 6011 inside 192.168.8.48 6011

# 添加新规则：将公网IP 223.241.233.98 的6011端口映射到内网服务器
[Huawei-GigabitEthernet1/0/0] nat server protocol tcp global 223.241.233.98 6011 inside 192.168.8.48 6011
[Huawei-GigabitEthernet1/0/0] quit

```

### 4. 检查安全策略

这一步通常不需要改动，除非你之前限制了源区域。但为了保险起见，请确认允许外网访问内网服务器的策略依然存在。

```bash
[Huawei] display current-configuration | include rule.*Allow_WAN_to_Server
# 确保能看到这条规则，且动作为 permit

```

### 5. 保存配置

```bash
[Huawei] return
<Huawei> save

```

---

### 📝 配置总结表

<table id="bkmrk-%E9%85%8D%E7%BD%AE%E9%A1%B9-%E8%AE%BE%E7%BD%AE%E5%80%BC-%E8%AF%B4%E6%98%8E-wan-%E6%8E%A5%E5%8F%A3-ip-1"><thead><tr><th align="left">配置项</th><th align="left">设置值</th><th align="left">说明</th></tr></thead><tbody><tr><td align="left">**WAN 接口 IP**</td><td align="left">`223.241.233.98 / 24`</td><td align="left">运营商分配的固定 IP</td></tr><tr><td align="left">**默认网关**</td><td align="left">`223.241.233.1`</td><td align="left">流量出口指向</td></tr><tr><td align="left">**DNS 服务器**</td><td align="left">`61.132.163.68`</td><td align="left">用于防火墙解析域名</td></tr><tr><td align="left">**NAT 映射**</td><td align="left">`223.241.233.98:6011` -&gt; `192.168.8.48:6011`</td><td align="left">外部访问入口</td></tr></tbody></table>

配置完成后，你可以尝试在外网使用 `telnet 223.241.233.98 6011` 来测试端口是否通畅。

### ⚙️ 核心配置步骤

请在系统视图下依次执行以下命令：

#### 1. 生成本地 RSA 密钥对

SSH 加密连接依赖密钥对，这是必须的第一步。

```bash
<Huawei> system-view
[Huawei] rsa local-key-pair create
# 系统提示输入密钥长度，直接回车使用默认值（通常为 2048）即可
# 注意：如果提示已存在密钥，可跳过此步

```

#### 2. 开启 SSH 服务并配置 VTY 用户界面

这一步是告诉防火墙允许通过 SSH 协议进行远程管理，并指定验证方式。

```bash
[Huawei] stelnet server enable             # 开启 Secure Telnet (SSH) 服务
[Huawei] user-interface vty 0 4            # 进入虚拟终端接口配置模式
[Huawei-ui-vty0-4] authentication-mode aaa # 设置认证模式为 AAA（即使用用户名+密码）
[Huawei-ui-vty0-4] protocol inbound ssh    # 仅允许 SSH 协议接入（如需同时支持 Telnet 可改为 'all'）
[Huawei-ui-vty0-4] user privilege level 15 # 赋予最高权限等级（可选，建议设置以便管理）
[Huawei-ui-vty0-4] quit

```

#### 3. 创建管理员账号和密码

在 AAA 视图下创建专门用于 SSH 登录的用户。

```bash
[Huawei] aaa                               # 进入 AAA 配置视图
[Huawei-aaa] manager-user sshadmin         # 创建用户名为 "sshadmin"（可根据需要修改）
[Huawei-aaa-manager-user-sshadmin] password cipher YourPassword@123  # 设置密码（cipher表示加密存储）
[Huawei-aaa-manager-user-sshadmin] service-type ssh                # 关键：指定该用户仅允许使用 SSH 服务
[Huawei-aaa-manager-user-sshadmin] level 15                        # 赋予该用户最高管理权限
[Huawei-aaa-manager-user-sshadmin] quit
[Huawei-aaa] quit

```

#### 4. 保存配置

配置完成后务必保存，防止重启丢失。

```bash
[Huawei] return
<Huawei> save

```

---

### 🛡️ 补充检查：安全策略与接口放行

如果上述配置完成后仍然无法连接，通常是因为防火墙的安全策略拦截了 SSH 流量（TCP 22端口）。

1. **检查管理接口是否放行 SSH** 如果你的 SSH 客户端连接的是管理口（如 GE0/0/0），需要确保该接口允许 SSH 服务：
    
    ```bash
    [Huawei] interface GigabitEthernet 0/0/0
    [Huawei-GigabitEthernet0/0/0] service-manage ssh permit
    [Huawei-GigabitEthernet0/0/0] quit
    
    ```
2. **检查安全策略 (Security Policy)** 如果你是通过业务接口（如 GE1/0/1）进行 SSH 管理，必须在安全策略中放行从该区域到 Local 区域的流量：
    
    ```bash
    [Huawei] security-policy
    [Huawei-policy-security] rule name Allow_SSH_Local
    [Huawei-policy-security-rule-Allow_SSH_Local] source-zone trust      # 源区域（根据实际连接接口所在的区域填写）
    [Huawei-policy-security-rule-Allow_SSH_Local] destination-zone local # 目的区域必须是 local（代表防火墙本身）
    [Huawei-policy-security-rule-Allow_SSH_Local] service ssh            # 服务类型为 ssh
    [Huawei-policy-security-rule-Allow_SSH_Local] action permit          # 动作允许
    [Huawei-policy-security-rule-Allow_SSH_Local] quit
    
    ```

### ✅ 验证方法

配置完成后，你可以使用 Putty、Xshell 或电脑自带的 CMD 进行测试：

- **命令**: `ssh sshadmin@<防火墙IP地址>`
- **端口**: 默认为 22
- **密码**: 输入你刚才设置的 `<a href="mailto:YourPassword@123">YourPassword@123</a>`
- ``

# i5 + 8G + 128G 安装OPNsense软路由教程

如果是你的机器配置：

```text
Intel i5
8GB RAM
128GB SSD

```

安装 OPNsense 很合适。下面按“实体机安装（最常见）”来讲，也会补充虚拟机方案。

## 官方文档

[OPNsense 安装文档](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com)

---

## 安装前准备

需要：

1. U盘（≥4GB）
2. 一台安装 OPNsense 的机器
3. 至少两个网口（推荐）

网络结构建议：

```text
光猫
   │
WAN口
┌─────────┐
│OPNsense │
└─────────┘
LAN口
   │
交换机/WiFi AP
   │
电脑/手机

```

如果只有一个网口，也能装，但需要：

- VLAN
- USB网卡
- 网桥

不推荐新手。

---

## 第一步：下载镜像

下载：

[OPNsense 下载页](https://opnsense.org/download/?utm_source=chatgpt.com)

参数建议：

```text
Architecture：amd64
Image type：dvd
Mirror：任选

```

下载得到：

```text
OPNsense-xx.x-dvd-amd64.iso.bz2

```

解压：

Windows：

```text
7zip

```

Linux：

```bash
bzip2 -d OPNsense-*.bz2

```

官方说明支持 USB VGA/ISO 安装。 ([docs.opnsense.org](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com "Initial Installation & Configuration — OPNsense documentation"))

---

## 第二步：制作启动U盘

Windows 推荐：

[Rufus](https://rufus.ie/?utm_source=chatgpt.com)

步骤：

```text
设备 → U盘
启动类型 → OPNsense ISO
分区 → GPT
目标系统 → UEFI
开始

```

如果老机器：

```text
MBR + BIOS

```

---

## 第三步：BIOS设置

进入 BIOS：

```text
F2
Del
F12

```

修改：

```text
Boot Mode = UEFI
SATA Mode = AHCI
USB Boot = Enabled

```

如果机器显示：

```text
Intel RST
RAID

```

改成：

```text
AHCI

```

否则可能看不到 SSD。社区里这是常见问题。 ([Reddit](https://www.reddit.com/r/opnsense/comments/1c96exy?utm_source=chatgpt.com "OPNsense doesn't see my NVMe!"))

---

## 第四步：安装 OPNsense

启动后进入 Live 环境。

登录：

```text
用户名:
installer

密码:
opnsense

```

如果 `installer` 不行：

```text
root
opnsense

8) Shell

opnsense-installer

```

这是官方安装流程。 ([docs.opnsense.org](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com "Initial Installation & Configuration — OPNsense documentation"))

---

安装选项建议：

### 键盘

```text
Default

```

---

### 文件系统

推荐：

```text
ZFS

```

优点：

- 快照
- 数据校验
- 更稳定

8GB内存足够。

如果想节省资源：

```text
UFS

```

也可以。 ([docs.opnsense.org](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com "Initial Installation & Configuration — OPNsense documentation"))

---

### 磁盘选择

选择：

```text
128GB SSD

```

确认：

```text
YES

```

会清空磁盘。

---

### Root密码

设置管理员密码：

```text
root: ********

```

---

### 安装完成

选择：

```text
Complete Install

```

重启：

```text
Remove installation media

```

---

## 第五步：分配 WAN/LAN

启动后会看到：

```text
Assign interfaces? [y/N]

```

输入：

```text
y

```

示例：

```text
igc0 → WAN
igc1 → LAN

```

如果不知道哪个网口：

拔网线观察：

```text
Link up/down

```

官方安装后支持手动指定接口。 ([docs.opnsense.org](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com "Initial Installation & Configuration — OPNsense documentation"))

---

## 第六步：进入管理界面

默认：

```text
LAN:
192.168.1.1

```

浏览器访问：

```text
https://192.168.1.1

```

默认：

```text
用户名:
root

密码:
刚设置密码

```

首次会进入初始化向导。 ([docs.opnsense.org](https://docs.opnsense.org/manual/install.html?utm_source=chatgpt.com "Initial Installation & Configuration — OPNsense documentation"))

---

建议修改：

### DNS

推荐：

```text
1.1.1.1
8.8.8.8

```

或：

```text
223.5.5.5
119.29.29.29

```

---

### 时区

```text
Asia/Shanghai

```

---

### DHCP范围

默认：

```text
192.168.1.100
~
192.168.1.200

```

---

## 第七步（建议安装插件）

系统：

```text
System
→ Firmware
→ Plugins

```

建议：

<table id="bkmrk-%E6%8F%92%E4%BB%B6-%E7%94%A8%E9%80%94-os-adguardhome"><thead><tr><th>插件</th><th align="right">用途</th></tr></thead><tbody><tr><td>os-adguardhome-maxit</td><td align="right">广告过滤</td></tr><tr><td>os-wireguard</td><td align="right">VPN</td></tr><tr><td>os-ddclient</td><td align="right">DDNS</td></tr><tr><td>os-crowdsec</td><td align="right">安全防护</td></tr><tr><td>os-zerotier</td><td align="right">异地组网</td></tr></tbody></table>

---

## 如果做家庭网络，我建议最终结构

```text
光猫(桥接)
      │
WAN
┌───────────┐
│OPNsense   │
└───────────┘
      │
交换机
      │
AP
      │
手机/电脑/NAS

```

这样比：

```text
光猫→普通路由器

```

灵活很多。

另外，如果你准备把 **i5 + 8G + 128G** 做成“一体机”，我更建议：

```text
Proxmox
├─ OPNsense
├─ AdGuard Home
├─ HomeAssistant
└─ Docker

```

以后加 NAS、下载机、监控都不用重装。

# 1U 200万以上NAT会话数企业级路由器推荐

“200万 NAT 会话数 + 1U” 这个需求已经不是普通企业路由器级别了，基本进入：

- 中大型出口网关
- 数据中心边界
- 高并发 NAT / CGNAT
- 下一代防火墙（NGFW）

很多 SMB 路由器只有几万到几十万 NAT 会话。比如 H3C 一些常见企业路由器只有 8 万～26 万 NAT 会话。([云视互联 - 一站式数字解决方案提供商](https://cvi-china.com/product/h3c%E5%85%A8%E6%96%B0%E4%B8%80%E4%BB%A3%E9%AB%98%E6%80%A7%E8%83%BD%E4%BC%81%E4%B8%9A%E7%BA%A7%E8%B7%AF%E7%94%B1%E5%99%A8-er3200g3/?utm_source=chatgpt.com "H3C全新一代高性能企业级路由器 ER3200G3 - 云视互联 H3C网络解决方案合作伙伴"))

我给你按“靠谱程度”分几档：

---

## 最推荐：x86 软路由 + 1U 工控服务器

如果你真要稳定跑 200 万 NAT，会比传统“企业路由器”更划算。

### 推荐配置

- 1U 服务器
    
    
    - Supermicro
    - Dell R240 / R250
    - H3C / 浪潮 1U
- CPU
    
    
    - Xeon D-2141
    - Xeon Silver
    - EPYC 处理器
- 网卡
    
    
    - Intel X710
    - Mellanox ConnectX-4/5
- 系统
    
    
    - RouterOS CHR
    - VyOS
    - TNSR（DPDK）
    - OpenWrt x86（高性能方案）

### 优点

- NAT 会话可以做到几百万
- PPS 性能远超普通路由器
- 可上 10G / 25G
- 成本比 FortiGate / Juniper 低很多

### 缺点

- 需要自己调优
- 对 Linux 网络栈有要求

---

# 成品方案（企业级）

## 性价比高

### MikroTik CCR2216 系列

适合：

- 万兆出口
- 大量连接
- 中型 ISP

优点：

- RouterOS 功能强
- NAT 性能很猛
- 价格远低于华为/思科

缺点：

- 真正稳定 200 万连接要仔细调优
- ACL/策略复杂时性能下降明显

---

## 真正运营商级

### Fortinet FortiGate 200F / 400F

优点：

- 会话数高
- ASIC 硬件 NAT
- 稳定性强
- 企业出口非常常见

缺点：

- 贵
- license 很坑

---

### Juniper Networks SRX1500 / SRX1600

这个更偏 ISP/运营商。

优点：

- 超稳
- NAT / BGP / MPLS 强
- PPS 能力优秀

缺点：

- 学习成本高
- 二手市场才有性价比

---

## 国产方案

### Huawei USG 系列

比如：

- USG6625E
- USG6635E

优点：

- NAT 能力强
- 运营商场景多
- ACL/QoS 很成熟

缺点：

- CLI 偏传统
- 新手不友好

---

# 我实际建议

## 如果你是：

### 家宽 NAT / PCDN / 出海 / 代理池

直接：

> 1U x86 + RouterOS CHR

最划算。

---

### 企业出口

直接：

> FortiGate 200F

省心。

---

### ISP / IDC / 高并发

直接：

> Juniper SRX 或 x86 DPDK 方案

---

# 不建议买的

很多“企业千兆路由器”宣传很猛，但 NAT 会话只有：

- 8万
- 16万
- 32万

比如一些 H3C SMB 系列。([云视互联 - 一站式数字解决方案提供商](https://cvi-china.com/product/h3c%E5%85%A8%E6%96%B0%E4%B8%80%E4%BB%A3%E9%AB%98%E6%80%A7%E8%83%BD%E4%BC%81%E4%B8%9A%E7%BA%A7%E8%B7%AF%E7%94%B1%E5%99%A8-er3200g3/?utm_source=chatgpt.com "H3C全新一代高性能企业级路由器 ER3200G3 - 云视互联 H3C网络解决方案合作伙伴"))

跑：

- BT
- 大量 TCP 短连接
- PCDN
- 海外代理

很容易爆 conntrack。

---

如果你愿意，我还能继续帮你细化：

- 10G 场景推荐
- 25G NAT 方案
- RouterOS / VyOS 选型
- DPDK 方案
- Intel vs Mellanox 网卡
- 低功耗 1U 方案
- 二手性价比型号
- 国产可替代型号
- NAT 会话调优参数（conntrack/sysctl）

# 1U厚度 200万以上NAT会话数企业级路由器推荐

你这个需求已经是：

- 企业出口核心
- IDC / ISP 边界
- 高并发 NAT
- 大量 TCP/UDP 短连接

级别了。

核心条件：

- **1U 厚度**
- **200万+ NAT / 并发会话**
- 企业级稳定性
- 最好支持 10G/25G
- 长时间高 conntrack 不炸

下面是我筛出来真正靠谱的。

---

# 第一梯队（最推荐）

## Best overall

FortiGate 200F 是目前“1U + 高 NAT 会话 + 企业稳定性”里非常均衡的方案。

关键点：

- 官方并发会话：300万 TCP Sessions
- 1U
- 10G SFP+
- ASIC 硬件加速
- 高 PPS
- NAT 非常成熟

很多运营商出口、小 IDC、海外代理节点都在用。([Omega One Company](https://omegaco.ae/shop/cybersecurity-firewalls/fortinet-fortigate-200f?utm_source=chatgpt.com "Fortinet FortiGate 200F - Omega One Company"))

---

## ISP / IDC 更推荐

适合：

- ISP
- IDC
- 大规模 BGP
- CGNAT
- 高 PPS UDP/TCP

优点：

- Junos 极稳
- NAT 表管理优秀
- 长时间高并发不容易抖

缺点：

- 贵
- 学习成本高

---

## 性价比路线

CCR2216 这代已经不是以前的低端 MikroTik 了。

优势：

- 12×25G + 2×100G
- 1U
- ARM64 16核
- RouterOS v7 性能明显提升
- 性价比极高

适合：

- PCDN
- 海外代理
- 中小 IDC
- 高连接数出口

但注意：

- 真到 200万 NAT 时，需要认真调 conntrack
- 复杂 ACL/队列会掉性能
- 不如 Fortinet 稳

---

## 国产方案（偏运营商）

华为 USG 系列在国内运营商、政企里非常多。

优点：

- NAT 能力强
- ACL/QoS 很成熟
- 稳定性好
- 大流量场景经验丰富

缺点：

- CLI 偏传统
- 海外生态一般
- 价格不低

---

# 对比（重点）

<table id="bkmrk-%E5%B1%9E%E6%80%A7-fortinet-fortigat"><thead><tr><th>属性</th><th>[Fortinet FortiGate FG-200F Security Firewall](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th>[Juniper Networks SRX Series SRX1600](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th>[MikroTik Router CCR2216-1G-12XS-2XQ](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th>[USG6630E, Huawei HiSecEngine USG6630E AI 방화벽, 4x40GE QSFP+ /](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th></tr></thead><tbody><tr><td>机身规格</td><td>1U</td><td>1U</td><td>1U</td><td>1U</td></tr><tr><td>NAT/并发会话</td><td>300万级</td><td>200万+级</td><td>可达百万级以上</td><td>200万+级</td></tr><tr><td>稳定性</td><td>极强</td><td>极强</td><td>中上</td><td>很强</td></tr><tr><td>适合 ISP</td><td>中</td><td>极强</td><td>中</td><td>强</td></tr><tr><td>10G/25G</td><td>支持</td><td>支持</td><td>25G/100G 很强</td><td>支持</td></tr><tr><td>配置难度</td><td>中</td><td>高</td><td>中</td><td>中高</td></tr><tr><td>性价比</td><td>高</td><td>中</td><td>极高</td><td>中</td></tr><tr><td>推荐场景</td><td>企业出口</td><td>IDC/ISP</td><td>PCDN/代理</td><td>政企/运营商</td></tr></tbody></table>

---

# 我实际建议

## 如果你要：

### 最稳、最省心

直接：

> FortiGate 200F

很多人最后都会回到它。  
尤其：

- NAT
- 多 WAN
- SD-WAN
- 连接追踪
- 大量短连接

都很成熟。([Omega One Company](https://omegaco.ae/shop/cybersecurity-firewalls/fortinet-fortigate-200f?utm_source=chatgpt.com "Fortinet FortiGate 200F - Omega One Company"))

---

## 如果你是：

- IDC
- BGP
- ISP
- 高 PPS

直接：

> Juniper SRX1600

---

## 如果你追求：

- 性价比
- 大带宽
- 高连接
- 自己会调 RouterOS

直接：

> CCR2216

---

## 不建议

不要买：

- TP-Link Omada
- 普通 H3C SMB
- 爱快
- 普通锐捷
- 普通 ER 系列

很多标称：

- 企业级
- 万兆
- 高性能

但 NAT 会话可能只有几十万。

高并发短连接场景会炸 conntrack。

---

另外提醒你：

> “200万 NAT 会话” 和 “200万并发 TCP Session”

有些厂家会混着写。

真正要看：

- Concurrent Sessions
- CPS（new sessions/sec）
- PPS
- NAT Throughput
- 是否硬件 offload

不要只看“带宽”。

# H3C MSR3640-G路由器 与 TP-LINI 8411 路由器 对比

这两台其实不是一个路线。

你可以理解成：

- H3C MSR3640-G：
    
    > “传统大型企业 WAN 路由器”
- ### TP-Link ER8411

Description: None  
Price: €457.22  
URL:  
Number of Reviews: 41  
Rating: 4.7  
Featured Tag: None  
Merchants: Mediamarkt Marketplace DE  
：

> “现代高并发企业 NAT 网关”

所以：

> 你做什么业务，决定谁更好。

---

# 先给结论

<table id="bkmrk-%E5%9C%BA%E6%99%AF-%E8%B0%81%E6%9B%B4%E5%BC%BA-%E4%BC%81%E4%B8%9A%E5%8A%9E%E5%85%AC%E5%87%BA%E5%8F%A3-er8411"><thead><tr><th>场景</th><th>谁更强</th></tr></thead><tbody><tr><td>企业办公出口</td><td>ER8411</td></tr><tr><td>万兆 NAT</td><td>ER8411</td></tr><tr><td>高并发连接</td><td>ER8411</td></tr><tr><td>PCDN/代理</td><td>ER8411</td></tr><tr><td>多分支/MPLS/BGP</td><td>MSR3640-G</td></tr><tr><td>传统政企网络</td><td>MSR3640-G</td></tr><tr><td>ISP/WAN复杂路由</td><td>MSR3640-G</td></tr><tr><td>易用性</td><td>ER8411</td></tr><tr><td>CLI专业性</td><td>MSR3640-G</td></tr><tr><td>性价比</td><td>ER8411</td></tr><tr><td>稳定性（传统企业）</td><td>MSR3640-G</td></tr><tr><td>高 CPS NAT</td><td>ER8411</td></tr></tbody></table>

---

# 核心区别（最重要）

## H3C MSR3640-G

本质是：

> 企业 WAN 路由器

重点能力：

- MPLS
- BGP
- IPSec
- GRE
- SD-WAN
- 路由协议
- 多分支互联
- QoS

它更像：

- Cisco ISR
- Huawei AR/MSR
- Juniper Branch Router

不是专门“高 NAT”优化机器。 ([H3C](https://www.h3c.com/en/Products_and_Solutions/InterConnect/Routers/Products/WAN_Routers/MSR/H3C_MSR3600/?utm_source=chatgpt.com "H3C MSR3600 Router Series-H3C"))

---

## ER8411

本质是：

> 高并发 NAT 企业网关

重点能力：

- NAT
- 多 WAN
- 高连接数
- Omada SDN
- 企业出口
- 万兆 NAT

官方直接强调：

- 230万 Concurrent Sessions
- 2万 New Sessions/s
- 双 10G SFP+ ([H3C](https://www.h3c.com/en/Support/Resource_Center/EN/Home/Routers/00-Public/Product_Literature/Hardware_Information___Specifications/H3C_MSR_3600_Specifications/202403/2067364_294551_0.htm?utm_source=chatgpt.com "Support - 01-About the router- H3C"))

它明显更偏：

> “互联网出口”

而不是：

> “传统 MPLS 企业广域网”。

---

# NAT 能力谁更强？

## 明显是 ER8411

因为：

### TP-Link 直接宣传：

- 230万 NAT 会话

而：

### H3C MSR3640-G

官方根本不重点宣传 NAT session。  
主要强调：

- 400Mpps
- MPLS
- VPN
- Forwarding
- ACL+QoS ([H3C](https://www.h3c.com/cn/Products_And_Solution/InterConnect/Products/Routers/Products/Wan_Router/MSR/MSR_3600/Home/Detail_Material_List/Specifications/?utm_source=chatgpt.com "产品规格 - 产品技术 - 新华三集团-H3C"))

这意味着：

> H3C 的设计重点不是“海量 conntrack”。

---

# 如果你做：

## 代理 / BT / 下载 / NAT

ER8411 更合适。

因为：

- conntrack 更大
- NAT 更现代化
- 更偏互联网出口设计
- Omada 管理简单

---

# 但 H3C 有几个 ER8411 做不到的东西

## 1. 真企业 WAN 能力

MSR3640-G：

- MPLS
- VXLAN
- GRE
- BGP
- ADVPN
- 策略路由
- QoS

比 ER8411 强很多。 ([H3C](https://www.h3c.com/en/Products_and_Solutions/InterConnect/Routers/Products/WAN_Routers/MSR/H3C_MSR3600/?utm_source=chatgpt.com "H3C MSR3600 Router Series-H3C"))

---

## 2. 模块化

MSR3640-G：

- SIC
- HMIM
- 模块扩展

是真运营商/政企思路。

ER8411 是固定盒子。

---

## 3. Comware 系统更专业

网络工程师会更喜欢：

- H3C Comware
- Cisco IOS
- JunOS

这种 CLI 逻辑。

Reddit 上很多人评价：

- 稳定
- 企业味浓
- 学习成本高 ([reddit.com](https://www.reddit.com/r/sysadmin/comments/157id6l?utm_source=chatgpt.com "What do you guys think of H3C?."))

---

# 但 H3C 有个致命问题

## 它是 2U

而：

### ER8411 是 1U

MSR3640-G 官方规格：

- 88.1mm
- 2RU ([H3C](https://www.h3c.com/en/Support/Resource_Center/EN/Home/Routers/00-Public/Product_Literature/Hardware_Information___Specifications/H3C_MSR_3600_Specifications/202403/2067364_294551_0.htm?utm_source=chatgpt.com "Support - 01-About the router- H3C"))

如果你机柜空间紧张：

ER8411 完胜。

---

# 还有一个现实问题：功耗

<table id="bkmrk-%E8%AE%BE%E5%A4%87-%E5%8A%9F%E8%80%97-er8411-%E5%A4%A7%E7%BA%A6-40%7E6"><thead><tr><th>设备</th><th>功耗</th></tr></thead><tbody><tr><td>ER8411</td><td>大约 40~60W</td></tr><tr><td>MSR3640-G</td><td>最高 250W</td></tr></tbody></table>

H3C 明显更“传统机房设备”。 ([H3C](https://www.h3c.com/cn/Products_And_Solution/InterConnect/Products/Routers/Products/Wan_Router/MSR/MSR_3600/Home/Detail_Material_List/Specifications/?utm_source=chatgpt.com "产品规格 - 产品技术 - 新华三集团-H3C"))

---

# 我真实建议

## 如果你现在目标是：

### 互联网出口

比如：

- NAT
- 代理
- BT
- PCDN
- 万兆下载
- Docker/K8S 出口

## 选：

---

## 如果你是：

### 传统企业网络

比如：

- 多分支
- MPLS
- BGP
- IPSec
- SD-WAN
- 政企

那么：

> H3C MSR3640-G 更专业。

---

# 最关键一句话

## ER8411：

> 更像“互联网 NAT 网关”

## MSR3640-G：

> 更像“企业 WAN 路由器”

---

# 如果让我二选一

## 我会这样选：

### 做互联网业务

选：

### [TP-Link ER8411](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)

---

### 做传统企业网络

选：

> H3C MSR3640-G

---

<table id="bkmrk-%E5%B1%9E%E6%80%A7-h3c-msr3640-g-tp-"><thead><tr><th>属性</th><th>H3C MSR3640-G</th><th>[TP-Link ER8411](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th></tr></thead><tbody><tr><td>设备高度</td><td>2U</td><td>1U</td></tr><tr><td>NAT会话</td><td>未明确</td><td>230万</td></tr><tr><td>高并发NAT</td><td>中</td><td>强</td></tr><tr><td>企业WAN</td><td>极强</td><td>中</td></tr><tr><td>MPLS/BGP</td><td>强</td><td>弱</td></tr><tr><td>万兆NAT</td><td>中</td><td>强</td></tr><tr><td>易用性</td><td>一般</td><td>强</td></tr><tr><td>功耗</td><td>高</td><td>低</td></tr><tr><td>性价比</td><td>中</td><td>很高</td></tr><tr><td>推荐用途</td><td>政企WAN</td><td>互联网出口</td></tr></tbody></table>

# FortiGate 200F 与TP-LINK 8411 对比

先说结论：

> 如果你是“高并发 NAT / 万兆出口 / 互联网业务”  
> FortiGate 200F 明显强于 ER8411。

但：

> ER8411 的性价比极高。

它俩不是一个级别。

---

## 定位差距（核心）

### Fortinet FortiGate 200F

属于：

- 中高端 NGFW
- 企业核心出口
- IDC/ISP 边界
- SD-WAN
- 高安全场景

核心是：

> “硬件 ASIC 加速”

不是普通 ARM/x86 路由器。 ([Spectrum Edge](https://www.spectrum-edge.com/fortinet/fortigate/200f/?utm_source=chatgpt.com "FortiGate 200F (Malaysia) Datasheet & Price | Spectrum Edge"))

---

### TP-Link ER8411

属于：

- SMB 企业出口
- Omada SDN
- 万兆 NAT
- 高连接企业网关

核心是：

> “便宜 + 高 NAT 会话”

---

# 最关键差距：CPS（新建连接能力）

这个才是真性能。

很多人只看：

- NAT Session

其实不够。

真正决定：

- BT
- 代理池
- 短连接
- PCDN
- HTTP 高频请求

的是：

# New Sessions/sec

---

## FortiGate 200F

官方：

- Concurrent Sessions：
    
    
    - 300万
- New Sessions/sec：
    
    
    - 28万/s
- PPS：
    
    
    - 16.5 Mpps ([Spectrum Edge](https://www.spectrum-edge.com/fortinet/fortigate/200f/?utm_source=chatgpt.com "FortiGate 200F (Malaysia) Datasheet & Price | Spectrum Edge"))

---

## ER8411

官方：

- Concurrent Sessions：
    
    
    - 230万
- New Sessions：
    
    
    - 2万/s

---

# 差距有多大？

## CPS 差了：

> 14倍

这已经不是“小差距”。

而是：

# 完全不同级别。

---

# 为什么 FortiGate 强这么多？

因为它有：

# Fortinet ASIC

包括：

- NP6/NP7
- CP9

专门处理：

- NAT
- Session
- IPS
- SSL
- PPS

不是靠普通 CPU 硬扛。 ([Grid Solutions](https://www.gridsolutionsperu.com/soluciones-fortigate-peru/fortigate-200f/?utm_source=chatgpt.com "Fortigate 200F | Grid Solutions"))

---

# 实际体验差距（真实）

## ER8411

强在：

- 便宜
- 易用
- Omada
- 万兆 NAT
- 企业办公

但：

### 高并发短连接压力下：

容易出现：

- CPU 飙升
- Session 抖动
- NAT 老化异常
- 小包 PPS 不稳

尤其：

- BT
- PCDN
- 海量代理

---

## FortiGate 200F

则属于：

> “真运营商级互联网出口设备”

特点：

- 长时间高 conntrack 稳
- 高频 CPS 稳
- 小包 PPS 强
- NAT 老化机制成熟
- Session 管理成熟

很多 IDC 真在用。 ([reddit.com](https://www.reddit.com/r/fortinet/comments/n0itl3?utm_source=chatgpt.com "New to Fortinet: A few questions about the 200F"))

---

# 功能层面差距

<table id="bkmrk-%E5%8A%9F%E8%83%BD-fortigate-200f-er"><thead><tr><th>功能</th><th>FortiGate 200F</th><th>ER8411</th></tr></thead><tbody><tr><td>NAT能力</td><td>极强</td><td>强</td></tr><tr><td>CPS</td><td>极强</td><td>一般</td></tr><tr><td>小包PPS</td><td>极强</td><td>一般</td></tr><tr><td>万兆</td><td>强</td><td>强</td></tr><tr><td>25G支持</td><td>无</td><td>无</td></tr><tr><td>SD-WAN</td><td>强</td><td>中</td></tr><tr><td>IPS/AV/WAF</td><td>企业级</td><td>基础</td></tr><tr><td>SSL Inspection</td><td>强</td><td>很弱</td></tr><tr><td>BGP</td><td>有</td><td>有限</td></tr><tr><td>HA集群</td><td>很成熟</td><td>一般</td></tr><tr><td>ASIC硬件加速</td><td>有</td><td>无</td></tr><tr><td>稳定性</td><td>极强</td><td>中上</td></tr><tr><td>学习成本</td><td>中高</td><td>很低</td></tr><tr><td>License</td><td>贵</td><td>无订阅压力</td></tr></tbody></table>

---

# 一个非常现实的问题：

# License

这是 Fortinet 最大缺点。

---

## FortiGate 200F

如果不开：

- IPS
- AV
- WebFilter

其实也能当：

> 超强 NAT 路由器

但：

很多功能依赖 License。

长期成本明显高。

---

## ER8411

基本：

- 买断
- 无订阅
- 无 FortiGuard 压力

这也是它爆火原因。

---

# 功耗和噪音

<table id="bkmrk-%E5%B1%9E%E6%80%A7-fortigate-200f-er"><thead><tr><th>属性</th><th>FortiGate 200F</th><th>ER8411</th></tr></thead><tbody><tr><td>功耗</td><td>80~110W</td><td>40~60W</td></tr><tr><td>噪音</td><td>中高</td><td>中</td></tr><tr><td>散热</td><td>企业级暴力风扇</td><td>相对安静</td></tr></tbody></table>

---

# 我会怎么选（真实建议）

## 如果你是：

### 企业办公

### 万兆出口

### Docker/K8S NAT

### 普通代理

### NAS

直接：

# ER8411

性价比太高了。

---

## 如果你是：

### PCDN

### 大量短连接

### IDC

### 海外代理池

### 高 CPS NAT

### 高 PPS

直接：

# FortiGate 200F

它不是“强一点”。

而是：

> 完全不同档次。

---

# 最关键一句话

## ER8411：

> “高性价比企业 NAT 网关”

## FortiGate 200F：

> “真正运营商级 NAT/安全平台”

---

# 最终推荐

<table id="bkmrk-%E4%BD%A0%E7%9A%84%E5%9C%BA%E6%99%AF-%E6%8E%A8%E8%8D%90-%E9%A2%84%E7%AE%97%E6%9C%89%E9%99%90%E4%BC%81%E4%B8%9A%E5%87%BA%E5%8F%A3-er8"><thead><tr><th>你的场景</th><th>推荐</th></tr></thead><tbody><tr><td>预算有限企业出口</td><td>ER8411</td></tr><tr><td>万兆办公网</td><td>ER8411</td></tr><tr><td>NAT高并发</td><td>FortiGate 200F</td></tr><tr><td>海量短连接</td><td>FortiGate 200F</td></tr><tr><td>PCDN</td><td>FortiGate 200F</td></tr><tr><td>ISP/IDC</td><td>FortiGate 200F</td></tr><tr><td>长时间满载稳定</td><td>FortiGate 200F</td></tr><tr><td>性价比</td><td>ER8411</td></tr></tbody></table>

---

<table id="bkmrk-%E5%B1%9E%E6%80%A7-fortinet-fortigat"><thead><tr><th>属性</th><th align="right">[Fortinet FortiGate FG-200F Security Firewall](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th align="right">[TP-Link er8411 Omada VPN Router](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th></tr></thead><tbody><tr><td>设备定位</td><td align="right">中高端NGFW</td><td align="right">SMB企业网关</td></tr><tr><td>Concurrent Sessions</td><td align="right">300万</td><td align="right">230万</td></tr><tr><td>New Sessions/sec</td><td align="right">28万/s</td><td align="right">2万/s</td></tr><tr><td>PPS</td><td align="right">16.5Mpps</td><td align="right">明显更低</td></tr><tr><td>ASIC加速</td><td align="right">有</td><td align="right">无</td></tr><tr><td>小包性能</td><td align="right">极强</td><td align="right">一般</td></tr><tr><td>高并发短连接</td><td align="right">极强</td><td align="right">中</td></tr><tr><td>企业安全能力</td><td align="right">极强</td><td align="right">一般</td></tr><tr><td>价格</td><td align="right">很贵</td><td align="right">很便宜</td></tr><tr><td>License成本</td><td align="right">高</td><td align="right">几乎无</td></tr><tr><td>易用性</td><td align="right">中</td><td align="right">强</td></tr><tr><td>推荐等级</td><td align="right">真企业核心出口</td><td align="right">高性价比出口</td></tr></tbody></table>

# FortiGate 200F 、TP-LINK 8411、H3C MSR3640-G 三款路由器对比，针对CPS NAT会话数等等

这三台其实代表了三种完全不同路线：

- Fortinet FortiGate 200F  
    → 真正运营商/大型企业级 NGFW
- TP-Link ER8411  
    → 高性价比互联网 NAT 网关
- H3C MSR3640-G  
    → 传统企业 WAN/MPLS 路由器

你重点问：

- CPS
- NAT 会话
- 高并发
- 稳定性

那这三个差距其实非常大。

---

# 三台机器定位（一句话）

<table id="bkmrk-%E8%AE%BE%E5%A4%87-%E6%9C%AC%E8%B4%A8%E5%AE%9A%E4%BD%8D-fortigate-20"><thead><tr><th>设备</th><th>本质定位</th></tr></thead><tbody><tr><td>FortiGate 200F</td><td>ASIC 硬件加速 NGFW</td></tr><tr><td>TP-Link ER8411</td><td>高并发 NAT 企业网关</td></tr><tr><td>H3C MSR3640-G</td><td>企业 WAN/MPLS 路由器</td></tr></tbody></table>

---

# 先看最关键指标（核心）

## PRODUCT COMPARISON TABLE

<table id="bkmrk-%E5%B1%9E%E6%80%A7-fortinet-fortigat"><thead><tr><th>属性</th><th align="right">[Fortinet FortiGate 200F](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th align="right">[TP-Link ER8411](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th align="right">H3C MSR3640-G</th></tr></thead><tbody><tr><td>设备定位</td><td align="right">企业核心NGFW</td><td align="right">企业NAT网关</td><td align="right">企业WAN路由</td></tr><tr><td>Concurrent Sessions</td><td align="right">300万</td><td align="right">230万</td><td align="right">官方未公开</td></tr><tr><td>New Sessions/sec（CPS）</td><td align="right">28万/s</td><td align="right">2万/s</td><td align="right">官方未公开</td></tr><tr><td>NAT Throughput</td><td align="right">极强</td><td align="right">约9.4Gbps</td><td align="right">ACL+NAT+QoS约12Gbps</td></tr><tr><td>小包 PPS</td><td align="right">16.5Mpps</td><td align="right">约210万pps</td><td align="right">400Mpps转发（非纯NAT）</td></tr><tr><td>ASIC硬件加速</td><td align="right">有</td><td align="right">无</td><td align="right">无</td></tr><tr><td>10G接口</td><td align="right">有</td><td align="right">双10G</td><td align="right">5×10G</td></tr><tr><td>25G</td><td align="right">无</td><td align="right">无</td><td align="right">无</td></tr><tr><td>VPN性能</td><td align="right">很强</td><td align="right">中上</td><td align="right">强</td></tr><tr><td>BGP/MPLS</td><td align="right">中上</td><td align="right">一般</td><td align="right">很强</td></tr><tr><td>SD-WAN</td><td align="right">企业级</td><td align="right">基础</td><td align="right">强</td></tr><tr><td>设备高度</td><td align="right">1U</td><td align="right">1U</td><td align="right">2U</td></tr><tr><td>功耗</td><td align="right">80~110W</td><td align="right">20~30W</td><td align="right">150~300W</td></tr><tr><td>稳定性</td><td align="right">极强</td><td align="right">中上</td><td align="right">很强</td></tr><tr><td>高并发短连接</td><td align="right">极强</td><td align="right">一般</td><td align="right">一般</td></tr><tr><td>PCDN/代理池</td><td align="right">强</td><td align="right">中</td><td align="right">弱</td></tr><tr><td>企业办公</td><td align="right">强</td><td align="right">强</td><td align="right">极强</td></tr><tr><td>ISP/IDC</td><td align="right">强</td><td align="right">中</td><td align="right">中</td></tr><tr><td>学习成本</td><td align="right">中</td><td align="right">低</td><td align="right">高</td></tr><tr><td>License</td><td align="right">高</td><td align="right">无</td><td align="right">无</td></tr></tbody></table>

FortiGate 与 TP-Link 官方性能参数来自厂商规格书；H3C 来自 MSR3600 官方规格页。([TP-Link](https://static.tp-link.com/upload/product-overview/2025/202509/20250930/ER8411%28UN%29%20v1.60%20Data%20Sheet.pdf?utm_source=chatgpt.com "tp-link | OmâdaOmada VPN Router with 10G PortsMODEL: ER8411Highlights• Dedicated Quad-core Cortex-A72 @2.2GHz CPU for outstanding performance"))

---

# 真正核心差距：

# CPS（每秒新建连接）

这个是决定：

- 高并发 NAT
- BT
- 代理
- PCDN
- 海量 HTTP 请求
- Docker/K8S 出口

最重要指标。

---

# 1. FortiGate 200F

## 最强

它本质上不是普通路由器。

而是：

> ASIC 安全/NAT 平台

优势：

- 300万会话
- 28万 CPS
- 16.5Mpps
- 小包性能极强
- Session 管理成熟

特别适合：

- PCDN
- 海外代理
- CGNAT
- IDC
- 高并发 NAT

很多真正机房出口在用。([reddit.com](https://www.reddit.com/r/fortinet/comments/xg78so?utm_source=chatgpt.com "Fortigate SMB user count question"))

---

## 为什么它强？

因为：

### Fortinet 有专用 ASIC

专门加速：

- NAT
- Session
- IPS
- SSL
- 小包 PPS

不是靠 ARM CPU 硬顶。

---

## 缺点

### License 很贵

不开：

- IPS
- AV
- DPI

它也能当：

> 超强 NAT 网关

但长期订阅成本高。

---

# 2. TP-Link ER8411

## 性价比最高

这是：

> 便宜版高并发 NAT 网关

优点：

- 230万 Session
- 1U
- 双10G
- 功耗极低
- Omada 易管理

官方：

- 230万会话
- 2万 CPS
- NAT 接近 10Gbps([TP-Link](https://static.tp-link.com/upload/product-overview/2025/202509/20250930/ER8411%28UN%29%20v1.60%20Data%20Sheet.pdf?utm_source=chatgpt.com "tp-link | OmâdaOmada VPN Router with 10G PortsMODEL: ER8411Highlights• Dedicated Quad-core Cortex-A72 @2.2GHz CPU for outstanding performance"))

---

## 但问题也很明显

### CPS 只有 2万/s

相比：

- FortiGate 200F：
    
    
    - 28万/s

差了：

> 14倍

---

## 这意味着：

### 长连接：

很好

### 高频短连接：

一般

比如：

- BT
- 高频代理
- HTTP flood
- 海量 API

就不如 FortiGate。

---

## 小包 PPS 也一般

ER8411：

- 64B 转发：
    
    
    - 约 210万pps([TP-Link](https://static.tp-link.com/upload/product-overview/2025/202509/20250930/ER8411%28UN%29%20v1.60%20Data%20Sheet.pdf?utm_source=chatgpt.com "tp-link | OmâdaOmada VPN Router with 10G PortsMODEL: ER8411Highlights• Dedicated Quad-core Cortex-A72 @2.2GHz CPU for outstanding performance"))

这个对企业办公够。

但：

> 不算运营商级。

---

## 实际问题

Reddit 上有人反馈：

- Controller 重配置掉线
- Session 中断
- 偶发稳定性问题([reddit.com](https://www.reddit.com/r/TPLink_Omada/comments/1i71grg?utm_source=chatgpt.com "ER8411 Reconfigures And Drops Connections"))

所以：

### 企业办公：

很推荐

### IDC核心：

一般

---

# 3. H3C MSR3640-G

## 最“传统企业路由器”

H3C 这台：

> 强项不是 NAT。

而是：

- MPLS
- BGP
- VPN
- SD-WAN
- 企业 WAN

---

## 官方性能其实很强

官方：

- 400Mpps
- 25Gbps IP Forward
- NAT+ACL+QoS：
    
    
    - 12Gbps([H3C](https://www.h3c.com/en/Products_and_Solutions/InterConnect/Routers/Products/WAN_Routers/MSR/H3C_MSR3600/?utm_source=chatgpt.com "H3C MSR3600 Router Series-H3C"))

---

## 但问题：

### 没公布 CPS

### 没公布 NAT Session

这通常说明：

> 它不是专门做海量 NAT 的。

---

## 它更像：

- Cisco ISR
- 华为 AR/MSR
- Juniper Branch

而不是：

- CGNAT 平台

---

# 真正的实际体验差距

<table id="bkmrk-%E5%9C%BA%E6%99%AF-%E6%9C%80%E5%BC%BA-%E6%B5%B7%E9%87%8F-nat-fortiga"><thead><tr><th>场景</th><th>最强</th></tr></thead><tbody><tr><td>海量 NAT</td><td>FortiGate</td></tr><tr><td>高频短连接</td><td>FortiGate</td></tr><tr><td>小包 PPS</td><td>FortiGate</td></tr><tr><td>企业 WAN</td><td>H3C</td></tr><tr><td>MPLS/BGP</td><td>H3C</td></tr><tr><td>性价比</td><td>ER8411</td></tr><tr><td>易用性</td><td>ER8411</td></tr><tr><td>家庭实验室</td><td>ER8411</td></tr><tr><td>IDC出口</td><td>FortiGate</td></tr><tr><td>PCDN</td><td>FortiGate</td></tr><tr><td>企业办公</td><td>ER8411/H3C</td></tr><tr><td>多分支互联</td><td>H3C</td></tr></tbody></table>

---

# 我实际建议（非常重要）

## 如果你是：

### PCDN

### 海外代理

### CGNAT

### IDC

### 高频 NAT

直接：

# FortiGate 200F

它是唯一真正：

> “运营商级 NAT 平台”

---

## 如果你：

### 企业办公

### 万兆出口

### Docker/K8S NAT

### 下载

### NAS

直接：

# ER8411

性价比太高。

---

## 如果你：

### MPLS

### BGP

### IPSec

### 多分支

### 政企

直接：

# H3C MSR3640-G

---

# 最关键一句话

## FortiGate 200F

> 真正高 CPS 高并发 NAT 平台

## ER8411

> 高性价比 NAT 网关

## H3C MSR3640-G

> 企业 WAN 路由器，不是 NAT 怪兽

这三台里：

- ### Fortinet FortiGate 200F

Description: None  
Price: €861.33  
URL:  
Number of Reviews: 1  
Rating: 5.0  
Featured Tag: None  
Merchants: Made-in-China.com  
是“ASIC 硬件加速安全平台”

- ### TP-Link ER8411

Description: None  
Price: €280.30  
URL:  
Number of Reviews: 41  
Rating: 4.7  
Featured Tag: None  
Merchants: Amazon.de  
是“高性价比 NAT 网关”

- H3C MSR3640-G  
    是“传统企业 WAN/MPLS 路由器”

所以：

它们 CPU/内存设计思路都不同。

---

# 三款详细硬件参数对比（核心）

<table id="bkmrk-%E5%8F%82%E6%95%B0-fortinet-fortigat"><thead><tr><th>参数</th><th>[Fortinet FortiGate 200F](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th>[TP-Link ER8411](https://chatgpt.com/c/6a179746-c998-83eb-a181-e94dec84e288)</th><th>H3C MSR3640-G</th></tr></thead><tbody><tr><td>产品定位</td><td>企业级 NGFW</td><td>企业 NAT 网关</td><td>企业 WAN 路由器</td></tr><tr><td>CPU架构</td><td>FortiASIC + SoC4</td><td>ARM64 四核</td><td>1.8GHz 企业网络 CPU</td></tr><tr><td>CPU频率</td><td>官方未公开</td><td>2.2GHz</td><td>1.8GHz</td></tr><tr><td>CPU核心数</td><td>官方未公开（ASIC 卸载）</td><td>4核</td><td>官方未公开</td></tr><tr><td>专用硬件加速</td><td>NP6/CP9 ASIC</td><td>无</td><td>无</td></tr><tr><td>内存 RAM</td><td>16GB DDR4</td><td>4GB</td><td>4GB DDR4</td></tr><tr><td>Flash/eMMC</td><td>128GB SSD</td><td>512MB NAND</td><td>4GB/8GB eMMC</td></tr><tr><td>会话数</td><td>300万</td><td>230万</td><td>官方未公开</td></tr><tr><td>CPS</td><td>28万/s</td><td>2万/s</td><td>官方未公开</td></tr><tr><td>小包 PPS</td><td>16.5Mpps</td><td>约2.1Mpps</td><td>400Mpps（纯转发）</td></tr><tr><td>NAT吞吐</td><td>极强</td><td>约9.4Gbps</td><td>NAT+ACL+QoS约12Gbps</td></tr><tr><td>IP Forward</td><td>极强</td><td>中上</td><td>25Gbps IMIX</td></tr><tr><td>VPN能力</td><td>极强</td><td>中</td><td>强</td></tr><tr><td>10G接口</td><td>有</td><td>双10G SFP+</td><td>6×10G SFP+</td></tr><tr><td>25G支持</td><td>无</td><td>无</td><td>无</td></tr><tr><td>电源</td><td>双电源</td><td>单电源</td><td>双冗余电源</td></tr><tr><td>设备高度</td><td>1U</td><td>1U</td><td>2U</td></tr><tr><td>功耗</td><td>80~110W</td><td>20~30W</td><td>最大251W</td></tr><tr><td>散热噪音</td><td>高</td><td>中</td><td>高</td></tr><tr><td>操作系统</td><td>FortiOS</td><td>Omada OS</td><td>Comware</td></tr><tr><td>学习成本</td><td>中高</td><td>低</td><td>高</td></tr><tr><td>License</td><td>高依赖</td><td>基本无</td><td>无</td></tr></tbody></table>

H3C 官方规格来自 MSR3600 系列规格书。([H3C](https://www.h3c.com/cn/Products_And_Solution/InterConnect/Products/Routers/Products/Wan_Router/MSR/MSR_3600/Home/Detail_Material_List/Specifications/?utm_source=chatgpt.com "产品规格 - 产品技术 - 新华三集团-H3C"))

---

# 1. FortiGate 200F（真正高并发怪兽）

---

## 核心特点

FortiGate 最强的不是 CPU。

而是：

# FortiASIC

包括：

- NP6
- CP9

专门加速：

- NAT
- Session
- IPS
- SSL
- 小包 PPS

---

## 为什么它 CPS 高？

因为：

它很多流量：

> 根本不走主 CPU。

而是：

> ASIC 硬件转发。

这就是它：

- 28万 CPS
- 300万会话
- 16.5Mpps

还能稳定运行的原因。

---

## 实际体验

特点：

- 高频短连接极强
- CGNAT 强
- 小包性能强
- 长时间满载稳定

适合：

- PCDN
- 代理池
- IDC
- ISP 边界

---

## 缺点

- 贵
- License 贵
- 风扇很吵
- 功耗明显高于 ER8411

---

# 2. TP-Link ER8411（性价比王）

---

# 它本质是：

> ARM64 高性能 NAT 网关

核心：

- 4核 2.2GHz
- 4GB RAM
- 无 ASIC
- 全靠 CPU 扛 NAT

---

# 优点

## 非常省电

只有：

- 20~30W

比：

- FortiGate
- H3C

低很多。

---

## NAT Session 很大

官方：

- 230万会话

这个在 SMB 里很夸张。

---

## Omada 很易用

适合：

- 企业办公
- Docker NAT
- NAS
- 万兆出口

---

# 但核心问题：

## CPS 不高

只有：

- 2万/s

相比：

FortiGate：

- 28万/s

差：

# 14倍

---

# 为什么？

因为：

ER8411：

## 没 ASIC

所有：

- NAT
- conntrack
- ACL

都压 CPU。

---

# 所以：

## 长连接：

很强

## 高频短连接：

一般

例如：

- BT
- API flood
- PCDN
- 高频代理

会明显弱于 FortiGate。

---

# 3. H3C MSR3640-G（传统企业 WAN 路由）

H3C 官方规格：([H3C](https://www.h3c.com/cn/Products_And_Solution/InterConnect/Products/Routers/Products/Wan_Router/MSR/MSR_3600/Home/Detail_Material_List/Specifications/?utm_source=chatgpt.com "产品规格 - 产品技术 - 新华三集团-H3C"))

---

# 核心硬件

## CPU

官方：

- 1.8GHz

但没明确：

- 核心数

H3C 很多企业设备：

- 不强调 CPU
- 强调 forwarding ASIC/NP

---

# 内存

- 4GB DDR4

Flash：

- 4GB 或 8GB eMMC

---

# 真正强项

不是 NAT。

而是：

- MPLS
- BGP
- IPSec
- GRE
- SD-WAN
- WAN Routing

---

# 官方性能

- 400Mpps 转发
- 25Gbps IP Forward
- ACL+NAT+QoS：
    
    
    - 12Gbps

([H3C](https://www.h3c.com/cn/Products_And_Solution/InterConnect/Products/Routers/Products/Wan_Router/MSR/MSR_3600/Home/Detail_Material_List/Specifications/?utm_source=chatgpt.com "产品规格 - 产品技术 - 新华三集团-H3C"))

---

# 但问题：

官方：

## 不公布：

- CPS
- NAT Session

这通常说明：

> 它不是专门海量 NAT 平台。

---

# 它更像：

- Cisco ISR
- 华为 AR/MSR
- 企业 WAN Router

不是：

- CGNAT 盒子。

---

# 最真实的差距（重点）

<table id="bkmrk-%E8%83%BD%E5%8A%9B-%E6%9C%80%E5%BC%BA-cps-fortigate-"><thead><tr><th>能力</th><th>最强</th></tr></thead><tbody><tr><td>CPS</td><td>FortiGate</td></tr><tr><td>NAT Session</td><td>FortiGate</td></tr><tr><td>小包 PPS</td><td>FortiGate</td></tr><tr><td>功耗</td><td>ER8411</td></tr><tr><td>性价比</td><td>ER8411</td></tr><tr><td>企业 WAN</td><td>H3C</td></tr><tr><td>MPLS/BGP</td><td>H3C</td></tr><tr><td>PCDN</td><td>FortiGate</td></tr><tr><td>海量短连接</td><td>FortiGate</td></tr><tr><td>易用性</td><td>ER8411</td></tr><tr><td>传统企业稳定性</td><td>H3C/FortiGate</td></tr></tbody></table>

---

# 如果你做：

## 高并发 NAT

选：

# FortiGate 200F

---

## 企业办公 + 万兆

选：

# ER8411

---

## MPLS/BGP/多分支

选：

# H3C MSR3640-G

---

# 最关键一句话

## FortiGate 200F

> ASIC 驱动的“运营商级 NAT 平台”

## ER8411

> ARM CPU 驱动的“高性价比 NAT 网关”

## H3C MSR3640-G

> 企业 WAN 路由器，不是 NAT 怪兽

---

# 一行命令，丢包率从15％直降为0%

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; background-color: transparent; letter-spacing: 0.034em; visibility: visible;">有没有遇到这种情况，网络带宽使用率只有50%,CPU使用率也很低，但是经常会出现网络丢包的告警，伴随着响应超时和请求缓慢，应用日志中还查不到记录。</span>

那么大概率就是受到了这个参数设置的限制，net.core.netdev\_max-backlog。

查看系统当前的值

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">[![image_1.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/iPonjVXkvHtVYEZL-image-1.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/iPonjVXkvHtVYEZL-image-1.jpg)</section><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">  
</section></div>它是Linux 内核网络子系统中一个控制网络接收队列长度的参数。新到的数据包必须先在内核的 backlog 队列里排队等候。

目前主流的发行版本这个值默认为1000，意味着一旦瞬间有超过1000个数据包涌来而CPU 来不及处理，超出的部分会被内核直接丢弃，不通知任何应用程序，这也是我们为什么应用查不到记录的原因。

显然，这个值在真实的高PPS场景中是非常脆弱的，只要上游出现一次网络突刺就极有可能导致backlog队列就会瞬间溢出。

用iperf3模拟高频UDP请求对比下这个参数调整前后的变化

先启动一个新的窗口实时观察backlog 丢包情况

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--7" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_2.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/JSuaeHCmdrTTCJVC-image-2.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/JSuaeHCmdrTTCJVC-image-2.jpg)</section></div>正常情况下，所有 CPU 的dropped列应为 0

服务端启动 iperf3 监听

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--9" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_3.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/JggIKQ4aL8an4EMT-image-3.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/JggIKQ4aL8an4EMT-image-3.jpg)</section></div>客户端发起压测

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--11" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_4.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/PTzTEBPX2Huc0Yqg-image-4.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/PTzTEBPX2Huc0Yqg-image-4.jpg)</section></div>观察调整前默认值1000 监控端输出

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--13" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_5.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/300LdZAin17Xtxtu-image-5.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/300LdZAin17Xtxtu-image-5.jpg)</section></div>可以看到每个 CPU 都有明显丢包，丢包率大约为15%。

修改值为5000后重新压测观察

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--16" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_6.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/APdcnSeYcpOKxFmn-image-6.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/APdcnSeYcpOKxFmn-image-6.jpg)</section></div>再次执行压测命令，观察监控窗口

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--18" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_7.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/4BsSDXLsCnQMxEH0-image-7.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/4BsSDXLsCnQMxEH0-image-7.jpg)</section></div>所有 CPU 的 dropped均为 0，丢包率0%，网卡dropped计数器也停止增长。

丢包率从15％下降到了 0%。

那真实环境需要调整多大合适呢？

常规场景调整到5000~10000;

高PPS场景调整到30000~50000（需压测验证）。

需要注意的是，如果还想进一步调优就需要配合 RPS提升软中断能力。

调大 netdev\_max\_backlog 只是解决了队列容量问题，但如果没有足够的软中断处理能力，<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; background-color: transparent; letter-spacing: 0.034em;">队列依然会持续积压。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; background-color: transparent; letter-spacing: 0.034em;">  
</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; background-color: transparent; letter-spacing: 0.034em;">提高软中断处理能力的就是是让多个 CPU核共同分担网络收包处理。</span>

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--25" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">[![image_8.jpg](https://bost.lesrec.cn/uploads/images/gallery/2026-06/scaled-1680-/zLhx7QyRYjU8Jst1-image-8.jpg)](https://bost.lesrec.cn/uploads/images/gallery/2026-06/zLhx7QyRYjU8Jst1-image-8.jpg)</section></div>开启RPS(Receive PacketSteering)LRPS将收到的数据包哈希分发到多个CPU 的 backlog 队列上，让软中断并行处理。

开启 RFS(Receive Flow Steering): RFS 是 RPS 的升级版，能将同一条流（例如同一个TCP连接)数据包送到同一个CPU

net.core.netdev\_max backlog是 Linux 网络接收路径上容易被忽视的参数，目前的默认值很有可能成为高 PPS场景下的网络瓶颈。

<div class="rich_media_content js_underline_content
                       defaultNoSetting
            " id="bkmrk--29" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></div>

# 别再ping着发呆了：银行老运维的10分钟网络排障法

<div class="rich_media_content js_underline_content
                       autoTypeSetting24psection
            " id="bkmrk-%E4%BA%91%E9%97%B4%E8%B1%B9%E5%8F%98-%7C-linux%E8%B0%83%E4%BC%98%E5%AE%9E%E6%88%98%E7%B3%BB%E5%88%97-%E8%AE%B0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; color: rgba(0, 0, 0, 0.9); font-size: 17px; overflow: hidden; text-align: justify; position: relative; z-index: 0; user-select: text; font-family: 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><section data-pm-slice="0 0 []" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px 10px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif; font-size: 16px; color: rgb(0, 0, 0); line-height: 1.5em; word-spacing: 0em; letter-spacing: 0em; word-break: break-word; text-align: left; visibility: visible;">> **<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">云间豹变 | Linux调优实战系列</span>**

---

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">记得某次半夜值班遇到告警，应用电话打过来：「A系统调B系统接口，间歇超时，帮忙看一下网络。」</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">我揉了揉眼睛，</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">ping 10.10.1.20</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">——通。</span>

`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">telnet 10.10.1.20 8080</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">——通。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">「网络没问题啊，你们应用层自己查。」</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">挂了电话，五分钟后告警又来了，一晚上反复如此，第二天还被喷没解决问题。</span>

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">这是我早年入行踩过最深的坑：ping通，不等于网络没问题。</span>**

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">后来我整理了一套「10分钟网络定位法」，从那以后再也没被这类网络基础问题「骚扰」过。</span>

---

## <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 5px 0px 0px; padding: 3px 10px 1px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 22px; color: rgb(255, 255, 255); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; border: 1px none rgb(0, 0, 0);"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">先建一张「网络排查地图」</span></span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">从技术原理角度来看，银行生产环境的网络问题，藏在至少6个层面。出了事你得知道先查哪层：</span>

<section data-tool="mdnice编辑器" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; overflow-x: auto;"><table style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 10px; padding: 0px; outline: 0px; border-collapse: collapse; display: table; width: 657px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; text-align: left; min-width: 344px;"><thead style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><th data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240); max-width: 100%; box-sizing: border-box !important; color: rgb(0, 0, 0); font-size: 16px; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; height: auto; border-radius: 0px; min-width: 85px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">排查层面</span></section></th><th data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240); max-width: 100%; box-sizing: border-box !important; color: rgb(0, 0, 0); font-size: 16px; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; height: auto; border-radius: 0px; min-width: 85px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">工具</span></section></th><th style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240); max-width: 100%; box-sizing: border-box !important; color: rgb(0, 0, 0); font-size: 16px; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; height: auto; border-radius: 0px; min-width: 85px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">能看到什么</span></section></th></tr></thead><tbody style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">连通性</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ping / </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ping6</span>``</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">基础ICMP可达性</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(248, 248, 248); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">路由</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ip route / </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">traceroute</span>``</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">包走的路径，在哪一跳丢的</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">端口</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ss / </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">netstat</span>``</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">本地监听和连接状态</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(248, 248, 248); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">DNS</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">dig / </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">nslookup</span>``</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">域名解析对不对</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">网卡物理层</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ethtool / </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ip addr</span>``</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">网卡UP、协商速率、有无错包</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(248, 248, 248); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">抓包</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">tcpdump</span>`</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">包到底有没有到本机，TCP握手细节</span></section></td></tr><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(0, 0, 0); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255); width: auto; height: auto;"><td data-colwidth="130" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">应用层</span></section></td><td data-colwidth="189" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;">`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">curl -w</span>`</td><td style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 5px 10px; outline: 0px; overflow-wrap: break-word !important; word-break: break-all; hyphens: auto; border: 1px solid rgba(204, 204, 204, 0.4); max-width: 100%; box-sizing: border-box !important; min-width: 85px; border-radius: 0px;"><section style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">请求慢在哪一段（DNS/TCP/SSL/服务端）</span></section></td></tr></tbody></table>

</section>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">10分钟排障法则的核心</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">：不要上来就ping。先问清楚症状（慢？不通？间歇？），再从底层往上层逐层查。</span>

---

## <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 5px 0px 0px; padding: 3px 10px 1px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 22px; color: rgb(255, 255, 255); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; border: 1px none rgb(0, 0, 0);"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">六个命令，覆盖物理层到应用层</span></span>

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">① ss — 连接状态一看就懂</span>**

```
# 查看所有TCP连接，按状态分组统计
# NR>1 跳过表头行，避免把 "State" 也算进去
ss -tan | awk 'NR>1 {print $1}' | sort | uniq -c | sort -rn

# 查看哪个进程在监听8080端口（排障必用）
sudo ss -tlnp | grep 8080

# 查看已建立的连接，按本地端口聚合，看有没有异常外联
# state established 比简写 est 兼容性更好（老版本 RHEL/CentOS 适用）
ss -tn state established | awk 'NR>1 {print $4}' | sort | uniq -c | sort -rn | head -20

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">② ip route — 路由表是第一现场</span>**

```
# 查看路由表，默认路由指向谁
ip route show

# 追踪到目标IP的路径（每一跳延迟，IP都是随便取的，无需在意）
traceroute -n 10.10.1.20
# 或者用mtr（实时刷新，推荐）
mtr -r -c 10 10.10.1.20

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">③ tcpdump — 抓包，看清包到底到没到</span>**

```
# 抓取到达eth0的HTTP流量（排障神器）
sudo tcpdump -i eth0 -nn port 80 and host 10.10.1.20 -c 100

# 抓取ICMP包，看ping的包有没有出去
sudo tcpdump -i eth0 -nn icmp

# 保存到文件，事后用Wireshark分析
sudo tcpdump -i eth0 -w /tmp/capture.pcap port not 22

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">④ dig — DNS问题别再背锅了</span>**

```
# 查A记录，看解析对不对
dig +short api.example.com

# 追踪DNS解析全过程（看是哪一层DNS的问题）
dig +trace api.example.com

# 反向解析，从IP查域名（安全审计常用）
dig -x 10.10.1.20

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">⑤ ethtool — 网卡物理层排障</span>**

```
# 看网卡是否UP、协商速率和双工模式（百兆/千兆/万兆）
ethtool eth0 | grep -E "Speed|Duplex|Link detected"

# 看网卡驱动信息和固件版本
ethtool -i eth0

# 看网卡收发包统计（有多少错误、丢包）
ethtool -S eth0 | grep -iE "drop|error|discard"

```

> <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">💡 </span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">什么时候用 ethtool？</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 当你怀疑是"网线松了""网卡掉速""协商到百兆而不是千兆"这类物理层问题的时候。</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ping</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 看不出来，</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ss</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 也看不出来，只有 </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ethtool</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 能确认。</span>

---

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">⑥ curl — 应用层时间拆解（从开发角度排查必备）</span>**

```
# 把一次HTTP请求的时间拆成 DNS→TCP握手→SSL→服务端处理 四段
curl -w '\nDNS解析: %{time_namelookup}s
TCP握手: %{time_connect}s
SSL握手: %{time_appconnect}s
服务端首字节: %{time_starttransfer}s
总耗时:    %{time_total}s\n' \
     -o /dev/null -s http://10.10.1.20:8080/api/health

```

> <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">💡 </span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ping</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 告诉你网络通不通，</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">curl -w</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 告诉你</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">慢在哪一段</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">。DNS 慢找 DNS，TCP 握手慢找路由，服务端慢找应用——不用猜。</span>

---

## <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 5px 0px 0px; padding: 3px 10px 1px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 22px; color: rgb(255, 255, 255); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; border: 1px none rgb(0, 0, 0);"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">真实案例：10分钟从「ping通」找到「MTU丢包」</span></span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">这是我处理过最「烧脑」的一次故障。</span>

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">故障现象</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">：应用A调用应用B的接口，小请求正常（GET /health 秒回），但带 payload 的 POST 大请求就超时。A和B在同一网段，</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">ping</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 正常，</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">telnet</span>`<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 端口也通。</span>

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">定位过程（实际耗时10分钟）</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">：</span>

```
# 第1分钟：确认基础连通性
ping 10.10.1.20
# 通。不是网络不通的问题。

# 第2分钟：用curl模拟大请求——复现问题
curl -X POST -d "$(dd if=/dev/urandom bs=1000 count=50 2>/dev/null | base64)" \
     --connect-timeout 3 --max-time 10 \
     http://10.10.1.20:8080/api/submit
# 超时！小请求OK，带body的大请求挂。

# 第3分钟：检查TCP握手时的MSS协商（tcpdump抓包）
sudo tcpdump -i eth0 -nn 'tcp port 8080 and (tcp[tcpflags] & tcp-syn != 0)' -c 3
# 看到 A→B SYN 包中 MSS=1460（A端MTU 1500 正常）
# 看到 B→A SYN-ACK 包中 MSS=8960（B端MTU 9000 巨帧！）

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">问题就在 MSS=8960</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">B 端虚拟机迁移后网卡被配成了 MTU=9000。TCP 握手时，B 向 A 通告 "我能收 8960 字节的 TCP 段"。A 端客户端看到这个值，尝试构造接近 8960 字节的大段发送——但 A 自己的网卡 MTU 只有 1500，内核只能做 </span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">IP 分片</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">。</span>

```
# 第4分钟：验证分片行为
ip link show eth0 | grep mtu
# A端: mtu 1500
ip link show eth0 | grep mtu  # 在B端执行
# B端: mtu 9000  ← 问题在这

```

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">被分片的 IP 包经过交换机时，部分交换机对分片包的处理不稳定——重组队列有限、分片可能乱序到达。</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">一旦有一个分片丢了，B 端的 TCP 层就永远等不到完整段，应用层超时。</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"> 小请求为什么没事？因为小于 1460 字节，根本不需要分片。</span>

```
# 第5分钟：临时修复——把B端MTU改回1500，立即恢复
sudo ip link set eth0 mtu 1500

# 验证：再次curl大请求
curl -X POST -d "$(dd if=/dev/urandom bs=1000 count=50 2>/dev/null | base64)" \
     --connect-timeout 3 --max-time 10 \
     http://10.10.1.20:8080/api/submit
# 正常返回！

```

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">永久生效</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">（根据是否使用 NetworkManager 选一种，切记提工单去做）：</span>

```
# 方式一：传统 network-scripts（RHEL 7 及以前）
sed -i 's/^MTU=.*/MTU=1500/' /etc/sysconfig/network-scripts/ifcfg-eth0

# 方式二：NetworkManager（RHEL 8+ 及大部分现代发行版）
nmcli con mod eth0 802-3-ethernet.mtu 1500
nmcli con up eth0

```

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">从告警到恢复，</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">10分钟搞定手工</span>**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">如果用传统方式——先找应用组查代码、再找网络组查路由、再逐层拉会——这个故障保底耗2小时。</span>

---

## <span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 5px 0px 0px; padding: 3px 10px 1px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-size: 22px; color: rgb(255, 255, 255); background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; border: 1px none rgb(0, 0, 0);"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">放进crontab的网络巡检脚本</span></span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">不要等出事才查。这个脚本每天跑一次，主动发现问题：</span>

```
#!/bin/bash
# network_check.sh — 日常网络健康巡检

REPORT="/tmp/network_report_$(date +%Y%m%d).txt"

echo"=== 网络巡检报告 $(date) ===" > "$REPORT"

# 1. 检查默认路由是否存在
DEFAULT_ROUTE=$(ip route | grep default | wc -l)
echo"默认路由数量: ${DEFAULT_ROUTE}" >> "$REPORT"
[ "$DEFAULT_ROUTE" -eq 0 ] && echo"[WARN] 缺少默认路由！" >> "$REPORT"

# 2. 检查DNS配置是否正常（银行环境不通外网，改查本地resolver）
DNS_NS=$(grep -c '^nameserver' /etc/resolv.conf 2>/dev/null)
echo"DNS服务器数量: ${DNS_NS}" >> "$REPORT"
[ "$DNS_NS" -eq 0 ] && echo"[WARN] 未配置DNS服务器！" >> "$REPORT"
# 能访问外网的机器可以加一步验证：dig +time=2 +short 你的内网域名

# 3. 检查网卡状态和协商速率
for iface in $(ls /sys/class/net/ | grep -v lo); do
    STATE=$(cat /sys/class/net/$iface/operstate 2>/dev/null || echo"N/A")
    SPEED=$(ethtool $iface 2>/dev/null | grep -oP 'Speed: \K.*')
    [ -z "$SPEED" ] && SPEED="N/A"
    echo"网卡 $iface: 速率=${SPEED} 状态=${STATE}" >> "$REPORT"
    [ "$STATE" != "up" ] && echo"[WARN] 网卡 $iface 不是UP状态！" >> "$REPORT"
done

# 4. 检查MTU是否与标准值一致（巨帧未关是常见坑）
for iface in $(ls /sys/class/net/ | grep -v lo); do
    MTU=$(cat /sys/class/net/$iface/mtu 2>/dev/null)
    [ -n "$MTU" ] && [ "$MTU" -ne 1500 ] && \
        echo"[WARN] 网卡 $iface MTU=${MTU} (非标准1500)！" >> "$REPORT"
done

# 5. 检查异常连接数（根据业务实际情况调整阈值）
ESTAB_COUNT=$(ss -tn state established | tail -n +2 | wc -l)
echo"当前ESTABLISHED连接数: ${ESTAB_COUNT}" >> "$REPORT"
[ "$ESTAB_COUNT" -gt 500 ] && echo"[WARN] 连接数超阈值(${ESTAB_COUNT})，请核查" >> "$REPORT"

# 6. 检查有没有丢包的网卡
for iface in $(ls /sys/class/net/ | grep -v lo); do
    RX_DROP=$(cat /sys/class/net/$iface/statistics/rx_dropped 2>/dev/null || echo 0)
    TX_DROP=$(cat /sys/class/net/$iface/statistics/tx_dropped 2>/dev/null || echo 0)
    [ "$RX_DROP" -gt 100 ] && echo"[WARN] $iface RX丢包: $RX_DROP" >> "$REPORT"
    [ "$TX_DROP" -gt 100 ] && echo"[WARN] $iface TX丢包: $TX_DROP" >> "$REPORT"
done

cat "$REPORT"

```

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">和之前排查日志一样[别再tail -f发呆了：银行老运维的10分钟日志排障法](https://mp.weixin.qq.com/s?__biz=MzkwMzI3ODA4Mg==&mid=2247483873&idx=1&sn=8ac51fd8341e0ef1b151a8e2a9939cce&scene=21#wechat_redirect)，加进crontab每天早上8点跑一次：</span>

```
0 8 * * * /opt/scripts/network_check.sh >> /var/log/network_daily.log 2>&1

```

---

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">尾声</span>**

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">10分钟定位，不是玄学，是方法。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">地图建好了，从底层往上层逐层推——物理网卡→路由→传输层→应用端口，基本不会走弯路。</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">下次碰到网络故障，不用只会ping了。</span>

---

**<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">你遇到过最「烧脑」的网络故障是什么？</span>**

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">是MTU不匹配，还是路由表被误改？</span>

<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">评论区聊聊，没准能帮到下一个正在ping着发呆的人。</span>

---

*<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">👉 觉得有用就转发给你的运维bro，在网络排障的时候说不定用得上</span>*

*<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">如果不想错过下一期排障实战，点个关注，每次更新直接推到你微信里。顺手点个「在看」，让我知道这类干货你们爱看。</span>*

</section></div>

# 思科ADSL/PPPoE拨号 封禁IP完整配置

\# 思科ADSL/PPPoE拨号（Dialer接口）封禁 206.82.0.0/16 完整配置  
\## 核心原理  
ADSL拨号虚拟接口 `Dialer1` 是外网接口，\*\*`in` 方向过滤公网主动流入的流量\*\*，用\*\*扩展ACL（100~199）\*\* 精准阻断源网段 `206.82.0.0/16` 所有访问内网的数据包，不影响内网主动向外访问该网段。

\### 网段反掩码换算  
`206.82.0.0/16` 掩码 `255.255.0.0` → 反掩码 `0.0.255.255`

\## 完整可复制配置（适配你现有Dialer1拨号环境）  
```ios  
conf t  
! 1. 创建扩展ACL，拒绝206.82.0.0/16公网主动访问内网  
access-list 160 deny ip 206.82.0.0 0.0.255.255 any log  
! 放行所有其他公网正常流量（ACL末尾隐含deny any，必须加permit ip any any）  
access-list 160 permit ip any any

! 2. 绑定到ADSL拨号外网接口Dialer1，入站过滤in（公网进来的包）  
interface Dialer1  
 ip access-group 160 in  
exit  
end  
```

\## 两种需求区分（按需选择）  
\### 需求1：仅禁止206.82.0.0/16 主动连入你的内网（推荐上面配置）  
\- 效果：公网 `206.82.x.x` 无法发起TCP/UDP连接访问你的内网服务器；  
\- 内网设备主动去访问 `206.82.x.x` 不受限制，可正常建立连接。

\### 需求2：双向完全阻断（内网也不能访问206.82.0.0/16）  
额外在Dialer1出站out方向追加规则：  
```ios  
conf t  
access-list 160 deny ip any 206.82.0.0 0.0.255.255 log  
interface Dialer1  
 ip access-group 160 out  
end  
```

\## 结合你之前业务ACL150兼容方案（无需新建ACL，直接复用）  
如果你已经在用 `access-list 150` 做外网入站控制，直接追加封禁规则到现有ACL头部（ACL从上到下匹配，deny要放在permit前面）：  
```ios  
conf t  
! 在原有ACL最顶部插入封禁网段  
access-list 150 deny ip 206.82.0.0 0.0.255.255 any log  
! 下面保留你原有所有规则不变  
access-list 150 permit udp any host 218.1.210.220 range 16000 20000  
access-list 150 deny udp any host 218.1.210.220 eq 5060  
access-list 150 permit ip any any  
! 接口绑定不变，已经绑定过Dialer1 in无需重复操作  
end  
```

\## 校验与排错命令  
1\. 查看ACL匹配计数，确认206.82网段流量被拦截（匹配数字持续增长代表生效）  
```ios  
show access-list 160  
show access-list 150  
```  
2\. 查看Dialer接口ACL绑定状态  
```ios  
show run interface Dialer1  
```  
3\. 实时查看被拦截的数据包日志（配置里加了`log`关键字）  
```ios  
terminal monitor  
```  
4\. 临时清空ACL匹配计数  
```ios  
clear access-list counters 160  
```

\## 关键注意事项  
1\. \*\*方向不能写反\*\*：`ip access-group XXX in` 是过滤公网进来的流量；写out只会拦截内网主动对外访问，无法阻止外部主动扫描攻击。  
2\. ACL顺序优先级：deny网段规则必须放在所有permit规则\*\*最前面\*\*，否则会被放行规则先匹配，封禁失效。  
3\. `log` 参数作用：记录每一条被丢弃的数据包源目IP、协议，方便事后溯源攻击行为，生产环境建议保留。  
4\. ADSL拨号接口固定为Dialer1，物理ATM/以太网接口不需要绑定ACL，所有外网流量统一经过Dialer虚拟接口过滤。