SlideShare a Scribd company logo
1 of 95
Event-driven Network Automation and
Orchestration
Mircea Ulinic
Cloudflare, London
APRICOT 2019
Daejeon, South Korea
1
2
Mircea Ulinic
● Network software engineer at Cloudflare
● Previously research and teaching assistant at EPFL, Switzerland
● Member and maintainer at NAPALM Automation
● SaltStack contributor of the year 2017
● O’Reilly author
● OpenConfig representative
● https://mirceaulinic.net/
@mirceaulinicmirceaulinic
Agenda
● Why automate and how to start
● Vendor-agnostic automation using Salt
● YANG
● Using napalm-logs for event-driven
network automation
● Live demo
3
To automate, I have to learn Python or another
programming language.
4
To automate, I have to learn Python or another
programming language.
5
W
RONG!
Do not jump into implementation.
Design first!
6
What’s the best tool?
7
What’s the best tool?
8
Wrong question.
What’s the best tool for my network?
9
What’s the best tool for my network?
● How large is your network?
● How many platforms / operating systems?
● How dynamic?
● External sources of truth? e.g., IPAM
● Do you need native caching? REST API?
● Event-driven automation?
● Community
10
● Very scalable
● Concurrency
● Event-driven automation
● Easily configurable & customizable
● Native caching and drivers for useful tools
● One of the friendliest communities
● Great documentation
11
Why Salt
Why Salt
Orchestration vs. Automation
https://flic.kr/p/5EQe2dCC BY 2.0
12
Why Salt
“
In SaltStack, speed isn’t a byproduct, it is a design goal. SaltStack was created as
an extremely fast, lightweight communication bus to provide the foundation for
a remote execution engine.
SaltStack now provides orchestration, configuration management, event
reactors, cloud provisioning, and more, all built around the SaltStack
high-speed communication bus.
”
13
https://docs.saltstack.com/en/getstarted/speed.html
… + cross-vendor network automation from 2016.11 (Carbon)
Who’s Salty
14
Vendor-agnostic API: NAPALM
15
NAPALM
(Network Automation and Programmability Abstraction Layer with Multivendor support)
https://github.com/napalm-automation
16
NAPALM integrated in Salt: Carbon
https://docs.saltstack.com/en/develop/topics/releases/2016.11.0.html
17
NAPALM integrated in Salt: Nitrogen
https://docs.saltstack.com/en/develop/topics/releases/nitrogen.html
Vendor-agnostic automation (1)
18
$ sudo salt iosxr-router net.arp
iosxr-router:
----------
out:
|_
----------
age:
1620.0
interface:
Bundle-Ether4
ip:
10.0.0.2
mac:
00:25:90:20:46:B5
|_
----------
age:
8570.0
$ sudo salt junos-router net.arp
junos-router:
----------
out:
|_
----------
age:
129.0
interface:
ae2.100
ip:
10.0.0.1
mac:
84:B5:9C:CD:09:73
|_
----------
age:
1101.0
Vendor-agnostic automation (2)
19
$ sudo salt junos-router state.sls ntp
junos-router:
----------
ID: oc_ntp_netconfig
Function: netconfig.managed
Result: True
Comment: Configuration changed!
Started: 10:53:25.624396
Duration: 3494.153 ms
Changes:
----------
diff:
[edit system ntp]
- peer 172.17.17.2;
[edit system ntp]
+ server 10.10.10.1 prefer;
+ server 10.10.10.2;
- server 172.17.17.1 version 2 prefer;
$ sudo salt iosxr-router state.sls ntp
iosxr-router:
----------
ID: oc_ntp_netconfig
Function: netconfig.managed
Result: True
Comment: Configuration changed!
Started: 11:02:39.162423
Duration: 3478.683 ms
Changes:
----------
diff:
---
+++
@@ -1,4 +1,10 @@
+ntp
+ server 10.10.10.1 prefer
+ server 10.10.10.2
!
Vendor-agnostic automation: how to
20
● Salt in 10 minutes
● Salt fudamentals
● Configuration management
● Network Automation official Salt docs
● Step-by-step tutorial -- up and running in
60 minutes
● Using Salt at Scale
21
Minion Minion Minion...
https://docs.saltstack.com/en/latest/topics/topology/index.html
Introduction to Salt
Salt Architectures: typical hub and spoke
Master
Minion Minion Minion
Device to be
managed
The name of
the Salt
process
22
Master
Minion Minion Minion...
Master Master
Introduction to Salt
Salt Architectures: multiple Masters
MasterMaster Master
Minion Minion Minion
23
Minion Minion Minion...
Introduction to Salt
Salt Architectures: Masterless
Minion Minion Minion
24
device device device...
https://docs.saltstack.com/en/latest/topics/topology/index.html
Introduction to Salt
Salt Architectures: Proxy Minions
Master
Proxy
Minion
Proxy
Minion
Proxy
Minion
HTTP
SSH
NETCONF
Introduction to Salt
Nomenclature
25
Salt in 10 minutes: https://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html
Pillar
Free-form data that can be used to organize configuration
values or manage sensitive data, e.g.: interface details,
NTP peers, BGP config...
Data provided by the user (as file, HTTP API, database, etc.)
Grains
Data collected from the device, e.g., device model, vendor,
uptime, serial number etc.
Salt handles this, you don’t need to do anything
Introduction to Salt
Nomenclature
26
SLS
File format used by Salt in various subsystems.
In can be used for both data and automation logic.
By default, SLS = Jinja + YAML.
Can be changed to any other Renderer combination.
Introduction to Salt
SLS
27
list_with_ten_elements:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
list_with_ten_elements:
{%- for i in range(10) %}
- {{ i }}
{%- endfor %}
#!py
def run():
return {
'list_with_ten_elements': [ i
for i in range(10) ]
}
The following SLS files are equivalent:
Pure YAML Default SLS (Jinja + YAML) Other combination: Pure Python
YANG
28
YANG
29
● Data modeling language
○ A language of its own
○ It is not XML, JSON, YAML etc.
○ It describes hierarchies and the types of data
● Standardised in RFC 6020
● Aims to solve the vendor discrepancy in
terms of operational and configuration
data
YANG for dummies:
https://napalm-automation.net/yang-for-dummies/
YANG
A quick example
30
// module name
module napalm-star-wars {
grouping personal-data {
leaf name {
type string;
}
leaf age {
type age;
}
}
// this is the root object defined by the model
container universe {
list individual {
// identify each individual by using the name as key
key "name";
uses personal-data;
}
}
}
YANG
A quick example: the structure
31
$ pyang -f tree napalm-star-wars.yang
module: napalm-star-wars
+--rw universe
+--rw individual* [name]
+--rw name string
+--rw age? age
YANG
A quick example
32
{
"universe": {
"individual": {
"Obi-Wan Kenobi": {
"age": 57,
"name": "Obi-Wan Kenobi"
},
"Luke Skywalker": {
"age": 19,
"name": "Luke Skywalker"
},
"Darth Vader": {
"age": 42,
"name": "Darth Vader"
},
"Yoda": {
"age": 896,
"name": "Yoda"
}
}
}
}
A JSON document
following the hierarchy
defined in the YANG
model defined
previously.
YANG
A quick example
33
<universe>
<individual>
<Luke Skywalker>
<age>
19
</age>
<name>
Luke Skywalker
</name>
</Luke Skywalker>
<Darth Vader>
<age>
42
</age>
<name>
Darth Vader
</name>
<Yoda>
<age>
896
</age>
<name>
Yoda
</name>
</Yoda>
</individual>
A XML document
following the hierarchy
defined in the YANG
model defined
previously.
YANG
Standards Organizations
34
● OpenConfig
○ OpenConfig is an informal working group of
network operators
○ YANG models available at
https://github.com/openconfig/public
● IETF
● IEEE
● BBF (Broadband Forum)
Event-driven
automation
35
Event-driven network automation (1)
36
Event-driven network automation (1)
37
False
Event-driven network automation (2)
38
● Several of ways your network is trying to
communicate with you
● Millions of messages
Event-driven network automation (3)
39
● SNMP traps
● Syslog messages
● Streaming telemetry
Event-driven network automation (4)
40
Event-driven network automation
Streaming Telemetry
41
● Push notifications
○ Vs. pull (SNMP)
● Structured data
○ Structured objects, using the YANG standards
■ OpenConfig
■ IETF
● Supported on very new operating systems
○ IOS-XR >= 6.1.1
○ Junos >= 15.1 (depending on the platform)
Event-driven network automation
Syslog messages
42
<99>Jul 13 22:53:14 device1 xntpd[16015]: NTP Server 172.17.17.1 is Unreachable
<99>2647599: device3 RP/0/RSP0/CPU0:Aug 21 09:39:14.747 UTC: ntpd[262]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost :
172.17.17.1 :The association was removed
● Junos
● IOS-XR
Event-driven network automation
Syslog messages: napalm-logs (1)
43
● Listen for syslog messages
○ Directly from the network devices, via UDP or TCP
○ Other systems: Apache Kafka, ZeroMQ, etc.
● Publish encrypted messages
○ Structured documents, using the YANG standards
■ OpenConfig
■ IETF
○ Over various channels: ZeroMQ, Kafka, etc.
https://napalm-logs.com
Event-driven network automation
Syslog messages: napalm-logs (2)
44
https://napalm-automation.net/napalm-logs-released/
napalm-logs
Network
device
Network
device
Network
device
Kafka
Client
Client
Client
Kafka
ZMQ
Client
Event-driven network automation
Syslog messages: napalm-logs startup
45
$ napalm-logs --listener udp --address 172.17.17.1 --port 5514 --publish-address 172.17.17.2 --publish-port 49017
--publisher zmq --disable-security
More configuration options:
https://napalm-logs.readthedocs.io/en/latest/options/index.html
Event-driven network automation
Syslog messages: napalm-logs clients
46
More complete example:
https://github.com/napalm-automation/napalm-logs/blob/master/examples/client_auth.py
import zmq # when using the ZeroMQ publisher
import napalm_logs.utils
server_address = '127.0.0.1' # IP
server_port = 49017 # Port for the napalm-logs publisher interface
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect('tcp://{address}:{port}'.format(address=server_address,
port=server_port))
socket.setsockopt(zmq.SUBSCRIBE, '') # subscribe to the napalm-logs publisher
while True:
raw_object = socket.recv() # binary object
print(napalm_logs.utils.unserialize(raw_object)) # deserialize
Event-driven network automation
Syslog messages (again)
47
<99>Jul 13 22:53:14 device1 xntpd[16015]: NTP Server 172.17.17.1 is Unreachable
<99>2647599: device3 RP/0/RSP0/CPU0:Aug 21 09:39:14.747 UTC: ntpd[262]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost :
172.17.17.1 :The association was removed
● Junos
● IOS-XR
Event-driven
network automation
Syslog messages:
napalm-logs
structured objects
48
{
"error": "NTP_SERVER_UNREACHABLE",
"facility": 12,
"host": "device1",
"ip": "127.0.0.1",
"os": "junos",
"severity": 4,
"timestamp": 1499986394,
"yang_message": {
"system": {
"ntp": {
"servers": {
"server": {
"172.17.17.1": {
"state": {
"stratum": 16,
"association-type": "SERVER"
}
}
}
}
}
}
},
"yang_model": "openconfig-system"
}
Event-driven network automation
Other raw syslog message example
49
<149>Jun 21 14:03:12 vmx01 rpd[2902]: BGP_PREFIX_THRESH_EXCEEDED: 192.168.140.254 (External AS 4230): Configured maximum
prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master)
<149>2647599: xrv01 RP/0/RSP1/CPU0:Mar 28 15:08:30.941 UTC: bgp[1051]: %ROUTING-BGP-5-MAXPFX : No. of IPv4 Unicast prefixes
received from 192.168.140.254 has reached 94106, max 12500
● Junos
● IOS-XR
50
"yang_message": {
"bgp": {
"neighbors": {
"neighbor": {
"192.168.140.254": {
"afi_safis": {
"afi_safi": {
"inet4": {
"ipv4_unicast": {
"prefix_limit": {
"state": {
"max_prefixes": 140
}
}
},
"state": {
"prefixes": {
"received": 141
}
}
}
}
},
"state": {
"peer_as": "4230"
}
}
}
}
}
},
"yang_model": "openconfig-bgp"
}
Event-driven
network automation
Syslog messages:
napalm-logs
structured objects
Event-driven network automation
napalm-logs key facts to remember
51
● Continuously listening to syslog messages
● Continuously publishing structured data
○ Structure following the YANG standards
■ OpenConfig
■ IETF
Event-driven network automation
Salt event system
52
Salt is a data driven system. Each action (job) performed (manually from the CLI or automatically
by the system) is uniquely identified and has an identification tag:
$ sudo salt-run state.event pretty=True
salt/job/20170110130619367337/new {
"_stamp": "2017-01-10T13:06:19.367929",
"arg": [],
"fun": "net.arp",
"jid": "20170110130619367337",
"minions": [
"junos-router"
],
"tgt": "junos-router",
"tgt_type": "glob",
"user": "mircea"
}
Unique job tag
$ sudo salt junos-router net.arp
# output omitted
Event-driven network automation
Syslog messages: napalm-syslog Salt engine (1)
53
https://docs.saltstack.com/en/latest/ref/engines/all/salt.engines.napalm_syslog.html
engines:
- napalm_syslog:
transport: zmq
address: 172.17.17.2
port: 49017
auth_address: 172.17.17.3
auth_port: 49018
Imports messages from napalm-logs into the Salt event bus
/etc/salt/master
54
{
"error": "NTP_SERVER_UNREACHABLE",
"facility": 12,
"host": "device1",
"ip": "127.0.0.1",
"os": "junos",
"severity": 4,
"timestamp": 1499986394,
"yang_message": {
"system": {
"ntp": {
"servers": {
"server": {
"172.17.17.1": {
"state": {
"stratum": 16,
"association-type": "SERVER"
}
}
}
}
}
}
},
"yang_model": "openconfig-system"
}
(from slide #43)
Event-driven
network automation
Syslog messages:
napalm-logs
structured objects
55
napalm/syslog/junos/NTP_SERVER_UNREACHABLE/edge01.bjm01 {
"error": "NTP_SERVER_UNREACHABLE",
"facility": 12,
"host": "edge01.bjm01",
"ip": "10.10.0.1",
"os": "junos",
"timestamp": 1499986394,
"yang_message": {
"system": {
"ntp": {
"servers": {
"server": {
"172.17.17.1": {
"state": {
"association-type": "SERVER",
"stratum": 16
}
}
}
}
}
}
},
"yang_model": "openconfig-system"
}
Event-driven network
automation
Salt event bus
Using the napalm-syslog Salt engine you can inject
napalm-logs events into the Salt event bus.
See
https://napalm-automation.net/napalm-logs-released/
and
https://mirceaulinic.net/2017-10-19-event-driven-netw
ork-automation/
For more examples
56
reactor:
- 'napalm/syslog/*/NTP_SERVER_UNREACHABLE/*':
- salt://reactor/exec_ntp_state.sls
/etc/salt/reactor/exec_ntp_state.sls
triggered NTP state:
cmd.state.sls:
- tgt: {{ data.host }}
- arg:
- ntp
/etc/salt/master
Matches the event tag
napalm/syslog/junos/NTP_SERVER_UNREACHABLE/edge01.bjm01
$ sudo salt edge01.bjm01 state.sls ntp
CLI Equivalent:
(see slide #20)
Event-driven network automation
Fully automated configuration changes
57
reactor:
- 'napalm/syslog/*/INTERFACE_DOWN/*':
- salt://reactor/if_down_shutdown.sls
- salt://reactor/if_down_send_mail.sls
Shutdown the interface
/etc/salt/master
Matches the event tag
napalm/syslog/junos/INTERFACE_DOWM/edge01.bjm01
(Event pushed when an interface is operationally down)
Event-driven network automation
Fully automated configuration changes & more
Send an email notification
More details at:
https://mirceaulinic.net/2017-10-19-event-driven-network-automation/
58
Network Automation
at Scale: the book
Free download:
https://www.cloudflare.com/network-automation-at-sc
ale-ebook/
Live demo
59
All the files are available on GitHub
https://github.com/mirceaulinic/apricot2019-tutorial
60
Live demo
Topology
Salt
Master
Server
Docker
container
Salt
Proxy
Minion
napalm-logs
Juniper vMX
Amazon EC2
61
Live demo
Topology
Salt
Master
Salt
Proxy
Minion
napalm-logs
Juniper vMX
Amazon EC2
1
2
3
4
1. Syslog
notification
sent to
napalm-logs.
2. Structured
napalm-logs
message on
the Salt bus.
3. Triggered job
execution.
4. Configuration
changed on
the device.
Live demo
Start a Salt Master and
Proxy Minion (1)
62
base:
'*':
- ntp
{{ opts.id }}:
- {{ opts.id }}_pillar
My Pillar Top file
/etc/salt/pillar/top.sls
How to read this: each Minion will load the contents from a file based on it’s ID, e.g., Minion ID
dummy will load the contents from dummy_pillar.sls, etc.
The ntp.sls Pillar is spread to all the Minions (thanks to the *).
Live demo
Start a Salt Master and
Proxy Minion (2)
63
openconfig-system:
system:
ntp:
config:
servers:
server:
17.253.2.125:
config:
association_type: SERVER
prefer: true
The shared Pillar for the NTP configuration, structured as defined in the openconfig-system model
/etc/salt/pillar/ntp.sls
Live demo
Start a Salt Master and
Proxy Minion (3)
64
proxy:
proxytype: napalm
driver: junos
host: example.com
username: test
password: test
The Pillar for the device1 Proxy Minion
/etc/salt/pillar/device1_pillar.sls
Live demo
Start a Salt Master and
Proxy Minion (4)
65
open_mode: true
pillar_roots:
base:
- /etc/salt/pillar
file_roots:
base:
- /etc/salt
- /etc/salt/states
engines:
- napalm_syslog:
address: example.com
port: 17171
disable_security: true
reactor:
- 'napalm/syslog/*/NTP_SERVER_UNREACHABLE/*':
- salt://reactor/exec_ntp_state.sls
The Salt Master config file
/etc/salt/master
The configuration for the napalm-syslog
Salt Engine, to ingest events from
napalm-logs.
Reactor configuration, to trigger a State
execution when there’s a
NTP_SERVER_UNREACHABLE
notification.
Live demo
Start a Salt Master and
Proxy Minion (1)
66
master: salt-master
open_mode: true
multiprocessing: false
The Proxy config file
/etc/salt/proxy
Live demo
Start a Salt Master and
Proxy Minion (1)
67
services:
salt-master:
image: mirceaulinic/salt-master:2017.7.5
hostname: salt-master
container_name: salt-master
environment:
- LOG_LEVEL
volumes:
- ./master:/etc/salt/master
- ./pillar/:/etc/salt/pillar/
- ./states/:/etc/salt/states/
- ./reactor/:/etc/salt/reactor/
network_mode: host
salt-proxy:
image: mirceaulinic/salt-proxy:2017.7.5
hostname: salt-proxy
container_name: salt-proxy
volumes:
- ./proxy:/etc/salt/proxy
environment:
- LOG_LEVEL
- PROXYID
network_mode: host
One Docker container each, using Docker Compose
docker-compose.yml (simplified version)
Share filesystems with the containers,
mounting the files as volumes. This
way, we can edit the Pillars / States /
Reactor etc. files without restarting the
container, but simply edit them locally
and the changes will be reflected inside
the container.
Live demo
Start a Salt Master and
Proxy Minion (2)
68
One Docker container each, using Docker Compose
docker-compose.yml (live version)
services:
salt-master:
image: mirceaulinic/salt-master:2017.7.5
hostname: salt-master
container_name: salt-master
environment:
- LOG_LEVEL
volumes:
- ./master:/etc/salt/master
- ./pillar/:/etc/salt/pillar/
- ./states/:/etc/salt/states/
- ./reactor/:/etc/salt/reactor/
network_mode: host
salt-proxy:
image: mirceaulinic/salt-proxy:2017.7.5
hostname: ${PROXYID}
container_name: salt-proxy-${PROXYID}
volumes:
- ./proxy:/etc/salt/proxy
environment:
- LOG_LEVEL
- PROXYID
network_mode: host
The Proxy Minion ID can be sent
from the Makefile
Live demo
Start a Salt Master and
Proxy Minion (1)
69
master: salt-master
open_mode: true
multiprocessing: false
The Salt Proxy config file
/etc/salt/proxy
70
Live demo
Starting napalm-logs (1)
log_level: info
log_file: cli
port: 17171
listener:
- udp: {}
publisher:
- zmq: {}
disable_security: true
The napalm-logs config file
/etc/napalm/logs
71
Similarly, in a Docker container
docker-compose.yml (live version)
services:
napalm-logs:
image: mirceaulinic/napalm-logs:0.5.0
hostname: napalm-logs
container_name: napalm-logs
environment:
- LOG_LEVEL
volumes:
- ./napalm-logs.conf:/etc/napalm/logs
network_mode: host
ports:
- "49017"
Live demo
Starting napalm-logs (2)
72
set system syslog host 10.10.10.1 port 17171 any any
Live demo
Starting napalm-logs: configure the network box
Where napalm-logs will be
running (listening to the syslog
messages)
As configured in the
napalm-logs.conf config file
For more configuration details for other network operating systems, check the Supported devices
and configuration section in the napalm-logs documentation.
73
The Makefile
export PROXYID ?= dummy
all:
docker-compose up -d
Live demo
Starting all the containers (1)
74
Simply execute
$ make PROXYID=device1
docker-compose up -d
Creating napalm-logs ... done
Creating salt-proxy-device1 ... done
Creating salt-master ... done
Live demo
Starting all the containers (2)
75
All 3 containers should be up and running
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
df9019904036 mirceaulinic/salt-master:2017.7.5 "/bin/sh -c "/usr/lo…" 8 minutes ago Up 8 minutes
salt-master
9feb2f32f864 mirceaulinic/salt-proxy:2017.7.5 "/bin/sh -c "/usr/lo…" 8 minutes ago Up 8 minutes
salt-proxy-device1
bc693428c207 mirceaulinic/napalm-logs:0.5.0 "/bin/sh -c 'napalm-…" 8 minutes ago Up 8 minutes
napalm-logs
Live demo
Starting all the containers (3)
76
From the Master can execute:
$ docker exec -it salt-master bash
root@salt-master:/# salt device1 test.ping
device1:
True
Live demo
Starting all the containers (4) $ docker exec -it salt-master bash
root@salt-master:/# salt device1 route.show
0.0.0.0/0
device1:
----------
comment:
out:
----------
0.0.0.0/0:
|_
----------
age:
113525
current_active:
True
inactive_reason:
last_active:
True
next_hop:
172.31.0.1
77
We should notice napalm-logs events on the
Salt bus:
$ docker exec -it salt-master bash
root@salt-master:/# salt-run state.event pretty=True
Live demo
Starting all the containers
napalm/syslog/junos/USER_ENTER_CONFIG_MODE/edge01.mrs01 {
"_stamp": "2018-05-09T14:05:10.669616",
"error": "USER_ENTER_CONFIG_MODE",
"facility": 23,
"host": "edge01.mrs01",
"ip": "172.31.13.150",
"os": "junos",
"severity": 5,
"timestamp": 1525874708,
"yang_message": {
"users": {
"user": {
"mircea": {
"action": {
"enter_config_mode": true
}
}
}
}
},
"yang_model": "NO_MODEL"
}
78
$ git clone https://github.com/mirceaulinic/apricot2019-tutorial.git
$ cd apricot2019-tutorial
### edit pillar/device1_pillar.sls file, and add your authentication details
$ make PROXYID=device1
Live demo
Reproduce this yourself
Docker and Docker Compose are assumed to be already installed. Otherwise, follow the
installation notes: https://docs.docker.com/install/ and
https://docs.docker.com/compose/install/
79
Live demo
Applying a configuration
change
[edit]
napalm@device1# set system ntp server 1.2.3.4
[edit]
napalm@device1# show | compare
[edit system]
+ ntp {
+ server 1.2.3.4;
+ }
[edit]
napalm@device1# commit
commit complete
80
Live demo
Applying a configuration
change: as seen on the
Salt bus
napalm/syslog/junos/CONFIGURATION_COMMIT_REQUESTED/device1 {
"_stamp": "2018-05-09T14:19:40.733766",
"error": "CONFIGURATION_COMMIT_REQUESTED",
"facility": 23,
"host": "device1",
"ip": "172.31.13.150",
"os": "junos",
"severity": 5,
"timestamp": 1525875578,
"yang_message": {
"users": {
"user": {
"napalm": {
"action": {
"comment": "none",
"requested_commit": true
}
}
}
}
},
"yang_model": "NO_MODEL"
}
81
Live demo
Applying a configuration
change: as seen on the
Salt bus
napalm/syslog/junos/CONFIGURATION_COMMIT_COMPLETED/device1 {
"_stamp": "2018-05-09T14:19:50.235894",
"error": "CONFIGURATION_COMMIT_COMPLETED",
"facility": 23,
"host": "device1",
"ip": "172.31.13.150",
"os": "junos",
"severity": 4,
"timestamp": 1525875587,
"yang_message": {
"system": {
"operations": {
"commit_complete": true
}
}
},
"yang_model": "NO_MODEL"
}
82
napalm@device1> show ntp associations
remote refid st t when poll reach delay offset jitter
===============================================================================
1.2.3.4 .INIT. 16 - - 64 0 0.000 0.000 4000.00
Live demo
The device is unsynchronised
83
Live demo
An NTP server becomes
unreachable
napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1 {
"error": "NTP_SERVER_UNREACHABLE",
"facility": 12,
"host": "device1",
"ip": "172.31.13.150",
"os": "junos",
"severity": 3,
"timestamp": 1525942185,
"yang_message": {
"system": {
"ntp": {
"servers": {
"server": {
"1.2.3.4": {
"state": {
"association-type": "SERVER",
"stratum": 16
}
}
}
}
}
}
},
"yang_model": "openconfig-system"
}
84
[DEBUG ] Sending event: tag = napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1; data = {'_stamp':
'2018-05-10T08:49:58.296950', 'yang_message': {'system': {'ntp': {'servers': {'server': {'1.2.3.4': {'state':
{'association-type': 'SERVER', 'stratum': 16}}}}}}}, 'message_details': {'processId': '22637', 'severity': 3, 'facility':
12, 'hostPrefix': None, 'pri': '99', 'host': 'device1', 'tag': 'xntpd', 'time': '09:13:23', 'date': 'May 10', 'message':
'NTP Server 1.2.3.4 is Unreachable'}, 'facility': 12, 'ip': '172.31.13.150', 'error': 'NTP_SERVER_UNREACHABLE', 'host':
'device1', 'yang_model': 'openconfig-system', 'timestamp': 1525943603, 'os': 'junos', 'severity': 3}
[DEBUG ] Gathering reactors for tag napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1
[DEBUG ] Compiling reactions for tag napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1
[DEBUG ] Rendered data from file: /var/cache/salt/master/files/base/reactor/exec_ntp_state.sls:
triggered NTP state:
local.state.sls:
- tgt: device1
- arg:
- ntp
[DEBUG ] Results of YAML rendering:
OrderedDict([('triggered NTP state', OrderedDict([('local.state.sls', [OrderedDict([('tgt', 'device1')]),
OrderedDict([('arg', ['ntp'])])])]))])
Live demo
The reactor kicks a State execution
(configuration change): Salt Master logs
85
[DEBUG ] Sending event: tag = 20180510084958473615; data = {'_stamp': '2018-05-10T08:49:58.474571', 'minions':
['device1']}
[DEBUG ] Sending event: tag = salt/job/20180510084958473615/new; data = {'tgt_type': 'glob', 'jid':
'20180510084958473615', 'tgt': 'device1', '_stamp': '2018-05-10T08:49:58.474852', 'user': 'root', 'arg': ['ntp'], 'fun':
'state.sls', 'minions': ['device1']}
[DEBUG ] Adding minions for job 20180510084958473615: ['device1']
[INFO ] User root Published command state.sls with jid 20180510084958473615
[DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20180510084958473615', 'tgt': 'device1', 'ret': '',
'user': 'root', 'arg': ['ntp'], 'fun': 'state.sls'}
[INFO ] Got return from device1 for job 20180510084958473615
[DEBUG ] Sending event: tag = salt/job/20180510084958473615/ret/device1; data = {'fun_args': ['ntp'], 'jid':
'20180510084958473615', 'return': {'netconfig_|-oc_ntp_netconfig_|-oc_ntp_netconfig_|-managed': {'comment': 'Configuration
changed!n', 'pchanges': {'diff': '[edit system ntp]n+ server 17.253.2.125 prefer;n- server 1.2.3.4;'}, 'name':
'oc_ntp_netconfig', 'start_time': '08:49:58.671645', 'result': True, 'duration': 10704.875, '__run_num__': 0, '__sls__':
'ntp.netconfig', 'changes': {'diff': '[edit system ntp]n+ server 17.253.2.125 prefer;n- server 1.2.3.4;'},
'__id__': 'oc_ntp_netconfig'}}, 'retcode': 0, 'success': True, 'cmd': '_return', '_stamp': '2018-05-10T08:50:09.966462',
'fun': 'state.sls', 'id': 'device1', 'out': 'highstate'}
Live demo
The reactor kicks a State execution
(configuration change): Salt Master logs
86
Live demo
The reactor kicks a State
execution (configuration
change): Salt bus
20180510084958473615 {
"_stamp": "2018-05-10T08:49:58.474571",
"minions": [
"device1"
]
}
salt/job/20180510084958473615/new {
"_stamp": "2018-05-10T08:49:58.474852",
"arg": [
"ntp"
],
"fun": "state.sls",
"jid": "20180510084958473615",
"minions": [
"device1"
],
"tgt": "device1",
"tgt_type": "glob",
"user": "root"
}
87
Live demo
The reactor kicks a State
Execution (configuration
change): result
salt/job/20180510084958473615/ret/device1{
"_stamp": "2018-05-10T08:50:09.966462",
"cmd": "_return",
"fun": "state.sls",
"fun_args": [
"ntp"
],
"id": "device1",
"jid": "20180510084958473615",
"out": "highstate",
"retcode": 0,
"return": {
"netconfig_|-oc_ntp_netconfig_|-oc_ntp_netconfig_|-managed": {
"changes": {
"diff": "[edit system ntp]n+ server
17.253.2.125 prefer;n- server 1.2.3.4;"
},
"comment": "Configuration changed!n",
"duration": 11288.952,
"name": "oc_ntp_netconfig",
"result": true,
"start_time": "08:49:58.671645"
}
},
"success": true
}
88
Live demo
Side note: the previous
job output, when
executed from the CLI
root@salt-master:/# salt device1 state.sls ntp
device1:
----------
ID: oc_ntp_netconfig
Function: netconfig.managed
Result: True
Comment: Configuration changed!
Started: 11:22:21.364131
Duration: 10644.564 ms
Changes:
----------
diff:
[edit system ntp]
+ server 17.253.2.125 prefer;
- server 1.2.3.4;
Summary for device1
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 10.645 s
root@salt-master:/#
89
napalm@device1> show configuration system ntp
server 17.253.2.125 prefer;
napalm@device1>
napalm@device1> show ntp associations
remote refid st t when poll reach delay offset jitter
===============================================================================
*17.253.2.125 .GPSs. 1 - 8 64 77 39.015 12.527 27.595
Live demo
The device is synchronised
Other examples using napalm-logs
● Using BGP_NEIGHBOR_STATE_CHANGED,
can send alerts (e.g., chat, SMS, email, etc.)
● On OSPF_NEIGHBOR_DOWN can adjust
the route metric cost.
● On BGP_SESSION_NOT_CONFIGURED,
send an email to your peer as a reminder.
● This list can be nearly infinite, and
depends on your own use case. 90
Key takeaways
● napalm-logs can be used for event-driven
network automation.
● There can be many other good sources of
internal and external events, e.g.,
streaming telemetry, BGPmon,
Prometheus Alertmanager, emails from
your partners, or other in-house that
make sense to your own business model. 91
“
The only limit to your impact is your imagination and commitment.
”
92
(besides time, mood, human resources, YouTube, Facebook, etc.)
Tony Robbins
Need help/advice?
Join https://networktocode.slack.com/
rooms: #saltstack #napalm
New: https://saltstackcommunity.slack.com
rooms: #networks
93
How can you contribute?
● napalm-logs:
https://github.com/napalm-automation/na
palm-logs
● NAPALM Automation:
https://github.com/napalm-automation
● Salt
https://github.com/saltstack/salt
94
Questions
95
?
mircea@cloudflare.com

More Related Content

What's hot

SRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-typeSRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-typeKentaro Ebisawa
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linaro
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)Linaro
 
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Thomas Graf
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Adam Dunkels
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersP4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersOpen-NFP
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machineAlexei Starovoitov
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Consensus as a Network Service
Consensus as a Network ServiceConsensus as a Network Service
Consensus as a Network ServiceOpen-NFP
 
LinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVSLinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVSThomas Graf
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersBrendan Gregg
 
Why my network does not work? Networking Quiz 2017
Why my network does not work? Networking Quiz 2017Why my network does not work? Networking Quiz 2017
Why my network does not work? Networking Quiz 2017Andriy Berestovskyy
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 

What's hot (20)

SRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-typeSRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-type
 
Stress your DUT
Stress your DUTStress your DUT
Stress your DUT
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)
BKK16-308 The tool called Auto-Tuned Optimization System (ATOS)
 
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Future Internet protocols
Future Internet protocolsFuture Internet protocols
Future Internet protocols
 
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersP4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
 
Networking
NetworkingNetworking
Networking
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machine
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Consensus as a Network Service
Consensus as a Network ServiceConsensus as a Network Service
Consensus as a Network Service
 
LinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVSLinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVS
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
 
Why my network does not work? Networking Quiz 2017
Why my network does not work? Networking Quiz 2017Why my network does not work? Networking Quiz 2017
Why my network does not work? Networking Quiz 2017
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 

Similar to Event-driven Network Automation and Orchestration

Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkCloudflare
 
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?Tom Paseka
 
Network Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: IntrouctionNetwork Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: IntrouctionCloudflare
 
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...Puppet
 
Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkAPNIC
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
 
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemTutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemDheryta Jaisinghani
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkRiyaj Shamsudeen
 
Detecting Spoofing at IXPs
Detecting Spoofing at IXPsDetecting Spoofing at IXPs
Detecting Spoofing at IXPsAPNIC
 
Detecting spoofing at IxP's
Detecting spoofing at IxP'sDetecting spoofing at IxP's
Detecting spoofing at IxP'sTom Paseka
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 
Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultDataWorks Summit
 
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Puppet
 
Model-driven Network Management
Model-driven Network ManagementModel-driven Network Management
Model-driven Network ManagementAnees Shaikh
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4Open Networking Summits
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...aaajjj4
 
Navigating the YANGscape of network automation
Navigating the YANGscape of network automationNavigating the YANGscape of network automation
Navigating the YANGscape of network automationRoman Dodin
 

Similar to Event-driven Network Automation and Orchestration (20)

Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient network
 
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
 
Network Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: IntrouctionNetwork Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: Introuction
 
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
 
Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient network
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemTutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 
Using Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalightUsing Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalight
 
Detecting Spoofing at IXPs
Detecting Spoofing at IXPsDetecting Spoofing at IXPs
Detecting Spoofing at IXPs
 
Detecting spoofing at IxP's
Detecting spoofing at IxP'sDetecting spoofing at IxP's
Detecting spoofing at IxP's
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
 
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
Model-driven Network Management
Model-driven Network ManagementModel-driven Network Management
Model-driven Network Management
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...
BRKDCT-3144 - Advanced - Troubleshooting Cisco Nexus 7000 Series Switches (20...
 
Navigating the YANGscape of network automation
Navigating the YANGscape of network automationNavigating the YANGscape of network automation
Navigating the YANGscape of network automation
 

More from APNIC

APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119APNIC
 
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119APNIC
 
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119APNIC
 
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119APNIC
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...APNIC
 
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC
 
NANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonNANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonAPNIC
 
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonDNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonAPNIC
 
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPNIC
 
Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6APNIC
 
AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!APNIC
 
CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023APNIC
 
AFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAPNIC
 
AFNOG 1: Afghanistan IP Deployment Status
AFNOG 1: Afghanistan IP Deployment StatusAFNOG 1: Afghanistan IP Deployment Status
AFNOG 1: Afghanistan IP Deployment StatusAPNIC
 

More from APNIC (20)

APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
 
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
 
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
 
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
 
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
 
NANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonNANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff Huston
 
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonDNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
 
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
 
Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6
 
AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!
 
CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023
 
AFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet development
 
AFNOG 1: Afghanistan IP Deployment Status
AFNOG 1: Afghanistan IP Deployment StatusAFNOG 1: Afghanistan IP Deployment Status
AFNOG 1: Afghanistan IP Deployment Status
 

Recently uploaded

Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Onlineanilsa9823
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 

Recently uploaded (20)

@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 

Event-driven Network Automation and Orchestration

  • 1. Event-driven Network Automation and Orchestration Mircea Ulinic Cloudflare, London APRICOT 2019 Daejeon, South Korea 1
  • 2. 2 Mircea Ulinic ● Network software engineer at Cloudflare ● Previously research and teaching assistant at EPFL, Switzerland ● Member and maintainer at NAPALM Automation ● SaltStack contributor of the year 2017 ● O’Reilly author ● OpenConfig representative ● https://mirceaulinic.net/ @mirceaulinicmirceaulinic
  • 3. Agenda ● Why automate and how to start ● Vendor-agnostic automation using Salt ● YANG ● Using napalm-logs for event-driven network automation ● Live demo 3
  • 4. To automate, I have to learn Python or another programming language. 4
  • 5. To automate, I have to learn Python or another programming language. 5 W RONG!
  • 6. Do not jump into implementation. Design first! 6
  • 8. What’s the best tool? 8 Wrong question.
  • 9. What’s the best tool for my network? 9
  • 10. What’s the best tool for my network? ● How large is your network? ● How many platforms / operating systems? ● How dynamic? ● External sources of truth? e.g., IPAM ● Do you need native caching? REST API? ● Event-driven automation? ● Community 10
  • 11. ● Very scalable ● Concurrency ● Event-driven automation ● Easily configurable & customizable ● Native caching and drivers for useful tools ● One of the friendliest communities ● Great documentation 11 Why Salt
  • 12. Why Salt Orchestration vs. Automation https://flic.kr/p/5EQe2dCC BY 2.0 12
  • 13. Why Salt “ In SaltStack, speed isn’t a byproduct, it is a design goal. SaltStack was created as an extremely fast, lightweight communication bus to provide the foundation for a remote execution engine. SaltStack now provides orchestration, configuration management, event reactors, cloud provisioning, and more, all built around the SaltStack high-speed communication bus. ” 13 https://docs.saltstack.com/en/getstarted/speed.html … + cross-vendor network automation from 2016.11 (Carbon)
  • 15. Vendor-agnostic API: NAPALM 15 NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) https://github.com/napalm-automation
  • 16. 16 NAPALM integrated in Salt: Carbon https://docs.saltstack.com/en/develop/topics/releases/2016.11.0.html
  • 17. 17 NAPALM integrated in Salt: Nitrogen https://docs.saltstack.com/en/develop/topics/releases/nitrogen.html
  • 18. Vendor-agnostic automation (1) 18 $ sudo salt iosxr-router net.arp iosxr-router: ---------- out: |_ ---------- age: 1620.0 interface: Bundle-Ether4 ip: 10.0.0.2 mac: 00:25:90:20:46:B5 |_ ---------- age: 8570.0 $ sudo salt junos-router net.arp junos-router: ---------- out: |_ ---------- age: 129.0 interface: ae2.100 ip: 10.0.0.1 mac: 84:B5:9C:CD:09:73 |_ ---------- age: 1101.0
  • 19. Vendor-agnostic automation (2) 19 $ sudo salt junos-router state.sls ntp junos-router: ---------- ID: oc_ntp_netconfig Function: netconfig.managed Result: True Comment: Configuration changed! Started: 10:53:25.624396 Duration: 3494.153 ms Changes: ---------- diff: [edit system ntp] - peer 172.17.17.2; [edit system ntp] + server 10.10.10.1 prefer; + server 10.10.10.2; - server 172.17.17.1 version 2 prefer; $ sudo salt iosxr-router state.sls ntp iosxr-router: ---------- ID: oc_ntp_netconfig Function: netconfig.managed Result: True Comment: Configuration changed! Started: 11:02:39.162423 Duration: 3478.683 ms Changes: ---------- diff: --- +++ @@ -1,4 +1,10 @@ +ntp + server 10.10.10.1 prefer + server 10.10.10.2 !
  • 20. Vendor-agnostic automation: how to 20 ● Salt in 10 minutes ● Salt fudamentals ● Configuration management ● Network Automation official Salt docs ● Step-by-step tutorial -- up and running in 60 minutes ● Using Salt at Scale
  • 21. 21 Minion Minion Minion... https://docs.saltstack.com/en/latest/topics/topology/index.html Introduction to Salt Salt Architectures: typical hub and spoke Master Minion Minion Minion Device to be managed The name of the Salt process
  • 22. 22 Master Minion Minion Minion... Master Master Introduction to Salt Salt Architectures: multiple Masters MasterMaster Master Minion Minion Minion
  • 23. 23 Minion Minion Minion... Introduction to Salt Salt Architectures: Masterless Minion Minion Minion
  • 24. 24 device device device... https://docs.saltstack.com/en/latest/topics/topology/index.html Introduction to Salt Salt Architectures: Proxy Minions Master Proxy Minion Proxy Minion Proxy Minion HTTP SSH NETCONF
  • 25. Introduction to Salt Nomenclature 25 Salt in 10 minutes: https://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html Pillar Free-form data that can be used to organize configuration values or manage sensitive data, e.g.: interface details, NTP peers, BGP config... Data provided by the user (as file, HTTP API, database, etc.) Grains Data collected from the device, e.g., device model, vendor, uptime, serial number etc. Salt handles this, you don’t need to do anything
  • 26. Introduction to Salt Nomenclature 26 SLS File format used by Salt in various subsystems. In can be used for both data and automation logic. By default, SLS = Jinja + YAML. Can be changed to any other Renderer combination.
  • 27. Introduction to Salt SLS 27 list_with_ten_elements: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 list_with_ten_elements: {%- for i in range(10) %} - {{ i }} {%- endfor %} #!py def run(): return { 'list_with_ten_elements': [ i for i in range(10) ] } The following SLS files are equivalent: Pure YAML Default SLS (Jinja + YAML) Other combination: Pure Python
  • 29. YANG 29 ● Data modeling language ○ A language of its own ○ It is not XML, JSON, YAML etc. ○ It describes hierarchies and the types of data ● Standardised in RFC 6020 ● Aims to solve the vendor discrepancy in terms of operational and configuration data YANG for dummies: https://napalm-automation.net/yang-for-dummies/
  • 30. YANG A quick example 30 // module name module napalm-star-wars { grouping personal-data { leaf name { type string; } leaf age { type age; } } // this is the root object defined by the model container universe { list individual { // identify each individual by using the name as key key "name"; uses personal-data; } } }
  • 31. YANG A quick example: the structure 31 $ pyang -f tree napalm-star-wars.yang module: napalm-star-wars +--rw universe +--rw individual* [name] +--rw name string +--rw age? age
  • 32. YANG A quick example 32 { "universe": { "individual": { "Obi-Wan Kenobi": { "age": 57, "name": "Obi-Wan Kenobi" }, "Luke Skywalker": { "age": 19, "name": "Luke Skywalker" }, "Darth Vader": { "age": 42, "name": "Darth Vader" }, "Yoda": { "age": 896, "name": "Yoda" } } } } A JSON document following the hierarchy defined in the YANG model defined previously.
  • 33. YANG A quick example 33 <universe> <individual> <Luke Skywalker> <age> 19 </age> <name> Luke Skywalker </name> </Luke Skywalker> <Darth Vader> <age> 42 </age> <name> Darth Vader </name> <Yoda> <age> 896 </age> <name> Yoda </name> </Yoda> </individual> A XML document following the hierarchy defined in the YANG model defined previously.
  • 34. YANG Standards Organizations 34 ● OpenConfig ○ OpenConfig is an informal working group of network operators ○ YANG models available at https://github.com/openconfig/public ● IETF ● IEEE ● BBF (Broadband Forum)
  • 38. Event-driven network automation (2) 38 ● Several of ways your network is trying to communicate with you ● Millions of messages
  • 39. Event-driven network automation (3) 39 ● SNMP traps ● Syslog messages ● Streaming telemetry
  • 41. Event-driven network automation Streaming Telemetry 41 ● Push notifications ○ Vs. pull (SNMP) ● Structured data ○ Structured objects, using the YANG standards ■ OpenConfig ■ IETF ● Supported on very new operating systems ○ IOS-XR >= 6.1.1 ○ Junos >= 15.1 (depending on the platform)
  • 42. Event-driven network automation Syslog messages 42 <99>Jul 13 22:53:14 device1 xntpd[16015]: NTP Server 172.17.17.1 is Unreachable <99>2647599: device3 RP/0/RSP0/CPU0:Aug 21 09:39:14.747 UTC: ntpd[262]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 172.17.17.1 :The association was removed ● Junos ● IOS-XR
  • 43. Event-driven network automation Syslog messages: napalm-logs (1) 43 ● Listen for syslog messages ○ Directly from the network devices, via UDP or TCP ○ Other systems: Apache Kafka, ZeroMQ, etc. ● Publish encrypted messages ○ Structured documents, using the YANG standards ■ OpenConfig ■ IETF ○ Over various channels: ZeroMQ, Kafka, etc. https://napalm-logs.com
  • 44. Event-driven network automation Syslog messages: napalm-logs (2) 44 https://napalm-automation.net/napalm-logs-released/ napalm-logs Network device Network device Network device Kafka Client Client Client Kafka ZMQ Client
  • 45. Event-driven network automation Syslog messages: napalm-logs startup 45 $ napalm-logs --listener udp --address 172.17.17.1 --port 5514 --publish-address 172.17.17.2 --publish-port 49017 --publisher zmq --disable-security More configuration options: https://napalm-logs.readthedocs.io/en/latest/options/index.html
  • 46. Event-driven network automation Syslog messages: napalm-logs clients 46 More complete example: https://github.com/napalm-automation/napalm-logs/blob/master/examples/client_auth.py import zmq # when using the ZeroMQ publisher import napalm_logs.utils server_address = '127.0.0.1' # IP server_port = 49017 # Port for the napalm-logs publisher interface context = zmq.Context() socket = context.socket(zmq.SUB) socket.connect('tcp://{address}:{port}'.format(address=server_address, port=server_port)) socket.setsockopt(zmq.SUBSCRIBE, '') # subscribe to the napalm-logs publisher while True: raw_object = socket.recv() # binary object print(napalm_logs.utils.unserialize(raw_object)) # deserialize
  • 47. Event-driven network automation Syslog messages (again) 47 <99>Jul 13 22:53:14 device1 xntpd[16015]: NTP Server 172.17.17.1 is Unreachable <99>2647599: device3 RP/0/RSP0/CPU0:Aug 21 09:39:14.747 UTC: ntpd[262]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 172.17.17.1 :The association was removed ● Junos ● IOS-XR
  • 48. Event-driven network automation Syslog messages: napalm-logs structured objects 48 { "error": "NTP_SERVER_UNREACHABLE", "facility": 12, "host": "device1", "ip": "127.0.0.1", "os": "junos", "severity": 4, "timestamp": 1499986394, "yang_message": { "system": { "ntp": { "servers": { "server": { "172.17.17.1": { "state": { "stratum": 16, "association-type": "SERVER" } } } } } } }, "yang_model": "openconfig-system" }
  • 49. Event-driven network automation Other raw syslog message example 49 <149>Jun 21 14:03:12 vmx01 rpd[2902]: BGP_PREFIX_THRESH_EXCEEDED: 192.168.140.254 (External AS 4230): Configured maximum prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master) <149>2647599: xrv01 RP/0/RSP1/CPU0:Mar 28 15:08:30.941 UTC: bgp[1051]: %ROUTING-BGP-5-MAXPFX : No. of IPv4 Unicast prefixes received from 192.168.140.254 has reached 94106, max 12500 ● Junos ● IOS-XR
  • 50. 50 "yang_message": { "bgp": { "neighbors": { "neighbor": { "192.168.140.254": { "afi_safis": { "afi_safi": { "inet4": { "ipv4_unicast": { "prefix_limit": { "state": { "max_prefixes": 140 } } }, "state": { "prefixes": { "received": 141 } } } } }, "state": { "peer_as": "4230" } } } } } }, "yang_model": "openconfig-bgp" } Event-driven network automation Syslog messages: napalm-logs structured objects
  • 51. Event-driven network automation napalm-logs key facts to remember 51 ● Continuously listening to syslog messages ● Continuously publishing structured data ○ Structure following the YANG standards ■ OpenConfig ■ IETF
  • 52. Event-driven network automation Salt event system 52 Salt is a data driven system. Each action (job) performed (manually from the CLI or automatically by the system) is uniquely identified and has an identification tag: $ sudo salt-run state.event pretty=True salt/job/20170110130619367337/new { "_stamp": "2017-01-10T13:06:19.367929", "arg": [], "fun": "net.arp", "jid": "20170110130619367337", "minions": [ "junos-router" ], "tgt": "junos-router", "tgt_type": "glob", "user": "mircea" } Unique job tag $ sudo salt junos-router net.arp # output omitted
  • 53. Event-driven network automation Syslog messages: napalm-syslog Salt engine (1) 53 https://docs.saltstack.com/en/latest/ref/engines/all/salt.engines.napalm_syslog.html engines: - napalm_syslog: transport: zmq address: 172.17.17.2 port: 49017 auth_address: 172.17.17.3 auth_port: 49018 Imports messages from napalm-logs into the Salt event bus /etc/salt/master
  • 54. 54 { "error": "NTP_SERVER_UNREACHABLE", "facility": 12, "host": "device1", "ip": "127.0.0.1", "os": "junos", "severity": 4, "timestamp": 1499986394, "yang_message": { "system": { "ntp": { "servers": { "server": { "172.17.17.1": { "state": { "stratum": 16, "association-type": "SERVER" } } } } } } }, "yang_model": "openconfig-system" } (from slide #43) Event-driven network automation Syslog messages: napalm-logs structured objects
  • 55. 55 napalm/syslog/junos/NTP_SERVER_UNREACHABLE/edge01.bjm01 { "error": "NTP_SERVER_UNREACHABLE", "facility": 12, "host": "edge01.bjm01", "ip": "10.10.0.1", "os": "junos", "timestamp": 1499986394, "yang_message": { "system": { "ntp": { "servers": { "server": { "172.17.17.1": { "state": { "association-type": "SERVER", "stratum": 16 } } } } } } }, "yang_model": "openconfig-system" } Event-driven network automation Salt event bus Using the napalm-syslog Salt engine you can inject napalm-logs events into the Salt event bus. See https://napalm-automation.net/napalm-logs-released/ and https://mirceaulinic.net/2017-10-19-event-driven-netw ork-automation/ For more examples
  • 56. 56 reactor: - 'napalm/syslog/*/NTP_SERVER_UNREACHABLE/*': - salt://reactor/exec_ntp_state.sls /etc/salt/reactor/exec_ntp_state.sls triggered NTP state: cmd.state.sls: - tgt: {{ data.host }} - arg: - ntp /etc/salt/master Matches the event tag napalm/syslog/junos/NTP_SERVER_UNREACHABLE/edge01.bjm01 $ sudo salt edge01.bjm01 state.sls ntp CLI Equivalent: (see slide #20) Event-driven network automation Fully automated configuration changes
  • 57. 57 reactor: - 'napalm/syslog/*/INTERFACE_DOWN/*': - salt://reactor/if_down_shutdown.sls - salt://reactor/if_down_send_mail.sls Shutdown the interface /etc/salt/master Matches the event tag napalm/syslog/junos/INTERFACE_DOWM/edge01.bjm01 (Event pushed when an interface is operationally down) Event-driven network automation Fully automated configuration changes & more Send an email notification More details at: https://mirceaulinic.net/2017-10-19-event-driven-network-automation/
  • 58. 58 Network Automation at Scale: the book Free download: https://www.cloudflare.com/network-automation-at-sc ale-ebook/
  • 59. Live demo 59 All the files are available on GitHub https://github.com/mirceaulinic/apricot2019-tutorial
  • 61. 61 Live demo Topology Salt Master Salt Proxy Minion napalm-logs Juniper vMX Amazon EC2 1 2 3 4 1. Syslog notification sent to napalm-logs. 2. Structured napalm-logs message on the Salt bus. 3. Triggered job execution. 4. Configuration changed on the device.
  • 62. Live demo Start a Salt Master and Proxy Minion (1) 62 base: '*': - ntp {{ opts.id }}: - {{ opts.id }}_pillar My Pillar Top file /etc/salt/pillar/top.sls How to read this: each Minion will load the contents from a file based on it’s ID, e.g., Minion ID dummy will load the contents from dummy_pillar.sls, etc. The ntp.sls Pillar is spread to all the Minions (thanks to the *).
  • 63. Live demo Start a Salt Master and Proxy Minion (2) 63 openconfig-system: system: ntp: config: servers: server: 17.253.2.125: config: association_type: SERVER prefer: true The shared Pillar for the NTP configuration, structured as defined in the openconfig-system model /etc/salt/pillar/ntp.sls
  • 64. Live demo Start a Salt Master and Proxy Minion (3) 64 proxy: proxytype: napalm driver: junos host: example.com username: test password: test The Pillar for the device1 Proxy Minion /etc/salt/pillar/device1_pillar.sls
  • 65. Live demo Start a Salt Master and Proxy Minion (4) 65 open_mode: true pillar_roots: base: - /etc/salt/pillar file_roots: base: - /etc/salt - /etc/salt/states engines: - napalm_syslog: address: example.com port: 17171 disable_security: true reactor: - 'napalm/syslog/*/NTP_SERVER_UNREACHABLE/*': - salt://reactor/exec_ntp_state.sls The Salt Master config file /etc/salt/master The configuration for the napalm-syslog Salt Engine, to ingest events from napalm-logs. Reactor configuration, to trigger a State execution when there’s a NTP_SERVER_UNREACHABLE notification.
  • 66. Live demo Start a Salt Master and Proxy Minion (1) 66 master: salt-master open_mode: true multiprocessing: false The Proxy config file /etc/salt/proxy
  • 67. Live demo Start a Salt Master and Proxy Minion (1) 67 services: salt-master: image: mirceaulinic/salt-master:2017.7.5 hostname: salt-master container_name: salt-master environment: - LOG_LEVEL volumes: - ./master:/etc/salt/master - ./pillar/:/etc/salt/pillar/ - ./states/:/etc/salt/states/ - ./reactor/:/etc/salt/reactor/ network_mode: host salt-proxy: image: mirceaulinic/salt-proxy:2017.7.5 hostname: salt-proxy container_name: salt-proxy volumes: - ./proxy:/etc/salt/proxy environment: - LOG_LEVEL - PROXYID network_mode: host One Docker container each, using Docker Compose docker-compose.yml (simplified version) Share filesystems with the containers, mounting the files as volumes. This way, we can edit the Pillars / States / Reactor etc. files without restarting the container, but simply edit them locally and the changes will be reflected inside the container.
  • 68. Live demo Start a Salt Master and Proxy Minion (2) 68 One Docker container each, using Docker Compose docker-compose.yml (live version) services: salt-master: image: mirceaulinic/salt-master:2017.7.5 hostname: salt-master container_name: salt-master environment: - LOG_LEVEL volumes: - ./master:/etc/salt/master - ./pillar/:/etc/salt/pillar/ - ./states/:/etc/salt/states/ - ./reactor/:/etc/salt/reactor/ network_mode: host salt-proxy: image: mirceaulinic/salt-proxy:2017.7.5 hostname: ${PROXYID} container_name: salt-proxy-${PROXYID} volumes: - ./proxy:/etc/salt/proxy environment: - LOG_LEVEL - PROXYID network_mode: host The Proxy Minion ID can be sent from the Makefile
  • 69. Live demo Start a Salt Master and Proxy Minion (1) 69 master: salt-master open_mode: true multiprocessing: false The Salt Proxy config file /etc/salt/proxy
  • 70. 70 Live demo Starting napalm-logs (1) log_level: info log_file: cli port: 17171 listener: - udp: {} publisher: - zmq: {} disable_security: true The napalm-logs config file /etc/napalm/logs
  • 71. 71 Similarly, in a Docker container docker-compose.yml (live version) services: napalm-logs: image: mirceaulinic/napalm-logs:0.5.0 hostname: napalm-logs container_name: napalm-logs environment: - LOG_LEVEL volumes: - ./napalm-logs.conf:/etc/napalm/logs network_mode: host ports: - "49017" Live demo Starting napalm-logs (2)
  • 72. 72 set system syslog host 10.10.10.1 port 17171 any any Live demo Starting napalm-logs: configure the network box Where napalm-logs will be running (listening to the syslog messages) As configured in the napalm-logs.conf config file For more configuration details for other network operating systems, check the Supported devices and configuration section in the napalm-logs documentation.
  • 73. 73 The Makefile export PROXYID ?= dummy all: docker-compose up -d Live demo Starting all the containers (1)
  • 74. 74 Simply execute $ make PROXYID=device1 docker-compose up -d Creating napalm-logs ... done Creating salt-proxy-device1 ... done Creating salt-master ... done Live demo Starting all the containers (2)
  • 75. 75 All 3 containers should be up and running $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES df9019904036 mirceaulinic/salt-master:2017.7.5 "/bin/sh -c "/usr/lo…" 8 minutes ago Up 8 minutes salt-master 9feb2f32f864 mirceaulinic/salt-proxy:2017.7.5 "/bin/sh -c "/usr/lo…" 8 minutes ago Up 8 minutes salt-proxy-device1 bc693428c207 mirceaulinic/napalm-logs:0.5.0 "/bin/sh -c 'napalm-…" 8 minutes ago Up 8 minutes napalm-logs Live demo Starting all the containers (3)
  • 76. 76 From the Master can execute: $ docker exec -it salt-master bash root@salt-master:/# salt device1 test.ping device1: True Live demo Starting all the containers (4) $ docker exec -it salt-master bash root@salt-master:/# salt device1 route.show 0.0.0.0/0 device1: ---------- comment: out: ---------- 0.0.0.0/0: |_ ---------- age: 113525 current_active: True inactive_reason: last_active: True next_hop: 172.31.0.1
  • 77. 77 We should notice napalm-logs events on the Salt bus: $ docker exec -it salt-master bash root@salt-master:/# salt-run state.event pretty=True Live demo Starting all the containers napalm/syslog/junos/USER_ENTER_CONFIG_MODE/edge01.mrs01 { "_stamp": "2018-05-09T14:05:10.669616", "error": "USER_ENTER_CONFIG_MODE", "facility": 23, "host": "edge01.mrs01", "ip": "172.31.13.150", "os": "junos", "severity": 5, "timestamp": 1525874708, "yang_message": { "users": { "user": { "mircea": { "action": { "enter_config_mode": true } } } } }, "yang_model": "NO_MODEL" }
  • 78. 78 $ git clone https://github.com/mirceaulinic/apricot2019-tutorial.git $ cd apricot2019-tutorial ### edit pillar/device1_pillar.sls file, and add your authentication details $ make PROXYID=device1 Live demo Reproduce this yourself Docker and Docker Compose are assumed to be already installed. Otherwise, follow the installation notes: https://docs.docker.com/install/ and https://docs.docker.com/compose/install/
  • 79. 79 Live demo Applying a configuration change [edit] napalm@device1# set system ntp server 1.2.3.4 [edit] napalm@device1# show | compare [edit system] + ntp { + server 1.2.3.4; + } [edit] napalm@device1# commit commit complete
  • 80. 80 Live demo Applying a configuration change: as seen on the Salt bus napalm/syslog/junos/CONFIGURATION_COMMIT_REQUESTED/device1 { "_stamp": "2018-05-09T14:19:40.733766", "error": "CONFIGURATION_COMMIT_REQUESTED", "facility": 23, "host": "device1", "ip": "172.31.13.150", "os": "junos", "severity": 5, "timestamp": 1525875578, "yang_message": { "users": { "user": { "napalm": { "action": { "comment": "none", "requested_commit": true } } } } }, "yang_model": "NO_MODEL" }
  • 81. 81 Live demo Applying a configuration change: as seen on the Salt bus napalm/syslog/junos/CONFIGURATION_COMMIT_COMPLETED/device1 { "_stamp": "2018-05-09T14:19:50.235894", "error": "CONFIGURATION_COMMIT_COMPLETED", "facility": 23, "host": "device1", "ip": "172.31.13.150", "os": "junos", "severity": 4, "timestamp": 1525875587, "yang_message": { "system": { "operations": { "commit_complete": true } } }, "yang_model": "NO_MODEL" }
  • 82. 82 napalm@device1> show ntp associations remote refid st t when poll reach delay offset jitter =============================================================================== 1.2.3.4 .INIT. 16 - - 64 0 0.000 0.000 4000.00 Live demo The device is unsynchronised
  • 83. 83 Live demo An NTP server becomes unreachable napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1 { "error": "NTP_SERVER_UNREACHABLE", "facility": 12, "host": "device1", "ip": "172.31.13.150", "os": "junos", "severity": 3, "timestamp": 1525942185, "yang_message": { "system": { "ntp": { "servers": { "server": { "1.2.3.4": { "state": { "association-type": "SERVER", "stratum": 16 } } } } } } }, "yang_model": "openconfig-system" }
  • 84. 84 [DEBUG ] Sending event: tag = napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1; data = {'_stamp': '2018-05-10T08:49:58.296950', 'yang_message': {'system': {'ntp': {'servers': {'server': {'1.2.3.4': {'state': {'association-type': 'SERVER', 'stratum': 16}}}}}}}, 'message_details': {'processId': '22637', 'severity': 3, 'facility': 12, 'hostPrefix': None, 'pri': '99', 'host': 'device1', 'tag': 'xntpd', 'time': '09:13:23', 'date': 'May 10', 'message': 'NTP Server 1.2.3.4 is Unreachable'}, 'facility': 12, 'ip': '172.31.13.150', 'error': 'NTP_SERVER_UNREACHABLE', 'host': 'device1', 'yang_model': 'openconfig-system', 'timestamp': 1525943603, 'os': 'junos', 'severity': 3} [DEBUG ] Gathering reactors for tag napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1 [DEBUG ] Compiling reactions for tag napalm/syslog/junos/NTP_SERVER_UNREACHABLE/device1 [DEBUG ] Rendered data from file: /var/cache/salt/master/files/base/reactor/exec_ntp_state.sls: triggered NTP state: local.state.sls: - tgt: device1 - arg: - ntp [DEBUG ] Results of YAML rendering: OrderedDict([('triggered NTP state', OrderedDict([('local.state.sls', [OrderedDict([('tgt', 'device1')]), OrderedDict([('arg', ['ntp'])])])]))]) Live demo The reactor kicks a State execution (configuration change): Salt Master logs
  • 85. 85 [DEBUG ] Sending event: tag = 20180510084958473615; data = {'_stamp': '2018-05-10T08:49:58.474571', 'minions': ['device1']} [DEBUG ] Sending event: tag = salt/job/20180510084958473615/new; data = {'tgt_type': 'glob', 'jid': '20180510084958473615', 'tgt': 'device1', '_stamp': '2018-05-10T08:49:58.474852', 'user': 'root', 'arg': ['ntp'], 'fun': 'state.sls', 'minions': ['device1']} [DEBUG ] Adding minions for job 20180510084958473615: ['device1'] [INFO ] User root Published command state.sls with jid 20180510084958473615 [DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20180510084958473615', 'tgt': 'device1', 'ret': '', 'user': 'root', 'arg': ['ntp'], 'fun': 'state.sls'} [INFO ] Got return from device1 for job 20180510084958473615 [DEBUG ] Sending event: tag = salt/job/20180510084958473615/ret/device1; data = {'fun_args': ['ntp'], 'jid': '20180510084958473615', 'return': {'netconfig_|-oc_ntp_netconfig_|-oc_ntp_netconfig_|-managed': {'comment': 'Configuration changed!n', 'pchanges': {'diff': '[edit system ntp]n+ server 17.253.2.125 prefer;n- server 1.2.3.4;'}, 'name': 'oc_ntp_netconfig', 'start_time': '08:49:58.671645', 'result': True, 'duration': 10704.875, '__run_num__': 0, '__sls__': 'ntp.netconfig', 'changes': {'diff': '[edit system ntp]n+ server 17.253.2.125 prefer;n- server 1.2.3.4;'}, '__id__': 'oc_ntp_netconfig'}}, 'retcode': 0, 'success': True, 'cmd': '_return', '_stamp': '2018-05-10T08:50:09.966462', 'fun': 'state.sls', 'id': 'device1', 'out': 'highstate'} Live demo The reactor kicks a State execution (configuration change): Salt Master logs
  • 86. 86 Live demo The reactor kicks a State execution (configuration change): Salt bus 20180510084958473615 { "_stamp": "2018-05-10T08:49:58.474571", "minions": [ "device1" ] } salt/job/20180510084958473615/new { "_stamp": "2018-05-10T08:49:58.474852", "arg": [ "ntp" ], "fun": "state.sls", "jid": "20180510084958473615", "minions": [ "device1" ], "tgt": "device1", "tgt_type": "glob", "user": "root" }
  • 87. 87 Live demo The reactor kicks a State Execution (configuration change): result salt/job/20180510084958473615/ret/device1{ "_stamp": "2018-05-10T08:50:09.966462", "cmd": "_return", "fun": "state.sls", "fun_args": [ "ntp" ], "id": "device1", "jid": "20180510084958473615", "out": "highstate", "retcode": 0, "return": { "netconfig_|-oc_ntp_netconfig_|-oc_ntp_netconfig_|-managed": { "changes": { "diff": "[edit system ntp]n+ server 17.253.2.125 prefer;n- server 1.2.3.4;" }, "comment": "Configuration changed!n", "duration": 11288.952, "name": "oc_ntp_netconfig", "result": true, "start_time": "08:49:58.671645" } }, "success": true }
  • 88. 88 Live demo Side note: the previous job output, when executed from the CLI root@salt-master:/# salt device1 state.sls ntp device1: ---------- ID: oc_ntp_netconfig Function: netconfig.managed Result: True Comment: Configuration changed! Started: 11:22:21.364131 Duration: 10644.564 ms Changes: ---------- diff: [edit system ntp] + server 17.253.2.125 prefer; - server 1.2.3.4; Summary for device1 ------------ Succeeded: 1 (changed=1) Failed: 0 ------------ Total states run: 1 Total run time: 10.645 s root@salt-master:/#
  • 89. 89 napalm@device1> show configuration system ntp server 17.253.2.125 prefer; napalm@device1> napalm@device1> show ntp associations remote refid st t when poll reach delay offset jitter =============================================================================== *17.253.2.125 .GPSs. 1 - 8 64 77 39.015 12.527 27.595 Live demo The device is synchronised
  • 90. Other examples using napalm-logs ● Using BGP_NEIGHBOR_STATE_CHANGED, can send alerts (e.g., chat, SMS, email, etc.) ● On OSPF_NEIGHBOR_DOWN can adjust the route metric cost. ● On BGP_SESSION_NOT_CONFIGURED, send an email to your peer as a reminder. ● This list can be nearly infinite, and depends on your own use case. 90
  • 91. Key takeaways ● napalm-logs can be used for event-driven network automation. ● There can be many other good sources of internal and external events, e.g., streaming telemetry, BGPmon, Prometheus Alertmanager, emails from your partners, or other in-house that make sense to your own business model. 91
  • 92. “ The only limit to your impact is your imagination and commitment. ” 92 (besides time, mood, human resources, YouTube, Facebook, etc.) Tony Robbins
  • 93. Need help/advice? Join https://networktocode.slack.com/ rooms: #saltstack #napalm New: https://saltstackcommunity.slack.com rooms: #networks 93
  • 94. How can you contribute? ● napalm-logs: https://github.com/napalm-automation/na palm-logs ● NAPALM Automation: https://github.com/napalm-automation ● Salt https://github.com/saltstack/salt 94