Skip to content

Instantly share code, notes, and snippets.

View NilashishC's full-sized avatar
🎯
Focusing

Nilashish Chakraborty NilashishC

🎯
Focusing
View GitHub Profile
tmux new -s <session-name>
New window: C-b + c
Splits: C-b % and C-b "
Change Windows: C-b + w (Or, C-b + p)
Exit from a session: C-b + d
Attach to a session: tmux a -t <session-name>
Verify Fingerprint of Key-Pair generated using AWS:
openssl pkcs8 -in path_to_private_key -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c
Verify public key md5 fingerprint:
ssh-keygen -lf ~/.ssh/id_rsa.pub -E md5
Remove a merge commit but keep the actual work
git rebase -i HEAD^
iosxr_lag_interfaces:
state: ['merged', 'replaced', 'overridden', 'deleted']
config:
- name: <str> (Ether-Bundle name)
members: <list> (List of interfaces that are part of this bundle)
min_active_links: <int> (Set the minimum link criteria for the bundle to be active)
max_active_links: <int> (Set a limit on the number of links that can be active)
load_balancing_hash: ['dst_ip','src_ip'] (Select the hash function used for traffic forwarded over the bundle)
load_interval: <int> (Specify interval for load calculation for an interface)
static_routes:
- address_families:
- afi: ipv4
routes:
- dest: 10.0.0.0/8
next_hops:
- forward_router_address: 192.168.1.1
interface: FastEthernet0/0/0/0
safi: unicast
- afi: ipv4
---
- hosts: aws_csr
gather_facts: no
vars:
backup_directory: ~/Desktop/csr
tasks:
- name: Create Backup Directory
file:
path: "{{ backup_directory }}"
state: directory
---
- hosts: aws_csr
gather_facts: no
tasks:
- name: Configure remote host logging
ios_logging:
dest: host
name: 203.0.113.65
state: present
---
- hosts: aws_csr
gather_facts: no
tasks:
- name: Push golden config to the box
ios_interfaces:
config:
- name: GigabitEthernet1
description: 'OUTBOUND_INTERFACE_1'
mtu: 1600
---
- hosts: iosxr_local
gather_facts: no
tasks:
- iosxr_facts:
gather_subset: min
gather_network_resources:
- static_routes
tags:
- facts
---
- hosts: nxos
gather_facts: no
tasks:
- nxos_l3_interfaces:
state: deleted
tags:
- deleted
- nxos_l3_interfaces:
---
- hosts: xrv-9k-612
gather_facts: no
vars:
acl_to_replace:
- name: acl_4
aces:
- sequence: 10
source:
any: True