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访问自身区域除外的外部网络。

实验条件

网络拓朴

在这里插入图片描述

需求

  1. 要求按照下列标准配置一个OSPF网络。
  2. 路由协议采用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访问自身区域除外的外部网络。
  11. 在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 89
 router-id 2.2.2.2
 network 0.0.0.0 255.255.255.255 area 23
R2(config-router)#

R3

R3(config-router)#do show run | s route               
router ospf 89
 router-id 3.3.3.3
 network 3.3.3.3 0.0.0.0 area 23
 network 172.8.23.0 0.0.0.255 area 23
 network 172.8.35.0 0.0.0.255 area 35
R3(config-router)#

R5

R5(config-router)#do show run | s route
router ospf 89
 router-id 5.5.5.5
 network 5.5.5.5 0.0.0.0 area 0
 network 172.8.35.0 0.0.0.255 area 35
 network 172.8.100.0 0.0.0.255 area 0
R5(config-router)#

R6

R6(config-router)#do show run | s route
router ospf 89
 router-id 6.6.6.6
 network 6.6.6.6 0.0.0.0 area 0
 network 172.8.100.0 0.0.0.255 area 0
 network 172.8.146.0 0.0.0.255 area 146
R6(config-router)#

R4

R4(config-router)#do show run | s route                 
router ospf 89
 router-id 4.4.4.4
 network 4.4.4.4 0.0.0.0 area 0
 network 172.8.100.0 0.0.0.255 area 0
 network 172.8.146.0 0.0.0.255 area 146
R4(config-router)#

R1

R1(config-router)#do show run | s route
router ospf 89
 router-id 1.1.1.1
 network 0.0.0.0 255.255.255.255 area 146
R1(config-router)#

邻居关系表
R3

R3(config-router)#do show ip ospf neighbor

Neighbor 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 neighbor

Neighbor 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 neighbor

Neighbor 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 neighbor

Neighbor 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/1

R5(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 0

R4#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/2

R6(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 - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 211.98.5.254 to network 0.0.0.0

      1.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/0
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/11] via 172.8.100.4, 00:09:52, Ethernet0/0
      172.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 - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 211.98.5.254 to network 0.0.0.0

O IA  1.0.0.0/8 [110/21] via 172.8.100.4, 00:00:05, Ethernet0/0
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/11] via 172.8.100.4, 00:10:09, Ethernet0/0
      172.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 - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 172.8.146.6 to network 0.0.0.0

O*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/0
      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      172.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)#
// 默认两个负载均衡。

// 现在调整开销。改变路径
R4(config-if)#router ospf 89
R4(config-router)#area 146 default-cost 100

实现结果

R1(config-router)#do show ip route        
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 172.8.146.6 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/11] via 172.8.146.6, 00:07:16, Ethernet0/0
      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      172.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)#

出口路径只剩下一条了 。

  1. 在AREA 0以外的所有区域启用OSPF明文认证,密码:SPOTO

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/253608.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

电子电器架构( E/E) 演化 —— 高速 大算力

电子电器架构( E/E) 演化 —— 高速 & 大算力 我是穿拖鞋的汉子,魔都中坚持长期主义的汽车电子工程师。 老规矩,分享一段喜欢的文字,避免自己成为高知识低文化的工程师: 屏蔽力是信息过载时代一个人的特殊竞争力,任何消耗你的人和事,多看一眼都是你的不对。非必要…

ELK(八)—Metricbeat部署

目录 介绍修改配置文件启动 Modulenginx开启状态查询配置Nginx module查看是否配置成功 介绍 Metricbeat 是一个轻量级的开源度量数据收集器,用于监控系统和服务。它由 Elastic 公司开发,并作为 Elastic Stack(Elasticsearch、Logstash、Kiba…

【机器学习】梯度下降法:从底层手写实现线性回归

【机器学习】Building-Linear-Regression-from-Scratch 线性回归 Linear Regression0. 数据的导入与相关预处理0.工具函数1. 批量梯度下降法 Batch Gradient Descent2. 小批量梯度下降法 Mini Batch Gradient Descent(在批量方面进行了改进)3. 自适应梯度…

什么同源策略?

同源 同源指的是URL有相同的协议、主机名和端口号。 同源策略 同源策略指的是浏览器提供的安全功能,非同源的RUL之间不能进行资源交互 跨域 两个非同源之间要进行资源交互就是跨域。 浏览器对跨域请求的拦截 浏览器是允许跨域请求的,但是请求返回…

spring-kakfa依赖管理之org/springframework/kafka/listener/CommonErrorHandler错误

问题: 整个项目使用spring-boot2.6.8版本,使用gradle构建,在common模块指定了implementation org.springframework.kafka:spring-kafka:2.6.8’这个工程也都能运行(这正常发送kafka消息和接收消息),但是执行…

nodejs+vue+微信小程序+python+PHP邮件过滤系统的设计与实现-计算机毕业设计推荐

邮件过滤系统根据权限类型进行分类,主要可分为用户和管理员二大模块。 管理员模块主要根据管理员对整个系统的管理进行设计,提高了管理的效率和规范[11]。邮件过滤系统综合网络空间开发设计要求。该系统主要设计并完成了管理过程中的用户登录、个人信息修…

持续集成交付CICD:基于 GitLabCI 与 JenkinsCD 实现后端项目发布

目录 一、实验 1. GitLabCI环境设置 2.优化GitLabCI共享库代码 3.JenkinsCD 发布后端项目 4.再次优化GitLabCI共享库代码 5.JenkinsCD 再次发布后端项目 一、实验 1. GitLabCI环境设置 (1)GitLab给后端项目添加CI配置路径 (2&#xf…

万兆网络之屏蔽线序接法(下)

我们直接干吧 1.剥去网线外被,这个相信大家都会的,剪掉尼龙线 剥去的长度用水晶头和护套量度,多留一点长度用于撸直 为了插进去很紧,我用的是超五类的护套,只能顶到条纹底端就很费劲了 然后十字骨架留一小段&#xf…

【JAVA-Day69】抛出异常的精髓:深度解析 throw、throws 关键字,优雅处理异常问题

抛出异常的精髓:深度解析 throw、throws 关键字,优雅处理异常问题 🚀 抛出异常的精髓:深度解析 throw、throws 关键字,优雅处理异常问题 🚀一、什么是抛出异常 😊二、如何抛出异常 &#x1f914…

IDEA中,如何将maven项目变为SpringBoot项目?

第一步&#xff1a;新建Maven工程 这很简单不做过多赘述。 第二步&#xff1a;修改pom.xml文件 分别加入springboot父依赖&#xff0c;web依赖&#xff0c;test测试依赖&#xff0c;maven打包依赖。 <?xml version"1.0" encoding"UTF-8"?> <…

Android Stuido报错处理

仅用作报错记录。防止以后出项问题不知如何解决。 报错1 Dependency‘androidx.annotation:xx requires libraries and applications … 需要修改CompileSDKVersion更改为报错中提示的版本 打开项目build.gradle文件&#xff0c;将compileSdk和targetSdk修改为报错中提示的版…

Word写大论文常见问题(持续更新)

脚注横线未定格 解决方案&#xff1a;“视图”-“草图”&#xff0c;“引用”-“显示备注”-选择“脚注分隔符”&#xff0c;把横线前的空格删掉。 2.PPT做的图插入word中清晰度太低 解决方案&#xff1a;PPT-图形-“另存为图片”-“可缩放矢量图格式”-粘贴到word中。

FPGA简易加减法计算器设计

题目要求&#xff1a; &#xff08;1&#xff09;设计10以内的加减法计算器。 &#xff08;2&#xff09;1个按键用于指定加法或减法&#xff0c;一个用于指定加数或被加数&#xff0c;还有两个分别控制加数或被加数的增加或减少。 &#xff08;3&#xff09;设置的结果和计算的…

饥荒Mod 开发(十四):制作屏幕弹窗

饥荒Mod 开发(十三)&#xff1a;木牌传送 在上一个文章里面制作了一个传送选择页面&#xff0c;是一个全屏的窗口&#xff0c;那饥荒中如何制作一个全屏的窗口&#xff0c;下面介绍一下如何从零开始制作一个全屏窗口 制作屏幕窗口 饥荒中的全屏窗口都有一个基类 “Screen”,我…

JVM基础入门

JVM 基础入门 JVM 基础 聊一聊 Java 从编码到执行到底是一个怎么样的过程&#xff1f; 假设我们有一个文件 x.Java&#xff0c;你执行 javac&#xff0c;它就会变成 x.class。 这个 class 怎么执行的&#xff1f; 当我们调用 Java 命令的时候&#xff0c;class 会被 load 到…

Kafka相关知识

一、kafka架构 Kafka基础知识 Kafka是最初由Linkedin公司开发&#xff0c;是一个分布式、分区的、多副本的、多生产者、多订阅者&#xff0c;基于zookeeper协 调的分布式日志系统(也可以当做MQ系统)&#xff0c;常见可以用于webynginx日志、访问日志&#xff0c;消息服务等等&…

pycharm依赖管理(不要用pip freeze)

在使用python虚拟环境时&#xff0c;可以使用requirements.txt来管理当前项目的依赖。 注意&#xff0c;不要用 pip freeze > requirements.txt 这个命令&#xff0c;因为它会引入很多无关的包。 可以使用 pipreqs ./ --encodingutf-8 ./ 表示当前项目的目录&#xff0…

QT for Android安卓编译环境搭建+首次编译3个大坑

1、安装 编译环境能否搭建成功&#xff0c;主要是看各个依赖软件的版本是否匹配。依赖的软件有3个&#xff1a;JDK、安卓SDK、安卓NDK。 我的qt版本是5.14.1&#xff0c;我亲测以下版本可以成功让编译安卓&#xff1a; QT5.14 JDK1.8.0 安卓SDK26.1 安卓NDK20.1 在QT-&g…

为什么在Android中需要Context?

介绍 在Android开发中&#xff0c;Context是一个非常重要的概念&#xff0c;但是很多开发者可能并不清楚它的真正含义以及为什么需要使用它。本文将详细介绍Context的概念&#xff0c;并解释为什么在Android应用中需要使用它。 Context的来源 Context的概念来源于Android框架…

【算法Hot100系列】三数之和

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…