ASR9k Split-horizon Summary

对于ASR9k的split-horizon简单总结如下:

注:ASR9k不同于76,split-horizon不能disable;它一共分3组,group 0,1和2,每组的定义不一样。

  • 默认所有AC都属于group 0,group 0比较特殊,其中的AC都可以互访
  • 所有PW都属于group 1,group 1中的member不能互访,但能与group0或group 2互访
  • 不论在AC还是PW上配置split-horizion后,都会属于group 2,group2中的member不能互访,但能与group0或group1互访

下面是Xander总结的(https://supportforums.cisco.com/thread/2213114 ):

Three SHG groups are defined for VPLS(SHG0,SHG1 and SHG2). By default, all the 
bridge-ports( AC or PW ) come in SHG0. When a Split horizon-group is configured 
under the Bridge-port( either under AC or PW) they come in SHG2. 
PWs defined under VFI come in SHG1. 
By definition, Bridge-ports in same SHG(SHG1 and SHG2) won't talk to each 
other ( this is not applicable for SHG0 though ).

SHG0 --- > SHG0,SHG1 and SHG2
SHG1 --- > SHG0 and SHG2
SHG2 ----> SHG0 and SHG1

Accelerated Upgrade Tool for Cisco IOS-XR

AUT是一个脚本,可以实现自动化安装IOS-XR,支持Turboboot,不过看了下AUT的介绍,暂时感觉不出用了这个脚本后会省多少功夫

https://www.youtube.com/watch?v=2DgXPi0Ink4

这个脚本不能在windows下调用,MAC,linux和类Unix系统都可以用
因为脚本用到pexpect模块,这个模块是纯的python模块,依赖pty 模块,pty模块是任何Posix系统标准库的一部分
下面是使用前的一些基本步骤,有兴趣的童鞋可以试试这个脚本

1. 下载后执行,有报错

x-mac:accelerated upgrade frank$ ./accelerated_upgrade -h
-bash: ./accelerated_upgrade: /router/bin/python: bad interpreter: No such file or directory

完整阅读

Taking a Vacation: Paying Up

下面是”taking a vacation”中最后部分“Paying Up”,下面是脚本流程:

1. 首先用函数hotel_cost()算出宾馆总费用bill
2. 由于手头紧,所以只付一半钱,也就是bill/2;另一半分期付款,并产生税费,由函数add_monthly_interest()计算得出
3. 第一次调用make_payment(),算出交了一半的钱,扣除利息,还剩下多少
4. 第二次调用make_payment(),再付100元,扣除利息,还剩下多少

注:这里可以把利息的计算公式和部分程序优化一下,就可以用于非常简单但很实用的贷款利息计算工具。
完整阅读

TypeError: unsupported operand type(s) for -: ‘str’ and ‘int’

这段代码是在Taking a Vacation中的“Plan Your Trip!”小节
按照要求,我定义了4个函数,程序流程是这样的:
1. 分别赋3个值给变量city,days和spending_money
2. 用这3个变量调用函数trip_cost()
3. 在函数trip_cost()中返回旅行的总花费,包括住宿费用,飞机费用和租车费用,这些费用用另外3个函数计算
完整阅读

Codecademy Python – “Almost Oneday”

最近在学习Codecademy中的python,可以对python有个全面简单的了解,开始很简单,但是做到PygLatin的“Almost Oneday!”这节时,发现总是有问题,查了一些资料,总算找到原因了,这个脚本相当于是对字符串部分做的一个小总结。

需求:

1. 提示用户输入内容,只能是英文字母,如果为空或者数字则提示(既有数字又有字母没有做判定,都算是非字母)
2. 判断用户输入的字符串首字母是否为元音
3. 如果为元音,则在字符串后加上“ay”,E.g:如果用户输入“area”->“areaay”
4. 如果首字母为辅音字母,则将该字符串首字母移动结尾,并加上“ay”,Eg:如果用户输入“test”->“esttay”
完整阅读

blonde teen swallows load.xxx videos