26
Sylvain AFCHAIN Principal Software Engineer 17/05/2016 Skydive A real-time network analyzer

Skydive, real-time network analyzer, container integration

Embed Size (px)

Citation preview

Page 1: Skydive, real-time network analyzer, container integration

Sylvain AFCHAINPrincipal Software Engineer

17/05/2016

SkydiveA real-time network analyzer

Page 2: Skydive, real-time network analyzer, container integration
Page 3: Skydive, real-time network analyzer, container integration

WHY ?

Page 4: Skydive, real-time network analyzer, container integration

SDN IS COMPLEX

Troubleshooting/monitoring is even more complex

Page 5: Skydive, real-time network analyzer, container integration
Page 6: Skydive, real-time network analyzer, container integration

ImplementationsManagement

Control plane

● OpenFlow● XMPP● BGP● AMQP● Etc...

Data plane

● VLAN● VXLAN● GRE● MPLS● OVS, Linuxbridge, other

Page 7: Skydive, real-time network analyzer, container integration

TroubleshootingWhere...

packets are dropped ?packets are fragmented ?choke point occurs ?

What…

packet layers path ?kind of traffic for this virtual network ?number of flows on this link ?number of TCP Sessions ?bandwidth for this tenant ?

Page 8: Skydive, real-time network analyzer, container integration

Current toolbox● iproute2 ● ovs-vsctl, ovs-ofctl, ovs-dpctl...● ethtool● brctl● tcpdump● SDN CLI/API● SSH● ...

Page 9: Skydive, real-time network analyzer, container integration

What we need● Flow centric● Easy to deploy● SDN Agnostic solution● Non-intrusive / Lightweight● Open, API● Connectors to SDN

Page 10: Skydive, real-time network analyzer, container integration

What we need● Topology capture

a. interfaces, bond, mtu, vlanb. bridgesc. Network namespacesd. etc..

● Flow capturea. on-demand traffic captureb. on-demand counter capturec. filteringd. underlay/overlay informations

● Topology/flow aggregationa. mapping topology/flowb. analysis

Page 11: Skydive, real-time network analyzer, container integration

Topology capture● Graph engine, event based● Gremlin like query language● Populated from :

○ netlink ○ netns ○ ovsdb○ ethtool

● External connectors :○ Docker○ Neutron

Page 12: Skydive, real-time network analyzer, container integration

Topology capture$ ip netns add vm1

$ ip link add vm1-eth0 type veth peer \name eth0 netns vm1

$ ip link set vm1-eth0 up

$ ip netns exec vm1 ip link set eth0 up

$ ip netns exec vm1 ip address add \10.0.0.1/24 dev eth0

$ ovs-vsctl add-port br-int vm1-eth0

Page 13: Skydive, real-time network analyzer, container integration

Topology capture$ skydive client topology query -q 'G.V().Has("Name", "vm1")'

[{"Host": "localhost.localdomain","ID": "07236227-b280-4947-5ceb-c1f98e8515f3","Metadata": {

"Name": "vm1","Type": "netns"

}}]

Page 14: Skydive, real-time network analyzer, container integration

Topology capture$ skydive client topology query -q 'G.V().Has("Type", "ovsbridge").Out().Out().Has("Name", Without("br-int"))

[ { "Host": "localhost.localdomain","ID": "a190409e-f76e-4c8f-55b9-985e662a37c0","Metadata": { "Driver": "veth", "IfIndex": 168,

"MAC": "3e:88:b9:65:04:7e", "MTU": 1500, "Name": "vm1-eth0", "State": "UP",

"Type": "veth","UUID": "b6e9bf79-9b58-4b65-800e-1ddf9909d9dc" }}]

Page 15: Skydive, real-time network analyzer, container integration

Topology capture$ docker run --name=webserver \-p 80:80 -d eboraas/apache

$ sudo docker run --name database \postgres

Page 16: Skydive, real-time network analyzer, container integration

Topology capture$ skydive client topology query -q 'G.V().Has("Type", "netns")'

[{ "Host": "localhost.localdomain","ID": "5674d492-e2e1-4e6f-63f4-3b9f1073da03","Metadata": { "Docker.ContainerID": "5841d117701051542496d….994e5c2f2284e86c0ce17f2662", "Docker.ContainerName": "/webserver", "Docker.ContainerPID": 17216, "Manager": "docker", "Name": "webserver", "Type": "netns"}

}]

Page 17: Skydive, real-time network analyzer, container integration

Flow capture● Flow table centric● Local mapping flow/topology● Layer metrics● Packet data from

○ sFlow○ Pcap

Page 18: Skydive, real-time network analyzer, container integration

Flow capture$ skydive client capture create \--probepath "*/br-int[Type=ovsbridge]"

{ "ProbePath": "*/br-int[Type=ovsbridge]"}

Page 19: Skydive, real-time network analyzer, container integration

Flow capture$ ip netns exec vm1 ping 10.0.0.2

Flow schema

● Metrics per layer● Unique ID per flow● Unique ID per flow/capture● Origin/Destination● Capture point

Page 20: Skydive, real-time network analyzer, container integration

Skydive architectureAgents :

● Capture topology● Capture flows, maintains flow table● Local topology/flow mapping● Forward topology/flow to analyzers

Analyzers :

● Aggregate topology/flow● Global topology/flow mapping● Stores topology/flow in a database

Page 21: Skydive, real-time network analyzer, container integration

Kubernetes integration

Page 22: Skydive, real-time network analyzer, container integration

Demo

Page 23: Skydive, real-time network analyzer, container integration

Skydive Use-cases● Detection of common configuration errors

● Detection of live network issues○ bad performances, helping to find the root cause○ DDOS and any unattended traffic

● Possibility to capture traffic at any point○ History of all the captured metrics○ Post mortem analysis

● Detection of bad application performance, bad RTT, wrong security groups

Page 24: Skydive, real-time network analyzer, container integration

Skydive Roadmap● Topology capture

○ More probes : OpenFlow, L3 informations ○ Versioning

● Live distributed capture○ Filtering

● Analysis○ More protocols○ Alerting

● Security○ RBAC○ SSL○ IP anonymization

Page 25: Skydive, real-time network analyzer, container integration

Open source

Apache License

Written in Go

Contributions are welcome

Page 26: Skydive, real-time network analyzer, container integration

Questions ?

https://github.com/redhat-cip/skydiveIRC: #skydive-project @[email protected]@redhat.com