April 2021

You are currently browsing the monthly archive for April 2021.

PAM(Platform Automated Monitoring),从6.1.2 版本开始(64bit, not in 32bit)开始引入该功能, 并且默认情况下是自动启动,用于监视进程crash,memory leak, CPU hog,traceback , disk usage等, 具体点就是当检测到某一事件时, 会自动采集一些信息并默认保存到harddisk:/cisco_support目录下, 供我们troubleshooting, 这一功能是全自动的,目前没法手动配置,具体示例可以参考以下文档:

PAM Events

从6.6.1 开始新引入一个feature, on-demand EDCD(Event Driven CLI Database ), 结合PAM能实现两种功能

  1. PAM Schedule: 每间隔一段时间采集一些信息
  2. PAM EEM Agent: 监控syslog, 若符合条件trigger采集一些信息
Read the rest of this entry »

7.1.2开始支持这个feature, 默认功能是关闭的, 开启后自动将主引擎harddisk:/mirror/ 下的文件同步到备引擎。

测试如下:

RP/0/RSP0/CPU0:ASR-9006-L_NPE2#show mirror    <<<<< default disable 
Sun Apr 25 03:40:36.544 UTC
  % Mirror is not enabled
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#conf 
Sun Apr 25 03:40:38.634 UTC
RP/0/RSP0/CPU0:ASR-9006-L_NPE2(config)#mirror enable 
RP/0/RSP0/CPU0:ASR-9006-L_NPE2(config-mirror)#commit 
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#show mirror 
Sun Apr 25 03:40:53.688 UTC
MIRROR DIR: /harddisk:/mirror/
  % Last sync of this dir ended at Sun Apr 25 03:40:43 2021
  Location    |Mirrored |Modification Time        
  ------------------------------------------------
  script-mgmt/|yes      |Thu Apr 15 18:42:06 2021 

RP/0/RSP0/CPU0:ASR-9006-L_NPE2#show run | file harddisk:/mirror/test_mirror.cfg 
Sun Apr 25 03:41:35.610 UTC
Building configuration...

[OK]
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#show mirror                                      
Sun Apr 25 03:41:38.621 UTC
MIRROR DIR: /harddisk:/mirror/
  % Last sync of this dir ended at Sun Apr 25 03:41:36 2021
  Location        |Mirrored |Modification Time        
  ----------------------------------------------------
  test_mirror.cfg |yes      |Sun Apr 25 03:41:36 2021 
  script-mgmt/    |yes      |Thu Apr 15 18:42:06 2021 

RP/0/RSP0/CPU0:ASR-9006-L_NPE2#dir harddisk:/mirror/ location 0/rSP1/CPU0 
Sun Apr 25 03:41:55.205 UTC

Directory of harddisk:/mirror/
652810 drwxr-xr-x. 7  4096 Apr 15 18:42 script-mgmt
652819 -rwxr--r--. 1 84943 Apr 25 03:41 test_mirror.cfg

23099260 kbytes total (18171220 kbytes free)
RP/0/RSP0/CPU0:ASR-9006-L_NPE2#
Read the rest of this entry »

最近测试了SRv6,顺便记录下, SRv6具体是什么?对比我们平常的MPLS VPN的网络,数据转发采用的MPLS标签, 那MPLS标签常见的可以是LDP或者SR分配的; SRv6使用的IPv6的报头进行转发,在IPv6 Header 中新增SRH(Segment Routing Header)用来记录128bit IPv6地址格式的SRv6 SID(segment ID)如下图所示:

RFC2460

上面所说的为Base format的SRv6 报文, 还有一种Micro-segment格式的报文。两种封装的区别如下。

Micro-segment 采用的是32bit + 16bit的形式,所以它的locator是/48位。

Base- format的locator是/64位

SRv6 Segment

Locator

128Bit的IPv6 SID由两部分组成, 其中前64bit/48bit 为Locator。
Base- forma的tLocator 的前40Bit 必须在SRv6 domain中一致;余下的24bit 为node-id, 用于表示node,不能为0且SRv6域内node-id 不能一致。

##### Base- format
segment-routing
 srv6
  locators
   locator r7
    prefix 2002:0:0:7::/64   <<<<<

##### uSID

  locators
   locator MAIN
    micro-segment behavior unode psp-usd.     <<<<<
    prefix fcbb:bb00:1::/48

在NCS55 平台中有两种profile, 用来切换这两种封装, 每次更换封装都需要重启板卡。

hw-module profile segment-routing srv6 mode base

hw-module profile segment-routing srv6 mode micro-segment format f3216

在771 版本引入了双模式“hw-module profile segment-routing srv6 mode base-and-micro-segment-f3216 ”

7.10.1默认设备为双模式, 不需要添加配置。

使用diagshell 命令可以get到芯片目前设置的是什么模式,

`show controllers fia diagshell 0 “config show” location 0/0/CPU0 | i srv6”`

 custom_feature_srv6_enable.   "3" means base mode
                                                        '5' means dual mode 
ps:  usid忘记是什么了, 想起来再更改。

ASR9K只需要更改配置即可在这两个模式间切换, 不需要额外的hw-module profile 命令

Read the rest of this entry »
# VMDK–>qcow2:
qemu-img convert -f vmdk -O qcow2 source-name.vmdk target-name.img

# qcow2–>raw:
qemu-img convert -O qcow2 source-name.raw target-name.qcow