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

hcip的mgre和ospf实验

题目

在这里插入图片描述

拓扑图

在这里插入图片描述

一、配置环回和IP地址

R1

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 64.1.1.1 24
Aug 4 2023 18:56:07-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 14.1.1.1 24
Aug 4 2023 18:56:27-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]int lo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 24

R2

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 24.1.1.1 24
Aug 4 2023 18:56:56-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]int lo
[r2]int LoopBack 0
[r2-LoopBack0]ip add 2.2.2.2 24

R3

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
Aug 4 2023 18:57:15-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]q
[r3]int lo
[r3]int LoopBack 0
[r3-LoopBack0]ip add 3.3.3.3 24

R4

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 44.1.1.1 24
Aug 4 2023 18:57:38-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]q
[r4]int lo
[r4]int LoopBack 0
[r4-LoopBack0]ip add 4.4.4.4 24

R5

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 54.1.1.1 24
Aug 4 2023 18:58:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]q
[r5]int lo
[r5]int LoopBack 0
[r5-LoopBack0]ip add 5.5.5.5 24

R6

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]int g2/0/0
[r6-GigabitEthernet2/0/0]ip add 34.1.1.2 24
Aug 4 2023 18:58:28-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet2/0/0 has entered the UP state.
[r6-GigabitEthernet2/0/0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 14.1.1.2 24
Aug 4 2023 18:58:45-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 64.1.1.2 24
[r6-GigabitEthernet0/0/1]
Aug 4 2023 18:59:23-08:00 r6 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r6-GigabitEthernet0/0/1]int g0/0/2
[r6-GigabitEthernet0/0/2]ip add 24.1.1.2 24
[r6-GigabitEthernet0/0/2]
Aug 4 2023 18:59:35-08:00 r6 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r6-GigabitEthernet0/0/2]int g4/0/0
[r6-GigabitEthernet4/0/0]ip add 54.1.1.2 24
[r6-GigabitEthernet4/0/0]
Aug 4 2023 18:59:56-08:00 r6 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[r6-GigabitEthernet4/0/0]int g3/0/0
[r6-GigabitEthernet3/0/0]ip add 44.1.1.2 24
[r6-GigabitEthernet3/0/0]
Aug 4 2023 19:00:10-08:00 r6 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
on the interface GigabitEthernet3/0/0 has entered the UP state.
[r6]int lo
[r6]int LoopBack 0
[r6-LoopBack0]ip add 6.6.6.6 24

二、配置缺省

R1

[r1]ip rou
[r1]ip route
[r1]ip route-static 0.0.0.0 0 14.1.1.2
[r1]ip route-static 0.0.0.0 0 64.1.1.2

R2

[r2]ip rou
[r2]ip route
[r2]ip route-static 0.0.0.0 0 24.1.1.2

R3

[r3]ip rou
[r3]ip route
[r3]ip route-static 0.0.0.0 0 34.1.1.2

R4

[r4]ip rou
[r4]ip route
[r4]ip route-static 0.0.0.0 0 44.1.1.2

R5

[r5]ip rou
[r5]ip route
[r5]ip route-static 0.0.0.0 0 54.1.1.2

星型拓扑结构

R1

[r1]int tu
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24
[r1-Tunnel0/0/0]tun
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]sou
[r1-Tunnel0/0/0]source 14.1.1.1
Aug 4 2023 19:54:53-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp en
[r1-Tunnel0/0/0]nhrp entry mu
[r1-Tunnel0/0/0]nhrp entry multicast dy
[r1-Tunnel0/0/0]nhrp entry multicast dynamic

R2

[r2]int tun
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.4.2 24
[r2-Tunnel0/0/0]tun
[r2-Tunnel0/0/0]tunnel-protocol gre
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]sour
[r2-Tunnel0/0/0]source g0/0/0
Aug 4 2023 19:56:36-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r2-Tunnel0/0/0]nhrp entry multicast dynamic
[r2-Tunnel0/0/0]nh
[r2-Tunnel0/0/0]nhrp en
[r2-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r2-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r2-Tunnel0/0/0]

R3

[r3]int tun
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.3 24
[r3-Tunnel0/0/0]tun
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]s
[r3-Tunnel0/0/0]sou
[r3-Tunnel0/0/0]source g0/0/0
Aug 4 2023 19:58:08-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nh
[r3-Tunnel0/0/0]nhrp en
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r3-Tunnel0/0/0]

MGRE全连拓扑

R1

[r1]int tun
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.5.1 24
[r1-Tunnel0/0/1]tun
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]sou
[r1-Tunnel0/0/1]source 64.1.1.1
Aug 4 2023 21:49:24-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the DOWN state.
[r1-Tunnel0/0/1]
[r1-Tunnel0/0/1]
Aug 4 2023 21:49:24-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/1]nh
[r1-Tunnel0/0/1]nhrp en
[r1-Tunnel0/0/1]nhrp entry mu
[r1-Tunnel0/0/1]nhrp entry multicast dy
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nh
[r1-Tunnel0/0/1]nhrp en
[r1-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 re
[r1-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.5.3 54.1.1.1 register
[r1-Tunnel0/0/1]

R4

[r4]int tun
[r4]int Tunnel 0/0/1
[r4-Tunnel0/0/1]nh
[r4-Tunnel0/0/1]nhrp en
[r4-Tunnel0/0/1]ip add 192.168.5.2 24
[r4-Tunnel0/0/1]tun
[r4-Tunnel0/0/1]tunnel-protocol gre p2mp
[r4-Tunnel0/0/1]sou
[r4-Tunnel0/0/1]source 44.1.1.1
Aug 4 2023 21:53:12-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r4-Tunnel0/0/1]nhrp entry multicast dynamic
[r4-Tunnel0/0/1]nh
[r4-Tunnel0/0/1]nhrp en
[r4-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 re
[r4-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 register
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.
[r4-Tunnel0/0/1]nhrp entry 192.168.5.3 54.1.1.1 register
[r4-Tunnel0/0/1]

R5

[r5]
[r5]int tun
[r5]int Tunnel 0/0/1
[r5-Tunnel0/0/1]ip add 192.168.5.3 24
[r5-Tunnel0/0/1]tun
[r5-Tunnel0/0/1]tunnel-protocol gre p2mp
[r5-Tunnel0/0/1]sou
[r5-Tunnel0/0/1]source 54.1.1.1
Aug 4 2023 21:54:27-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/1]nhrp entry multicast dynamic
[r5-Tunnel0/0/1]nh
[r5-Tunnel0/0/1]nhrp en
[r5-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 re
[r5-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 register
[r5-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 register
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.
[r5-Tunnel0/0/1]

ospf配置

R1

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.5.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.4.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

R2

[r2]ospf 1 rou
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]ar
[r2-ospf-1]area 0
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]q
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ospf network-type p2mp

R3

[r3]ospf 1 rou
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]ar
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.5.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.4.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]q
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ospf network-type p2mp

R4

[r4]ospf 1 rou
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]ar
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 192.168.5.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]q
[r4-ospf-1]q
[r4]int Tunnel 0/0/1
[r4-Tunnel0/0/1]ospf network-type broadcast

R5

[r5]ospf 1 rou
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]ar
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]net
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 192.168.5.3 0.0.0.0
[r5-ospf-1-area-0.0.0.0]q
[r5-ospf-1]q
[r5]int Tunnel 0/0/1
[r5-Tunnel0/0/1]ospf network-type broadcast

检验,用R1去ping R2,R3,R4,R5的环回,能ping通则成功
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
ping R6的环回也成功
在这里插入图片描述

相关文章:

hcip的mgre和ospf实验

题目 拓扑图 一、配置环回和IP地址 R1 < Huawei>sy Enter system view, return user view with CtrlZ. [Huawei]sysname r1 [r1]int g0/0/1 [r1-GigabitEthernet0/0/1]ip add 64.1.1.1 24 Aug 4 2023 18:56:07-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol…...

gdb学习笔记

参考:https://blog.csdn.net/Stars_WW/article/details/88994391 gdb常用交互命令 启动gdb后&#xff0c;进入到交互模式&#xff0c;通过以下命令完成对程序的调试&#xff1b;注意高频使用的命令一般都会有缩写&#xff0c;熟练使用这些缩写命令能提高调试的效率&#xff1b;…...

java -jar指定外部配置文件

场景 spingboot项目部署jar时,需要时常修改配置,为了方便,将配置文件放到jar包外 操作步骤 在jar包同级目录下创建config文件夹(位置没有强制要求,为了方便而已) 在jar包同级目录下创建start.bat文件,并编辑内容 echo off :: 命令窗口标题 title yudibei_performance_tes…...

【IDEA】常用插件清单

【IDEA】常用插件清单 arthas ideaCodeium: AI Autocomplete for xxxCommit-MessageGenerateAllSetterMaven HelperMybatisPlusOne Dark themePDF ViewerRainbow BracketsRestfulToolSequenceDiagramSonarLintTranslation arthas idea 快捷生成arthas命令 Codeium: AI Autoc…...

私域流量运营数据分析:6个关键指标

随着数字化时代的到来&#xff0c;私域流量运营已经成为企业营销的重要策略。然而&#xff0c;要确保私域流量运营的有效性和成功&#xff0c;数据分析是至关重要的一环。通过对运营数据进行深入分析&#xff0c;企业可以了解用户行为和趋势&#xff0c;发现问题和机遇&#xf…...

解释器模式——自定义语言的实现

1、简介 1.1、文法规则和抽象语法树 解释器模式描述了如何为简单的语言定义一个文法&#xff0c;如何在该语言中表示一个句子&#xff0c;以及如何解释这些句子。在正式分析解释器模式结构之前&#xff0c;先来学习如何表示一个语言的文法规则以及如何构造一棵抽象语法树。 …...

基于STM32103移植FreeRTOS

目录 一、FreeRTOS协议栈下载 二、准备工程文件与协议代码 三、移植FreeRTOS协议栈 一、FreeRTOS协议栈下载 1、官网下载 FreeRTOS - Market leading RTOS (Real Time Operating System) for embedded systems with Internet of Things extensionshttps://www.freertos.or…...

docker compose一键部署lnmt环境

创建docker compose 目录 [rootlocalhost ~]# mkdir -p /compose_lnmt 编写nginx的dockerfile文件 创建目录 [rootlocalhost compose_lnmt]# mkdir -p nginx 编写nginx配置文件 [rootlocalhost nginx]# vim nginx.conf user root; #运行身份#nginx自动设置进程…...

Eeny Meeny Moo

Eeny Meeny Moo 题目描述输入输出格式输入格式输出格式 输入输出样例输入样例输出样例 正确解法A C 代码 题目描述 你肯定有过这样的经验&#xff0c;那就是当很多一起使用网络的时候&#xff0c;网速变得很慢很慢。为了解决这个问题&#xff0c;德国的Ulm大学开发了一份意外事…...

flask---闪现/请求扩展/g对象

闪现 # 一个请求---》假设出错了---》重定向到另一个地址---》把错误信息在另一个返回中看到 错误信息放个位置----》另一个请求过来&#xff0c;去那个位置拿 # 把一些数据&#xff0c;放在某个位置---》后期可以去取出来----》取完不用删除&#xff0c;就没了 def index():s…...

Qt视频播放器

一、设置好ui界面二、打开文件槽函数1.QDir::homePath()作用介绍2.QFileDialog::getOpenFileName()介绍3.QFileInfo介绍4.player 指针解释5.打开文件槽函数完整代码 三、视频播放器初始化1.QMediaPlayer()函数2.设置时间间隔的作用3. QGraphicsScene介绍4.QGraphicsVideoItem介…...

Stable Diffusion教程(8) - X/Y/Z 图表使用

1. 介绍 这项功能可以在 文生图/图生图 界面的左下角种 “脚本” 一栏内选择 “X/Y/Z 图表” 以启用。 它创建具有不同参数的图像网格。使用 X 类型和 Y 类型字段选择应由行和列共享的参数&#xff0c;并将这些参数以逗号分隔输入 X 值 / Y 值字段。支持整数、浮点数和范围。…...

Android 获取网关 ip 和 DNS ip

参考下方 PingUtil.java 代码 import android.content.Context; import android.net.DhcpInfo; import android.net.wifi.WifiManager; import android.text.format.Formatter;import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; impor…...

Docker root用户的pip使用方法

Docker下root用户 pip install XX 显示pip命令不存在 # 原始目标&#xff1a;pip install XX pip install --root-user-actionignore 【XX】# (要安装的包)参考&#xff1a;WARNING: Running pip as the ‘root‘ user can result in broken permissions Linux 中 root 与 su…...

企业新片场排名如何优化

企业新片场排名如何优化 要如何去做关键SEO&#xff1f;第一个我们要做的就是做好 SEO 关键词的选词&#xff0c;一般就是会有第一个常用的选词方法&#xff0c;第一是以常用的提问词去做&#xff0c;不实像是情人节买什么礼物&#xff0c;母亲节买什么礼物&#xff0c; 618 有…...

Database Name

概述 DB_NAME与INSTANCE_NAME DB_NAME 数据库名称&#xff0c;也就是数据库的名字标示。这里&#xff0c;数据库里可能有多个实例&#xff0c;比如RAC里的多节点&#xff0c;这多个节点是不同的实例&#xff0c;但是却有相同的名字&#xff0c;他们的 DB_NAME是相同的&#xf…...

git代码版本管理

git 文章目录 git基本使用 基本使用 在一台新的电脑上使用git 你要下载安装git, 然后把git的安装路径配到系统环境变量里 然后把这台电脑的.ssh/ id_rsa.pub里的公钥整到github里 然后在github上新建仓库&#xff0c;它会生成一些指令引导上你传本地的代码 之后就可以在终…...

k8s概念-ConfigMap

回到目录 一般用于去存储 Pod 中应用所需的一些配置信息&#xff0c;或者环境变量&#xff0c;将配置于 Pod 分开&#xff0c;避免应为修改配置导致还需要重新构建 镜像与容器。 1 创建ConfigMap #使用 kubectl create configmap -h 查看示例&#xff0c;构建 configmap 对象…...

Mybatis 实体类属性名和表中字段名不一致怎么处理

一. 前言 最近耀哥有学生出去面试&#xff0c;被问到 “Mybatis实体类的属性名和表中的字段名不一致该怎么处理&#xff1f;”&#xff0c;这其实是一个很经典的面试题&#xff0c;接下来耀哥就为大家详细解析一下这道面试题。 二. 分析 2.1 实体类和字段名不一致所带来的后果…...

CAS - 从AtomicInteger窥探CAS

Unsafe类是CAS的核心&#xff0c;由于Java方法无法直接访问底层&#xff0c;需要通过本地方法(native)来实现&#xff0c;Unsafe类相当于一个桥梁。基于Unsafe类&#xff0c;可以直接操作特定的内存数据。 我们从上一篇说CAS基本原理的时候&#xff0c;有说到一个“资源”被100…...

生成xcframework

打包 XCFramework 的方法 XCFramework 是苹果推出的一种多平台二进制分发格式&#xff0c;可以包含多个架构和平台的代码。打包 XCFramework 通常用于分发库或框架。 使用 Xcode 命令行工具打包 通过 xcodebuild 命令可以打包 XCFramework。确保项目已经配置好需要支持的平台…...

基于FPGA的PID算法学习———实现PID比例控制算法

基于FPGA的PID算法学习 前言一、PID算法分析二、PID仿真分析1. PID代码2.PI代码3.P代码4.顶层5.测试文件6.仿真波形 总结 前言 学习内容&#xff1a;参考网站&#xff1a; PID算法控制 PID即&#xff1a;Proportional&#xff08;比例&#xff09;、Integral&#xff08;积分&…...

CocosCreator 之 JavaScript/TypeScript和Java的相互交互

引擎版本&#xff1a; 3.8.1 语言&#xff1a; JavaScript/TypeScript、C、Java 环境&#xff1a;Window 参考&#xff1a;Java原生反射机制 您好&#xff0c;我是鹤九日&#xff01; 回顾 在上篇文章中&#xff1a;CocosCreator Android项目接入UnityAds 广告SDK。 我们简单讲…...

Rust 异步编程

Rust 异步编程 引言 Rust 是一种系统编程语言,以其高性能、安全性以及零成本抽象而著称。在多核处理器成为主流的今天,异步编程成为了一种提高应用性能、优化资源利用的有效手段。本文将深入探讨 Rust 异步编程的核心概念、常用库以及最佳实践。 异步编程基础 什么是异步…...

实现弹窗随键盘上移居中

实现弹窗随键盘上移的核心思路 在Android中&#xff0c;可以通过监听键盘的显示和隐藏事件&#xff0c;动态调整弹窗的位置。关键点在于获取键盘高度&#xff0c;并计算剩余屏幕空间以重新定位弹窗。 // 在Activity或Fragment中设置键盘监听 val rootView findViewById<V…...

C# 求圆面积的程序(Program to find area of a circle)

给定半径r&#xff0c;求圆的面积。圆的面积应精确到小数点后5位。 例子&#xff1a; 输入&#xff1a;r 5 输出&#xff1a;78.53982 解释&#xff1a;由于面积 PI * r * r 3.14159265358979323846 * 5 * 5 78.53982&#xff0c;因为我们只保留小数点后 5 位数字。 输…...

docker 部署发现spring.profiles.active 问题

报错&#xff1a; org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property spring.profiles.active imported from location class path resource [application-test.yml] is invalid in a profile specific resource [origin: class path re…...

【Redis】笔记|第8节|大厂高并发缓存架构实战与优化

缓存架构 代码结构 代码详情 功能点&#xff1a; 多级缓存&#xff0c;先查本地缓存&#xff0c;再查Redis&#xff0c;最后才查数据库热点数据重建逻辑使用分布式锁&#xff0c;二次查询更新缓存采用读写锁提升性能采用Redis的发布订阅机制通知所有实例更新本地缓存适用读多…...

纯 Java 项目(非 SpringBoot)集成 Mybatis-Plus 和 Mybatis-Plus-Join

纯 Java 项目&#xff08;非 SpringBoot&#xff09;集成 Mybatis-Plus 和 Mybatis-Plus-Join 1、依赖1.1、依赖版本1.2、pom.xml 2、代码2.1、SqlSession 构造器2.2、MybatisPlus代码生成器2.3、获取 config.yml 配置2.3.1、config.yml2.3.2、项目配置类 2.4、ftl 模板2.4.1、…...

【Linux】Linux安装并配置RabbitMQ

目录 1. 安装 Erlang 2. 安装 RabbitMQ 2.1.添加 RabbitMQ 仓库 2.2.安装 RabbitMQ 3.配置 3.1.启动和管理服务 4. 访问管理界面 5.安装问题 6.修改密码 7.修改端口 7.1.找到文件 7.2.修改文件 1. 安装 Erlang 由于 RabbitMQ 是用 Erlang 编写的&#xff0c;需要先安…...