Introduce the basic concept of Open vSwitch. In this slide, we talked about how Linux kernel and networking stack worked together to forward and process the network packet and also compare those Linux networking stack functionality with Open vSwitch and Openflow.
At the end of this slide, we talk about the challenge to integrate the Open vSwitch with Kubernetes, what kind of the networking function we need to resolve and what is the benefit we can get from the Open Vswitch.
2. Who Am I
• HungWei Chiu (hwchiu)
• Open Networking Foundation
• Member of Technical Staff
• https://hwchiu.com
• Kubernetes/Container
• Networking/Linux/Kernel
• Co-Organizer of SDNDS-TW/
CNTUG
5. Data Link
Switch v.s Router
TCP/IP Model
Network
Transport
Application
Physical
Data Link
Physical
Data Link
Network
Physical
Data Link
Network
Transport
Application
Physical
Client Server
Switch
Router
6. Router v.s Switch
• Both
• Store and forward packets
• Network layer
• Data Link layer
• Router:
• Routing table
• Routing algorithms
• Switch
• Switch table
• Learning algorithms
9. Data Link
Switch v.s Router
TCP/IP Model
Network
Transport
Application
Physical
Data Link
Physical
Data Link
Network
Physical
Data Link
Network
Transport
Application
Physical
Client Server
Switch
Router
eth0
Linux Bridge
br0
Container
172.17.8.1
172.17.8.56
10.1.2.3
Linux Host
Container
172.17.8.57
Container to WAN
10. Linux Host
Switch v.s Router
TCP/IP Model
Data Link
Network
Transport
Application
Physical
Data Link
Physical
Data Link
Network
Physical
Data Link
Network
Transport
Application
Physical
Client Server
Switch
Router
Container WAN
Linux
Bridge
Linux Bridge
Instances
veth
function call function call
18. Openflow
• Maintained by Open Networking Foundation (ONF)
• The first standard communication interface defined
between control and forwarding layers of an SDN
architecture.
https://en.wikipedia.org/wiki/OpenFlow
25. Flows
Switch Port Layer 2 Layer 3 Layer 4eth_type Action
…*…* Arp
ARP
Switch Port Layer 3 Header Layer 4 HeaderLayer2 Action
• Change src/dst Mac
• Forward to port…..…..* *
Routing
Switch Port Layer 3 Header Layer 4 Action
* *
NAT
*
Layer2
….. …..
• Change src/dst IP
• Forward to port
26. Open vSwtich
• Need to prepare all flow rules
• Without Linux Kernel (mostly)
• Openflow controller
• Program your logic
• CLI
• Difficult to maintain all logics.
27. Other functions
• Linux
• Tunneling
• GRE/VXLAN/GRE/
STT/NVGRE
• iptables extension
• nfqueue ..etc
• 802.1q VLAN
• Linux
• Link Aggregation with/
without LACP
• QoS
• Traffic Shaping
• Socket Applications
• VPN, other
networking functions.
30. Kubernetes & Networking
• Pod communication
• Pod to Pod
• Pod to Wan
• Service
• ClusterIP
• NodePort
• NetworkPolicy
CNI Flannel
• Linux Bridge
• ARP Table
• Routing Table
• Iptables
Iptables
Implemented by
CNI.
31. Challenge
• CNI
• Pod to Pod
• Same Node
• Different Node
• Overlay ?
• Pod to Wan
• NAT
32. Challenge
• Kube-proxy (service)
• Monitor service object
• Create/Update/Remove rules
• Translate policy to OpenFlow rules and apply to all switches.
• NetworkPolicy
• Monitor network policy object
• Create/Update/Remove rules
• Translate policy to OpenFlow rules and apply to all switches.
38. Why
• Networking performance?
• Open vSwitch + DPDK (Kernel Bypass)
• Hardware offloading
• Service chain?
• Rewrite packets header
• Redirect packets within different Pods
• Networking Traffic Monitor?
• Latency
• Counters
39. K8S Node
Pod Pod Pod
eth0
Openflow Switch Openflow Switch Openflow Switch
Data network
K8S Node
Pod Pod Pod
eth0
K8S Node
Pod Pod Pod
eth0
Openflow Controller
Reference Architecture
41. One
• Learn how system works
• Computing/Storage/Networking
• Linux
• Increase your value
• Don’t rely on Framework or Tools
• Helm/Operator …etc
• Never be the Yaml Engineer