Archive

‘学习笔记’ 分类存档

How to get correct Yang configuration on ASR9k

Now some customer test netconf-yang on our XR platform. And frequency to check how to get correct yang config(XML), then they test the yang config by their controller to touch with our devices. Now there are several ways to achieve that, summed up to facilitate review:

Commit follow cmd:

netconf-yang agent ssh
ssh server v2
ssh server rate-limit 300
ssh server netconf vrf default
ssh server logging

Generate key:

#crypto key generate dsa
—————————————————

 

  • We can ssh 830 to asr9k paltform, then get the configuration, that should correct yang config, you can reference attachment at test-xml-by-ssh.txt
ssh [email protected] -p 830 -s netconf
  • We can build Netconf NED by pioneer in NSO, then sync-from devices, and “devices device 9001-A compare-config outformat xml”, that should correct yang config
  • After install NSO, we can use follow tools to achieve that function too
netconf-console -u cisco -p cisco --host 10.75.49.53 --port 831 --get-config

 

Btw, please attention “-” and “–” that maybe cause command issue.

Linux操作系统虚拟机(ESXi、VMware Workstation等)MAC地址变化后网卡无法启动-转

原始文章:
http://iknow.lenovo.com/detail/dc_148601.html

虚拟机MAC改变后,无法启动,并报错:“Device eth0 does not seem to be present”
出现该问题,是由于MAC地址变更后,操作系统仍然保留原来MAC地址作为eth0,并且将新的MAC地址识别为新的网卡导致的,可以删除文件“/etc/udev/rules.d/70-persistent-net.rule”中老MAC的信息,并把新MAC中的eth1改成eth0,通过start_udev重新加载udev,然后重启网卡恢复:“service network restart”

Deploy Samba on OpenWRT

买了linksys wrt1200ac很久了,之前只是装了一个openwrt+默认配置,也没启用什么特别功能,感觉还算稳定。不过现在想听一些下载下来的广播,但又不想总是开着PC,所以突然想把这些音频挪到没用的u盘里,并挂在openwrt中,这样任何设备都可以访问了,还剩资源:)

定制OpenWRT

1. 安装中文包

root@OpenWrt:~# opkg update <<< 每次重启后需要缓存安装包列表,这样才能search到所有可用的包
root@OpenWrt:~# opkg list |grep zh-cn <<< 学会如何查找相应的包
root@OpenWrt:~# opkg install luci-i18n-base-zh-cn <<< 安装中文包

2.安装luci的主题

默认只有一种,在默认更新源里,加上默认的一共有4个,最后我还是选择了默认的 -_-

root@OpenWrt:~# opkg list |grep -i theme
luci - git-16.018.33482-3201903-1 - Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
luci-theme-bootstrap - git-16.018.33482-3201903-1 - Bootstrap Theme (default)
luci-theme-freifunk-bno - git-16.018.33482-3201903-1 - Freifunk Berlin Nordost Theme
luci-theme-freifunk-generic - git-16.018.33482-3201903-1 - Freifunk Generic Theme
luci-theme-openwrt - git-16.018.33482-3201903-1 - LuCI OpenWrt.org theme
 完整阅读

Excel 小技巧

在处理工作时,常常遇到统计log,但如何高效的统计,常常需要度娘,而且查起来也很麻烦,所以统计到blog里,下次可以统一查阅:

Excel中两列数据,找出重复项

参考文章请查看:https://zhidao.baidu.com/question/546059662.html
分别对两行建立条件公式,选中A列,条件“=COUNTIF(B:B,A1)>0”;选中B列,条件“=COUNTIF(A:A,B1)>0”,如下所示:

完整阅读

INSTALL CISCO WAE 6.4.5

Introduction

After installed Centos 6.7 for CISCO WAE, I found python version is 2.6 that is much older, and I need ansible1.9, but Centos default upgrade to ansible2.2… in order to easy management ansible1.9 that is python package, I plan to install PIP. From official website, suggest not use 2.6 under pip, so I need to upgrade python to 2.7 too.

But I found WAE use 2.6 after I succeed upgrade python to 2.7…Summarized the totally steps that will help me review in future.

Upgrade Python

After checked from follow link, python 2.7.9 integrate pip, so install this version 🙂
https://pip.pypa.io/en/latest/installing/

1. Install some package that require by python

python have multi dependencie

[root@wae ~]# yum install gcc
[root@wae ~]# yum install openssl-devel

2. Install python 2.7.9

[root@wae ~]# wget http://python.org/ftp/python/2.7.9/Python-2.7.9.tgz
[root@wae ~]# mv Python-2.7.9.tgz /opt/
[root@wae ~]# cd /opt/
[root@wae opt]# tar -xvf Python-2.7.9.tgz 
[root@wae opt]# cd Python-2.7.9
[root@wae Python-2.7.9]# ./configure --prefix=/usr/local/python2.7
[root@wae Python-2.7.9]# make
[root@wae Python-2.7.9]# make install

完整阅读

blonde teen swallows load.xxx videos