Skip to content

Instantly share code, notes, and snippets.

View rohitthakur2590's full-sized avatar

Rohit Thakur rohitthakur2590

View GitHub Profile
---
- name: IOS_BGP
hosts: ios-lab
tasks:
- name: Configure global BGP
cisco.ios.ios_bgp:
config:
bgp_as: 65000
router_id: 192.168.1.1
@rohitthakur2590
rohitthakur2590 / junos_running_config.txt
Created April 1, 2021 14:37
running config before purge or delete operation
vagrant@vsrx# show routing-options autonomous-system
65534 loops 3 asdot-notation;
vagrant@vsrx# show protocols bgp
precision-timers;
advertise-from-main-vpn-tables;
holddown-all-stale-labels;
description "This is configured with Junos_bgp resource module";
accept-remote-nexthop;
---
- name: Gtaher facts
hosts: junos-lab
collections:
- junipernetworks.junos
tasks:
- name: Get junos Facts
junipernetworks.junos.junos_facts:
gather_subset: all
gather_network_resources: all
Tracing command fsck_ufs pid 45 tid 100112 td 0xfffff80003d9f560
sched_switch() at sched_switch+0x308/frame 0xfffffe0000210b60
mi_switch() at mi_switch+0xd2/frame 0xfffffe0000210b90
critical_exit() at critical_exit+0x7e/frame 0xfffffe0000210bb0
lapic_handle_timer() at lapic_handle_timer+0xb1/frame 0xfffffe0000210bf0
Xtimerint() at Xtimerint+0x8c/frame 0xfffffe0000210bf0
--- interrupt, rip = 0x800b75522, rsp = 0x7fffffffe900, rbp = 0x7fffffffe930 ---
Tracing command sh pid 42 tid 100120 td 0xfffff80003dbd560
sched_switch() at sched_switch+0x308/frame 0xfffffe00002386c0
TASK [network-image-builder : Bootstrap VM] *************************************************************************************************************************************************************************************************
task path: /home/rothakur/ansible-collections/collections/ansible_collections/ansible-network/network-image-builder/tasks/vsrx/19.2R1/bootstrap.yaml:2
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: rothakur
<127.0.0.1> EXEC /bin/sh -c 'echo ~rothakur && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/rothakur/.ansible/tmp `"&& mkdir "` echo /home/rothakur/.ansible/tmp/ansible-tmp-1616389994.1730797-132887-63306123569430 `" && echo ansible-tmp-1616389994.1730797-132887-63306123569430="` echo /home/rothakur/.ansible/tmp/ansible-tmp-1616389994.1730797-132887-63306123569430 `" ) && sleep 0'
Using module file /home/rothakur/.local/lib/python3.9/site-packages/ansible/modules/expect.py
<127.0.0.1> PUT /home/rothakur/.ansible/tmp/ansible-local-132637694ph
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": "telnet localhost 8888",
"delta": "0:10:00.116260",
"end": "2021-03-18 14:50:17.521929",
"invocation": {
"module_args": {
"chdir": null,
"command": "telnet localhost 8888",
"creates": null,
@rohitthakur2590
rohitthakur2590 / parsed.txt
Created March 16, 2021 11:09
junos_bgp_global parsed operation output
===============================
OUTPUT:
"parsed": {
"accept_remote_nexthop": true,
"add_path_display_ipv4_address": true,
"advertise_bgp_static": {
"policy": "static-to-bgp"
},
"advertise_from_main_vpn_tables": true,
@rohitthakur2590
rohitthakur2590 / config_to_be_parsed.txt
Created March 16, 2021 11:04
Junos appliance BGP config in xml format
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="urn:uuid:0cadb4e8-5bba-47f4-986e-72906227007f">
<configuration changed-seconds="1590139550" changed-localtime="2020-05-22 09:25:50 UTC">
<version>18.4R1-S2.4</version>
<protocols>
<bgp>
<precision-timers />
<advertise-from-main-vpn-tables />
<holddown-all-stale-labels />
<description>This is configured with Junos_bgp resource module</description>
@rohitthakur2590
rohitthakur2590 / rendered.txt
Created March 16, 2021 10:39
junos_bgp_global rendered operation output
- name: Render the provided configuration.
junipernetworks.junos.junos_bgp_global:
config:
accept_remote_nexthop: true
add_path_display_ipv4_address: true
advertise_from_main_vpn_tables: true
advertise_inactive: true
as_number: '65534'
asdot_notation: true
@rohitthakur2590
rohitthakur2590 / config_to_be_rendered.txt
Created March 16, 2021 10:33
structured config to be rendered for junos_bgp_global config
accept_remote_nexthop: true
add_path_display_ipv4_address: true
advertise_from_main_vpn_tables: true
advertise_inactive: true
as_number: '65534'
asdot_notation: true
authentication_algorithm: md5
bgp_error_tolerance:
malformed_route_limit: 20000000
bmp: