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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
320
Why and Why not of enabling swap in Kubernetes
hwchiu
0
1.3k
Introduction to GitOps
hwchiu
0
590
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
520
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
“それは自分の仕事じゃない"を越えて行け
yuukiyo
1
350
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3.5k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
インフラ寄りSREでも 開発に踏み出せる〜境界を越えてユーザー体験に向き合いたい〜
sansantech
PRO
2
3.9k
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
250
貴方はどのエンジニアリングを磨くのか
hatyibei
0
130
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
230
ボーイスカウトルールでメモリやスキルを改善しよう
azukiazusa1
4
1.2k
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
1
130
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
240
シンガポールで登壇してきます
yama3133
0
140
ガバナンスの「ちょうどいい落とし所」を探れ!開発スピードを妨げない運用判断の勘所 / SRE NEXT 2026
genda
1
130
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
860
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
330
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Google's AI Overviews - The New Search
badams
0
1.1k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
330
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
390
First, design no harm
axbom
PRO
2
1.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
The untapped power of vector embeddings
frankvandijk
2
1.8k
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!