CCNP课程实验-OSPF-CFG
目录
- 实验条件
- 网络拓朴
- 需求
- 配置实现
- 基础配置
- 1. 配置所有设备的IP地址
- 实现目标
- 1. 要求按照下列标准配置一个OSPF网络。 路由协议采用OSPF,进程ID为89 ,RID为loopback0地址。
- 3. R4/R5/R6相连的三个站点链路OSPF网络类型配置成广播型,其中R5路由器做为永久性DR。
- 4. 按照图示配置OSPF区域,其中R1/R4/R6之间的区域要配置成完全末梢区域。
- 5. R2为新并入的站点,由于来不及布线施工而暂时并到R3这个站点上,所在区域为AREA 23,配置使得所有网络可达(采用ping测试)。
- 6. OSPF内部的网络希望通过R5路由器访问Internet(假设R5和Internet连接),配置R5使其能够满足需求,只考虑内部OSPF的实现。
- 7. AREA 0基于安全的原因配置上MD5认证,密码:SPOTO
- 8. AREA 146中,配置R1为指定路由器(DR),R4/R6之间保持two-way的邻居关系。
- 9. 为了减少网络流量,将R1所在的区域汇总成主类网络通告出去。
- 10. 由于R6与R5之间的链路质量较好,适当配置使得R1优先选取R6访问自身区域除外的外部网络。
实验条件
网络拓朴

需求
- 要求按照下列标准配置一个OSPF网络。
- 路由协议采用OSPF,进程ID为89 ,RID为loopback0地址。
- R4/R5/R6相连的三个站点链路OSPF网络类型配置成广播型,其中R5路由器做为永久性DR。
- 按照图示配置OSPF区域,其中R1/R4/R6之间的区域要配置成完全末梢区域。
- R2为新并入的站点,由于来不及布线施工而暂时并到R3这个站点上,所在区域为AREA 23,配置使得所有网络可达(采用ping测试)。
- OSPF内部的网络希望通过R5路由器访问Internet(假设R5和Internet连接),配置R5使其能够满足需求,只考虑内部OSPF的实现。
- AREA 0基于安全的原因配置上MD5认证,密码:SPOTO
- AREA 146中,配置R1为指定路由器(DR),R4/R6之间保持two-way的邻居关系。
- 为了减少网络流量,将R1所在的区域汇总成主类网络通告出去。
- 由于R6与R5之间的链路质量较好,适当配置使得R1优先选取R6访问自身区域除外的外部网络。
- 在AREA 0以外的所有区域启用OSPF明文认证,密码:SPOTO
配置实现
基础配置
拓扑中的IP地址段采用:172.8.AB.X/24:
其中AB为两台路由器编号组合,
例如:R2-R3之间的AB为23,X为路由器编号,例如R3的X=3
R1/R4/R6之间的网段为:172.8.146.X/24,其中X为路由器编号。
R4/R5/R6之间的网段为:172.8.100.X/24,其中X为路由器编号。
所有路由器都有一个loopback 0接口,地址格式为:X.X.X.X/32,其中X为路由器编号。
1. 配置所有设备的IP地址
R2
R2(config)#int e0/0
R2(config-if)#ip address 172.8.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int lo 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#no sh
R3
R3(config)#int e0/0
R3(config-if)#ip address 172.8.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int e0/1
R3(config-if)#ip address 172.8.35.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int lo0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#no sh
R5
R5(config)#int e0/1
R5(config-if)#ip address 172.8.35.5 255.255.255.0
R5(config-if)#no sh
R5(config-if)#int e0/0
R5(config-if)#ip address 172.8.100.5 255.255.255.0
R5(config-if)#no sh
R5(config-if)#int lo 0
R5(config-if)#ip address 5.5.5.5 255.255.255.255
R5(config-if)#no sh
R5(config-if)#
R4
R4(config)#int e0/1
R4(config-if)#ip address 172.8.100.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int e0/2
R4(config-if)#ip address 172.8.146.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int lo 0
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#no sh
R4(config-if)#
R6
R6(config)#int e0/1
R6(config-if)#ip address 172.8.100.6 255.255.255.0
R6(config-if)#no sh
R6(config-if)#int e0/0
R6(config-if)#ip address 172.8.146.6 255.255.255.0
R6(config-if)#no sh
R6(config-if)#int lo 0
R6(config-if)#ip address 6.6.6.6 255.255.255.255
R6(config-if)#no sh
R1
R1(config)#int e0/0
R1(config-if)#ip address 172.8.146.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int lo0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#no sh
Internet ISP
ISP(config)#username SPOTO password SPOTO123
ISP(config)#ip local pool cciepools 211.98.5.100 211.98.5.253
ISP(config)#interface virtual-template 1
ISP(config-if)#ip address 211.98.5.254 255.255.255.0
ISP(config-if)#no shutdown
ISP(config-if)#encapsulation ppp
ISP(config-if)#ip mtu 1492
ISP(config-if)#ppp authentication pap
ISP(config-if)#peer default ip address pool cciepools
ISP(config-if)#exit
ISP(config)#bba-group pppoe bgISP
ISP(config-bba-group)#virtual-template 1
ISP(config-bba-group)#exit
ISP(config)#int e0/0
ISP(config-if)#pppoe enable group bgISP
ISP(config-if)#no shutdown
ISP(config-if)#exit
ISP(config)#do show ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES NVRAM up up
Ethernet0/1 unassigned YES NVRAM administratively down down
Ethernet0/2 unassigned YES NVRAM administratively down down
Ethernet0/3 unassigned YES NVRAM administratively down down
Virtual-Access1 unassigned YES unset down down
Virtual-Access2 unassigned YES unset up up
Virtual-Template1 211.98.5.254 YES manual down down
ISP(config)#
实现目标
1. 要求按照下列标准配置一个OSPF网络。 路由协议采用OSPF,进程ID为89 ,RID为loopback0地址。
R2
R2(config-router)#do show run | s route
router ospf 89router-id 2.2.2.2network 0.0.0.0 255.255.255.255 area 23
R2(config-router)#
R3
R3(config-router)#do show run | s route
router ospf 89router-id 3.3.3.3network 3.3.3.3 0.0.0.0 area 23network 172.8.23.0 0.0.0.255 area 23network 172.8.35.0 0.0.0.255 area 35
R3(config-router)#
R5
R5(config-router)#do show run | s route
router ospf 89router-id 5.5.5.5network 5.5.5.5 0.0.0.0 area 0network 172.8.35.0 0.0.0.255 area 35network 172.8.100.0 0.0.0.255 area 0
R5(config-router)#
R6
R6(config-router)#do show run | s route
router ospf 89router-id 6.6.6.6network 6.6.6.6 0.0.0.0 area 0network 172.8.100.0 0.0.0.255 area 0network 172.8.146.0 0.0.0.255 area 146
R6(config-router)#
R4
R4(config-router)#do show run | s route
router ospf 89router-id 4.4.4.4network 4.4.4.4 0.0.0.0 area 0network 172.8.100.0 0.0.0.255 area 0network 172.8.146.0 0.0.0.255 area 146
R4(config-router)#
R1
R1(config-router)#do show run | s route
router ospf 89router-id 1.1.1.1network 0.0.0.0 255.255.255.255 area 146
R1(config-router)#
邻居关系表
R3
R3(config-router)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:35 172.8.23.2 Ethernet0/0
5.5.5.5 1 FULL/BDR 00:00:34 172.8.35.5 Ethernet0/1
R3(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 89 23 3.3.3.3/32 1 LOOP 0/0
Et0/0 89 23 172.8.23.3/24 10 BDR 1/1
Et0/1 89 35 172.8.35.3/24 10 DR 1/1
R3(config-router)#
R5
R5(config-router)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface
4.4.4.4 1 FULL/DROTHER 00:00:37 172.8.100.4 Ethernet0/0
6.6.6.6 1 FULL/BDR 00:00:32 172.8.100.6 Ethernet0/0
3.3.3.3 1 FULL/DR 00:00:32 172.8.35.3 Ethernet0/1
R5(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 89 0 5.5.5.5/32 1 LOOP 0/0
Et0/0 89 0 172.8.100.5/24 10 DR 2/2
Et0/1 89 35 172.8.35.5/24 10 BDR 1/1
R5(config-router)#
R4
R4(config-router)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface
5.5.5.5 1 FULL/DR 00:00:30 172.8.100.5 Ethernet0/1
6.6.6.6 1 FULL/BDR 00:00:38 172.8.100.6 Ethernet0/1
1.1.1.1 1 FULL/DROTHER 00:00:37 172.8.146.1 Ethernet0/2
6.6.6.6 1 FULL/DR 00:00:31 172.8.146.6 Ethernet0/2
R4(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 89 0 4.4.4.4/32 1 LOOP 0/0
Et0/1 89 0 172.8.100.4/24 10 DROTH 2/2
Et0/2 89 146 172.8.146.4/24 10 BDR 2/2
R4(config-router)#
R6
R6(config-router)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface
4.4.4.4 1 FULL/DROTHER 00:00:33 172.8.100.4 Ethernet0/1
5.5.5.5 1 FULL/DR 00:00:32 172.8.100.5 Ethernet0/1
1.1.1.1 1 FULL/DROTHER 00:00:37 172.8.146.1 Ethernet0/0
4.4.4.4 1 FULL/BDR 00:00:31 172.8.146.4 Ethernet0/0
R6(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 89 0 6.6.6.6/32 1 LOOP 0/0
Et0/1 89 0 172.8.100.6/24 10 BDR 2/2
Et0/0 89 146 172.8.146.6/24 10 DR 2/2
R6(config-router)#
3. R4/R5/R6相连的三个站点链路OSPF网络类型配置成广播型,其中R5路由器做为永久性DR。
R
R5(config-router)#int e0/0
R5(config-if)#ip ospf priority 255
R5(config-if)#
4. 按照图示配置OSPF区域,其中R1/R4/R6之间的区域要配置成完全末梢区域。
R4 & R5
R(config-router)#router ospf 89
R(config-router)#area 146 stub no-summary
R(config-router)#
R6
R(config-router)#router ospf 89
R(config-router)#area 146 stub
R(config-router)#
5. R2为新并入的站点,由于来不及布线施工而暂时并到R3这个站点上,所在区域为AREA 23,配置使得所有网络可达(采用ping测试)。
R3
R3(config-router)#area 35 virtual-link 5.5.5.5
R5
R5(config-router)#area 35 virtual-link 3.3.3.3
验证结果
R5
R5(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
VL0 89 0 172.8.35.5/24 10 P2P 1/1
Lo0 89 0 5.5.5.5/32 1 LOOP 0/0
Et0/0 89 0 172.8.100.5/24 10 DR 2/2
Et0/1 89 35 172.8.35.5/24 10 BDR 1/1
R5(config-router)#
R1
R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#
6. OSPF内部的网络希望通过R5路由器访问Internet(假设R5和Internet连接),配置R5使其能够满足需求,只考虑内部OSPF的实现。
R5拨号上网
R5(config)#interface dialer 1
R5(config-if)#encapsulation ppp
R5(config-if)#ip mtu 1492
R5(config-if)#ppp pap sent-username SPOTO password SPOTO123
R5(config-if)#ppp chap hostname SPOTO
R5(config-if)#ppp chap password SPOTO123
R5(config-if)#ip address negotiated
R5(config-if)#ppp ipcp route default
R5(config-if)#dialer pool 1
R5(config-if)#exit
R5(config)#int e0/0
R5(config-if)#pppoe enable group global
R5(config-if)#pppoe-client dial-pool-number 1
R5(config-if)#no shutdown
R5(config-if)#do show ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.8.100.5 YES manual up up
Ethernet0/1 172.8.35.5 YES manual up up
Ethernet0/2 unassigned YES TFTP up up
Ethernet0/3 unassigned YES TFTP administratively down down
Dialer1 211.98.5.100 YES IPCP up up
Loopback0 5.5.5.5 YES manual up up
Virtual-Access1 unassigned YES unset up up
Virtual-Access2 unassigned YES unset up up
R5(config-if)#do ping 211.98.5.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 211.98.5.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R5(config-if)#interface range e0/0-1
R5(config-if-range)#ip nat inside
R5(config-if-range)#interface dialer 1
R5(config-if)#ip nat outside
R5(config-if)#access-list 1 permit any
R5(config)#ip nat inside source list 1 interface dialer 1 overload
R5(config)#router ospf 89
R5(config-router)#default-information originate
// 添加以下语句,给所有的路由器下发一条默认路由
R5(config-router)#default-information originate
验证交易
R1

R4&R6

R5
默认上网

7. AREA 0基于安全的原因配置上MD5认证,密码:SPOTO
R4&R5&R6
全启开启全局摘要认证
R(config-router)#area 0 authentication message-digest
在3接口,1个虚拟链路上配置MD5密码
R(config-if)#ip ospf message-digest-key 1 md5 SPOTO 三个接口这样配置
R5(config-router)#area 35 virtual-link 3.3.3.3 message-digest-key 1 md5 SPOTO 虚拟链路这样配置
全局开启了,接口上就不用再开启一次
执行后
R5(config-router)#do show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 89 0 5.5.5.5/32 1 LOOP 0/0
Et0/0 89 0 172.8.100.5/24 10 BDR 1/1
VL0 89 0 172.8.35.5/24 10 P2P 1/1
Et0/1 89 35 172.8.35.5/24 10 BDR 1/1R5(config-router)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
6.6.6.6 1 FULL/DR 00:00:30 172.8.100.6 Ethernet0/0
3.3.3.3 0 FULL/ - - 172.8.35.3 OSPF_VL0
3.3.3.3 1 FULL/DR 00:00:31 172.8.35.3 Ethernet0/1
R5(config-router)#
邻居连接状态正常
8. AREA 146中,配置R1为指定路由器(DR),R4/R6之间保持two-way的邻居关系。
// 配置成0,退出竞争
R4(config-if)#int e0/2
R4(config-if)#ip ospf priority 0
// 配置成0,退出竞争
R6(config-if)#int e0/0
R6(config-if)#ip ospf priority 0R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
5.5.5.5 255 FULL/BDR 00:00:33 172.8.100.5 Ethernet0/1
1.1.1.1 255 FULL/DR 00:00:35 172.8.146.1 Ethernet0/2
6.6.6.6 0 2WAY/DROTHER 00:00:33 172.8.146.6 Ethernet0/2R6(config-router)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
5.5.5.5 255 FULL/BDR 00:00:33 172.8.100.5 Ethernet0/1
1.1.1.1 255 FULL/DR 00:00:38 172.8.146.1 Ethernet0/0
4.4.4.4 0 2WAY/DROTHER 00:00:36 172.8.146.4 Ethernet0/0
R4和R6处在了2Way的状态,R1成了DR
9. 为了减少网络流量,将R1所在的区域汇总成主类网络通告出去。
这个最好是在ABR上操作,因选择R4或是R6
R4(config-router)#area 146 range 172.8.0.0 255.255.0.0
R4(config-router)#area 146 range 1.0.0.0 255.0.0.0
R4(config-router)#

R5(config-router)#do show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop override, p - overrides from PfRGateway of last resort is 211.98.5.254 to network 0.0.0.01.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/21] via 172.8.100.4, 00:00:19, Ethernet0/04.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/11] via 172.8.100.4, 00:09:52, Ethernet0/0172.8.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA 172.8.146.0/24 [110/20] via 172.8.100.4, 00:00:17, Ethernet0/0
// ABR R4 路由汇总之后,R5收到的通告
R5(config-router)#do show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop override, p - overrides from PfRGateway of last resort is 211.98.5.254 to network 0.0.0.0O IA 1.0.0.0/8 [110/21] via 172.8.100.4, 00:00:05, Ethernet0/04.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/11] via 172.8.100.4, 00:10:09, Ethernet0/0172.8.0.0/16 is variably subnetted, 5 subnets, 3 masks
O IA 172.8.0.0/16 [110/20] via 172.8.100.4, 00:00:08, Ethernet0/0
R5(config-router)#

10. 由于R6与R5之间的链路质量较好,适当配置使得R1优先选取R6访问自身区域除外的外部网络。
加大去往R4的开销值。从而让R1选R6走
R1(config-router)#do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop override, p - overrides from PfRGateway of last resort is 172.8.146.6 to network 0.0.0.0O*IA 0.0.0.0/0 [110/11] via 172.8.146.6, 00:01:33, Ethernet0/0[110/11] via 172.8.146.4, 00:27:31, Ethernet0/01.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0172.8.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.8.146.0/24 is directly connected, Ethernet0/0
L 172.8.146.1/32 is directly connected, Ethernet0/0
R1(config-router)#
// 默认两个负载均衡。
该方法只能用在NSSA/Stub类型的区域,该类型的区域默认的cost开销是1,不影响区域外的路由Metric值
// 现在调整开销。改变路径
R4(config-if)#router ospf 89
R4(config-router)#area 146 default-cost 1500
// 为了看出效果,特意设置比较大的Metric值。
R6(config-if)#router ospf 89
R6(config-router)#area 146 default-cost 800
实现结果
R1(config-router)#do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop override, p - overrides from PfRGateway of last resort is 172.8.146.6 to network 0.0.0.0O*IA 0.0.0.0/0 [110/810] via 172.8.146.6, 00:07:16, Ethernet0/01.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0172.8.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.8.146.0/24 is directly connected, Ethernet0/0
L 172.8.146.1/32 is directly connected, Ethernet0/0
R1(config-router)#
R6的默认cost 800 加上 R1 入接口的 cost 10(e接口的cost为10:计算方式为10的8次方除以e口的带宽)=810
出口路径只剩下一条了从R6的810的metric的路由走了 。
- 在AREA 0以外的所有区域启用OSPF明文认证,密码:SPOTO
相关文章:
CCNP课程实验-OSPF-CFG
目录 实验条件网络拓朴需求 配置实现基础配置1. 配置所有设备的IP地址 实现目标1. 要求按照下列标准配置一个OSPF网络。 路由协议采用OSPF,进程ID为89 ,RID为loopback0地址。3. R4/R5/R6相连的三个站点链路OSPF网络类型配置成广播型,其中R5路…...
【Spring Security】打造安全无忧的Web应用--入门篇
🥳🥳Welcome Huihuis Code World ! !🥳🥳 接下来看看由辉辉所写的关于Spring Security的相关操作吧 目录 🥳🥳Welcome Huihuis Code World ! !🥳🥳 一.Spring Security是什么 1.概…...
【每日一题】【12.20】2828.判别首字母缩略词
🔥博客主页: A_SHOWY🎥系列专栏:力扣刷题总结录 数据结构 云计算 数字图像处理 力扣每日一题_ 1.题目链接 2828. 判别首字母缩略词https://leetcode.cn/problems/check-if-a-string-is-an-acronym-of-words/ 2.题目描述 今天…...
LabVIEW开发振动数据分析系统
LabVIEW开发振动数据分析系统 自动测试系统基于LabVIEW平台设计,采用了多种高级硬件设备。系统的硬件组成包括PCB振动加速度传感器,这是一种集成了传统压电加速度传感器和电荷放大器的先进设备,能够直接与采集仪器连接。此外,系统…...
去掉乘法运算的加法移位神经网络架构
[CVPR 2020] AdderNet: Do We Really Need Multiplications in Deep Learning? 代码:https://github.com/huawei-noah/AdderNet/tree/master 核心贡献 用filter与input feature之间的L1-范数距离作为“卷积层”的输出为了提升模型性能,提出全精度梯度…...
【TB作品】51单片机,具有报时报温功能的电子钟
2.具有报时报温功能的电子钟 一、功能要求: 1.显示室温。 2.具有实时时间显示。 3.具有实时年月日显示和校对功能。 4.具有整点语音播报时间和温度功能。 5.定闹功能,闹钟音乐可选。 6.操作简单、界面友好。 二、设计建议: 1.单片机自选(C51、STM32或其他单片机)。 2.时钟日历芯…...
了解C++工作机制
基于hello.cpp对C的运行进行一个初步认识,并介绍国外C大佬Cherno常用的项目结构和调试Tips C是如何工作的 C工作流程1.实用工程(project)结构(1)Microsoft Visual Studio2022新建项目后,自动生成的原始文件…...
力扣题目学习笔记(OC + Swift) 14. 最长公共前缀
14. 最长公共前缀 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 “”。 方法一 竖向扫描法 个人感觉纵向扫描方式比较直观,符合人类理解方式,从前往后遍历所有字符串的每一列,比较相同列上的…...
WinSW设置应用程序开机启动
前言 由于使用windows自动的自启方法,不管是将程序启动服务放到开机自启文件夹中,还是创建任务计划程序,都没有很好的实现程序的开机自启效果,而WinSW很好的解决了这个问题。 下载 WinSW下载地址 注意:不同版本&#…...
Leetcode—96.不同的二叉搜索树【中等】
2023每日刷题(六十四) Leetcode—96.不同的二叉搜索树 算法思想 实现代码 class Solution { public:int numTrees(int n) {vector<int> G(n 1, 0);G[0] 1;G[1] 1;for(int i 2; i < n; i) {for(int j 1; j < i; j) {G[i] G[j - 1] * …...
正则表达式零宽断言
正则表达式零宽断言 工具类,正则表达式匹配文本内容正则表达式语法例子例子01零宽断言?< 不包含左边值? 不包含右边值例子 常用正则表达式校验数字的表达式校验字符的表达式 工具类,正则表达式匹配文本内容 /*** 正则表达式工具类*/ public class…...
uni-app学习记录
uni-app注意点记录 跳转到 tabBar 页面只能使用 switchTab 跳转路由API的目标页面必须是在pages.json里注册的vue页面。如果想打开web url,在App平台可以使用 plus.runtime.openURL或web-view组件;H5平台使用 window.open;小程序平台使用web…...
API资源对象StorageClass;Ceph存储;搭建Ceph集群;k8s使用ceph
API资源对象StorageClass;Ceph存储;搭建Ceph集群;k8s使用ceph API资源对象StorageClass SC的主要作用在于,自动创建PV,从而实现PVC按需自动绑定PV。 下面我们通过创建一个基于NFS的SC来演示SC的作用。 要想使用NFS的SC,还需要安装一个NFS…...
Databend 开源周报第 124 期
Databend 是一款现代云数仓。专为弹性和高效设计,为您的大规模分析需求保驾护航。自由且开源。即刻体验云服务:https://app.databend.cn 。 Whats On In Databend 探索 Databend 本周新进展,遇到更贴近你心意的 Databend 。 新增对 Delta 和…...
Arduino开发实例-液体流量测量
液体流量测量 文章目录 液体流量测量1、流量传感器介绍2、硬件准备及接线3、代码实现在本文中,将介绍如何流量传感器进行测量液体流量。 流量传感器用于测量液体流速。 市场上有不同类型的流量传感器,在本文中,我们将使用霍尔效应流量传感器。 这些类型的流量传感器是非侵入…...
【idea】解决sprintboot项目创建遇到的问题
目录 一、报错Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found 二、报错java: 错误: 无效的源发行版:17 三、java: 无法访问org.springframework.web.bind.annotation.CrossOrigin 四、整合mybatis的时候,报java.lang.Ill…...
ADC芯片CS1237在电子秤方案的优势
随着科技的不断发展,电子秤已经成为我们日常生活中不可或缺的测量工具。为了满足用户对于高精度、高稳定性的需求,芯海ADC芯片CS1237应运而生,为电子秤方案带来了革命性的变革。 一、芯海ADC芯片CS1237介绍 芯海ADC芯片CS1237是一款高性能…...
Leetcode的AC指南 —— 哈希表:202. 快乐数
摘要: Leetcode的AC指南 —— 哈希表:202. 快乐数。题目介绍:编写一个算法来判断一个数 n 是不是快乐数。 文章目录 一、题目二、解析1、哈希表 一、题目 题目介绍:编写一个算法来判断一个数 n 是不是快乐数。 「快乐数」 定义为…...
机器学习 项目结构 数据预测 实验报告
需求: 我经过处理得到了测试值,然后进一步得到预测和真实值的比较,然后再把之前的所有相关的参数、评估指标、预测值、比较结果都存入excel,另外我还打算做测试报告模板,包括敏感性分析等。您建议我这些功能如何封装这些功能&…...
[Verilog] 设计方法和设计流程
主页: 元存储博客 文章目录 1. 设计方法2. 设计流程 3 Vivado软件设计流程总结 1. 设计方法 Verilog 的设计多采用自上而下的设计方法(top-down)。设计流程是指从一个项目开始从项目需求分析,架构设计,功能验证&#…...
谷歌浏览器插件
项目中有时候会用到插件 sync-cookie-extension1.0.0:开发环境同步测试 cookie 至 localhost,便于本地请求服务携带 cookie 参考地址:https://juejin.cn/post/7139354571712757767 里面有源码下载下来,加在到扩展即可使用FeHelp…...
超短脉冲激光自聚焦效应
前言与目录 强激光引起自聚焦效应机理 超短脉冲激光在脆性材料内部加工时引起的自聚焦效应,这是一种非线性光学现象,主要涉及光学克尔效应和材料的非线性光学特性。 自聚焦效应可以产生局部的强光场,对材料产生非线性响应,可能…...
ffmpeg(四):滤镜命令
FFmpeg 的滤镜命令是用于音视频处理中的强大工具,可以完成剪裁、缩放、加水印、调色、合成、旋转、模糊、叠加字幕等复杂的操作。其核心语法格式一般如下: ffmpeg -i input.mp4 -vf "滤镜参数" output.mp4或者带音频滤镜: ffmpeg…...
JDK 17 新特性
#JDK 17 新特性 /**************** 文本块 *****************/ python/scala中早就支持,不稀奇 String json “”" { “name”: “Java”, “version”: 17 } “”"; /**************** Switch 语句 -> 表达式 *****************/ 挺好的ÿ…...
JUC笔记(上)-复习 涉及死锁 volatile synchronized CAS 原子操作
一、上下文切换 即使单核CPU也可以进行多线程执行代码,CPU会给每个线程分配CPU时间片来实现这个机制。时间片非常短,所以CPU会不断地切换线程执行,从而让我们感觉多个线程是同时执行的。时间片一般是十几毫秒(ms)。通过时间片分配算法执行。…...
Java 二维码
Java 二维码 **技术:**谷歌 ZXing 实现 首先添加依赖 <!-- 二维码依赖 --><dependency><groupId>com.google.zxing</groupId><artifactId>core</artifactId><version>3.5.1</version></dependency><de…...
代码随想录刷题day30
1、零钱兑换II 给你一个整数数组 coins 表示不同面额的硬币,另给一个整数 amount 表示总金额。 请你计算并返回可以凑成总金额的硬币组合数。如果任何硬币组合都无法凑出总金额,返回 0 。 假设每一种面额的硬币有无限个。 题目数据保证结果符合 32 位带…...
【无标题】路径问题的革命性重构:基于二维拓扑收缩色动力学模型的零点隧穿理论
路径问题的革命性重构:基于二维拓扑收缩色动力学模型的零点隧穿理论 一、传统路径模型的根本缺陷 在经典正方形路径问题中(图1): mermaid graph LR A((A)) --- B((B)) B --- C((C)) C --- D((D)) D --- A A -.- C[无直接路径] B -…...
Vite中定义@软链接
在webpack中可以直接通过符号表示src路径,但是vite中默认不可以。 如何实现: vite中提供了resolve.alias:通过别名在指向一个具体的路径 在vite.config.js中 import { join } from pathexport default defineConfig({plugins: [vue()],//…...
掌握 HTTP 请求:理解 cURL GET 语法
cURL 是一个强大的命令行工具,用于发送 HTTP 请求和与 Web 服务器交互。在 Web 开发和测试中,cURL 经常用于发送 GET 请求来获取服务器资源。本文将详细介绍 cURL GET 请求的语法和使用方法。 一、cURL 基本概念 cURL 是 "Client URL" 的缩写…...
