当前位置: 首页 > news >正文

VRRP配置案例(路由走向分析,端口切换)

以下配置图为例

PC1的配置

acsw下行为access口,上行为trunk口, 将g0/0/3划分到vlan100中

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname acsw
[acsw]
Sep 11 2023 18:15:48-08:00 acsw DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 4, the 
change loop count is 0, and the maximum number of records is 4095.
[acsw]undo info-center enable
Info: Information center is disabled.
[acsw]vlan 10[acsw-vlan100]int g0/0/3
[acsw-GigabitEthernet0/0/3]port link-type access[acsw-GigabitEthernet0/0/3]port default vlan 10
[acsw-GigabitEthernet0/0/3]qu[acsw]int g0/0/1
[acsw-GigabitEthernet0/0/1]port link-type trunk
[acsw-GigabitEthernet0/0/1]port trunk allow-pass vlan all[acsw-GigabitEthernet0/0/1]int g0/0/2
[acsw-GigabitEthernet0/0/2]port link-type trunk
[acsw-GigabitEthernet0/0/2]port trunk allow-pass vlan all[acsw-GigabitEthernet0/0/2]qu
[acsw]

 核心交换机1的配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname coresw1
[coresw1]
Sep 11 2023 21:33:29-08:00 coresw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.
5.25.191.3.1 configurations have been changed. The current change number is 4, t
he change loop count is 0, and the maximum number of records is 4095.
[coresw1]undo info-center enable
Info: Information center is disabled.
[coresw1]interface g0/0/1
[coresw1-GigabitEthernet0/0/1]port link-type trunk
[coresw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all[coresw1-GigabitEthernet0/0/1]int g0/0/3
[coresw1-GigabitEthernet0/0/3]port link-type trunk
[coresw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[coresw1-GigabitEthernet0/0/3]q[coresw1]vlan 10
[coresw1-vlan10]q
[coresw1]vlan 100
[coresw1-vlan100]q
[coresw1]int g0/0/2
[coresw1-GigabitEthernet0/0/2]port link-type access
[coresw1-GigabitEthernet0/0/2]port default vlan 100
[coresw1-GigabitEthernet0/0/2]q[coresw1]interface vlanif 10
[coresw1-Vlanif10]ip address 192.168.10.252 24
[coresw1-Vlanif10]qu[coresw1]interface vlanif 100
[coresw1-Vlanif100]ip add 192.168.100.1 30
[coresw1-Vlanif100]qu<coresw1>sys
Enter system view, return user view with Ctrl+Z.
[coresw1]interface vlanif 10
#必配
[coresw1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
#选配
[coresw1-Vlanif10]vrrp vrid 10 priority 120
[coresw1-Vlanif10]vrrp vrid 10 preempt-mode time delay 20
[coresw1-Vlanif10]qu
[coresw1]
[coresw1]display vrrpVlanif10 | Virtual Router 10State : MasterVirtual IP : 192.168.10.254Master IP : 192.168.10.252PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES   Delay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-010aCheck TTL : YESConfig type : normal-vrrpCreate time : 2023-09-11 21:57:31 UTC-08:00Last change time : 2023-09-11 21:57:35 UTC-08:00#抢占延迟20秒的作用
这里我们先将coresw1
vrrp vrid 10 priority 90
在变为
vrrp vrid 10 priority 120
我们通过tracert路径可以看见,还是走coresw2,这就是因为有抢占延迟

核心交换机2的配置

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname coresw2
[coresw2]
Sep 11 2023 21:48:13-08:00 coresw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.
5.25.191.3.1 configurations have been changed. The current change number is 4, t
he change loop count is 0, and the maximum number of records is 4095.
[coresw2]undo info-center enable
Info: Information center is disabled.
[coresw2]interface g0/0/1
[coresw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[coresw2-GigabitEthernet0/0/1]int g0/0/3
[coresw2-GigabitEthernet0/0/3]p l t
[coresw2-GigabitEthernet0/0/3]port trunk allow vlan all
[coresw2-GigabitEthernet0/0/3]qu
[coresw2]vlan 10
[coresw2-vlan10]vlan 200
[coresw2-vlan200]qu
[coresw2]interface g0/0/2
[coresw2-GigabitEthernet0/0/2]port link-type access
[coresw2-GigabitEthernet0/0/2]port default vlan 200
[coresw2-GigabitEthernet0/0/2]qu
[coresw2]int vlanif 10
[coresw2-Vlanif10]ip add 192.168.10.253 24
[coresw2-Vlanif10]interface vlan 200
[coresw2-Vlanif200]ip address 192.168.200.1 30
[coresw2-Vlanif200]
[coresw2-Vlanif200]ping 192.168.10.252PING 192.168.10.252: 56  data bytes, press CTRL_C to breakReply from 192.168.10.252: bytes=56 Sequence=1 ttl=255 time=130 msReply from 192.168.10.252: bytes=56 Sequence=2 ttl=255 time=60 msReply from 192.168.10.252: bytes=56 Sequence=3 ttl=255 time=70 msReply from 192.168.10.252: bytes=56 Sequence=4 ttl=255 time=60 msReply from 192.168.10.252: bytes=56 Sequence=5 ttl=255 time=70 ms[coresw2]  
[coresw2]int vlanif 10
#必选
[coresw2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[coresw2-Vlanif10]
#默认优先级是100,但是第一个核心交换机为120,所以第一个是master
[coresw2-Vlanif10]qu[coresw2]display vrrpVlanif10 | Virtual Router 10State : BackupVirtual IP : 192.168.10.254Master IP : 192.168.10.252PriorityRun : 100PriorityConfig : 100MasterPriority : 120Preempt : YES   Delay Time : 0 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-010aCheck TTL : YESConfig type : normal-vrrpCreate time : 2023-09-11 22:05:51 UTC-08:00Last change time : 2023-09-11 22:05:51 UTC-08:00[coresw2]

ping 网关,是master,即coresw1进行回应

PC>ping 192.168.10.254Ping 192.168.10.254: 32 data bytes, Press Ctrl_C to break
From 192.168.10.254: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.10.254: bytes=32 seq=2 ttl=255 time=31 ms
From 192.168.10.254: bytes=32 seq=3 ttl=255 time=47 ms
From 192.168.10.254: bytes=32 seq=4 ttl=255 time=47 ms
From 192.168.10.254: bytes=32 seq=5 ttl=255 time=31 ms--- 192.168.10.254 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 31/37/47 ms

AR1的配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]interface g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 192.168.100.2 30
Sep 11 2023 22:16:34-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR1-GigabitEthernet0/0/1]int g0/0/2
[AR1-GigabitEthernet0/0/2]ip add 192.168.200.2 30
[AR1-GigabitEthernet0/0/2]
Sep 11 2023 22:17:17-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the UP state. 
[AR1-GigabitEthernet0/0/2]int g0/0/0 
[AR1-GigabitEthernet0/0/0]ip add 100.1.1.2 30
[AR1-GigabitEthernet0/0/0]
Sep 11 2023 22:17:39-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]q
#ping直连
[AR1]ping 192.168.100.1PING 192.168.100.1: 56  data bytes, press CTRL_C to breakReply from 192.168.100.1: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.100.1: bytes=56 Sequence=2 ttl=255 time=10 msReply from 192.168.100.1: bytes=56 Sequence=3 ttl=255 time=10 msReply from 192.168.100.1: bytes=56 Sequence=4 ttl=255 time=30 msReply from 192.168.100.1: bytes=56 Sequence=5 ttl=255 time=20 ms--- 192.168.100.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/24/50 ms[AR1]ping 192.168.200.1PING 192.168.200.1: 56  data bytes, press CTRL_C to breakReply from 192.168.200.1: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.200.1: bytes=56 Sequence=2 ttl=255 time=20 msReply from 192.168.200.1: bytes=56 Sequence=3 ttl=255 time=10 msReply from 192.168.200.1: bytes=56 Sequence=4 ttl=255 time=30 msReply from 192.168.200.1: bytes=56 Sequence=5 ttl=255 time=10 ms--- 192.168.200.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/24/50 ms

 互联网的配置

sys
int g0/0/0
ip add 100.1.1.1 30

 到这里PC1仍然ping不通互联网,PC1与互联网并不在一个网段,就到达网关(coresw1)

<coresw1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 7        Routes : 7        Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0192.168.10.0/24  Direct  0    0           D   192.168.10.252  Vlanif10192.168.10.252/32  Direct  0    0           D   127.0.0.1       Vlanif10192.168.10.254/32  Direct  0    0           D   127.0.0.1       Vlanif10192.168.100.0/30  Direct  0    0           D   192.168.100.1   Vlanif100192.168.100.1/32  Direct  0    0           D   127.0.0.1       Vlanif100

重要的一步

#配置默认路由,5个0,8个0都可以
[coresw1]ip route-static 0.0.0.0 0.0.0.0 192.168.100.2[coresw2]ip route-static 0.0.0.0 0 192.168.200.2

到达这一步,再配置互联网的回程路由
这里可以写静态路由,也可以写默认路由

#静态ip
ip route-static 192.168.10.0 24 100.1.1.2#默认路由
ip route-static 0.0.0.0 0 100.1.1.2

 这里AR1没有目的地址:192.168.10.1的路由 

[AR1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: PublicDestinations : 13       Routes : 13       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface100.1.1.0/30  Direct  0    0           D   100.1.1.2       GigabitEthernet
0/0/0100.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0100.1.1.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0192.168.100.0/30  Direct  0    0           D   192.168.100.2   GigabitEthernet
0/0/1192.168.100.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1192.168.100.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1192.168.200.0/30  Direct  0    0           D   192.168.200.2   GigabitEthernet
0/0/2192.168.200.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2192.168.200.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

 所以AR1还需要配静态路由

[AR1]ip route-static 192.168.10.0 24 192.168.100.1
[AR1]ip route-static 192.168.10.0 24 192.168.200.1

 现在终于可以ping通啦!!

注:

可以用tracert观察路径

 最后一个问题:端口的切换

#如果g0/0/2接口down了,那么其优先级变为120-30=90,那么master会变为coresw2
[coresw1]interface vlanif 10
[coresw1-Vlanif10]vrrp vrid 10 track interface g0/0/2
[coresw1-Vlanif10]vrrp vrid 10 track interface g0/0/2 reduced 30

可以自己试试

[coresw1]int g0/0/2
[coresw1-GigabitEthernet0/0/2]shutdown
[coresw1-GigabitEthernet0/0/2]qu
[coresw1]display vrrpVlanif10 | Virtual Router 10State : MasterVirtual IP : 192.168.10.254Master IP : 192.168.10.252PriorityRun : 90PriorityConfig : 120MasterPriority : 90Preempt : YES   Delay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-010aCheck TTL : YESConfig type : normal-vrrpTrack IF : GigabitEthernet0/0/2   Priority reduced : 30IF state : DOWNCreate time : 2023-09-11 21:57:31 UTC-08:00Last change time : 2023-09-11 21:57:35 UTC-08:00[coresw2]display vrrpVlanif10 | Virtual Router 10State : MasterVirtual IP : 192.168.10.254Master IP : 192.168.10.253PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES   Delay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-010aCheck TTL : YESConfig type : normal-vrrpCreate time : 2023-09-11 22:05:51 UTC-08:00Last change time : 2023-09-11 22:56:50 UTC-08:00

相关文章:

VRRP配置案例(路由走向分析,端口切换)

以下配置图为例 PC1的配置 acsw下行为access口&#xff0c;上行为trunk口&#xff0c; 将g0/0/3划分到vlan100中 <Huawei>sys Enter system view, return user view with CtrlZ. [Huawei]sysname acsw [acsw] Sep 11 2023 18:15:48-08:00 acsw DS/4/DATASYNC_CFGCHANGE:O…...

【图像处理】【应用程序设计】加载,编辑和保存图像数据、图像分割、色度键控研究(Matlab代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…...

05. 机器学习入门 - 动态规划

文章目录 从一个案例开始动态规划 Hi, 你好。我是茶桁。 咱们之前的课程就给大家讲了什么是人工智能&#xff0c;也说了每个人的定义都不太一样。关于人工智能的不同观点和方法&#xff0c;其实是一个很复杂的领域&#xff0c;我们无法用一个或者两个概念确定什么是人工智能&a…...

【JVM】第五篇 垃圾收集器G1和ZGC详解

导航 一. G1垃圾收集算法详解1. 大对象Humongous说明2. G1收集器执行一次GC运行的过程步骤3. G1垃圾收集分类4. G1垃圾收集器参数设置5. G1垃圾收集器的优化建议6. 适合使用G1垃圾收集器的场景?二. ZGC垃圾收集器详解1. NUMA与UMA2. 颜色指针3. ZGC的运作过程4. ZGC垃圾收集器…...

嵌入式Linux应用开发-基础知识-第十九章驱动程序基石⑤

嵌入式Linux应用开发-基础知识-第十九章驱动程序基石⑤ 第十九章 驱动程序基石⑤19.9 mmap19.9.1 内存映射现象与数据结构19.9.2 ARM架构内存映射简介19.9.2.1 一级页表映射过程19.9.2.2 二级页表映射过程 19.9.3 怎么给APP新建一块内存映射19.9.3.1 mmap调用过程19.9.3.2 cach…...

数据分析技能点-独立性检验拟合优度检验

在这个数据驱动的时代,数据分析已经成为了一个不可或缺的工具,无论是在商业决策、医疗研究还是日常生活中。然而数据分析并不仅仅是一堆数字和图表;它是一个需要严谨的科学方法和逻辑推理的过程。 本文将重点介绍两种广泛应用于数据分析的统计检验方法:独立性检验和拟合优…...

了解汽车ecu组成

常用ecu框架组成&#xff1a; BCM(body control module)-车身控制模块: 如英飞凌tc265芯片&#xff1a; 车身控制单元&#xff08;BCM&#xff09;适合应用于12V和24V两种电压工作环境&#xff0c;可用于轿车、大客车和商用车的车身控制。输入模块通过采集电路采集各路开关量和…...

用AI原生向量数据库Milvus Cloud 搭建一个 AI 聊天机器人

搭建聊天机器人 一切准备就绪后,就可以搭建聊天机器人了。 文档存储 机器人需要存储文档块以及使用 Towhee 提取出的文档块向量。在这个步骤中,我们需要用到 Milvus。 安装轻量版 Milvus Lite,使用以下命令运行 Milvus 服务器: (chatbot_venv) [egoebelbecker@ares milvus_…...

【OpenCV-Torch-dlib-ubuntu】Vm虚拟机linux环境摄像头调用方法与dilb模型探究

前言 随着金秋时节的来临&#xff0c;国庆和中秋的双重喜庆汇聚成一片温暖的节日氛围。在这个美好的时刻&#xff0c;我们有幸共同迎来一次长达8天的假期&#xff0c;为心灵充电&#xff0c;为身体放松&#xff0c;为未来充实自己。今年的国庆不仅仅是家国团聚的时刻&#xff…...

(二)详解观察者模式

一.使用场景 当我们需要一个类&#xff0c;在他的内部元素发生变化的时候可以主动通知其他类的时候&#xff0c;同时要保持良好的可拓展性&#xff0c;可以采用观察者模式。 二.核心 观察者模式出版者订阅者 我们拥有一个主题对象&#xff0c;和一些其他对象&#xff0c;包…...

嵌入式Linux应用开发-基础知识-第十九章驱动程序基石④

嵌入式Linux应用开发-基础知识-第十九章驱动程序基石④ 第十九章 驱动程序基石④19.7 工作队列19.7.1 内核函数19.7.1.1 定义 work19.7.1.2 使用 work&#xff1a;schedule_work19.7.1.3 其他函数 19.7.2 编程、上机19.7.3 内部机制19.7.3.1 Linux 2.x的工作队列创建过程19.7.3…...

2023 彩虹全新 SUP 模板,卡卡云模板修复版

2023 彩虹全新 SUP 模板&#xff0c;卡卡云模板&#xff0c;首页美化&#xff0c;登陆页美化&#xff0c;修复了 PC 端购物车页面显示不正常的问题。 使用教程 将这俩个数据库文件导入数据库&#xff1b; 其他的直接导入网站根目录覆盖就好&#xff1b; 若首页显示不正常&a…...

【AI视野·今日NLP 自然语言处理论文速览 第四十一期】Tue, 26 Sep 2023

AI视野今日CS.NLP 自然语言处理论文速览 Tue, 26 Sep 2023 Totally 75 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Computation and Language Papers Physics of Language Models: Part 3.1, Knowledge Storage and Extraction Authors Zeyuan Allen Zhu, Yuanz…...

【iptables 实战】05 iptables设置网络转发实验

一、网络架构 实验效果&#xff0c;通过机器B的转发功能&#xff0c;将机器A的报文转发到机器C 本实验准备三台机器分别配置如下网络 机器A ip:192.168.56.104 机器C ip:10.1.0.10 机器B 两张网卡&#xff0c;分别的ip是192.168.56.106和10.1.0.11 如图所示 如下图所示 二、…...

pygame - 贪吃蛇小游戏

蛇每吃掉一个身体块&#xff0c;蛇身就增加一个长度。为了统一计算&#xff0c;界面的尺寸和游戏元素的位置都是身体块长度的倍数 1. 上下左右方向键&#xff08;或者ASDW键&#xff09;控制蛇的移动方向 2. 空格键暂停和继续蛇的身体图片文件&#xff0c;复制到项目的asset\im…...

基于 QT 实现 Task Timer,高效利用时间

一、开发环境 Ubuntu 20.04 QT6.0 二、新建 Qt Wigets Application 这里的基类选择 Wigets&#xff0c; pro 配置文件添加 sql 模块&#xff0c;需要用到 sqlite&#xff0c; QT sql 三、添加数据库连接头文件 // connection.h #ifndef CONNECTION_H #define CONNECTION_…...

图像处理与计算机视觉--第五章-图像分割-霍夫变换

文章目录 1.霍夫变换(Hough Transform)原理介绍2.霍夫变换(Hough Transform)算法流程3.霍夫变换(Hough Transform)算法代码4.霍夫变换(Hough Transform)算法效果 1.霍夫变换(Hough Transform)原理介绍 Hough Transform是一种常用的计算机视觉图形检验方法&#xff0c;霍夫变换一…...

linux下文件操作命令

title: linux下文件操作命令 createTime: 2020-10-29 18:05:52 updateTime: 2020-10-29 18:05:52 categories: linux tags: Linux下文件操作命令 tar命令 使用tar命令一般打包分为两种*.tar ,*.tar.gz 相信大家也使用过tar -zcvf test.tar test/tar -zcvf test.tar.gz test/…...

Golang语法、技巧和窍门

Golang简介 命令式语言静态类型语法标记类似于C&#xff08;但括号较少且没有分号&#xff09;&#xff0c;结构类似Oberon-2编译为本机代码&#xff08;没有JVM&#xff09;没有类&#xff0c;但有带有方法的结构接口没有实现继承。不过有type嵌入。函数是一等公民函数可以返…...

Grander因果检验(格兰杰)原理+操作+解释

笔记来源&#xff1a; 1.【传送门】 2.【传送门】 前沿原理介绍 Grander因果检验是一种分析时间序列数据因果关系的方法。 基本思想在于&#xff0c;在控制Y的滞后项 (过去值) 的情况下&#xff0c;如果X的滞后项仍然有助于解释Y的当期值的变动&#xff0c;则认为 X对 Y产生…...

XCTF-web-easyupload

试了试php&#xff0c;php7&#xff0c;pht&#xff0c;phtml等&#xff0c;都没有用 尝试.user.ini 抓包修改将.user.ini修改为jpg图片 在上传一个123.jpg 用蚁剑连接&#xff0c;得到flag...

【Python】 -- 趣味代码 - 小恐龙游戏

文章目录 文章目录 00 小恐龙游戏程序设计框架代码结构和功能游戏流程总结01 小恐龙游戏程序设计02 百度网盘地址00 小恐龙游戏程序设计框架 这段代码是一个基于 Pygame 的简易跑酷游戏的完整实现,玩家控制一个角色(龙)躲避障碍物(仙人掌和乌鸦)。以下是代码的详细介绍:…...

利用ngx_stream_return_module构建简易 TCP/UDP 响应网关

一、模块概述 ngx_stream_return_module 提供了一个极简的指令&#xff1a; return <value>;在收到客户端连接后&#xff0c;立即将 <value> 写回并关闭连接。<value> 支持内嵌文本和内置变量&#xff08;如 $time_iso8601、$remote_addr 等&#xff09;&a…...

循环冗余码校验CRC码 算法步骤+详细实例计算

通信过程&#xff1a;&#xff08;白话解释&#xff09; 我们将原始待发送的消息称为 M M M&#xff0c;依据发送接收消息双方约定的生成多项式 G ( x ) G(x) G(x)&#xff08;意思就是 G &#xff08; x ) G&#xff08;x) G&#xff08;x) 是已知的&#xff09;&#xff0…...

安宝特方案丨XRSOP人员作业标准化管理平台:AR智慧点检验收套件

在选煤厂、化工厂、钢铁厂等过程生产型企业&#xff0c;其生产设备的运行效率和非计划停机对工业制造效益有较大影响。 随着企业自动化和智能化建设的推进&#xff0c;需提前预防假检、错检、漏检&#xff0c;推动智慧生产运维系统数据的流动和现场赋能应用。同时&#xff0c;…...

【算法训练营Day07】字符串part1

文章目录 反转字符串反转字符串II替换数字 反转字符串 题目链接&#xff1a;344. 反转字符串 双指针法&#xff0c;两个指针的元素直接调转即可 class Solution {public void reverseString(char[] s) {int head 0;int end s.length - 1;while(head < end) {char temp …...

Java-41 深入浅出 Spring - 声明式事务的支持 事务配置 XML模式 XML+注解模式

点一下关注吧&#xff01;&#xff01;&#xff01;非常感谢&#xff01;&#xff01;持续更新&#xff01;&#xff01;&#xff01; &#x1f680; AI篇持续更新中&#xff01;&#xff08;长期更新&#xff09; 目前2025年06月05日更新到&#xff1a; AI炼丹日志-28 - Aud…...

优选算法第十二讲:队列 + 宽搜 优先级队列

优选算法第十二讲&#xff1a;队列 宽搜 && 优先级队列 1.N叉树的层序遍历2.二叉树的锯齿型层序遍历3.二叉树最大宽度4.在每个树行中找最大值5.优先级队列 -- 最后一块石头的重量6.数据流中的第K大元素7.前K个高频单词8.数据流的中位数 1.N叉树的层序遍历 2.二叉树的锯…...

iOS性能调优实战:借助克魔(KeyMob)与常用工具深度洞察App瓶颈

在日常iOS开发过程中&#xff0c;性能问题往往是最令人头疼的一类Bug。尤其是在App上线前的压测阶段或是处理用户反馈的高发期&#xff0c;开发者往往需要面对卡顿、崩溃、能耗异常、日志混乱等一系列问题。这些问题表面上看似偶发&#xff0c;但背后往往隐藏着系统资源调度不当…...

C#中的CLR属性、依赖属性与附加属性

CLR属性的主要特征 封装性&#xff1a; 隐藏字段的实现细节 提供对字段的受控访问 访问控制&#xff1a; 可单独设置get/set访问器的可见性 可创建只读或只写属性 计算属性&#xff1a; 可以在getter中执行计算逻辑 不需要直接对应一个字段 验证逻辑&#xff1a; 可以…...