Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to OpenvSwitch
Search
Hung-Wei Chiu
September 23, 2017
Technology
680
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to OpenvSwitch
Hung-Wei Chiu
September 23, 2017
More Decks by Hung-Wei Chiu
See All by Hung-Wei Chiu
Kubernetes self-healing of your workload
hwchiu
1
1.1k
DevOps and GenAI: Navigating the Future in the Era of Artificial Intelligence
hwchiu
0
310
Why and Why not of enabling swap in Kubernetes
hwchiu
0
1.3k
Introduction to GitOps
hwchiu
0
580
Exploring the Gradually Lost Technical Skills in the Cloud Native Era
hwchiu
2
5.1k
Does Kubernetes is really easy than VM for cluster administrator.
hwchiu
0
1.1k
Workshop: control and fix your own K8s cluster.
hwchiu
0
510
The difference between Kubenet and Azure CNI in AKS
hwchiu
0
400
Opening in Cloud Native Taiwan User Group Meetup2
hwchiu
0
150
Other Decks in Technology
See All in Technology
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
3
2.1k
ループエンジニアリングでE2Eテストを実践
noriyukitakei
0
270
Tech-Verse 2026_Keynote
lycorptech_jp
PRO
0
130
はじめてのWDM
miyukichi_ospf
0
110
“全部コピーしない”ファイルデータの活用 : — FSx for ONTAP × S3 Tables × Icebergで作るメタデータカタログ
yoshiki0705
0
420
次世代ランサムウェア対策の考察 / 20260704 Mitsutoshi Matsuo
shift_evolve
PRO
5
1.7k
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
180
Zoom2Youtube.Claude
kawaguti
PRO
1
270
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
360
Why is RC4 still being used?
tamaiyutaro
0
290
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
260
5分でわかるDuckDB Quack
chanyou0311
4
310
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
290
The Spectacular Lies of Maps
axbom
PRO
1
850
A Modern Web Designer's Workflow
chriscoyier
698
190k
エンジニアに許された特別な時間の終わり
watany
107
250k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
Odyssey Design
rkendrick25
PRO
2
720
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
170
Embracing the Ebb and Flow
colly
88
5.1k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
360
Unsuck your backbone
ammeep
672
58k
Transcript
Introduction to OVS Hung-Wei Chiu, Linker Networks TFC Meetup 2017/09/23
Hung Wei-Chu • Linker Networks Software Engineer ◦ Container/Virtualization •
SDNDS-TW Co-Founder • Experiences ◦ Synology Network Software Engineer ◦ Open Source Contributor ▪ Mininet / Floodlight / ONOS / FRRouting ◦ Blog ▪ hwchiu.com
Before we talk about to OpenvSwitch.
Have you heard Linux Bridge ?
Linux Bridge • Connect two Ethernet segments together. • Packets
are forwarded based on Ethernet address. • Support filter and shape traffic ◦ ebtables ◦ Via Netfilter, TC
System view eth0 eth1 wlan0 br0 Linux Host
System view eth0 eth1 wlan0 br0 Linux Host tap0 tap1
VM1 eth0 Container1 eth0
Other functions • Packet filter ◦ iptables/ebtables • Traffic shape
◦ TC • 802.1Q ◦ Vlan • Bonding ◦ 802.3 ad/rr/alb/xor. etc
System view User Space Kernel Space iptables ebtables TC Linux
Kernel (Magic) br0 eth0 eth1 L2 forwarding L3 routing ACL/Firewall NAT/Port forwarding
Linux Bridge • Full function provided by kernel network stack
+ bridge • Bridge only handle ◦ L2 forwarding ◦ STP/RSTP
So, What is OpenvSwitch
Introduction • 2008 ◦ First paper about OpenFlow (SDN) ◦
Nicira company ▪ OpenvSwitch + Openflow = NVP (Network Virtualization Platform) • 2012 ◦ VMware buy Nicira ▪ NSX
Introduction • Hypervisors need to bridge traffic. ◦ Linux Bridge
• Why OpenvSwitch ? ◦ Targeted at multi-server virtualization. ◦ Responding to network dynamics ◦ Maintenance of logical tags ◦ Hardware Integration
Features • IPv6 • LACP ◦ 802.3ad • STP/RSTP •
VLAN • Overlay network ◦ GRE/VXLAN/STT/Geneve • OpenFlow
Compare • OpenvSwitch V.S Linux Bridge ◦ Architecture ◦ Functions
System view User Space Kernel Space ovs-vsctl ovs-dpctl ovs-ofctl OpenvSwitch
eth0 eth1 L2 forwarding L3 routing ACL/Firewall NAT/Port forwarding
All in one • iptables/ebtables won’t work anymore. • Linux
native function add complicated ◦ VLAN ◦ Bonding • OpenvSwitch try to handle provide features by itself.
How • Handle packets via Openflow rules. • Handle port
types ◦ Vlan ◦ Bonding • Some features are supported by linux kernel. ◦ Traffic Control ◦ Conntrack
Openflow • What is Openflow?
Openflow • One of the first SDN standards. • Defined
the communication protocol in SDN. ◦ Controller to forwarding plane of network devices.
Openflow rule L2 headers L3 headers L4 headers Switch port
• Forward/Flood • Drop • Modify header • Local • Forward to Controller Packer bytes/counts Match Action Statistics
Example • L2 forwarding src_MAC L3 headers L4 headers Switch
port dst_MAC Action * * 00:11:32:aa:bb:cc * * Forward port 6 src_MAC L3 headers L4 headers Switch port dst_MAC Action * * * * * Normal
Example • L3 forwarding L2 headers dst_ip L4 headers Switch
port src_ip Action 1 * 140.113.123.234 140.114.123.234 * Forward port 4
Example • Firewall L2 headers src_tcp_port dst_tcp_port Switch port L3
headers Action 1 * * * 22 Drop
Who control those openflow rules ?
Controller • SDN Brain • Centralized control all SDN network
devices. • Communicated via Northbound API ◦ Openflow/SNMP/OVSDB/NetConf.
Control Plane Data Plane Network Devices (OVS) Controller (ONOS) NAT
Routing Firewall Control Plane Data Plane Network Devices (OVS) Control Plane Data Plane Network Devices (OVS)
OpenvSwitch • Support connection mode ◦ Controller ◦ Standalone ▪
Default behavior is L2 forwarding • You can control openflow rules via ◦ Openflow controller ◦ OVS tools
How to handle port type • Implement it by OVS
itself • VLAN ◦ Match packet header. ◦ You can also push/pop vlan tags on openflow rules. • Bonding ◦ Active-backup ◦ balance-slb ◦ balance-tcp
How to handle bonding • Active-backup ◦ Only backup. •
Balance-slb ◦ Based on source MAC + vlan Tag ◦ Work with LACP • Balance-tcp ◦ Based on L2/L3/L4 headers ◦ Work with LACP
The other features • Traffic Shape by queue ◦ Linux
kernel TC • Conntrack ◦ Linux kernel conntrack module
How to use OVS • Create ovs bridge (datapath) ◦
ovs-vsctl add-br br0 • How to attach port ◦ ovs-vsctl add-port br0 eth0 • How to dump flows ◦ ovs-ofctl dump-flows br0
Step by Step User Space Kernel Space ovs-vswitchd ovsdb
Step by Step (add-br) User Space Kernel Space ovs-vswitchd ovsdb
br0
Step by Step (add-port) User Space Kernel Space ovs-vswitchd ovsdb
br0 eth0 eth1
Step by Step User Space Kernel Space ovs-vswitchd ovsdb br0
eth0 eth1 Packets come from eth0/eth1 are fully controller by br0 now.
Router Example (ping) 10.0.0.254 30.0.0.254 20.0.0.254 ovs (10.0.0.254, 20.0.0.254, 30.0.0.254)
eth0 eth1 eth2
First • We need to handle ARP request for gateway.
◦ table = 0, priority=65535, arp, arp_tpa=10.0.0.254, actions=LOCAL ◦ table = 0, priority=65535, arp, arp_tpa=20.0.0.254, actions=LOCAL ◦ table = 0, priority=65535, arp, arp_tpa=30.0.0.254, actions=LOCAL • System will reply ARP response for those ARP request.
Second • We need to handle ARP reply from gateway.
◦ table = 0, priority=65535, arp, arp_spa=10.0.0.1, actions=output:1 ◦ table = 0, priority=65535, arp, arp_tpa=20.0.0.1, actions=output:2 ◦ table = 0, priority=65535, arp, arp_tpa=30.0.0.1, actions=output:3
Final • We need to handle ICMP request/reply ◦ table
= 0, icmp, nw_dst = 10.0.0.1, actions=mod_dl_dst=00:00:00:00:00:01,output:1 ◦ table = 0, icmp, nw_dst = 20.0.0.1, actions=mod_dl_dst=00:00:00:00:00:02,output:2 ◦ table = 0, icmp, nw_dst = 30.0.0.1, actions=mod_dl_dst=00:00:00:00:00:03,output:3
How to Contribute to ONOS Thank You!