SlideShare a Scribd company logo
Understanding 
OpenVNet’s flow 
!1
http://github.com/axsh/openvnet/wiki/FlowTable 
Sorry for that the instruction is currently written in only Japanese. 
English version will come soon… 
!2
Flows on OVS 
[root@dev1 ~]# ovs-ofctl -O Openflow13 dump-flows br0! 
! 
OFPST_FLOW reply (OF1.3) (xid=0x2):! 
cookie=0x900000000000000, duration=2414584.604s, table=0, n_packets=2, n_bytes=684, 
priority=1,tun_id=0 actions=drop! 
cookie=0x900000000000000, duration=2414584.604s, table=0, n_packets=7, n_bytes=590, 
priority=2,in_port=CONTROLLER actions=write_metadata:0x4040000000000/0x40c0000000000,goto_table:7cookie=0x500000000000003, duration=2414582.969s, table=0, n_packets=220, n_bytes=39634, 
priority=2,in_port=3 actions=write_metadata:0x700040000000005/0xff000c00ffffffff,goto_table:15! 
cookie=0x500000000000001, duration=2414583.972s, table=0, n_packets=1042, n_bytes=133986, 
priority=2,in_port=1 actions=write_metadata:0x700080000000001/0xff000c00ffffffff,goto_table:10! 
cookie=0x5000000fffffffe, duration=2414584.042s, table=0, n_packets=180, n_bytes=38718, 
priority=2,in_port=LOCAL actions=write_metadata:0x40000000000/0xc0000000000,goto_table:6! 
cookie=0x500000000000002, duration=2414582.705s, table=0, n_packets=957, n_bytes=111288, 
priority=2,in_port=2 actions=write_metadata:0x700040000000004/0xff000c00ffffffff,goto_table:15 
Bit unreadable. we created vnflows 
!3
Flows on OpenVNet 
vnflows outputs the flows in a nice format 
[root@dev1 ~]# ovs-ofctl -O Openflow13 dump-flows br0 | vnflows! 
! 
(0): TABLE_CLASSIFIER! 
0-00 174 0 => 
actions=write_metadata:REMOTE(0x80000000000/0xc0000000000),goto_table:TABLE_TUNNEL_PORTS(3)! 
0-01 2 0 => tun_id=0 actions=drop! 
0-02 220 0 => in_port=3 actions=write_metadata:TYPE_INTERFACE| 
LOCAL(0x700040000000005/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRESS_CLASSIFIER(15)! 
0-02 310 0 => in_port=1 actions=write_metadata:TYPE_INTERFACE| 
REMOTE(0x700080000000001/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_INGRESS_CLASSIFIER(10)! 
0-02 180 0 => in_port=LOCAL 
actions=write_metadata:LOCAL(0x40000000000/0xc0000000000),goto_table:TABLE_LOCAL_PORT(6)! 
0-02 4 0 => in_port=CONTROLLER actions=write_metadata:LOCAL| 
NO_CONTROLLER(0x4040000000000/0x40c0000000000),goto_table:TABLE_CONTROLLER_PORT(7) 
Next : take one piece of flows to see how it is formed…. 
!4
Flows on OpenVNet 
Table Num of packets 
Priority 
Timeout Match Action 
! 
0-02 220 0 => in_port=3 actions=write_metadata:TYPE_INTERFACE| 
LOCAL(0x700040000000005/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRES 
S_CLASSIFIER(15)! 
“Metadata: a maskable register value that is used to carry 
information from one table to the next.” 
–OpenFlow Switch Specification Version 1.1.0 
!5
Metadata 
OpenVNet has its own usage of the metadata 
63 0 
metadata value field 
0 - 31 (32bits) 
56 55 40 31 
metadata flag field 
40 - 55 (16bits) 
metadata type field 
56 - 63 (8bits) 
!6
Metadata type 
METADATA_TYPE_SHIFT = 56! 
METADATA_TYPE_MASK = (0xff << METADATA_TYPE_SHIFT)! 
! 
METADATA_TYPE_DATAPATH = (0x1 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_DP_ROUTE_LINK = (0x2 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_NETWORK = (0x3 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_PORT = (0x4 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_ROUTE = (0x5 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_ROUTE_LINK = (0x6 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_INTERFACE = (0x7 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_EDGE_TO_VIRTUAL = (0x8 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_VIRTUAL_TO_EDGE = (0x9 << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_TUNNEL = (0xa << METADATA_TYPE_SHIFT)! 
METADATA_TYPE_DP_NETWORK = (0xb << METADATA_TYPE_SHIFT) 
METADATA_FLAGS_SHIFT = 40! 
METADATA_FLAGS_MASK = (0xffff << METADATA_FLAGS_SHIFT)! 
! 
METADATA_FLAG_VIRTUAL = (0x001 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_PHYSICAL = (0x002 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_LOCAL = (0x004 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_REMOTE = (0x008 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_FLOOD = (0x010 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_VIF = (0x020 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_MAC2MAC = (0x040 << METADATA_FLAGS_SHIFT)! 
METADATA_FLAG_IGNORE_MAC2MAC = (0x100 << METADATA_FLAGS_SHIFT) 
Metadata flag 
!7
Matching metadata 
Suppose a flow contains the following condition match 
metadata=TYPE_INTERFACE(0x70000000000000d/0xff000000ffffffff) 
& filter == 0x70000000000000d 
ex.) 
metadata 
metadata carried from another table 
10-10 128 0 => metadata=TYPE_INTERFACE(0x700000000000001/0xff000000ffffffff) 
actions=goto_table:TABLE_INTERFACE_INGRESS_MAC(11) 
!8
We look at… 
Packet from VM1 to VM5 (only ARP REQUEST) 
but it helps you understand flows for other packets 
!9
VM1 sends an ARP REQUEST packet 
0-02 221 0 => in_port=2 actions=write_metadata:TYPE_INTERFACE| 
LOCAL(0x700040000000004/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRESS_CLASSIFIER 
(15) 
public line 
datapath 
eth0 
eth1 
2 3 
VM1 
vna 
VM2 
host1 
Don’t forget metadata value!! 
we use a lot… 
metadata = 0x700040000000004 
!10
15-40 5 0 => 
arp,metadata=TYPE_INTERFACE(0x700000000000004/0xff000000ffffffff) 
,dl_src=02:00:00:00:00:01,arp_spa=10.101.0.10,arp_sha=02:00:00:00 
:00:01 
actions=write_metadata:TYPE_NETWORK(0x300000000000002/0xff000000f 
fffffff),goto_table:TABLE_INTERFACE_EGRESS_FILTER(18) 
metadata = 0x700040000000004 
public line 
datapath 
eth0 
eth1 
2 3 
VM1 
vna 
VM2 
host1 
MAC address 
02:00:00:00:00:01 
! 
IP address 
10.101.0.10 
0x300040000000002 
!11
18-00 612 0 => 
actions=goto_table:TABLE_NETWORK_SRC_CLASSIFIER(20)! 
! 
! 
20-40 369 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=goto_table:TABLE_VIRTUAL_SRC(21)! 
! 
! 
21-90 432 0 => 
metadata=LOCAL(0x40000000000/0xc0000000000) 
actions=goto_table:TABLE_ROUTE_INGRESS_INTERFACE(30) 
metadata = 0x300040000000002 
!12
30-00 844 0 => 
actions=goto_table:TABLE_NETWORK_DST_CLASSIFIER(40)! 
! 
! 
40-40 307 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=goto_table:TABLE_VIRTUAL_DST(41)! 
! 
! 
41-30 12 0 => dl_dst=ff:ff:ff:ff:ff:ff 
actions=goto_table:TABLE_FLOOD_SIMULATED(50) 
metadata = 0x300040000000002 
!13
50-00 9 0 => 
actions=goto_table:TABLE_FLOOD_LOCAL(51)! 
! 
! 
51-01 3 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=output:2,goto_table:TABLE_FLOOD_SEGMENT(52)! 
! 
52-01 2 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=set_field:02:00:00:bb:00:01->eth_dst,output: 
1,set_field:ff:ff:ff:ff:ff:ff- 
>eth_dst,goto_table:TABLE_FLOOD_TUNNELS(53) 
metadata = 0x300040000000002 
datapath 
eth0 
eth1 
2 3 
VM1 
vna 
VM2 
host1 
MAC address 
02:00:00:00:00:01 
! 
IP address 
10.101.0.10 
!14
DatapathNetwork 
52-01 2 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=set_field:02:00:00:bb:00:01->eth_dst,output: 
1,set_field:ff:ff:ff:ff:ff:ff- 
>eth_dst,goto_table:TABLE_FLOOD_TUNNELS(53) 
Pseudo broadcast MAC address internally used by OpenVNet 
datapath 
eth0 
eth1 
2 3 
VM1 
vna 
VM2 
datapath 
eth0 
eth1 
2 3 
VM3 
vna 
VM4 
host1 host2 
Modify 02:00:00:bb:00:01 
to ff:ff:ff:ff:ff:ff then send 
to VM3 
!15
Set tunnel ID then output to GRE port 
53-01 2 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=set_field:0x80000002->tun_id,output:19 
public line 
datapath 
eth0 
eth1 
2 3 
VM1 
vna 
L3 switch 
GRE tunnel 
VM2 
datapath 
eth0 
eth1 
2 3 
VM5 
vna 
VM6 
host1 host3 
!16
Packet arrived to host3 
Write METADATA_FLAG_REMOTE because the packet came 
from another host 
0-00 345 0 => 
actions=write_metadata:REMOTE(0x80000000000/0xc0000000000),goto_ 
table:TABLE_TUNNEL_PORTS(3) 
metadata = 0x000080000000002 
!17 
tun_id = 0x80000002
port number of GRE tunnel on host3 
3-30 175 0 => in_port=38 
actions=goto_table:TABLE_TUNNEL_NETWORK_IDS(4)! 
! 
4-30 174 0 => tun_id=0x80000002 
actions=write_metadata:TYPE_NETWORK(0x300000000000002/0xff000000 
ffffffff),goto_table:TABLE_NETWORK_SRC_CLASSIFIER(20)! 
! 
20-40 391 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=goto_table:TABLE_VIRTUAL_SRC(21) 
0x300080000000002 
metadata = 0x000080000000002 
!18 
tun_id = 0x80000002
Mac learning 
21-81 5 0 => arp,metadata=TYPE_NETWORK| 
REMOTE(0x300080000000002/0xff000c00ffffffff) 
actions=learn(table=41,idle_timeout=36000,priority=35,cookie=0x4000000000 
00002,metadata=0x300040000000002,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:N 
XM_NX_TUN_ID[]- 
>NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),goto_table:TABLE_ROUTE_INGRESS_ 
INTERFACE(30) 
public line 
datapath 
eth0 
MAC address 
02:00:00:00:00:01 
! 
IP address 
10.101.0.10 
eth1 
2 3 
VM1 
vna 
GRE tunnel L3 switch 
VM2 
datapath 
eth0 
2 3 
VM5 
vna 
VM6 
Learning MAC address! 
02:00:00:00:00:01! 
comes from eth0 
host1 host3 
!19
30-00 1223 0 => 
actions=goto_table:TABLE_NETWORK_DST_CLASSIFIER(40)! 
! 
! 
40-40 307 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=goto_table:TABLE_VIRTUAL_DST(41)! 
! 
! 
41-30 11 0 => dl_dst=ff:ff:ff:ff:ff:ff 
actions=goto_table:TABLE_FLOOD_SIMULATED(50) 
metadata = 0x300080000000002 
!20
50-00 7 0 => 
actions=goto_table:TABLE_FLOOD_LOCAL(51)! 
51-01 3 0 => 
metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) 
actions=output:2,goto_table:TABLE_FLOOD_SEGMENT(52)! 
! 
52-10 6 0 => 
metadata=REMOTE(0x80000000000/0xc0000000000) actions=drop 
Packet public line 
is sent to port 2, 
which is associated with VM5 
datapath 
eth0 
It then drops the packet 
since no more forwarding is needed. 
metadata = 0x300080000000002 
eth1 
2 3 
VM1 
vna 
L3 switch 
GRE tunnel 
VM2 
datapath 
eth0 
2 3 
VM5 
vna 
VM6 
host1 host3 
!21

More Related Content

Similar to WUG #003 - Understanding OpenVNet's flow

Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
Wim Godden
 
Moony li pacsec-1.8
Moony li pacsec-1.8Moony li pacsec-1.8
Moony li pacsec-1.8
PacSecJP
 
Anonymous Remote Arbitrary Code Execution in Alien Arena
Anonymous Remote Arbitrary Code Execution in Alien ArenaAnonymous Remote Arbitrary Code Execution in Alien Arena
Anonymous Remote Arbitrary Code Execution in Alien Arena
Jason Geffner
 
3
33
Marat-Slides
Marat-SlidesMarat-Slides
Marat-Slides
Marat Vyshegorodtsev
 
Cisco Networking Class Final Assignment
Cisco Networking Class Final AssignmentCisco Networking Class Final Assignment
Cisco Networking Class Final Assignment
Morgan Tucker
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)
Security Date
 
Troubleshooting Tips and Tricks for Database 19c ILOUG Feb 2020
Troubleshooting Tips and Tricks for Database 19c   ILOUG Feb 2020Troubleshooting Tips and Tricks for Database 19c   ILOUG Feb 2020
Troubleshooting Tips and Tricks for Database 19c ILOUG Feb 2020
Sandesh Rao
 
Product catlog
Product catlogProduct catlog
Product catlog
Aarya Technologies
 
CC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver ModuleCC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver Module
Aarya Technologies
 
Labmannual
LabmannualLabmannual
Labmannual
Matiullah Jamil
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
Joshua McKenzie
 
mplste-130112120119-phpapp02.pdf
mplste-130112120119-phpapp02.pdfmplste-130112120119-phpapp02.pdf
mplste-130112120119-phpapp02.pdf
Huynh MVT
 
Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
Wim Godden
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performance
Duoyi Wu
 
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
Sandesh Rao
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assembly
Marian Marinov
 
Ccna2 mod3-configuring a-router
Ccna2 mod3-configuring a-routerCcna2 mod3-configuring a-router
Ccna2 mod3-configuring a-router
97148881557
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmark
Louis liu
 
An Example MIPS
An Example  MIPSAn Example  MIPS
An Example MIPS
Sandra Long
 

Similar to WUG #003 - Understanding OpenVNet's flow (20)

Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
 
Moony li pacsec-1.8
Moony li pacsec-1.8Moony li pacsec-1.8
Moony li pacsec-1.8
 
Anonymous Remote Arbitrary Code Execution in Alien Arena
Anonymous Remote Arbitrary Code Execution in Alien ArenaAnonymous Remote Arbitrary Code Execution in Alien Arena
Anonymous Remote Arbitrary Code Execution in Alien Arena
 
3
33
3
 
Marat-Slides
Marat-SlidesMarat-Slides
Marat-Slides
 
Cisco Networking Class Final Assignment
Cisco Networking Class Final AssignmentCisco Networking Class Final Assignment
Cisco Networking Class Final Assignment
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)
 
Troubleshooting Tips and Tricks for Database 19c ILOUG Feb 2020
Troubleshooting Tips and Tricks for Database 19c   ILOUG Feb 2020Troubleshooting Tips and Tricks for Database 19c   ILOUG Feb 2020
Troubleshooting Tips and Tricks for Database 19c ILOUG Feb 2020
 
Product catlog
Product catlogProduct catlog
Product catlog
 
CC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver ModuleCC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver Module
 
Labmannual
LabmannualLabmannual
Labmannual
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
 
mplste-130112120119-phpapp02.pdf
mplste-130112120119-phpapp02.pdfmplste-130112120119-phpapp02.pdf
mplste-130112120119-phpapp02.pdf
 
Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performance
 
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
Troubleshooting Tips and Tricks for Database 19c - Sangam 2019
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assembly
 
Ccna2 mod3-configuring a-router
Ccna2 mod3-configuring a-routerCcna2 mod3-configuring a-router
Ccna2 mod3-configuring a-router
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmark
 
An Example MIPS
An Example  MIPSAn Example  MIPS
An Example MIPS
 

Recently uploaded

一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
Jhone kinadey
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
campbellclarkson
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
mohitd6
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
WebConnect Pvt Ltd
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Vince Scalabrino
 

Recently uploaded (20)

bgiolcb
bgiolcbbgiolcb
bgiolcb
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
 

WUG #003 - Understanding OpenVNet's flow

  • 2. http://github.com/axsh/openvnet/wiki/FlowTable Sorry for that the instruction is currently written in only Japanese. English version will come soon… !2
  • 3. Flows on OVS [root@dev1 ~]# ovs-ofctl -O Openflow13 dump-flows br0! ! OFPST_FLOW reply (OF1.3) (xid=0x2):! cookie=0x900000000000000, duration=2414584.604s, table=0, n_packets=2, n_bytes=684, priority=1,tun_id=0 actions=drop! cookie=0x900000000000000, duration=2414584.604s, table=0, n_packets=7, n_bytes=590, priority=2,in_port=CONTROLLER actions=write_metadata:0x4040000000000/0x40c0000000000,goto_table:7cookie=0x500000000000003, duration=2414582.969s, table=0, n_packets=220, n_bytes=39634, priority=2,in_port=3 actions=write_metadata:0x700040000000005/0xff000c00ffffffff,goto_table:15! cookie=0x500000000000001, duration=2414583.972s, table=0, n_packets=1042, n_bytes=133986, priority=2,in_port=1 actions=write_metadata:0x700080000000001/0xff000c00ffffffff,goto_table:10! cookie=0x5000000fffffffe, duration=2414584.042s, table=0, n_packets=180, n_bytes=38718, priority=2,in_port=LOCAL actions=write_metadata:0x40000000000/0xc0000000000,goto_table:6! cookie=0x500000000000002, duration=2414582.705s, table=0, n_packets=957, n_bytes=111288, priority=2,in_port=2 actions=write_metadata:0x700040000000004/0xff000c00ffffffff,goto_table:15 Bit unreadable. we created vnflows !3
  • 4. Flows on OpenVNet vnflows outputs the flows in a nice format [root@dev1 ~]# ovs-ofctl -O Openflow13 dump-flows br0 | vnflows! ! (0): TABLE_CLASSIFIER! 0-00 174 0 => actions=write_metadata:REMOTE(0x80000000000/0xc0000000000),goto_table:TABLE_TUNNEL_PORTS(3)! 0-01 2 0 => tun_id=0 actions=drop! 0-02 220 0 => in_port=3 actions=write_metadata:TYPE_INTERFACE| LOCAL(0x700040000000005/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRESS_CLASSIFIER(15)! 0-02 310 0 => in_port=1 actions=write_metadata:TYPE_INTERFACE| REMOTE(0x700080000000001/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_INGRESS_CLASSIFIER(10)! 0-02 180 0 => in_port=LOCAL actions=write_metadata:LOCAL(0x40000000000/0xc0000000000),goto_table:TABLE_LOCAL_PORT(6)! 0-02 4 0 => in_port=CONTROLLER actions=write_metadata:LOCAL| NO_CONTROLLER(0x4040000000000/0x40c0000000000),goto_table:TABLE_CONTROLLER_PORT(7) Next : take one piece of flows to see how it is formed…. !4
  • 5. Flows on OpenVNet Table Num of packets Priority Timeout Match Action ! 0-02 220 0 => in_port=3 actions=write_metadata:TYPE_INTERFACE| LOCAL(0x700040000000005/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRES S_CLASSIFIER(15)! “Metadata: a maskable register value that is used to carry information from one table to the next.” –OpenFlow Switch Specification Version 1.1.0 !5
  • 6. Metadata OpenVNet has its own usage of the metadata 63 0 metadata value field 0 - 31 (32bits) 56 55 40 31 metadata flag field 40 - 55 (16bits) metadata type field 56 - 63 (8bits) !6
  • 7. Metadata type METADATA_TYPE_SHIFT = 56! METADATA_TYPE_MASK = (0xff << METADATA_TYPE_SHIFT)! ! METADATA_TYPE_DATAPATH = (0x1 << METADATA_TYPE_SHIFT)! METADATA_TYPE_DP_ROUTE_LINK = (0x2 << METADATA_TYPE_SHIFT)! METADATA_TYPE_NETWORK = (0x3 << METADATA_TYPE_SHIFT)! METADATA_TYPE_PORT = (0x4 << METADATA_TYPE_SHIFT)! METADATA_TYPE_ROUTE = (0x5 << METADATA_TYPE_SHIFT)! METADATA_TYPE_ROUTE_LINK = (0x6 << METADATA_TYPE_SHIFT)! METADATA_TYPE_INTERFACE = (0x7 << METADATA_TYPE_SHIFT)! METADATA_TYPE_EDGE_TO_VIRTUAL = (0x8 << METADATA_TYPE_SHIFT)! METADATA_TYPE_VIRTUAL_TO_EDGE = (0x9 << METADATA_TYPE_SHIFT)! METADATA_TYPE_TUNNEL = (0xa << METADATA_TYPE_SHIFT)! METADATA_TYPE_DP_NETWORK = (0xb << METADATA_TYPE_SHIFT) METADATA_FLAGS_SHIFT = 40! METADATA_FLAGS_MASK = (0xffff << METADATA_FLAGS_SHIFT)! ! METADATA_FLAG_VIRTUAL = (0x001 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_PHYSICAL = (0x002 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_LOCAL = (0x004 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_REMOTE = (0x008 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_FLOOD = (0x010 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_VIF = (0x020 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_MAC2MAC = (0x040 << METADATA_FLAGS_SHIFT)! METADATA_FLAG_IGNORE_MAC2MAC = (0x100 << METADATA_FLAGS_SHIFT) Metadata flag !7
  • 8. Matching metadata Suppose a flow contains the following condition match metadata=TYPE_INTERFACE(0x70000000000000d/0xff000000ffffffff) & filter == 0x70000000000000d ex.) metadata metadata carried from another table 10-10 128 0 => metadata=TYPE_INTERFACE(0x700000000000001/0xff000000ffffffff) actions=goto_table:TABLE_INTERFACE_INGRESS_MAC(11) !8
  • 9. We look at… Packet from VM1 to VM5 (only ARP REQUEST) but it helps you understand flows for other packets !9
  • 10. VM1 sends an ARP REQUEST packet 0-02 221 0 => in_port=2 actions=write_metadata:TYPE_INTERFACE| LOCAL(0x700040000000004/0xff000c00ffffffff),goto_table:TABLE_INTERFACE_EGRESS_CLASSIFIER (15) public line datapath eth0 eth1 2 3 VM1 vna VM2 host1 Don’t forget metadata value!! we use a lot… metadata = 0x700040000000004 !10
  • 11. 15-40 5 0 => arp,metadata=TYPE_INTERFACE(0x700000000000004/0xff000000ffffffff) ,dl_src=02:00:00:00:00:01,arp_spa=10.101.0.10,arp_sha=02:00:00:00 :00:01 actions=write_metadata:TYPE_NETWORK(0x300000000000002/0xff000000f fffffff),goto_table:TABLE_INTERFACE_EGRESS_FILTER(18) metadata = 0x700040000000004 public line datapath eth0 eth1 2 3 VM1 vna VM2 host1 MAC address 02:00:00:00:00:01 ! IP address 10.101.0.10 0x300040000000002 !11
  • 12. 18-00 612 0 => actions=goto_table:TABLE_NETWORK_SRC_CLASSIFIER(20)! ! ! 20-40 369 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=goto_table:TABLE_VIRTUAL_SRC(21)! ! ! 21-90 432 0 => metadata=LOCAL(0x40000000000/0xc0000000000) actions=goto_table:TABLE_ROUTE_INGRESS_INTERFACE(30) metadata = 0x300040000000002 !12
  • 13. 30-00 844 0 => actions=goto_table:TABLE_NETWORK_DST_CLASSIFIER(40)! ! ! 40-40 307 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=goto_table:TABLE_VIRTUAL_DST(41)! ! ! 41-30 12 0 => dl_dst=ff:ff:ff:ff:ff:ff actions=goto_table:TABLE_FLOOD_SIMULATED(50) metadata = 0x300040000000002 !13
  • 14. 50-00 9 0 => actions=goto_table:TABLE_FLOOD_LOCAL(51)! ! ! 51-01 3 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=output:2,goto_table:TABLE_FLOOD_SEGMENT(52)! ! 52-01 2 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=set_field:02:00:00:bb:00:01->eth_dst,output: 1,set_field:ff:ff:ff:ff:ff:ff- >eth_dst,goto_table:TABLE_FLOOD_TUNNELS(53) metadata = 0x300040000000002 datapath eth0 eth1 2 3 VM1 vna VM2 host1 MAC address 02:00:00:00:00:01 ! IP address 10.101.0.10 !14
  • 15. DatapathNetwork 52-01 2 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=set_field:02:00:00:bb:00:01->eth_dst,output: 1,set_field:ff:ff:ff:ff:ff:ff- >eth_dst,goto_table:TABLE_FLOOD_TUNNELS(53) Pseudo broadcast MAC address internally used by OpenVNet datapath eth0 eth1 2 3 VM1 vna VM2 datapath eth0 eth1 2 3 VM3 vna VM4 host1 host2 Modify 02:00:00:bb:00:01 to ff:ff:ff:ff:ff:ff then send to VM3 !15
  • 16. Set tunnel ID then output to GRE port 53-01 2 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=set_field:0x80000002->tun_id,output:19 public line datapath eth0 eth1 2 3 VM1 vna L3 switch GRE tunnel VM2 datapath eth0 eth1 2 3 VM5 vna VM6 host1 host3 !16
  • 17. Packet arrived to host3 Write METADATA_FLAG_REMOTE because the packet came from another host 0-00 345 0 => actions=write_metadata:REMOTE(0x80000000000/0xc0000000000),goto_ table:TABLE_TUNNEL_PORTS(3) metadata = 0x000080000000002 !17 tun_id = 0x80000002
  • 18. port number of GRE tunnel on host3 3-30 175 0 => in_port=38 actions=goto_table:TABLE_TUNNEL_NETWORK_IDS(4)! ! 4-30 174 0 => tun_id=0x80000002 actions=write_metadata:TYPE_NETWORK(0x300000000000002/0xff000000 ffffffff),goto_table:TABLE_NETWORK_SRC_CLASSIFIER(20)! ! 20-40 391 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=goto_table:TABLE_VIRTUAL_SRC(21) 0x300080000000002 metadata = 0x000080000000002 !18 tun_id = 0x80000002
  • 19. Mac learning 21-81 5 0 => arp,metadata=TYPE_NETWORK| REMOTE(0x300080000000002/0xff000c00ffffffff) actions=learn(table=41,idle_timeout=36000,priority=35,cookie=0x4000000000 00002,metadata=0x300040000000002,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:N XM_NX_TUN_ID[]- >NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),goto_table:TABLE_ROUTE_INGRESS_ INTERFACE(30) public line datapath eth0 MAC address 02:00:00:00:00:01 ! IP address 10.101.0.10 eth1 2 3 VM1 vna GRE tunnel L3 switch VM2 datapath eth0 2 3 VM5 vna VM6 Learning MAC address! 02:00:00:00:00:01! comes from eth0 host1 host3 !19
  • 20. 30-00 1223 0 => actions=goto_table:TABLE_NETWORK_DST_CLASSIFIER(40)! ! ! 40-40 307 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=goto_table:TABLE_VIRTUAL_DST(41)! ! ! 41-30 11 0 => dl_dst=ff:ff:ff:ff:ff:ff actions=goto_table:TABLE_FLOOD_SIMULATED(50) metadata = 0x300080000000002 !20
  • 21. 50-00 7 0 => actions=goto_table:TABLE_FLOOD_LOCAL(51)! 51-01 3 0 => metadata=TYPE_NETWORK(0x300000000000002/0xff000000ffffffff) actions=output:2,goto_table:TABLE_FLOOD_SEGMENT(52)! ! 52-10 6 0 => metadata=REMOTE(0x80000000000/0xc0000000000) actions=drop Packet public line is sent to port 2, which is associated with VM5 datapath eth0 It then drops the packet since no more forwarding is needed. metadata = 0x300080000000002 eth1 2 3 VM1 vna L3 switch GRE tunnel VM2 datapath eth0 2 3 VM5 vna VM6 host1 host3 !21