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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
330
Why and Why not of enabling swap in Kubernetes
hwchiu
0
1.3k
Introduction to GitOps
hwchiu
0
600
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
530
The difference between Kubenet and Azure CNI in AKS
hwchiu
0
410
Opening in Cloud Native Taiwan User Group Meetup2
hwchiu
0
150
Other Decks in Technology
See All in Technology
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
SnowflakeCoCoでデータエンジニアリング!
foursue
0
170
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
230
Goでデータパイプラインを作ろう
sansantech
PRO
0
220
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
180
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
4
1k
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
120
サイバー捜査員研修(前半)
nomizone
1
1.5k
Retriever と Reranker、結局どうする?
kazuaki
2
660
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
210
AI時代の強いチームの作り方
yuukiyo
23
15k
NetBoxを利用した作業効率化の試み_NetDevNight4
tnoha
0
460
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
240
GraphQLとの向き合い方2022年版
quramy
50
15k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
The SEO identity crisis: Don't let AI make you average
varn
0
520
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Context Engineering - Making Every Token Count
addyosmani
9
1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
440
Done Done
chrislema
186
16k
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!