[2024]Digital Global Overview Report 2024 Meltwater.pdf
Open v switch20150410b
1. Mininet, Wireshark and
Open vSwitch
a study notes
Richard Kuo, Professional-Technical Architect,
Domain 2.0 Architecture & Planning
2. 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
7. 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
9. 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
10. 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
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
14. 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
15. 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
16. 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
17. 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
18. 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
# ovs-vswitchd
Core component in the system:
Communicates with outside world using OpenFlow
Communicates with ovsdbserver 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
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