思科OSPF辅助地址
实验拓扑图:
6台路由器和1台交换机和3台PC机
R1的配置
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int e0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int e0/1
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
R1(config-router)#network 192.168.2.0 0.0.0.255 area 1
R1(config-router)#area 1 stub
R1(config-router)#exit
R1(config)#do sh ip route
Codes: 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
Gateway of last resort is 192.168.2.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, Ethernet0/1
C 192.168.2.0/24 is directly connected, Ethernet0/0
O*IA 0.0.0.0/0 [110/11] via 192.168.2.2, 00:12:13, Ethernet0/0
R1(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.2.1 YES manual up up
Ethernet0/1 192.168.1.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R1(config)#do sh route ospf
route-map ospf not found
R1(config)#do sh ip route ospf
O*IA 0.0.0.0/0 [110/11] via 192.168.2.2, 00:24:05, Ethernet0/0
R1(config)#do sh ip ospf
Routing Process "ospf 1" with ID 192.168.2.1
Start time: 00:17:56.480, Time elapsed: 00:27:19.416
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
Area 1
Number of interfaces in this area is 2
It is a stub area
Area has no authentication
SPF algorithm last executed 00:24:27.172 ago
SPF algorithm executed 4 times
Area ranges are
Number of LSA 4. Checksum Sum 0x02F8C7
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R1(config)#
R2的配置
R2#
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int e0/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e0/1
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 192.168.2.0 0.0.0.255 area 1
R2(config-router)#network 192.168.3.0 0.0.0.255 area 0
R2(config-router)#area 1 stub no-summary
R2(config-router)#exit
R2(config)#do sh ip route
Codes: 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
Gateway of last resort is not set
O E2 192.168.8.0/24 [110/20] via 192.168.3.2, 00:16:30, Ethernet0/1
O IA 192.168.4.0/24 [110/20] via 192.168.3.2, 00:25:41, Ethernet0/1
O IA 192.168.5.0/24 [110/30] via 192.168.3.2, 00:23:03, Ethernet0/1
O IA 192.168.6.0/24 [110/40] via 192.168.3.2, 00:17:20, Ethernet0/1
O E2 192.168.7.0/24 [110/20] via 192.168.3.2, 00:17:15, Ethernet0/1
O 192.168.1.0/24 [110/20] via 192.168.2.1, 00:27:48, Ethernet0/0
C 192.168.2.0/24 is directly connected, Ethernet0/0
C 192.168.3.0/24 is directly connected, Ethernet0/1
R2(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.2.2 YES manual up up
Ethernet0/1 192.168.3.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R2(config)#do sh route os
route-map os not found
R2(config)#do sh route ospf
route-map ospf not found
R2(config)#do sh ip ospf
Routing Process "ospf 1" with ID 192.168.3.1
Start time: 00:19:34.552, Time elapsed: 00:52:54.572
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border router
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 2. Checksum Sum 0x00653C
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:49:34.768 ago
SPF algorithm executed 7 times
Area ranges are
Number of LSA 8. Checksum Sum 0x050BD9
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 1
Number of interfaces in this area is 1
It is a stub area, no summary LSA in this area
generates stub default route with cost 1
Area has no authentication
SPF algorithm last executed 00:51:41.580 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 4. Checksum Sum 0x02F0CB
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R2(config)#
R3的配置
R3#
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int e0/0
R3(config-if)#ip address 192.168.3.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int e0/1
R3(config-if)#ip address 192.168.4.1 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
R3(config-router)#network 192.168.4.0 0.0.0.255 area 2
R3(config-router)#area 2 nssa
R3(config-router)#exit
R3(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.3.2 YES manual up up
Ethernet0/1 192.168.4.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R3(config)#do sh ip route
Codes: 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
Gateway of last resort is not set
O N2 192.168.8.0/24 [110/20] via 192.168.4.2, 00:43:11, Ethernet0/1
C 192.168.4.0/24 is directly connected, Ethernet0/1
O 192.168.5.0/24 [110/20] via 192.168.4.2, 00:44:02, Ethernet0/1
O 192.168.6.0/24 [110/30] via 192.168.4.2, 00:44:02, Ethernet0/1
O N2 192.168.7.0/24 [110/20] via 192.168.4.2, 00:44:02, Ethernet0/1
O IA 192.168.1.0/24 [110/30] via 192.168.3.1, 00:44:02, Ethernet0/0
O IA 192.168.2.0/24 [110/20] via 192.168.3.1, 00:44:02, Ethernet0/0
C 192.168.3.0/24 is directly connected, Ethernet0/0
R3(config)#exit
R3#sh ip ospf
Routing Process "ospf 1" with ID 192.168.4.1
Start time: 00:21:31.032, Time elapsed: 00:54:21.640
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 2. Checksum Sum 0x00653C
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:52:58.224 ago
SPF algorithm executed 6 times
Area ranges are
Number of LSA 8. Checksum Sum 0x050BD9
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Area has no authentication
SPF algorithm last executed 00:44:38.796 ago
SPF algorithm executed 8 times
Area ranges are
Number of LSA 10. Checksum Sum 0x04C12C
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R3#sh ip route ospf
O N2 192.168.8.0/24 [110/20] via 192.168.4.2, 00:45:04, Ethernet0/1
O 192.168.5.0/24 [110/20] via 192.168.4.2, 00:45:54, Ethernet0/1
O 192.168.6.0/24 [110/30] via 192.168.4.2, 00:45:54, Ethernet0/1
O N2 192.168.7.0/24 [110/20] via 192.168.4.2, 00:45:54, Ethernet0/1
O IA 192.168.1.0/24 [110/30] via 192.168.3.1, 00:45:54, Ethernet0/0
O IA 192.168.2.0/24 [110/20] via 192.168.3.1, 00:45:54, Ethernet0/0
R3#
R4的配置
R4#
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int e0/0
R4(config-if)#ip address 192.168.4.2 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int e0/1
R4(config-if)#ip address 192.168.5.1 255.255.255.0
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#network 192.168.4.0 0.0.0.255 area 2
R4(config-router)#network 192.168.5.0 0.0.0.255 area 2
R4(config-router)#area 2 nssa
R4(config-router)#exit
R4(config)#int e0/1
R4(config-if)#ip address 192.168.7.1 255.255.255.0 secondary
R4(config-if)#exit
R4(config)#router rip
R4(config-router)#network 192.168.7.0
R4(config-router)#version 2
R4(config-router)#no auto-summary
R4(config-router)#exit
R4(config)#router ospf 1
R4(config-router)#redistribute rip subnets
R4(config-router)#router rip
R4(config-router)#redistribute ospf 1 metric 1
R4(config-router)#exit
R4#sh ip route
Codes: 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
Gateway of last resort is not set
R 192.168.8.0/24 [120/1] via 192.168.7.2, 00:00:12, Ethernet0/1
C 192.168.4.0/24 is directly connected, Ethernet0/0
C 192.168.5.0/24 is directly connected, Ethernet0/1
O 192.168.6.0/24 [110/20] via 192.168.5.2, 00:50:59, Ethernet0/1
C 192.168.7.0/24 is directly connected, Ethernet0/1
O IA 192.168.1.0/24 [110/40] via 192.168.4.1, 00:50:59, Ethernet0/0
O IA 192.168.2.0/24 [110/30] via 192.168.4.1, 00:50:59, Ethernet0/0
O IA 192.168.3.0/24 [110/20] via 192.168.4.1, 00:50:59, Ethernet0/0
R4#sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.4.2 YES manual up up
Ethernet0/1 192.168.5.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R4#sh ip ospf
Routing Process "ospf 1" with ID 192.168.5.1
Start time: 00:24:13.648, Time elapsed: 00:58:09.592
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an autonomous system boundary router
Redistributing External Routes from,
rip, includes subnets in redistribution
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
Area 2
Number of interfaces in this area is 2
It is a NSSA area
Area has no authentication
SPF algorithm last executed 00:51:20.440 ago
SPF algorithm executed 6 times
Area ranges are
Number of LSA 10. Checksum Sum 0x04C12C
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R4#sh ip route ospf
O 192.168.6.0/24 [110/20] via 192.168.5.2, 00:51:27, Ethernet0/1
O IA 192.168.1.0/24 [110/40] via 192.168.4.1, 00:51:27, Ethernet0/0
O IA 192.168.2.0/24 [110/30] via 192.168.4.1, 00:51:27, Ethernet0/0
O IA 192.168.3.0/24 [110/20] via 192.168.4.1, 00:51:27, Ethernet0/0
R4#
R5的配置
R5#
R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#int e0/0
R5(config-if)#ip address 192.168.5.2 255.255.255.0
R5(config-if)#no sh
R5(config-if)#int e0/1
R5(config-if)#ip address 192.168.6.1 255.255.255.0
R5(config-if)#no sh
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#network 192.168.5.0 0.0.0.255 area 2
R5(config-router)#network 192.168.6.0 0.0.0.255 area 2
R5(config-router)#area 2 nssa
R5(config-router)#exit
R5#sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.5.2 YES manual up up
Ethernet0/1 192.168.6.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R5#sh ip route
Codes: 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
Gateway of last resort is not set
O N2 192.168.8.0/24 [110/20] via 192.168.5.1, 00:54:20, Ethernet0/0
O 192.168.4.0/24 [110/20] via 192.168.5.1, 00:55:20, Ethernet0/0
C 192.168.5.0/24 is directly connected, Ethernet0/0
C 192.168.6.0/24 is directly connected, Ethernet0/1
O N2 192.168.7.0/24 [110/20] via 192.168.5.1, 00:55:20, Ethernet0/0
O IA 192.168.1.0/24 [110/50] via 192.168.5.1, 00:55:20, Ethernet0/0
O IA 192.168.2.0/24 [110/40] via 192.168.5.1, 00:55:20, Ethernet0/0
O IA 192.168.3.0/24 [110/30] via 192.168.5.1, 00:55:20, Ethernet0/0
R5#sh ip route ospf
O N2 192.168.8.0/24 [110/20] via 192.168.5.1, 00:54:27, Ethernet0/0
O 192.168.4.0/24 [110/20] via 192.168.5.1, 00:55:27, Ethernet0/0
O N2 192.168.7.0/24 [110/20] via 192.168.5.1, 00:55:27, Ethernet0/0
O IA 192.168.1.0/24 [110/50] via 192.168.5.1, 00:55:27, Ethernet0/0
O IA 192.168.2.0/24 [110/40] via 192.168.5.1, 00:55:27, Ethernet0/0
O IA 192.168.3.0/24 [110/30] via 192.168.5.1, 00:55:27, Ethernet0/0
R5#
R6的配置
R6#
R6#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R6(config)#int e0/0
R6(config-if)#ip address 192.168.7.2 255.255.255.0
R6(config-if)#no sh
R6(config-if)#int e0/1
R6(config-if)#ip address 192.168.8.1 255.255.255.0
R6(config-if)#no sh
R6(config-if)#exit
R6(config)#router rip
R6(config-router)#network 192.168.7.0
R6(config-router)#network 192.168.8.0
R6(config-router)#version 2
R6(config-router)#no auto-summary
R6(config-router)#redistribute ospf 1 metric 1
R6(config-router)#exit
R6#sh ip route
Codes: 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
Gateway of last resort is not set
C 192.168.8.0/24 is directly connected, Ethernet0/1
R 192.168.4.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
R 192.168.5.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
R 192.168.6.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
C 192.168.7.0/24 is directly connected, Ethernet0/0
R 192.168.1.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
R 192.168.2.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
R 192.168.3.0/24 [120/1] via 192.168.7.1, 00:00:01, Ethernet0/0
R6#sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.7.2 YES manual up up
Ethernet0/1 192.168.8.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R6#
SW1的配置
SW1#conf t
SW1(config)#int range f1/0 -2
SW1(config-if)#switchport mode trunk
SW1(config-if)#no sh
SW1#
转载于:https://blog.51cto.com/guochenyong/1979397
相关文章:

赠书 | GNN 模型在生物化学和医疗健康中的典型应用
计算生物化学和医疗健康的数据常常通过图来表示。例如,分子和化合物可以自然地表示为以原子为节点、以键为边的图。蛋白质相互作用(Protein-ProteinInteractions,PPI)记录了两个或多个蛋白质之间的物理联系, 这种联系可以很自然地…

C#控制远程计算机的服务
在.net中提供了一些类来显示和控制Windows系统上的服务,并可以实现对远程计算机服务服务的访问,如System.ServiceProcess命名空间下面的ServiceController 类,System.Management下面的一些WMI操作的类。虽然用ServiceController可以很方便的实…

百度WordPress结构化数据插件上线
2019独角兽企业重金招聘Python工程师标准>>> 博客文章收录慢?内容收录不全?马上使用百度WordPress结构化数据插件,轻松解决博客内容的收录问题,同时内容还能够在搜索结果中获得更丰富的展现,提高用户点击率…

MailMail、RegeX等程序的云端版
云端是一款优秀的国产软件,它通过虚拟环境的方式使软件与系统隔离,使软件做到免安装、易于删除、不留残余垃圾。 (这里捎带提醒一下,云端与Visual Studio有冲突,必须在禁用云端服务的情况下安装,详见《Visu…

java静态/动态成员变量、初始化块,父类/子类构造函数执行顺序问题
2019独角兽企业重金招聘Python工程师标准>>> /* * 几大原则 * 一、静态成员变量(Static) * 1、静态成员变量为类变量,所有对象共享同一内存空间 * 2、静态成员变量的声明和定义仅在首次加载类时执行一次 * 3、首次加载类…

什么?我要对AI礼貌?人机交互面临的道德漏洞
作者 | 库珀来源 | 数据实战派头图 | 付费下载于 IC Photo如果你在一条道路上行驶,突然前面拐弯处出现一辆无人驾驶汽车,你会继续坚持你的道路优先权,还是让位使它先过去?目前,我们大多数人在涉及其他人的情况下能表现…

C#多线程共享数据
在多线程编程中,我们经常要使用数据共享.C#中是如何实现的呢?很简单,只要把你要共享的数据设置成静态的就可以了.关键字static .如下: static Queue q1new Queue(); static int b0; 在这里我定义了一个整形变量b和队列q1. 接下去就可以创建多线程代码了.如下: MyThread m…

异常-----Java compiler level does not match解决方法
假如你现在还在为自己的技术担忧,假如你现在想提升自己的工资,假如你想在职场上获得更多的话语权,假如你想顺利的度过35岁这个魔咒,假如你想体验BAT的工作环境,那么现在请我们一起开启提升技术之旅吧,详情请…

求几亿个数中不重复元素的个数
题目: 有2.5亿个无符号整数(但在文件里面),要求找出这2.5亿个数字里面,不重复的数字的个数(那些只出现一次的数字的数目);另外,可用的内存限定为600M;要求算法…

进一步提升用户信息安全保护意识 小米安全与隐私宣传月完满落幕
6月29日,第二届小米安全与隐私宣传月活动完美落幕。活动通过多形式、多层次、全方位展示了小米在信息安全与用户隐私保护方面的实践和成就,进一步提升小米全体员工保护消费者个人信息的安全意识,为小米全线产品的安全防护水平奠定基础。 闭幕…

已知2个整形数据a,b.不使用if,?:以及其他任何条件判断的语法,找出a跟b中数据的大者。
已知2个整形数据a,b.不使用if,?:以及其他任何条件判断的语法,找出a跟b中数据的大者。答案: int max(int a,int b){return (ababs(a-b))/2;}类似的 请定义一个宏,比较两个数a、b的大小,不能使用大于、小于、if语句 答案࿱…

flume源码学习8-hdfs sink的具体写入流程
上一篇说了HDFSEventSink的实现,这里根据hdfs sink的配置和调用分析来看下sink中整个hdfs数据写入的过程: 线上hdfs sink的几个重要设置 12345678hdfs.path hdfs://xxxxx/%{logtypename}/%Y%m%d/%H: hdfs.rollInterval 60 hdfs.rollSize 0…

详解zabbix中文版安装部署
一、zabbix简介(摘自百度百科)zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供柔软的通知机制以让系统管理员快速定位/解决存在…

赠书 | 图解机器学习算法,看这文就够了!
机器学习指的是计算机根据给定的问题、课题或环境进行学习,并利用学习结果解决问题或课题等的一整套机制(图 1-1)。 图 1-1 分类的示意图与机器学习共同成为热门话题的还有人工智能和深度学习。这里梳理一下它们之间的关系(图 1-…

C#获得文件版本信息及只读文件的删除
获取文件的版本信息: FileVersionInfo myFileVersionInfo1 FileVersionInfo.GetVersionInfo("D://TEST.DLL"); textBox1.Text"版本号: " myFileVersionInfo1.FileVersion; 更改文件属性,删除只读文件: 下例欲将E:/test.txt文件…

组策略 从入门到精通(二) 如何区别跨越WAN网的计算机对组策略的套用
如果客户机与DC中间跨越了网络,造成传输速率慢的情况,我们希望通过策略中的一些元素,达成对这些计算机的另类处理。但我们并不知道这些计算机哪些与我们DC之间属于低速连接,哪些属于高速连接,那么我们要如何通过组策略…

插入记录时单引号的处理
由于Content, Title中可能包含单引号,直接使用sql的insert命令会报错,对此有两种处理方法,一种将单引号替换成两个单引号,第2种方法是使用存储过程。 表myBBS的格式定义如下: CREATE TABLE [dbo].[myBBS] ( [ID] [bi…

仅用 480 块 GPU 跑出万亿参数!全球首个“低碳版”巨模型 M6 来了
继今年 3 月阿里达摩院发布国内首个千亿参数多模态大模型 M6(MultiModality-to-MultiModality MultitaskMega-transformer,以下简称 M6) 之后,6 月 25 日,达摩院宣布对 M6 进行全新升级,带来“低碳版”巨模…

怎样将jpg转换成pdf软件
为什么80%的码农都做不了架构师?>>> 怎样将jpg转换成pdf软件 序言: 企业或个人通常会遇到设备终端软件的兼容性和支持性问题,比如,JPG转PDF文本,这给等于给用户设置了一个门槛,遇到需要将JPG转换…

二叉树的层次遍历 II
给出一棵二叉树,返回其节点值从底向上的层次序遍历(按从叶节点所在层到根节点所在的层遍历,然后逐层从左往右遍历) 样例 给出一棵二叉树 {3,9,20,#,#,15,7}, 3/ \9 20/ \15 7 按照从下往上的层次遍历为: [[15,7],[…

jquery autocomplete实现solr查询字段自动填充并执行查询
2019独角兽企业重金招聘Python工程师标准>>> 页面引入三个JS: <script type"text/javascript" src"js/jquery-1.7.2.js"></script> <script type"text/javascript" src"js/jquery-ui.js">&l…

C#使用CDO发送邮件
可以引用的COM组件列表,发现里面有一个名为Microsoft CDO For Exchange 2000 Library的COM组件,就是这个,我们可以用它来连接SMTP Server,使用用户名/密码验证发送邮件。 下面是实现的一个例子: Smtp Server使用的Smtp…

干货 | 当 YOLOv5 遇见 OpenVINO,实现自动检测佩戴口罩
YOLOv5网络YOLOv5代码链接:https://github.com/ultralytics/yolov5YOLOv5 于2020年6月横空出世!一经推出,便得到CV圈的瞩目,目前在各大目标检测竞赛、落地实战项目中得到广泛应用。 YOLOv5在COCO上的性能表现:YOLOv5一…

Ubuntu 16.04安装双显卡驱动方法收集
说明:不一定有效,要不断尝试。 http://www.linuxwang.com/html/2150.html http://blog.csdn.net/feishicheng/article/details/70662094>如有问题,请联系我:easonjim#163.com,或者下方发表评论。<

C#中的类型转换
C# 出来也有些日子了,最近由于编程的需要,对 C# 的类型转换做了一些研究,其内容涉及 C# 的装箱/拆箱/别名、数值类型间相互转换、字符的 ASCII 码和 Unicode 码、数值字符串和数值之间的转换、字符串和字符数组/字节数组之间的转换、各种数值…

解构 StyleCLIP:文本驱动、按需设计,媲美人类 P 图师
来源 | HyperAI超神经(ID:HyperAI)作者 | 神经三羊StyleCLIP 是一种新型「P 图法」,它结合了 StyleGAN 和 CLIP,可以仅依据文本描述,对图像进行修改和处理。提起 StyleGAN 大家都不陌生。这个由 NVIDIA 发布的新型生成…

nexus 4 下 DualBootInstallation 安装 ubuntu touch
最近折腾ubuntu for phone ubuntu也算是雷声大雨点小,从edge手机开始,到说兼容一大部分谷歌机,到现在缩水说只适配nexus 4 节操掉了一地啊,对付这种情况,ubuntu touch也就可以只装着玩玩了,还好ubuntu 官方…

我的家庭私有云计划-13
嗯,昨天算由感而发啊,大家看看就好了。 嗯,接着说咱们的云。 先说啊,我没打算在这个领域里面完全自研,我还没那么疯,这个呢属于一体化解决方案,我认为还是社会分工合作的结果,不强调…

C语言return函数
return函数 说到return,有必要提及主函数的定义。很多人甚至市面上的一些书籍,都使用了void main( )这一形式 ,其实这是错误的。 C/C 中从来没有定义过void main( ) 。C 之父 Bjarne Stroustrup 在他的主页上的 FAQ 中明确地写着: The defi…

怎样写出一个较好的高速排序程序
写出一个较好的高速排序程序 高速排序是经常使用的排序算法之中的一个,但要想写出一个又快又准的使用程序,就不是那么简单了须要注意的事项 首先要写正确。通常使用递归实现。其递归相当于二叉树展开,因此假设要用迭代实现的话须要使用一个队…