Archive

标签为 ‘IOX’的文章

ASR9k + Freeradius

Refer to IOX + Freeradius article that very less on Internet and lots of IOS with Freeradius, after study that, I summarized that by follow:

1: Install freeradius
You need install free radius first, ignore the part, you can check it by yourself or check my last article <RHEL7 install freeradius>

2: Config freeradius
clients.conf

[root@frank radius]# more /etc/raddb/clients.conf
client 10.x.x.x {
        secret = cisco123
        shortname = iox-5.2.2
        nas_type = cisco
}

users

Notes: as follow, we can assign a group for user “frank”, now priv5 is custom group, you can assign default group, e.g:
Cisco-avpair = “shell:task=#netadmin,#sysadmin,#cisco-support”

Btw, you can direct defined priv15 by follow:
Cisco-AVPair = “shell:priv-lvl=15”

Or direct defined cmd by follow:
Cisco-AVpair = “shell:cmd=show”

If you assign cisco-support group first, and then to limit command by “cmd=show”, cmd will unavailable; and vice versa.

[root@frank radius]# more /etc/raddb/users
frank   Cleartext-Password := "frank"
                Service-Type = NAS-Prompt-User,
                Reply-Message = "Hello!",
                Login-Service = Telnet,
                Cisco-AVPair = "shell:tasks*=#priv5,"

完整阅读

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

完整阅读

How to decode TCP, UDP and RAW for IOS-XR

做为工程师,常常遇到一些协议交互的问题,需要确认数据包的具体信息,这时常常会用到几种方法:
1. SPAN抓包
对于这种方法,结果分析起来最方便,但操作过程最麻烦
2. debug
这种方法最直观,但是debug数据如果非常多,会影响设备的正常运行

下面就是采用其他方法来达成这种需求,虽然用的是udp来说明,但是同样适用于TCP和RAW:

RP/0/RP1/CPU0:CRS2(config)#udp directory /tmp/udp
RP/0/RP1/CPU0:CRS2(config)#commit
RP/0/RP1/CPU0:CRS2(config)#ipv4 access-list hsrp-packet
RP/0/RP1/CPU0:CRS2(config-ipv4-acl)#20 permit udp any eq 1985 any eq 1985
RP/0/RP1/CPU0:CRS2(config-ipv4-acl)#30 deny ipv4 any any
RP/0/RP1/CPU0:CRS2(config-ipv4-acl)#exit
RP/0/RP1/CPU0:CRS2(config)#ipv6 access-list v6-filter
RP/0/RP1/CPU0:CRS2(config-ipv6-acl)#10 deny ipv6 any any
RP/0/RP1/CPU0:CRS2(config-ipv6-acl)#exit
RP/0/RP1/CPU0:CRS2(config)#commit
RP/0/RP1/CPU0:CRS2(config)#exit
RP/0/RP1/CPU0:CRS2#debug udp packet v4-access-list hsrp-packet v6-access-list v6-filter hex control-block location x/x/cpu0

You can check the capture by follow patch:
RP/0/RP1/CPU0:CRS2#run
# cd /tmp/udp
#ls
#more xxxx

AAA认证实列分析

aaa new-model
!—激活AAA访问控制
aaa authentication login default tacacs+ local
①用户登录时默认起用Tacacs+(这个是默认的名字,可以通过命令更改这个默认列表名)做AAA认证,不成功就用本地数据库(username);

② 当vty上设了pssword时,只有在local后面加上line才起作用,这时登录界面还是以username开头,这时用户名和密码都是在vty设的password密码,如pass zy;登录时,username:zy / pssword:zy,这样进入用户exec,然后通过在router上设置的enable进入特权exec;

③如果在列表最后加none,那么就不需要认证直接进入用户exec界面,然后再根据enable密码进入特权exec;
aaa authentication login vty local
!—列表名为vty,调用才能生效,如logging authen vty,加了前面那句后,这句加上就没什么意义了
aaa authentication enable default group tacacs+ enable
!—enable密码的授权交给tacacs+,如果失败,用本地enable密码进行验证
完整阅读

blonde teen swallows load.xxx videos