Netconf for Peering Automation. NANOG 64 San Francisco Tom Paseka

Similar documents
NETCONF Protocol. Restrictions for the NETCONF Protocol. Information About the NETCONF Protocol

Peering observations on security and resiliency at IXPs Greg Hankins, AS NANOG 67

Control Plane Protection

InvalidRoutesReporter Documentation

NETCONF Interoperability Testing

IPv6 Transition Mechanisms

BGP NSF Awareness. Finding Feature Information

Information About IPv6 Multicast Address Family Support for. Multiprotocol BGP. Finding Feature Information

Configuring FlexVPN Spoke to Spoke

IPv6 Transition Mechanisms

Module 18 Transit. Objective: To investigate methods for providing transit services. Prerequisites: Modules 12 and 13, and the Transit Presentation

Managing Service Requests

Module 19 Internet Exchange Points

IPv6 Module 6x ibgp and Basic ebgp

Verifying Wide-Area Routing Configuration

The Design and Implementation of OpenBGPd

Lab Guide 2 - BGP Configuration

Introduction to OpenConfig

IPv6 Module 6 ibgp and Basic ebgp

BGP mvpn BGP safi IPv4

NETCONF Client GUI. Client Application Files APPENDIX

IPv6 Implementation fundamentals for ISPs

Network Automation at Oracle+Dyn NANOG on the Road Boston, 14 Sept 2017

2016/09/07 08:37 1/5 Internal BGP Lab. Set up Internal BGP (ibgp) within the each Group autonomous system to carry routing information within the AS.

Module 6 ibgp and Basic ebgp

BGP Origin AS Validation

Internet Routing Registry

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Connecting to a Service Provider Using External BGP

BGP and the Internet

BGP Part-1.

BGP Event-Based VPN Import

Introduction to IP Routing. Geoff Huston

BGP-TE APPLICATION LEVEL TOPOLOGY INTELLIGENCE

BGP Dynamic Neighbors

Testing Documentation

Manage Your Inventory

DREN IPv6 Implementation Update

Unsupported Commands in Cisco IOS Release 12.2(25)EX

RADIUS Change of Authorization Support

LARGE SCALE IP ROUTING

BGP-MVPN SAFI 129 IPv6

2016/01/17 04:05 1/19 Basic BGP Lab

Module 2 More ibgp, and Basic ebgp Configuration

Module 4 BGP-LS Configuration Lab

Multi Topology Routing Truman Boyes

Internet Engineering Task Force (IETF) Juniper Networks K. Watsen Watsen Networks R. Wilton Cisco Systems March 2019

SSH Device Manager user guide.

Module 6 IPv6 ibgp and Basic ebgp

Network Working Group Request for Comments: 1998 Category: Informational cisco Systems August 1996

BGP made easy. John van Oppen Spectrum Networks / AS11404

Deployment Guide for SRX Series Services Gateways in Chassis Cluster Configuration

Module 10 An IPv6 Internet Exchange Point

Auto-export Explanation and Example. Jack W. Parks, IV Sr. Networks Engineer Juniper Networks 6/23/2009

Network Automation using modern tech. Egor Krivosheev 2degrees

IPv6 Security Safe, Secure, and Supported.

BGP Event-Based VPN Import

IOS Implementation of the ibgp PE CE Feature

Please review the Infoblox CCS Scripting Guide for more information on the above optional statements

BGP Multihoming ISP/IXP Workshops

Junos Reference Guide. JUNOsReference. 1 P a g e

Segment Routing With IS-IS v4 Node SID

BGP Scaling (RR & Peer Group)

Configuring SDM Templates

Segment Routing on Cisco Nexus 9500, 9300, 9200, 3200, and 3100 Platform Switches

Manage Your Device Inventory

BGP Next Hop Unchanged

First the Basics Binary Arithmetic

Remote Access MPLS-VPNs

BGP Filtering Myths Legends and Reality: Peer Filtering in the Modern Backbone

How Do I Manage All of This?! Eliot Lear Cisco Systems

Prevent DoS using IP source address spoofing

Juniper JN Enterprise Routing and Switching Support Professional (JNCSP-ENT)

2015/07/23 23:32 1/8 More ibgp and Basic ebgp

NetBrain Workstation Live Network Access Guide How NetBrain Accesses the Live Network

Data Plane Protection. The googles they do nothing.

IETF RFCs Supported by Cisco NX-OS Unicast Features Release 6.x

LISP Multicast. Finding Feature Information. Prerequisites for LISP Multicast

IPv6 Deployment Experiences

Could IXPs Use OpenFlow To Scale? Ivan Pepelnjak Chief Technology Advisor NIL Data Communications

YANG Modeling: The Good, The Bad, and The Ugly

Monitoring BGP. Configuring the Router

Unsupported Commands in Cisco IOS Release 12.2(25)SEE

By David Roy

Introduction to Computer Networks

Finding Support Information for Platforms and Cisco IOS Software Images

CCIE R&S v5.0. Troubleshooting Lab. Q1. PC 110 cannot access R7/R8, fix the problem so that PC 110 can ping R7

BGP Multihoming Techniques

NETCONF Interoperability Testing

Module 12 Multihoming to the Same ISP

I2RS Protocol. I2RS built for High performance. Sue Hares. Not the Pizza box CLI

BGP Best External. Finding Feature Information

ForeScout CounterACT. Configuration Guide. Version 8.12

Cisco Exam Questions & Answers

Network Configuration Example

Mediascope Programmers Guide

BGP AS-Override Split-Horizon

Configuring SDM Templates

CounterACT Switch Plugin

Module 16 An Internet Exchange Point

Transcription:

Netconf for Peering Automation NANOG 64 San Francisco Tom Paseka

Old Ways

Old Ways Manual input Very time consuming / manpower heavy Prone to human error: Typo Invalid and inconsistent input Route leaks

Old Ways Manual input with templates Still prone to human error Lacks validation Copy and paste error still prone to all the errors from manual input

Old Ways Expect Inelegant solution, though tried and tested Screen scraping, slow Security can be an issue (Where are you keeping your password?) Scripting anything more complicated becomes very time consuming expect router#

Old Ways Preconfiguration Pre-configure every peer on an internet exchange Set up peers in passive state (save CPU) But you have to track once they ve been setup Doesn t help you for individual settings (prefix-limit, md5) LOADS of irrelevant configuration on your device Quality of data is an issue (peeringdb) Without a better way to input, still prone to human error.

Old Ways Preconfiguration Pre-configure every peer on an internet exchange Set up peers in passive state (save CPU) But you have to track once they ve been setup Doesn t help you for individual settings (prefix-limit, md5) LOADS of irrelevant configuration on your device Quality of data is an issue (peeringdb) Without a better way to input, still prone to human error.

New Recipe

New Recipe NetConf (RFC 4741, RFC 6241, et. al) Programming language of choice Jump/Bastion Host Many different ways to cook it all up

Intro to NetConf

Intro to NetConf SNMP was thought to be used for configuration It failed and was never adopted XML configuration base Transactional changes (backup, restore, etc) Configuration validation

Intro to NetConf Request to return the running-configuration <rpc message-id= 1 xmlns="urn:ietf:params:xml:ns:netconf:base:1.0 > <get-config> <source> <running/> </source> </get-config> </rpc>

Intro to NetConf Juniper includes a NetConf handler and examples Its on GitHub! https://github.com/juniper/netconf-perl https://github.com/juniper/netconf-php https://github.com/juniper/netconf-java A lot of examples are available there

Intro to NetConf $./arp.pl h <router.hostname> l <username> -p <password> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos=http://xml.juniper.net/junos/12.3r6/junos> <arp-table-information xmlns="http://xml.juniper.net/junos/12.3r6/junos-arp" style="no-resolve > <arp-table-entry> <mac-address> 64:0e:94:28:02:c0 </mac-address> <ip-address> 10.10.10.50 </ip-address> <interface-name> ae0.900 </interface-name> <arp-table-entry-flags> <none/> </arp-table-entry-flags> </arp-table-information> </rpc-reply> tom@router> show arp no-resolve MAC Address Address Interface Flags 64:0e:94:28:02:c0 10.10.10.50 ae0.900 none tom@router> Router CLI Output

Intro to NetConf This script sends a netconf request, asking for the ARP table on the router my $res = $jnx->get_arp_table_information(no_resolve => 1); In the examples from Juniper, you can change the request, this one is get_arp_table_information. get_route_information in the Juniper Libraries will show you the routing table

Intro to NetConf But XML is ugly. Your favorite scripting language saves the day! A very basic script can convert from ugly XML, to pretty format Going back to the ARP script

Intro to NetConf $ cat arp-parse.php <?php $dom = simplexml_load_file('php://stdin'); echo "MAC Address \t \t IP Address \t Interface \n"; foreach($dom->{'arp-table-information'}->{'arp-table-entry'} as $record){ $mac = str_replace("\n", "", $record->{'mac-address'}); $ip = str_replace("\n", "", $record->{'ip-address'}); $interface = str_replace("\n", "", $record->{'interface-name'}); echo "$mac \t $ip \t $interface \n"; }?>

Intro to NetConf $./arp.pl h <router.hostname> -l <username> p <password> php arp-parse.php MAC Address IP Address Interface 64:0e:94:28:02:c0 10.10.10.50 ae0.900

Getting XML Configuration

Getting XML configuration Juniper has a useful command to see what the XML configuration looks like for beginner show configuration display XML

Getting XML configuration

Getting XML configuration <configuration> <protocols> <bgp> <group> <name>4-public-peers</name> <neighbor> <name>$ipaddr</name> <description>$descr</description> <family> <inet> <unicast> <prefix-limit> <maximum>$pfxcnt</maximum> </prefix-limit> </unicast> </inet> </family> <peer-as>$asn</peer-as> </neighbor> </group> </bgp> </protocols> </configuration>

Getting XML configuration <configuration> <protocols> <bgp> <group> <name>4-public-peers</name> <neighbor> <name>$ipaddr</name> <description>$descr</description> <family> <inet> <unicast> <prefix-limit> <maximum>$pfxcnt</maximum> </prefix-limit> </unicast> </inet> </family> <peer-as>$asn</peer-as> </neighbor> </group> </bgp> </protocols> </configuration>

Getting XML configuration Template is very simple Build out your group (be it Juniper group, Cisco peer-group, whatever) Peer config drops inside that group. There are really only 4 values you need to insert into the template

Pushing Peering Configuration

Pushing Peering Configuration Beginners way write config to a file then push it. Using template above, save it in a text file, Juniper has a handler to push inside :./edit_configuration.pl -l <username> p <password> <config file> <router> Once this is pushed, this handler validates configuration and applies to the running config on the router

Pushing Peering Configuration Intermediate mode write a handler around your own push $ php peer_push.php -h router d Testing Session" ip 1.1.1.1 as 1234 max 250 REQUEST succeeded!! - 0 $ Extra steps Validatie the peer IP/ASN details from external sources Don t troll me for using PHP

Pushing Peering Configuration Advanced Mode: Pulling peer configuration from PeeringDB and other sources for configuration A front end for configuration, validation status Anything you want to build!

Pushing Peering Configuration - Validate

Pushing Peering Configuration - Validate

Summary

Summary It s easy to build the base for automation Even for non-programmers like myself Make the system well, validate and its easy to build on top of it. Using the script, even at the intermediate mode can save minutes per peering session turn up, saving hours and days for large peering deployments

Questions?