Mininet, Wireshark and
Open vSwitch
a study notes
Richard Kuo, Professional-Technical Architect,
Domain 2.0 Architecture & Planning
Motivation
• Understand some basic network engineering tools
for SDN/NFV and network virtualization, which can
be served as building blocks for knowledge
development.
4/10/15 Creatie Common, SA, NC 2
Network Virtualization
• User Interface
• Network Services
• Controller
• Logic Network
• Virtualization
• Physical Network Resources
• Software operating environment
(VM, container)
• Analytics, Policy, Goal, QoS, SLA
• OSS and BSS
• Service composition, chaining
4/10/15 Creatie Common, SA, NC 3
Mininet
• http://mininet.org/
• Mininet is a network emulator, it
creates a virtual network, runs on
VM, cloud or native machine:
•
OpenVirtex, FlowVisor
ODL, ONOS,…
Mininet, OvS,
Wireshark, …
VPN, LB, DPI,..
OpenFlow
(Southbound)
4/10/15 Creatie Common, SA, NC 4
Mininet
$ sudo mn --topo single,3 --mac --
switch ovsk --controller=remote
$ sudo mn --topo linear,4 --mac --
switch ovsk --controller=remote
$ sudo mn --topo tree,3 --mac --switch
ovsk --controller=remote
from: NDI Communication
4/10/15 Creatie Common, SA, NC 5
Mininet Commands
• Default topology (h1, h2, s1, c0)
• sudo mn
• nodes
• net
• dump
• pingall
• h1 ping h2 –c3
4/10/15 Creatie Common, SA, NC 6
Wireshark
• supports hundreds of
protocolshttp://www.wireshark.or
g/docs/dfref/
• Live capture and offline analysis
• Multiplatform: Windows, Linux,
MAC
• Captured data browsing in GUI or
in TTY mode (TSHARK)
• R/W many different capture file
formats: tcpdump (libpcap), MS
Network Monitor, Network
General Sniffer®, RADCOM
WAN/LAN Analyzer and many
others.
• Output can be exported to XML,
PostScript® or simple text
4/10/15 Creatie Common, SA, NC 7
Wireshark
• Packet list
• Packet details
• Packet bytes
4/10/15 Creatie Common, SA, NC 8
Open vSwitch
• A software-based solution
• An implementation of
OpenFlow
• Flexible Controller in user-
space and fast datapath in
Kernel
• Flow Decision
• Decision about how to process
packet made in user-space
• First packet of new flow goes to
ovs-vswitchd, following packets
hit cached entry in kernel
4/10/15 Creatie Common, SA, NC 9
Features
• Visibility into inter-VM communication via NetFlow,
sFlow(R), IPFIX, SPAN, RSPAN, and GRE-tunneled
mirrors
• Support features on a Linux system:
– Fully functional Layer 2 switch
– NetFlow, sFlow, SPAN, and RSPAN support
– 802.1Q VLANs with trunking
– QoS
– Port aggregation
– GRE tunneling
– Compatibility with the Linux bridge code (brctl)
– Kernel and userspace switch implementation
• Fine-grained QoS control
• Support for HFSC qdisc
• Per VM interface traffic policing
• NIC bonding with source-MAC load balancing,
active backup, and L4 hashing
• OpenFlow protocol support (including many
extensions for virtualization)
• IPv6 support
• Multiple tunneling protocols
– GRE, VXLAN, IPsec, GRE and VXLAN over IPsec
• Remote configuration protocol with C and Python
bindings
• Kernel and user-space forwarding engine options
• Multi-table forwarding pipeline with flow-caching
engine
• Forwarding layer abstraction to ease porting to new
software and hardware platforms
• Feature list for container is in process
4/10/15 Creatie Common, SA, NC 10
Open vSwitch Schema
• Database that holds switch level
configuration
• Custom database with nice
properties:
• Log-based
• Speaks OVSDB management
protocol(JSON-RPC) to manager
and ovs-vswitchd
4/10/15 Creatie Common, SA, NC 11
Hardware VTEP Schema
4/10/15 Creatie Common, SA, NC 12
OvS Core Components
• ovs-vswitchd
• ovs-kernel
• ovsdb, ovsdb-server
4/10/15 Creatie Common, SA, NC 13
The example of QoS in OVS Database
• It is a GUI tool to see the tables in the ovsdb-server
• This case is about checking QoS setting
ovs-appctl
ovs-appctl is a utility for managing
these daemons at runtime. It is
useful for configuring log module
settings as well as viewing all
OpenFlow flows, including hidden
ones.
4/10/15 Creatie Common, SA, NC 15
ovs-dpctl
ovs-dpctl is very similar to ovs-
ofctl in that they both show flow
table entries. The flows that ovs-
dpctl prints are always an exact
match and reflect packets that
have actually passed through the
system within the last few
seconds.
.
4/10/15 Creatie Common, SA, NC 16
ovs-ofctl
This tool is used for administering
and monitoring OpenFlow
switches. Even if OVS isn't
configured for centralized
administration, ovs-ofctl can be
used to show the current state of
OVS including features,
configuration, and table entries.
4/10/15 Creatie Common, SA, NC 17
ovs-vsctl
This tool is used for configuration
and viewing OVS switch
operations:
• Port configuration,
• bridge additions/deletions,
• bonding,
• VLAN tagging
4/10/15 Creatie Common, SA, NC 18
Demo
4/10/15 Creatie Common, SA, NC 19

Open v switch20150410b

  • 1.
    Mininet, Wireshark and OpenvSwitch a study notes Richard Kuo, Professional-Technical Architect, Domain 2.0 Architecture & Planning
  • 2.
    Motivation • Understand somebasic network engineering tools for SDN/NFV and network virtualization, which can be served as building blocks for knowledge development. 4/10/15 Creatie Common, SA, NC 2
  • 3.
    Network Virtualization • UserInterface • Network Services • Controller • Logic Network • Virtualization • Physical Network Resources • Software operating environment (VM, container) • Analytics, Policy, Goal, QoS, SLA • OSS and BSS • Service composition, chaining 4/10/15 Creatie Common, SA, NC 3
  • 4.
    Mininet • http://mininet.org/ • Mininetis a network emulator, it creates a virtual network, runs on VM, cloud or native machine: • OpenVirtex, FlowVisor ODL, ONOS,… Mininet, OvS, Wireshark, … VPN, LB, DPI,.. OpenFlow (Southbound) 4/10/15 Creatie Common, SA, NC 4
  • 5.
    Mininet $ sudo mn--topo single,3 --mac -- switch ovsk --controller=remote $ sudo mn --topo linear,4 --mac -- switch ovsk --controller=remote $ sudo mn --topo tree,3 --mac --switch ovsk --controller=remote from: NDI Communication 4/10/15 Creatie Common, SA, NC 5
  • 6.
    Mininet Commands • Defaulttopology (h1, h2, s1, c0) • sudo mn • nodes • net • dump • pingall • h1 ping h2 –c3 4/10/15 Creatie Common, SA, NC 6
  • 7.
    Wireshark • supports hundredsof protocolshttp://www.wireshark.or g/docs/dfref/ • Live capture and offline analysis • Multiplatform: Windows, Linux, MAC • Captured data browsing in GUI or in TTY mode (TSHARK) • R/W many different capture file formats: tcpdump (libpcap), MS Network Monitor, Network General Sniffer®, RADCOM WAN/LAN Analyzer and many others. • Output can be exported to XML, PostScript® or simple text 4/10/15 Creatie Common, SA, NC 7
  • 8.
    Wireshark • Packet list •Packet details • Packet bytes 4/10/15 Creatie Common, SA, NC 8
  • 9.
    Open vSwitch • Asoftware-based solution • An implementation of OpenFlow • Flexible Controller in user- space and fast datapath in Kernel • Flow Decision • Decision about how to process packet made in user-space • First packet of new flow goes to ovs-vswitchd, following packets hit cached entry in kernel 4/10/15 Creatie Common, SA, NC 9
  • 10.
    Features • Visibility intointer-VM communication via NetFlow, sFlow(R), IPFIX, SPAN, RSPAN, and GRE-tunneled mirrors • Support features on a Linux system: – Fully functional Layer 2 switch – NetFlow, sFlow, SPAN, and RSPAN support – 802.1Q VLANs with trunking – QoS – Port aggregation – GRE tunneling – Compatibility with the Linux bridge code (brctl) – Kernel and userspace switch implementation • Fine-grained QoS control • Support for HFSC qdisc • Per VM interface traffic policing • NIC bonding with source-MAC load balancing, active backup, and L4 hashing • OpenFlow protocol support (including many extensions for virtualization) • IPv6 support • Multiple tunneling protocols – GRE, VXLAN, IPsec, GRE and VXLAN over IPsec • Remote configuration protocol with C and Python bindings • Kernel and user-space forwarding engine options • Multi-table forwarding pipeline with flow-caching engine • Forwarding layer abstraction to ease porting to new software and hardware platforms • Feature list for container is in process 4/10/15 Creatie Common, SA, NC 10
  • 11.
    Open vSwitch Schema •Database that holds switch level configuration • Custom database with nice properties: • Log-based • Speaks OVSDB management protocol(JSON-RPC) to manager and ovs-vswitchd 4/10/15 Creatie Common, SA, NC 11
  • 12.
    Hardware VTEP Schema 4/10/15Creatie Common, SA, NC 12
  • 13.
    OvS Core Components •ovs-vswitchd • ovs-kernel • ovsdb, ovsdb-server 4/10/15 Creatie Common, SA, NC 13
  • 14.
    The example ofQoS in OVS Database • It is a GUI tool to see the tables in the ovsdb-server • This case is about checking QoS setting
  • 15.
    ovs-appctl ovs-appctl is autility for managing these daemons at runtime. It is useful for configuring log module settings as well as viewing all OpenFlow flows, including hidden ones. 4/10/15 Creatie Common, SA, NC 15
  • 16.
    ovs-dpctl ovs-dpctl is verysimilar to ovs- ofctl in that they both show flow table entries. The flows that ovs- dpctl prints are always an exact match and reflect packets that have actually passed through the system within the last few seconds. . 4/10/15 Creatie Common, SA, NC 16
  • 17.
    ovs-ofctl This tool isused for administering and monitoring OpenFlow switches. Even if OVS isn't configured for centralized administration, ovs-ofctl can be used to show the current state of OVS including features, configuration, and table entries. 4/10/15 Creatie Common, SA, NC 17
  • 18.
    ovs-vsctl This tool isused for configuration and viewing OVS switch operations: • Port configuration, • bridge additions/deletions, • bonding, • VLAN tagging 4/10/15 Creatie Common, SA, NC 18
  • 19.

Editor's Notes

  • #5 From ONOS
  • #6 From NDI
  • #8 From: http://www.slideshare.net/yoramorzach/ch-01-introduction-to-network-troubleshooting
  • #14 # ovs-vswitchd Core component in the system: Communicates with outside world using OpenFlow Communicates with ovsdb­server using management protocol (OVSDB) Communicates with kernel module over netlink Communicates with the system through netdev abstract interface Supports multiple independent datapaths (bridges) Implements mirroring, bonding, and VLANs through modifications of the same flow table exposed through OpenFlow # OVS Kernel Module: openvswitch_mod.ko Handles switching and tunneling Exact-match cache of flows Designed to be fast and simple Packet comes in, if found, associated actions executed and counters updated. Otherwise, sent to userspace Does no flow expiration Knows nothing of OpenFlow Implements tunnels # ovsdb, ovsdb-server Database that holds switch level configuration Custom database with nice properties: Log-based Speaks OVSDB management protocol(JSON-RPC) to manager and ovs-vswitchd
  • #15 See Open vSwitch graphical monitoring tool for details, https://apps.ubuntu.com/cat/applications/raring/ovsdbmonitor/ # Example: Setup QoS, There are two ways to do that: Interface Rate Limiting ( on Interface ) For instance: sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000 sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000 Port QoS Policy ( on Port ) For instance: sudo ovs-vsctl set port eth1 qos=@newqos \ -- --id=@newqos create qos type=linux-htb \ other-config:max-rate=200000000 queues=0=@q0,1=@q1 \ -- --id=@q0 create queue \ other-config:min-rate=100000000 \ other-config:max-rate=100000000 \ -- --id=@q1 create queue \ other-config:min-rate=50000000 \ other-config:max-rate=50000000 Qos can have more than 1 queue