Skip to content

Instantly share code, notes, and snippets.

Avatar

Rohit Thakur rohitthakur2590

View GitHub Profile
@rohitthakur2590
rohitthakur2590 / bgp_address_family_parsed_output.txt
Created Jun 21, 2021
Blog Post Junos BGP address family parsed operation log
View bgp_address_family_parsed_output.txt
===============================
OUTPUT:
"parsed": {
"groups": [
{
"address_family": [
{
"af_type": [
{
@rohitthakur2590
rohitthakur2590 / bgp_address_family_running_config.txt
Created Jun 21, 2021
Blog Post Junos BGP address family running config to be parsed
View bgp_address_family_running_config.txt
<?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>
<group>
<name>external</name>
<family>
<inet>
@rohitthakur2590
rohitthakur2590 / bgp_address_family_rendered_output.txt
Created Jun 21, 2021
Blog Post Junos rendered Operation output
View bgp_address_family_rendered_output.txt
"rendered": "<nc:protocols xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">
<nc:bgp><nc:group><nc:name>internal</nc:name><nc:family><nc:evpn><nc:signaling>
<nc:accepted-prefix-limit><nc:maximum>20</nc:maximum><nc:teardown>
<nc:limit-threshold>98</nc:limit-threshold><nc:idle-timeout><nc:timeout>2001</nc:timeout>
</nc:idle-timeout></nc:teardown></nc:accepted-prefix-limit><nc:damping/>
<nc:defer-initial-multipath-build><nc:maximum-delay>2</nc:maximum-delay></nc:defer-initial-multipath-build>
</nc:signaling></nc:evpn></nc:family><nc:neighbor><nc:name>10.10.10.1</nc:name><nc:family><nc:evpn>
<nc:signaling><nc:accepted-prefix-limit><nc:maximum>20</nc:maximum></nc:accepted-prefix-limit>
</nc:signaling></nc:evpn><nc:inet><nc:unicast><nc:extended-nexthop/><nc:extended-nexthop-color/>
<nc:local-ipv4-address>192.168.56.120</nc:local-ipv4-address></nc:unicast></nc:inet></nc:family>
@rohitthakur2590
rohitthakur2590 / bgp_address_family_specific_delete_log.txt
Last active Jun 21, 2021
Blog Post Junos BGP address family delete specific operation
View bgp_address_family_specific_delete_log.txt
vagrant@vsrx# show protocols bgp
family inet {
unicast {
local-ipv4-address 192.168.122.40;
extended-nexthop;
extended-nexthop-color;
}
flow {
prefix-limit {
maximum 15;
@rohitthakur2590
rohitthakur2590 / bgp_address_family_overridden_log.txt
Created Jun 21, 2021
Blog_Post_Junos bgp address_family_config_after_overridden_state_log
View bgp_address_family_overridden_log.txt
after Device Config:
=====================
vagrant@vsrx# show protocols bgp
family inet {
unicast {
local-ipv4-address 192.168.122.40;
extended-nexthop;
extended-nexthop-color;
}
flow {
View bgp_address_family_before_overridden_deviation
--- before
+++ after
@@ -10,24 +10,51 @@
"address_family[1].af_type[0].legacy_redirect_ip_action.send": true,
"address_family[1].af_type[0].loops": 4,
"address_family[1].af_type[0].no_install": true,
- "address_family[1].af_type[0].output_queue_priority_expedited": true,
+ "address_family[1].af_type[0].prefix_limit.forever": true,
+ "address_family[1].af_type[0].prefix_limit.limit_threshold": 100,
+ "address_family[1].af_type[0].prefix_limit.maximum": 15,
@rohitthakur2590
rohitthakur2590 / bgp_address_family_fact_diff.txt
Created Jun 21, 2021
Junos BGP address family fact diff
View bgp_address_family_fact_diff.txt
- name: Gather current BGP address family configuration from the device
junipernetworks.junos.junos_bgp_address_family:
state: gathered
register: result
- name: Find out diff between intended and current configuration
ansible.utils.fact_diff:
before: "{{ bgp_address_family|ansible.utils.to_paths }}"
after: "{{ result['gathered']|ansible.utils.to_paths }}"
@rohitthakur2590
rohitthakur2590 / relpaced_state_input.txt
Created Jun 21, 2021
bgp_address_family replaced yaml content
View relpaced_state_input.txt
address_family:
- af_type:
- accepted_prefix_limit:
idle_timeout_value: 2001
limit_threshold: 98
maximum: 20
damping: true
defer_initial_multipath_build:
maximum_delay: 2
type: signaling
@rohitthakur2590
rohitthakur2590 / replaced_output.txt
Last active Jun 21, 2021
junos bgp_address_family replaced operation logs
View replaced_output.txt
Before Device Config:
=====================
vagrant@vsrx# show routing-options
autonomous-system 65534 loops 3 asdot-notation;
vagrant@vsrx# show protocols bgp
family inet {
unicast {
local-ipv4-address 9.9.9.9;
extended-nexthop;
@rohitthakur2590
rohitthakur2590 / merged.txt
Created Jun 17, 2021
Junos bgp address family merged operation log
View merged.txt
Before Device Config:
=====================
vagrant@vsrx# show routing-options
autonomous-system 65534 loops 3 asdot-notation;
vagrant@vsrx# show protocols bgp
family inet {
flow {
loops 4;
no-install;