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
NDIAS CTF 2026 問題解説会資料
bata_24
0
180
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
500
Why is RC4 still being used?
tamaiyutaro
0
290
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
140
“ID沼入口” - 基本とセキュリティから始める、考え続けるためのID管理技術勉強会 告知&イントロ
ritou
0
390
依頼文化をやめる日 EM視点で語るPlatform EngineeringとInclusive SRE / Discussing Platform Engineering and Inclusive SRE from an EM's Perspective
shin1988
3
1.5k
完全自律ロボットを作りたくて、先に開発を自律させた話(ROS Japan UG #63 LT)
rryz09
0
150
インフラ寄りSREでも 開発に踏み出せる〜境界を越えてユーザー体験に向き合いたい〜
sansantech
PRO
0
450
4人目のSREはAgent
tanimuyk
0
380
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
260
AI Agent SaaS を支える自社仮想化基盤への挑戦と実運用 / ai-agent-saas-virtualization
flatt_security
2
1.1k
ご挨拶「10周年を迎える共創ラボのこれまでとこれから」
iotcomjpadmin
0
180
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
Rails Girls Zürich Keynote
gr2m
96
14k
Fireside Chat
paigeccino
42
4k
How to Talk to Developers About Accessibility
jct
2
280
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
330
WCS-LA-2024
lcolladotor
0
670
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
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!