39
NETWORK AUTOMATION Urs Baumann Network Engineering Bern, 30. May 2017 SwiNOG 31 Road trip to an automated Network

WILLKOMMEN AN DER HSR - swinog.ch

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: WILLKOMMEN AN DER HSR - swinog.ch

NETWORK AUTOMATION

Urs Baumann

Network Engineering

Bern, 30. May 2017

SwiNOG 31

Road trip to an automated Network

Page 2: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

2

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 3: WILLKOMMEN AN DER HSR - swinog.ch

Main focus of Prof.B.Stettler and its 15 employees:

Education of future engineers and computer scientists

External trainings:

Microsoft Innovation Center

Cisco Networking Academy (CCNA, CCNP and CCIE)

Brocade Academy Program (BCNP & BCSPNE)

SDN, OpenStack, Network Automation, IPv6, WLAN, IoT

Network automation with Python

Applied Sciences project focus

Networking technologies

Network automation

Internet of Things

Unified Communications

Microsoft Technologies

3

Institute of Networked Solutions

Urs Baumann, Network Automation, 30.05.2017

Page 4: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann

Urs Baumann, Network Automation, 30.05.2017

4

Urs Baumann

Network Engineer

Python Developer

SDN, Cloud Infrastructure, OpenStack,

Python, Cisco and Brocade Instructor

[email protected]

@ubaumann_ch

http://ins.hsr.ch

@INSHSR

Page 5: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

5

SDN

VXLAN OpenFlow

Northbound APISouthbound API

Global View of the Network

Traffic Engineering

Vendor lock-in

Open-sourceService Provisioning

Cheap HardwareDeploying

Overlay

Data and Control Plane Separation

SNMPSSH

Restconf

Netconf

REST APINVGRE

Page 6: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

6

SDN Solutions

Page 7: WILLKOMMEN AN DER HSR - swinog.ch

Abstract complexity

Huge codebase

Southbound API

Northbound API

Large feature list

Provider dependency

Magic functionality

Great marketing slides

Urs Baumann, Network Automation, 30.05.2017

7

SDN Solutions

Page 8: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

8

SDN vs Network Automation

VXLAN OpenFlow

Northbound APISouthbound API

Global View of the Network

Traffic Engineering

Vendor lock-in

Open-sourceService Provisioning

Cheap HardwareDeploying

Overlay

Data and Control Plane Separation

SNMPSSH

Restconf

Netconf

REST APINVGRE

Page 9: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

9

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 10: WILLKOMMEN AN DER HSR - swinog.ch

Standardization

Urs Baumann, Network Automation, 30.05.2017

10

Page 11: WILLKOMMEN AN DER HSR - swinog.ch

Repeatability

Urs Baumann, Network Automation, 30.05.2017

11

Source: nestle-nespresso.com

Page 12: WILLKOMMEN AN DER HSR - swinog.ch

Validation

Test-driven development

Software !

Infrastructure ?

Monitoring

Side effects

HSR Student

Final year project

Network unit testing

Urs Baumann, Network Automation, 30.05.2017

12

Page 13: WILLKOMMEN AN DER HSR - swinog.ch

What is the most important aspect of an SDN solution?

Urs Baumann, Network Automation, 30.05.2017

13

Confidence

Testing

Experience

Long-term relationship

Controlled growing

Technology awareness

Page 14: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

14

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 15: WILLKOMMEN AN DER HSR - swinog.ch

Read only

Low-hanging fruit

Staging environment

Troubleshooting process

Configuration proposal

BGP traffic engineering

DoS detection

Firewall rules

New project / tenant / customer

Confidence established

Scale down human interaction

Urs Baumann, Network Automation, 30.05.2017

15

Where to start?

Page 16: WILLKOMMEN AN DER HSR - swinog.ch

Hello World

Urs Baumann, Network Automation, 30.05.2017

16

Page 17: WILLKOMMEN AN DER HSR - swinog.ch

HTTP Server

flask_shape.py shape.cfg

Urs Baumann, Network Automation, 30.05.2017

17

Page 18: WILLKOMMEN AN DER HSR - swinog.ch

HTTP Server

Urs Baumann, Network Automation, 30.05.2017

18

Page 19: WILLKOMMEN AN DER HSR - swinog.ch

Network Automation Libraries

Vender specific libraries

Napalm

Trigger

Netmiko

ncclient

Urs Baumann, Network Automation, 30.05.2017

19

Page 20: WILLKOMMEN AN DER HSR - swinog.ch

Documentation

Configuration > Documentation

Scripts / tools writes documentation files

Displays a searchable Wiki

Documentation > Configuration

Describe your service

Modeling language

Automatic deploy configuration

Urs Baumann, Network Automation, 30.05.2017

20

docs.saltstack.com

Page 21: WILLKOMMEN AN DER HSR - swinog.ch

Where is you source of truth?

Central Server

Network Device

Urs Baumann, Network Automation, 30.05.2017

21

Source of Truth

Page 22: WILLKOMMEN AN DER HSR - swinog.ch

Modulate solution

Combine tools to a great solution

Urs Baumann, Network Automation, 30.05.2017

22

3th party integration

Page 23: WILLKOMMEN AN DER HSR - swinog.ch

SaltStack

Python

YAML

Jinja2

Easy to extend

API

Agent-based / agent-less

Urs Baumann, Network Automation, 30.05.2017

23

https://docs.salstack.com

Page 24: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

24

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 25: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

25

Nuts (Network Unit Testing System)

nuts

https://github.com/HSRNetwork/Nuts

Page 26: WILLKOMMEN AN DER HSR - swinog.ch

Nuts

Command for network devices (= < > not)

connectivity

traceroute

interfacestatus

interfacespeed

arp

checkversion

checkuser

Comming soon

lldp_neighbor

bgp_neighbor

ospf_neighbor

route_to

stp_root

Command for debian systems (= < > not)

connectivity

traceroute

dnscheck

dhcpcheck

webresponse

portresponse

Urs Baumann, Network Automation, 30.05.2017

26

Page 27: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

27

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 28: WILLKOMMEN AN DER HSR - swinog.ch

One communication channel

Staff to staff

Staff to machine

Machine to staff

Transparent

Easy to understand

Know-how sharing

Fast

Urs Baumann, Network Automation, 30.05.2017

28

ChatOps

Jira - Ticketing

Room Administration

Course Administration

LDAP

Network Monitoring

Page 29: WILLKOMMEN AN DER HSR - swinog.ch

One communication channel

Staff to staff

Staff to machine

Machine to staff

Transparent

Easy to understand

Know-how sharing

Fast

Urs Baumann, Network Automation, 30.05.2017

29

ChatOps

Page 30: WILLKOMMEN AN DER HSR - swinog.ch

One communication channel

Staff to staff

Staff to machine

Machine to staff

Transparent

Easy to understand

Know-how sharing

Fast

Urs Baumann, Network Automation, 30.05.2017

30

ChatOps

Page 31: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

31

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 32: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

32

NetTowel ‒ Staging

Apache2

Taskmgmt.

Syslog

TFTP

DHCP

Network Truth

LDAP

HTTPS HTTPS (TSHOOT)

Events:New Device

RebootRebooted

API

AD

tftp

dhcp

Syslog

SSH

Get / Create / Update

IPAM

NMS

API

API

Page 33: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

33

NetTowel ‒ Staging

Page 34: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

34

NetTowel ‒ Staging

Page 35: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

35

NetTowel ‒ Staging

Page 36: WILLKOMMEN AN DER HSR - swinog.ch

Template Engine

Parameter

Template

Urs Baumann, Network Automation, 30.05.2017

36

!hostname testnamedomain-name lab!ntp server time0.ins.hsr.chntp server 152.96.120.53!end

!hostname {{ hostname }}domain-name {{ domain_name|default('lab') }}!{% for server in ntp %}ntp server {{ server }}!{% endfor %}end

hostname: testnamentp:- time0.ins.hsr.ch- 152.96.120.53

Page 37: WILLKOMMEN AN DER HSR - swinog.ch

Urs Baumann, Network Automation, 30.05.2017

37

NetTowel ‒ Staging

Page 38: WILLKOMMEN AN DER HSR - swinog.ch

Agenda

Urs Baumann, Network Automation, 30.05.2017

38

HSR

SDN

Automation fundamental

Network automation

Testing

ChatOps

NetTowel ‒ Staging

The new network engineer

Page 39: WILLKOMMEN AN DER HSR - swinog.ch

Networking

Cisco Networking Academy (CCNA, CCNP and CCIE)

Brocade Academy Program (BCNP & BCSPNE)

Technical trainings in the area of networking (IPv6, SDN, WLAN, Troubleshooting)

Programming

Network-Automation with Python

Security

Security Fundamentals, CCNA Security

Unified ICT Team

Cloud Infrastructure, OpenStack, Internet of Things (IoT) Fundamentals, Unified Communications

Urs Baumann, Network Automation, 30.05.2017

39

The new network engineer