CCIE-10-IPv6-TS

目录

  • 实验条件
    • 网络拓朴
  • 环境配置
  • 开始Troubleshooting
    • 问题1. R25和R22邻居关系没有建立
    • 问题2. 去往R25网络的下一跳地址不存在、不可用
    • 问题3. 去往目标网络的下一跳地址不存在、不可用

实验条件

网络拓朴

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

环境配置

在我的资源里可以下载(就在这篇文章的开头也可以下载)
在这里插入图片描述

开始Troubleshooting

检查所有接口的配置

Phone#show ipv int br
Ethernet0/0            [up/up]FE80::A8BB:CCFF:FE02:30002001:CC1E:BEEF:25::100
Ethernet0/1            [administratively down/down]unassigned
Ethernet0/2            [administratively down/down]unassigned
Ethernet0/3            [administratively down/down]unassignedR25#show ipv int br
Ethernet0/0            [up/up]FE80::A8BB:CCFF:FE02:20002001:CC1E:BEEF:25::1
Ethernet0/1            [up/up]FE80::A8BB:CCFF:FE02:20102001:CC1E:BEEF:2225::18
Loopback0              [up/up]FE80::A8BB:CCFF:FE02:20002001:CC1E:BEEF::2225
R25#R22#show ipv int br
Ethernet0/0            [up/up]unassigned
Ethernet0/1            [up/up]FE80::A8BB:CCFF:FE01:F0102001:CC1E:BEEF:2225::17
Ethernet1/0            [up/up]FE80::A8BB:CCFF:FE01:F0012001:CC1E:ABCD:2622::13

其它的两台路由器没有密码,应该是不需要调整的,
直接ping Server4的IPv6地址

Phone#ping 2001:BEEF:CAFE::26
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:BEEF:CAFE::26, timeout is 2 seconds:
UUUUU
Success rate is 0 percent (0/5)
Phone#traceroute 2001:BEEF:CAFE::26
Type escape sequence to abort.
Tracing the route to 2001:BEEF:CAFE::261 2001:CC1E:BEEF:25::1 !U  !U  !U 
Phone#

ping包出现U表示目标不可达的意思, 就是路由器在查询路由表的时候没有目标网络的路由表,而且也没有默认路由,这时就回给源路由器一个目标不可达,源路由器就显示一个U的标记;

数据包到达了网关R25之后就没有下一跳的路由了,查询R25的路由相关配置

R25#show ipv route      
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static routeB - BGP, HA - Home Agent, MR - Mobile Router, R - RIPH - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interareaIS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMOND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - RedirectRL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eidlA - LISP away, a - Application
LC  2001:CC1E:BEEF::2225/128 [0/0]via Loopback0, receive
C   2001:CC1E:BEEF:25::/64 [0/0]via Ethernet0/0, directly connected
L   2001:CC1E:BEEF:25::1/128 [0/0]via Ethernet0/0, receive
C   2001:CC1E:BEEF:2225::/64 [0/0]via Ethernet0/1, directly connected
L   2001:CC1E:BEEF:2225::18/128 [0/0]via Ethernet0/1, receive
L   FF00::/8 [0/0]via Null0, receive
R25#show run | s router          
router bgp 65101bgp log-neighbor-changesneighbor 123.1.2.17 remote-as 12345!address-family ipv4neighbor 123.1.2.17 activateexit-address-family!address-family ipv6network 2001:CC1E:BEEF::2225/128network 2001:CC1E:BEEF:25::/64neighbor 123.1.2.17 activateexit-address-family

没有目标的路由信息,路由协议采用的是BGP协议, 查看一下BGP邻居状态情况

R25#show ip bgp summary
BGP router identifier 202.65.1.5, local AS number 65101
BGP table version is 1, main routing table version 1Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
123.1.2.17      4        12345       0       0        1    0    0 never    Idle

发现R25和R22的邻居关系没有起来、查询R22的路由表信息,发现在R22上有和R26的邻居关系且有目标网络的路由信息且能ping通到目标网络。

R22#show ipv route
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static routeB - BGP, HA - Home Agent, MR - Mobile Router, R - RIPH - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interareaIS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMOND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - RedirectRL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eidlA - LISP away, a - Application
B   2001:BEEF:CAFE::/64 [20/0]via FE80::A8BB:CCFF:FE02:10, Ethernet1/0
C   2001:CC1E:ABCD:2622::/64 [0/0]via Ethernet1/0, directly connected
L   2001:CC1E:ABCD:2622::13/128 [0/0]via Ethernet1/0, receive
C   2001:CC1E:BEEF:2225::/64 [0/0]via Ethernet0/1, directly connected
L   2001:CC1E:BEEF:2225::17/128 [0/0]via Ethernet0/1, receive
L   FF00::/8 [0/0]via Null0, receive
R22#show ip bgp summary
BGP router identifier 134.22.22.22, local AS number 12345
BGP table version is 6, main routing table version 6
5 network entries using 720 bytes of memory
5 path entries using 420 bytes of memory
2/2 BGP path/bestpath attribute entries using 320 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1484 total bytes of memory
BGP activity 6/0 prefixes, 6/0 paths, scan interval 60 secsNeighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
123.1.2.18      4        65101       0       0        1    0    0 never    Idle (Admin)
123.3.3.3       4        12345       0       0        1    0    0 never    Idle
123.5.5.5       4        12345       0       0        1    0    0 never    Idle
134.21.21.21    4        12345       0       0        1    0    0 never    Idle
134.56.78.14    4        10001      22      19        6    0    0 00:15:40        5
R22#ping 2001:BEEF:CAFE::26
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:BEEF:CAFE::26, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R22#

那么只需要解决R22和R25的邻居关系且把目标的网络让R25接收就可以达到我们的目标。

问题1. R25和R22邻居关系没有建立

之前看了R25的BGP配置没有发现异常、继续检查R22的BGP配置

R22#show run | s router bgp
router bgp 12345bgp router-id 134.22.22.22bgp log-neighbor-changesneighbor PEER peer-groupneighbor PEER remote-as 12345neighbor 2001:CC1E:ABCD:2622::12 remote-as 10001neighbor 123.1.2.18 remote-as 65101neighbor 123.1.2.18 shutdownneighbor 123.3.3.3 peer-group PEERneighbor 123.5.5.5 peer-group PEERneighbor 134.21.21.21 peer-group PEERneighbor 134.56.78.14 remote-as 10001!address-family ipv4neighbor PEER next-hop-selfno neighbor 2001:CC1E:ABCD:2622::12 activateneighbor 123.1.2.18 activateneighbor 123.3.3.3 activateneighbor 123.5.5.5 activateneighbor 134.21.21.21 activateneighbor 134.56.78.14 activateneighbor 134.56.78.14 route-map MED outexit-address-family!        address-family ipv6neighbor 2001:CC1E:ABCD:2622::12 activateneighbor 123.1.2.18 activateneighbor 123.1.2.18 route-map NEXT-HOP outexit-address-family
R22#

发现邻居关系被 Shutdown了,no shutdown就可以了


R22#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R22(config)#router bgp 12345
R22(config-router)#no neighbor 123.1.2.18 shutdown
R22(config-router)#
%BGP-5-ADJCHANGE: neighbor 123.1.2.18 Up 
R22(config-router)#do show ip bgp summary
BGP router identifier 134.22.22.22, local AS number 12345
BGP table version is 6, main routing table version 6
5 network entries using 720 bytes of memory
5 path entries using 420 bytes of memory
2/2 BGP path/bestpath attribute entries using 320 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1508 total bytes of memory
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secsNeighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
123.1.2.18      4        65101       6       8        6    0    0 00:00:10        0
123.3.3.3       4        12345       0       0        1    0    0 never    Idle
123.5.5.5       4        12345       0       0        1    0    0 never    Idle
134.21.21.21    4        12345       0       0        1    0    0 never    Idle
134.56.78.14    4        10001      27      25        6    0    0 00:20:47        5
R22(config-router)#

发现R22和R25的邻居关系已经正常,查看BGP路由信息

R22(config-router)#do show bgp ipv6 unicast        
BGP table version is 2, local router ID is 134.22.22.22
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not foundNetwork          Next Hop            Metric LocPrf Weight Path*>   2001:BEEF:CAFE::/642001:CC1E:ABCD:2622::120 10001 i*    2001:CC1E:BEEF::2225/128::FFFF:123.1.2.180             0 65101 i*    2001:CC1E:BEEF:25::/64::FFFF:123.1.2.180             0 65101 i
R25#show bgp ipv6 unicast 
BGP table version is 3, local router ID is 202.65.1.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not foundNetwork          Next Hop            Metric LocPrf Weight Path*    2001:BEEF:CAFE::/64::FFFF:123.1.2.170 12345 10001 i*>   2001:CC1E:BEEF::2225/128::                       0         32768 i*>   2001:CC1E:BEEF:25::/64::                       0         32768 i
R25#

问题2. 去往R25网络的下一跳地址不存在、不可用

修改去往R25网络的下一跳地址,查询到R25上有配置了一个route-map 下一跳地址是R25的E0/1

R25#show run | s router
router bgp 65101bgp log-neighbor-changesneighbor 123.1.2.17 remote-as 12345!address-family ipv4neighbor 123.1.2.17 activateexit-address-family!address-family ipv6network 2001:CC1E:BEEF::2225/128network 2001:CC1E:BEEF:25::/64neighbor 123.1.2.17 activateexit-address-family
R25#show route-map
route-map NEXT-HOP, permit, sequence 10Match clauses:Set clauses:ipv6 next-hop 2001:CC1E:BEEF:2225::18Policy routing matches: 0 packets, 0 bytes
R25#

next-hop 2001:CC1E:BEEF:2225::18 这个IP地址是R25的 e0/1口,那说明这个route-map是为了修改BGP邻居访问network 2001:CC1E:BEEF::2225/128network 2001:CC1E:BEEF:25::/64时指定下一跳为自己的e0/1口,那说明这个route-map应该配置在out的方向上

R25#conf t
R25(config)#router bgp 65101
R25(config-router-af)#address-family ipv6
R25(config-router-af)#neighbor 123.1.2.17 route-map NEXT-HOP out
R25(config-router-af)#do show run | s router bgp
router bgp 65101bgp log-neighbor-changesneighbor 123.1.2.17 remote-as 12345!address-family ipv4neighbor 123.1.2.17 activateexit-address-family!address-family ipv6network 2001:CC1E:BEEF::2225/128network 2001:CC1E:BEEF:25::/64neighbor 123.1.2.17 activateneighbor 123.1.2.17 route-map NEXT-HOP outexit-address-family
R25(config-router-af)#

在R22的路由器上,查询BGP表

R22#show bgp ipv6 unicast
BGP table version is 4, local router ID is 134.22.22.22
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not foundNetwork          Next Hop            Metric LocPrf Weight Path*>   2001:BEEF:CAFE::/642001:CC1E:ABCD:2622::120 10001 i*>   2001:CC1E:BEEF::2225/1282001:CC1E:BEEF:2225::180             0 65101 i*>   2001:CC1E:BEEF:25::/642001:CC1E:BEEF:2225::180             0 65101 i
R22#show ipv route
IPv6 Routing Table - default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static routeB - BGP, HA - Home Agent, MR - Mobile Router, R - RIPH - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interareaIS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMOND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - RedirectRL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eidlA - LISP away, a - Application
B   2001:BEEF:CAFE::/64 [20/0]via FE80::A8BB:CCFF:FE02:10, Ethernet1/0
C   2001:CC1E:ABCD:2622::/64 [0/0]via Ethernet1/0, directly connected
L   2001:CC1E:ABCD:2622::13/128 [0/0]via Ethernet1/0, receive
B   2001:CC1E:BEEF::2225/128 [20/0]via FE80::A8BB:CCFF:FE02:2010, Ethernet0/1
B   2001:CC1E:BEEF:25::/64 [20/0]via FE80::A8BB:CCFF:FE02:2010, Ethernet0/1
C   2001:CC1E:BEEF:2225::/64 [0/0]via Ethernet0/1, directly connected
L   2001:CC1E:BEEF:2225::17/128 [0/0]via Ethernet0/1, receive
L   FF00::/8 [0/0]via Null0, receive

下一跳已经正常,且已经加进路由表中

问题3. 去往目标网络的下一跳地址不存在、不可用

修改去往目标网络的下一跳地址,查询到R22上的BGP有配置了一个route-map NEXT-HOP

R22#show run | s router bgp
router bgp 12345bgp router-id 134.22.22.22bgp log-neighbor-changes
......!address-family ipv6......neighbor 123.1.2.18 route-map NEXT-HOP outexit-address-family
R22#show route-map NEXT-HOP
route-map NEXT-HOP, permit, sequence 10Match clauses:Set clauses:Policy routing matches: 0 packets, 0 bytes
R22#

却是什么都没有配置、这导致R25去往目标网络时的下跳变成了::FFFF:123.1.2.17这个无效地址,因此配置一下set next-hop解决这个问题(ipv4建邻居,传ipv6路由和ipv6建邻居,传ipv4路由的下一跳都会出现问题需要手动修改)

R22#conf t
R22(config)#route-map NEXT-HOP permit 10
R22(config-route-map)#set ipv next-hop 2001:CC1E:BEEF:2225::17
R22(config-route-map)#do show route-map NEXT-HOP
route-map NEXT-HOP, permit, sequence 10Match clauses:Set clauses:ipv6 next-hop 2001:CC1E:BEEF:2225::17Policy routing matches: 0 packets, 0 bytes
R22(config-route-map)#

在R25上查看BGP路由表

R25#show bgp ipv6 unicast        
BGP table version is 4, local router ID is 202.65.1.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not foundNetwork          Next Hop            Metric LocPrf Weight Path*>   2001:BEEF:CAFE::/642001:CC1E:BEEF:2225::170 12345 10001 i*>   2001:CC1E:BEEF::2225/128::                       0         32768 i*>   2001:CC1E:BEEF:25::/64::                       0         32768 i
R25#show ipv route 
IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static routeB - BGP, HA - Home Agent, MR - Mobile Router, R - RIPH - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interareaIS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMOND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - RedirectRL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eidlA - LISP away, a - Application
B   2001:BEEF:CAFE::/64 [20/0]via FE80::A8BB:CCFF:FE01:F010, Ethernet0/1
LC  2001:CC1E:BEEF::2225/128 [0/0]via Loopback0, receive
C   2001:CC1E:BEEF:25::/64 [0/0]via Ethernet0/0, directly connected
L   2001:CC1E:BEEF:25::1/128 [0/0]via Ethernet0/0, receive
C   2001:CC1E:BEEF:2225::/64 [0/0]via Ethernet0/1, directly connected
L   2001:CC1E:BEEF:2225::18/128 [0/0]via Ethernet0/1, receive
L   FF00::/8 [0/0]via Null0, receive
R25#

去往目标网络的下一跳已经正常,现在测试一下网络是否连通

Phone#ping 2001:BEEF:CAFE::26
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:BEEF:CAFE::26, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Phone#traceroute 2001:BEEF:CAFE::26
Type escape sequence to abort.
Tracing the route to 2001:BEEF:CAFE::261 2001:CC1E:BEEF:25::1 0 msec 0 msec 1 msec2 2001:CC1E:BEEF:2225::17 0 msec 0 msec 1 msec3 2001:CC1E:ABCD:2622::12 0 msec 1 msec 0 msec4 2001:BEEF:CAFE::26 1 msec 1 msec 0 msec
Phone#

网络通了,目标达成。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux Shell:`xargs`命令

Linux Shell:xargs命令 在Linux Shell脚本或命令行操作中,xargs是一个非常有用的命令,它可以将标准输入(stdin)数据转换成命令行参数。xargs命令读取来自标准输入的数据,然后将这些数据作为参数传递给其他…

《Java面试自救指南》(专题三)数据库

文章目录 一条sql语句的查询流程有哪些数据库存储引擎,各自的区别数据库的三大范式事务的四大特性(含隔离级别)MySQL四种隔离机制的底层实现(如何解决幻读 )MySQL有哪几种锁,分别怎么实现数据库中有哪些索引…

Kubernetes学习笔记8

Kubernetes集群客户端工具kubectl 我们已经能够部署Kubernetes了,那么我们如何使用Kubernetes集群运行企业的应用程序呢?那么,我们就需要使用命令行工具kubectl。 学习目标: 了解kubectl 命令帮助方法 了解kubectl子命令使用分…

竞赛常考的知识点大总结(四)高级数据结构

并查集 并查集(Disjoint Set Union,DSU)是一种数据结构,用于管理一系列不相交的集合,并支持两种操作:合并(Union)和查找(Find)。并查集可以高效地处理动态连…

传统海外仓的管理模式有什么缺点?使用位像素海外仓系统的海外仓有什么优势?

传统的海外仓管理模式主要需要大量的人工操作和相对简单的信息化手段进行仓库的日常运营。因此,传统海外仓的运作比较依赖仓库员工的手工记录、核对和处理各种仓储和物流信息。 然而,传统海外仓管理模式通常存在一些缺点: 效率低下 因为需…

Docker-23.0.0版本 一键安装

一 前言 在数字化飞速发展的今天,应用程序的部署和管理成为每个企业和个人开发者不可忽视的课题。而Docker,作为一款开源的容器化技术,正以其独特的沙箱环境和逻辑隔离特性,引领着应用程序部署的新潮流。想象一下,每个…

算法之美:缓存数据淘汰算法分析及分解实现

在设计一个系统的时候,由于数据库的读取速度远小于内存的读取速度,那么为加快读取速度,需先将一部分数据加入到内存中(该动作称为缓存),但是内存容量又是有限的,当缓存的数据大于内存容量时&…

《乡土中国》中国基层传统社会里的一种体系,支配着社会生活的各方面 - 三余书屋 3ysw.net

乡土中国 大家好,今天我们要解读的是费孝通先生的经典著作《乡土中国》。这本书的中文版大约有10万字,我将用30分钟左右的时间为你解读书中的精髓。为什么说中国的根基在于乡土社会?我们应该从哪些方面来理解乡土社会的特征及其重要性&#…

穿越雷区(Java--BFS解法)

穿越雷区(Java–BFS解法) 题目链接:http://oj.ecustacm.cn/problem.php?id1266 解题代码(内含注释思路) import java.util.*;public class Main {static int[][] dir {{0,1},{0,-1},{1,0},{-1,0}};static String[]…

Oracle备份和还原的几种方式

1、使用数据泵方式 exp demo/demoorcl buffer1024 filed:\back.dmp fully demo:用户名、密码 buffer: 缓存大小 file: 具体的备份文件地址 full: 是否导出全部文件 ignore: 忽略错误,如果表已经存在,则也是覆盖 exp demo/de…

JAVA 100道题(26)

26.编写一个JAVA程序,将文本文件中的内容读取到内存中并打印出来 以下是一个简单的Java程序,用于读取文本文件的内容并将其打印到控制台上: java复制代码 import java.io.BufferedReader; import java.io.FileReader; import java.io.IOExce…

MyBatis与Hibernate的优缺点对比

MyBatis和Hibernate都是Java中常用的持久化框架,它们各自有着优点和缺点。让我们来对比一下它们的优缺点。 MyBatis 优点: SQL控制: MyBatis允许开发人员直接编写SQL语句,提供了更直观的数据库访问控制。灵活性: 开发人员可以更精细地控制…

LeetCode 856. 括号的分数

解题思路 栈模拟。 相关代码 class Solution {public int scoreOfParentheses(String s) {//stack中的值是左括号的的右边所有合法配对括号的值Stack<Integer> stack new Stack<>();stack.push(0);for(int i0;i<s.length();i)if(s.charAt(i) () stack.push…

nvm 安装多个版本的Node npm

先安装nvm 管理工具 git安装地址 找到安装包 下载然后安装 https://github.com/coreybutler/nvm-windows/releases/tag/1.1.11nvm常用命令 命令说明nvm version查看nvm版本nvm ls查看所有已经安装的Nodejs版本nvm list installed查看所有已经安装的Nodejs版本nvm ls availab…

第十一章 U-boot 顶层 Makefile 详解 (模块编译)

11.2.7 模块编译 在 uboot 中允许单独编译某个模块,使用命令" make Mdir"&#xff0c;旧语法"makeSUBDIRSdir"也是支持的。 200 # Use make Mdir to specify directory of external module to build 201 # Old syntax make ... SUBDIRS$PWD is still supp…

网站排名不升反降?揭秘SEO中常见的降权触发点!

在SEO(搜索引擎优化)中&#xff0c;网站的权重是影响其在搜索引擎中排名的重要因素。然而&#xff0c;有许多原因可能导致网站被降权&#xff0c;以下是一些常见的原因&#xff1a; 1. 网站内容过于雷同或不相关性&#xff1a;如果网站的内容大量复制自其他网站&#xff0c;或…

笔试:4.6美团笔试(硬件开发方向)

二十道选择两道算法题。 选择就不说了&#xff0c;硬件方面目前了解较少。 两道算法题都过了&#xff0c;第一题很简单没有什么好讲的。 第二题看着题目以为会很复杂&#xff0c;没想到一遍过。 小美有一个由 n 个互不相等的正整数构成的数组 a&#xff0c;但她一不小心把 a…

Three 之 three.js (webgl)GLSL-Card 中文手册相关知识

Three 之 three.js &#xff08;webgl&#xff09;GLSL-Card 中文手册相关知识 目录 Three 之 three.js &#xff08;webgl&#xff09;GLSL-Card 中文手册相关知识 一、简单介绍 二、GLSL 中文手册 1、基本类型 2、基本结构和数组 3、向量的分量访问 4、运算符 5、基础…

<c++基础(5)>整数溢出

整数溢出 在工程中遇到问题&#xff0c;两个int类型加减结果赋值给double类型时提示溢出风险&#xff1a; //sum和sumb都是int类型&#xff0c; double a double(sum - sumB);这里发生了整数溢出&#xff0c;整数溢出是指当计算结果超出了整数类型所能表示的范围时发生的情况…

南京观海微电子---Vitis HLS设计流程(实例演示)——Vitis HLS教程

1. 前言 课时2我们介绍了Vitis HLS的设计流程&#xff0c;如下图所示&#xff1a; 算法或软件的设计和仿真都基于C/C&#xff0c;通过HLS平台导出打包好的IP RTL代码&#xff0c;最后将该打包的IP加入到主工程使用。 本课时&#xff0c;我们通过一个具体的实例&#xff0c;演示…