This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: IOS | |
user: aimless | |
gather_facts: no | |
tasks: | |
- name: ter len 0 | |
raw: ter len 0 | |
- name: show ins status | |
raw: show int status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more /etc/dhcp/dhclient-exit-hooks | |
#!/bin/bash | |
FIRST=`/sbin/ifconfig eth0|grep -i global|cut -d ":" -f2,3,4,5` | |
SECOND=`/sbin/ifconfig eth0|grep -i global|cut -d ":" -f6,7,8,9|cut -d "/" -f1` | |
IPV6=$FIRST:a$SECOND | |
for SUFFIX in `echo {0..9}`;do ifconfig eth0 inet6 add $IPV6$SUFFIX/64 > /dev/null 2>&1; done; | |
for SUFFIX in `echo {a..f}`;do ifconfig eth0 inet6 add $IPV6$SUFFIX/64 > /dev/null 2>&1; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more /etc/dhcp/dhclient-eth0.conf | |
send vendor-class-identifier "anaconda-Linux 2.6.32-358.el6.x86_64 x86_64"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config firewall policy | |
edit 13 | |
set srcintf "VLAN-200" | |
set dstintf "wan1" | |
set srcaddr "192.168.200.0/24" | |
set dstaddr "all" | |
set action accept | |
set utm-status enable | |
set identity-based enable | |
set nat enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config firewall policy": { | |
"13": { | |
"srcintf": "VLAN-200", | |
"dstintf": "wan1", | |
"srcaddr": "192.168.200.0/24", | |
"dstaddr": "all", | |
"action": "accept", | |
"utm-status": "enable", | |
"identity-based": "enable", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RP/0/0/CPU0:ios#show running-config | |
Wed Apr 2 13:37:49.326 UTC | |
Building configuration... | |
!! IOS XR Configuration 5.1.1 | |
!! No configuration change since last restart | |
! | |
interface MgmtEth0/0/CPU0/0 | |
shutdown | |
! | |
interface GigabitEthernet0/0/0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# screen /dev/ttyS0 | |
!!!!!!!!!!!!!!!!!!!! NO root-system username is configured. Need to configure root-system username. !!!!!!!!!!!!!!!!!!!! | |
--- Administrative User Dialog --- | |
Enter root-system username: aimless | |
Enter secret: | |
Enter secret again: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cisco@onepk:~/onePK-sdk-1.2.0.173/python/tutorials/session$ ./SessionTutorial.py -a 10.10.10.110 -R /home/cisco/ca.pem | |
Enter Username : xxxxxx | |
Enter Password : | |
INFO:onep:SessionTutorial: | |
********* INITIALIZE AND CONNECT ******* | |
INFO:onep:SessionTutorial:Got a NetworkElement - | |
NetworkElement [ 10.10.10.110 ] | |
INFO:onep:SessionTutorial:Successfully connected to NetworkElement - | |
NetworkElement [ 10.10.10.110 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cisco@onepk:~/study-onepk$ cat ../onePK-sdk-1.2.0.173/python/tutorials/BaseTutorial.py | |
#!/usr/bin/env python | |
# Copyright (c) 2010-2013 by Cisco Systems, Inc. | |
# | |
# THIS SAMPLE CODE IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY | |
# BY CISCO SOLELY FOR THE PURPOSE of PROVIDING PROGRAMMING EXAMPLES. | |
# CISCO SHALL NOT BE HELD LIABLE FOR ANY USE OF THE SAMPLE CODE IN ANY | |
# APPLICATION. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from onep.element import * | |
from onep.interfaces import * | |
from onep.routing import * | |
def getRouteList(network_element): | |
# 対象機器のルーティングオブジェクトを取得する |
OlderNewer