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
670
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
500
The difference between Kubenet and Azure CNI in AKS
hwchiu
0
390
Opening in Cloud Native Taiwan User Group Meetup2
hwchiu
0
150
Other Decks in Technology
See All in Technology
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
840
新しいVibe Codingと”自走”について
watany
6
300
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
610
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
130
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
370
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
130
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
140
Disciplined Vibes: Scaling AI-Assisted Engineering
sheharyar
0
140
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
370
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
7
1.8k
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
170
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Fireside Chat
paigeccino
42
3.9k
HDC tutorial
michielstock
2
700
It's Worth the Effort
3n
188
29k
Technical Leadership for Architectural Decision Making
baasie
3
400
Music & Morning Musume
bryan
47
7.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
The agentic SEO stack - context over prompts
schlessera
0
810
The Language of Interfaces
destraynor
162
27k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
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!