netvirt-DVR路由流表分析

OpenFlow基础入门知识 本文进行讨论的是OpenFlow 1.0和OpenFlow 1.3的基本知识 Overview: Openflow 1.0: 安全通道+单张流表+ipv4 Openflow 1.3: 安全通道+多级流表(流水线pipeline)+组表+测量表+ipv6+.....   流(flow) 1.流由管理员定义,根据不同的流执行不同的策略 2.在一段时间内,经过同一个网络的一系列具有相同... 阅读详情

Dvr 流表分析

阅读本文前请参考阅读netvirt-浮动ip之流表实现分析,分析环境都是基于该文档中的物理环境。

本文档流表分析所依据的物理拓扑图和流表管道如下:
图片一
如上图,tap设备“:”后面为openflow端口号

图片二

1.东西向流表分析

1.1 同子网,同计算节点虚拟机间互访

虚拟机A: 192.168.100.4 compute1

虚拟机B:192.168.100.5 compute1

192.168.100.4 ping 192.168.100.5

outbound —request

cookie=0x8000000, duration=496736.592s, table=0, n_packets=9974, n_bytes=1118500, priority=4,in_port=2 actions=write_metadata:0x410000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=496734.338s, table=17, n_packets=9974, n_bytes=1118500, priority=1,metadata=0x410000000000/0xffffff0000000000 actions=write_metadata:0xa000410000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=503280.813s, table=40, n_packets=9860, n_bytes=1118690, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=503427.291s, table=17, n_packets=10374, n_bytes=1170500, priority=5,metadata=0xa000410000000000/0xffffff0000000000 actions=write_metadata:0xc0004100000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x1080000, duration=515251.235s, table=19, n_packets=26179005, n_bytes=14185066330, priority=0 actions=resubmit(,17)

cookie=0x8040000, duration=514616.493s, table=17, n_packets=2063, n_bytes=184176, priority=6,metadata=0xc000410000000000/0xffffff0000000000 actions=write_metadata:0xe000411388000000/0xfffffffffffffffe,goto_table:50

cookie=0x8051388, duration=514712.959s, table=50, n_packets=2164, n_bytes=193738, priority=20,metadata=0x411388000000/0x1fffffffff000000,dl_src=fa:16:3e:d2:41:24 actions=goto_table:51

cookie=0x8031388, duration=514965.945s, table=51, n_packets=2046, n_bytes=193452, priority=20,metadata=0x1388000000/0xffff000000,dl_dst=fa:16:3e:06:e1:36 actions=load:0x4200->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=513923.972s, table=220, n_packets=1703, n_bytes=149276, priority=6,reg6=0x4200 actions=load:0xe0004200->NXM_NX_REG6[],write_metadata:0xe000420000000000/0xfffffffffffffffe,goto_table:251

 cookie=0x6900000, duration=668.645s, table=251, n_packets=1236, n_bytes=120198, priority=61005,ip,metadata=0x420000000000/0x1fffff0000000000 actions=resubmit(,220)    

cookie=0x8000007, duration=513815.884s, table=220, n_packets=1589, n_bytes=138496, priority=7,reg6=0xe0004200 actions=output:3

inbound—reply

cookie=0x8000000, duration=515151.152s, table=0, n_packets=2582, n_bytes=250374, priority=4,in_port=3 actions=write_metadata:0x420000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=515190.554s, table=17, n_packets=2626, n_bytes=254574, priority=1,metadata=0x420000000000/0xffffff0000000000 actions=write_metadata:0xa000420000000000/0xfffffffffffffffe,goto_table:40
#---------设置安全组规则流表

cookie=0x6900000, duration=515313.604s, table=40, n_packets=2546, n_bytes=253992, priority=61005,ip,metadata=0x420000000000/0x1fffff0000000000 actions=resubmit(,17)
#---------匹配通过后,跳入表17

cookie=0x8000001, duration=515383.147s, table=17, n_packets=2827, n_bytes=273768, priority=5,metadata=0xa000420000000000/0xffffff0000000000 actions=write_metadata:0xc0004200000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x1080000, duration=516101.855s, table=19, n_packets=26233690, n_bytes=14213658127, priority=0 actions=resubmit(,17)

cookie=0x8040000, duration=515612.100s, table=17, n_packets=2898, n_bytes=275324, priority=6,metadata=0xc000420000000000/0xffffff0000000000 actions=write_metadata:0xe000421388000000/0xfffffffffffffffe,goto_table:50

cookie=0x8031388, duration=515683.933s, table=51, n_packets=2804, n_bytes=265496, priority=20,metadata=0x1388000000/0xffff000000,dl_dst=fa:16:3e:d2:41:24 actions=load:0x4100->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=515718.509s, table=220, n_packets=42123, n_bytes=3444466, priority=6,reg6=0x4100 actions=load:0xe0004100->NXM_NX_REG6[],write_metadata:0xe000410000000000/0xfffffffffffffffe,goto_table:251

cookie=0x6900000, duration=2833.379s, table=251, n_packets=41918, n_bytes=3447056, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=516041.828s, table=220, n_packets=42468, n_bytes=3477044, priority=7,reg6=0xe0004100 actions=output:2

1.2 同子网,不同计算节点虚拟机间互访

虚拟机A: 192.168.100.4 compute1

虚拟机B:192.168.100.6 compute2

192.168.10.4 (compute1) ping 192.168.10.6 (compute2) (不同计算节点)

outbound –request

compute1:

cookie=0x8000000, duration=496736.592s, table=0, n_packets=9974, n_bytes=1118500, priority=4,in_port=2 actions=write_metadata:0x410000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=496734.338s, table=17, n_packets=9974, n_bytes=1118500, priority=1,metadata=0x410000000000/0xffffff0000000000 actions=write_metadata:0xa000410000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=503280.813s, table=40, n_packets=9860, n_bytes=1118690, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=503427.291s, table=17, n_packets=10374, n_bytes=1170500, priority=5,metadata=0xa000410000000000/0xffffff0000000000 actions=write_metadata:0xc0004100000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x1080000, duration=515251.235s, table=19, n_packets=26179005, n_bytes=14185066330, priority=0 actions=resubmit(,17)

cookie=0x8040000, duration=514616.493s, table=17, n_packets=2063, n_bytes=184176, priority=6,metadata=0xc000410000000000/0xffffff0000000000 actions=write_metadata:0xe000411388000000/0xfffffffffffffffe,goto_table:50

cookie=0x8051388, duration=514712.959s, table=50, n_packets=2164, n_bytes=193738, priority=20,metadata=0x411388000000/0x1fffffffff000000,dl_src=fa:16:3e:d2:41:24 actions=goto_table:51
#----------源mac是已知的就进行处理,跳入表51,
不知道就需要向控制器发送packet_in消息请求流表

cookie=0x8031388, duration=1926.951s, table=51, n_packets=663, n_bytes=62958, priority=20,metadata=0x1388000000/0xffff000000,dl_dst=fa:16:3e:76:69:01 actions=set_field:0x37->tun_id,output:6
#-------根据mac地址,将数据包引入隧道口,最终路由到相应计算节点。
隧道为vxlan隧道,这里设置了tun_id,对应于网络id

这里tun4a3b08ef6e9的openflow端口号为6,tun4a3b08ef6e9建立了本地隧道ip192.168.10.22(copute1)到远端隧道ip192.168.10.24(compute2)之间的隧道

compute2:

从compute1发送的request包经过隧道进入compute2的tun843fe0e497d口,openflow端口号为5

cookie=0x8000001, duration=517283.573s, table=0, n_packets=696080, n_bytes=50627237, priority=5,in_port=5 actions=write_metadata:0x450000000001/0x1fffff0000000001,goto_table:36

cookie=0x9000037, duration=517454.470s, table=36, n_packets=1510, n_bytes=146767, priority=5,tun_id=0x37 actions=load:0x3700->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=517496.024s, table=220, n_packets=1853, n_bytes=165085, priority=6,reg6=0x3700 actions=load:0xe0003700->NXM_NX_REG6[],write_metadata:0xe000370000000000/0xfffffffffffffffe,goto_table:251

cookie=0x6900000, duration=4369.608s, table=251, n_packets=1494, n_bytes=147599, priority=61005,ip,metadata=0x370000000000/0x1fffff0000000000 actions=resubmit(,220)
#---------设置安全组规则 进入虚拟机方向

cookie=0x8000007, duration=517629.120s, table=220, n_packets=1994, n_bytes=178455, priority=7,reg6=0xe0003700 actions=output:2

 2(tap277ea1d6-7b) 即为 192.168.100.6 的tap设备

inbound–reply

 compute2:

cookie=0x8000000, duration=517856.535s, table=0, n_packets=1971, n_bytes=188958, priority=4,in_port=2 actions=write_metadata:0x370000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=517898.901s, table=17, n_packets=2016, n_bytes=193256, priority=1,metadata=0x370000000000/0xffffff0000000000 actions=write_metadata:0xa000370000000000/0xfffffffffffffffe,goto_table:40             

cookie=0x6900000, duration=517937.452s, table=40, n_packets=1910, n_bytes=186934, priority=61005,ip,metadata=0x370000000000/0x1fffff0000000000 actions=resubmit(,17)
#----------表40 设置安全组规则的流表

cookie=0x8000001, duration=518052.654s, table=17, n_packets=2181, n_bytes=208866, priority=5,metadata=0xa000370000000000/0xffffff0000000000 actions=write_metadata:0xc0003700000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x1080000, duration=518471.445s, table=19, n_packets=26430474, n_bytes=14300659600, priority=0 actions=resubmit(,17)

cookie=0x8040000, duration=518091.122s, table=17, n_packets=2220, n_bytes=212632, priority=6,metadata=0xc000370000000000/0xffffff0000000000 actions=write_metadata:0xe000371388000000/0xfffffffffffffffe,goto_table:50

cookie=0x8051388, duration=518183.825s, table=50, n_packets=2318, n_bytes=221900, priority=20,metadata=0x371388000000/0x1fffffffff000000,dl_src=fa:16:3e:76:69:01 actions=goto_table:51
#-------判断是否为已知的mac,其他的向控制器发送消息获取

cookie=0x8031388, duration=3428.435s, table=51, n_packets=2252, n_bytes=213864, priority=20,metadata=0x1388000000/0xffff000000,dl_dst=fa:16:3e:d2:41:24 actions=set_field:0x41->tun_id,output:5                         #-----在数据包中添加tun_id,然后从5口发出

 5(tun843fe0e497d)隧道端口,其本端隧道ip192.168.10.24(compute2),远端隧道ip为192.168.10.22(compute1)

compute1:
对端compute1 中6(tun4a3b08ef6e9)接受compute2发送的vxlan报文

cookie=0x8000001, duration=518621.082s, table=0, n_packets=698909, n_bytes=50665838, priority=5,in_port=6 actions=write_metadata:0x440000000001/0x1fffff0000000001,goto_table:36

cookie=0x9000041, duration=518642.831s, table=36, n_packets=2765, n_bytes=266049, priority=5,tun_id=0x41 actions=load:0x4100->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=518666.508s, table=220, n_packets=45241, n_bytes=3740582, priority=6,reg6=0x4100 actions=load:0xe0004100->NXM_NX_REG6[],write_metadata:0xe000410000000000/0xfffffffffffffffe,goto_table:251

cookie=0x6900000, duration=5560.074s, table=251, n_packets=44640, n_bytes=3713812, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=518769.020s, table=220, n_packets=45348, n_bytes=3750788, priority=7,reg6=0xe0004100 actions=output:2

最终进入虚拟机192.168.100.4

1.3 不同子网,同计算节点虚拟机间互访

虚拟机A:192.168.100.4 compute1

虚拟机B:192.168.101.4 compute1

192.168.100.4 ping 192.168.101.4

outbound –request

cookie=0x8000000, duration=496736.592s, table=0, n_packets=9974, n_bytes=1118500, priority=4,in_port=2 actions=write_metadata:0x410000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=496734.338s, table=17, n_packets=9974, n_bytes=1118500, priority=1,metadata=0x410000000000/0xffffff0000000000 actions=write_metadata:0xa000410000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=503280.813s, table=40, n_packets=9860, n_bytes=1118690, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=503427.291s, table=17, n_packets=10374, n_bytes=1170500, priority=5,metadata=0xa000410000000000/0xffffff0000000000 actions=write_metadata:0xc0004100000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x8000009, duration=520097.535s, table=19, n_packets=27174, n_bytes=3302480, priority=20,metadata=0x222fe/0xfffffffe,dl_dst=fa:16:3e:33:77:83 actions=goto_table:21
#------表19 L3网关,floatingip相关mac处理。fa:16:3e:33:77:83为192.168.100.1默认网关的mac。
由于是跨网段,其目的ip为192.168.101.4,但是目的mac还是为192.168.100.1默认网关的mac

cookie=0x8000003, duration=7046.973s, table=21, n_packets=498, n_bytes=48804, priority=42,ip,metadata=0x222fe/0xfffffffe,nw_dst=192.168.101.4 actions=write_actions(group:150011)

group_id=150011,type=all,bucket=actions=set_field:fa:16:3e:cd:7e:e8->eth_dst,load:0x4800->NXM_NX_REG6[],resubmit(,220)
#------修改目的mac(网关mac)为真实的目的mac

cookie=0x6900000, duration=7323.597s, table=220, n_packets=922, n_bytes=88952, priority=6,reg6=0x4800 actions=load:0xe0004800->NXM_NX_REG6[],write_metadata:0xe000480000000000/0xfffffffffffffffe,goto_table:251
#---------安全组,入方向过滤

cookie=0x6900000, duration=7378.653s, table=251, n_packets=907, n_bytes=90066, priority=61005,ip,metadata=0x480000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=7424.997s, table=220, n_packets=1026, n_bytes=98976, priority=7,reg6=0xe0004800 actions=output:7

inbound-reply

cookie=0x8000000, duration=7588.975s, table=0, n_packets=1193, n_bytes=114914, priority=4,in_port=7 actions=write_metadata:0x480000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=7627.736s, table=17, n_packets=1234, n_bytes=118876, priority=1,metadata=0x480000000000/0xffffff0000000000 actions=write_metadata:0xa000480000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=7652.860s, table=40, n_packets=1206, n_bytes=118236, priority=61005,ip,metadata=0x480000000000/0x1fffff0000000000 actions=resubmit(,17)
#----------处理安全组相关,出虚拟机方向过滤

cookie=0x8000001, duration=7724.590s, table=17, n_packets=1335, n_bytes=128550, priority=5,metadata=0xa000480000000000/0xffffff0000000000 actions=write_metadata:0xc0004800000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x8000009, duration=7828.804s, table=19, n_packets=1241, n_bytes=121618, priority=20,metadata=0x222fe/0xfffffffe,dl_dst=fa:16:3e:e7:2c:21 actions=goto_table:21
#---------fa:16:3e:e7:2c:21 为192.168.101.1网关mac地址

cookie=0x8000003, duration=521049.125s, table=21, n_packets=40184, n_bytes=3275909, priority=42,ip,metadata=0x222fe/0xfffffffe,nw_dst=192.168.100.4 actions=write_actions(group:150004)

group_id=150004,type=all,bucket=actions=set_field:fa:16:3e:d2:41:24->eth_dst,load:0x4100->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=521119.648s, table=220, n_packets=47772, n_bytes=3983356, priority=6,reg6=0x4100 actions=load:0xe0004100->NXM_NX_REG6[],write_metadata:0xe000410000000000/0xfffffff
ffffffffe,goto_table:251 

cookie=0x6900000, duration=7981.008s, table=251, n_packets=47045, n_bytes=3949502, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,220)
#-----------处理安全组相关 入虚拟机方向过滤

cookie=0x8000007, duration=521198.634s, table=220, n_packets=47853, n_bytes=3991182, priority=7,reg6=0xe0004100 actions=output:2

1.4 不同子网,不同计算节点虚拟机间互访

虚拟机A:192.168.100.4 compute1

虚拟机B:192.168.101.6 compute2

192.168.100.4 ping 192.168.101.6

outbound –request

compute1:

cookie=0x8000000, duration=496736.592s, table=0, n_packets=9974, n_bytes=1118500, priority=4,in_port=2 actions=write_metadata:0x410000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=496734.338s, table=17, n_packets=9974, n_bytes=1118500, priority=1,metadata=0x410000000000/0xffffff0000000000 actions=write_metadata:0xa000410000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=503280.813s, table=40, n_packets=9860, n_bytes=1118690, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=503427.291s, table=17, n_packets=10374, n_bytes=1170500, priority=5,metadata=0xa000410000000000/0xffffff0000000000 actions=write_metadata:0xc0004100000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x8000009, duration=520097.535s, table=19, n_packets=27174, n_bytes=3302480, priority=20,metadata=0x222fe/0xfffffffe,dl_dst=fa:16:3e:33:77:83 actions=goto_table:21
#------表19 L3网关,floatingip处理。fa:16:3e:33:77:83为192.168.100.1默认网关的mac。
由于是跨网段,其目的ip为192.168.101.6,但是目的mac还是为192.168.100.1默认网关的mac:fa:16:3e:33:77:83

cookie=0x8000003, duration=6703.524s, table=21, n_packets=541, n_bytes=53018, priority=42,ip,metadata=0x222fe/0xfffffffe,nw_dst=192.168.101.6 actions=write_actions(set_field:0x1118f->tun_id,output:6)

compute1节点上的隧道口信息
6(tun4a3b08ef6e9): addr:b2:85:a8:5e:1d:b5
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbp

Port "tun4a3b08ef6e9"
            Interface "tun4a3b08ef6e9"
                type: vxlan
                options: {key=flow, local_ip="192.168.10.22", remote_ip="192.168.10.24"}    
192.168.10.24为compute2的本地隧道Ip     
从上面看到数据包从compute1的隧道端口tun4a3b08ef6e9发出,到compute2相应隧道口

compute2节点上的隧道口信息
Port "tun843fe0e497d"
            Interface "tun843fe0e497d"
                type: vxlan
                options: {key=flow, local_ip="192.168.10.24", remote_ip="192.168.10.22"}

5(tun843fe0e497d): addr:de:9d:07:58:63:68
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max

compute2:

cookie=0x8000001, duration=521797.419s, table=0, n_packets=705304, n_bytes=51363296, priority=5,in_port=5 actions=write_metadata:0x450000000001/0x1fffff0000000001,goto_table:36

cookie=0x901118f, duration=8681.714s, table=36, n_packets=865, n_bytes=84770, priority=5,tun_id=0x1118f actions=write_actions(group:150013)

group_id=150013,type=all,bucket=actions=set_field:fa:16:3e:d4:70:b1->eth_dst,load:0x4a00->NXM_NX_REG6[],resubmit(,220)
#-----针对跨网段情况,修改目的mac地址

cookie=0x6900000, duration=8845.413s, table=220, n_packets=1244, n_bytes=116700, priority=6,reg6=0x4a00 actions=load:0xe0004a00->NXM_NX_REG6[],write_metadata:0xe0004a0000000000/0xfffffffffffffffe,goto_table:251

cookie=0x6900000, duration=8881.479s, table=251, n_packets=1140, n_bytes=112900, priority=61005,ip,metadata=0x4a0000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=8935.783s, table=220, n_packets=1337, n_bytes=125702, priority=7,reg6=0xe0004a00 actions=output:7

7(tapc93414f4-31): addr:fe:16:3e:d4:70:b1
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
tapc93414f4-31对应于虚拟机192.168.101.6

inbound—reply

compute2:

cookie=0x8000000, duration=9410.115s, table=0, n_packets=1763, n_bytes=168566, priority=4,in_port=7 actions=write_metadata:0x4a0000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=9441.356s, table=17, n_packets=1797, n_bytes=171842, priority=1,metadata=0x4a0000000000/0xffffff0000000000 actions=write_metadata:0xa0004a0000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=9480.426s, table=40, n_packets=1748, n_bytes=171048, priority=61005,ip,metadata=0x4a0000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=9521.398s, table=17, n_packets=1878, n_bytes=179724, priority=5,metadata=0xa0004a0000000000/0xffffff0000000000 actions=write_metadata:0xc0004a00000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x8000009, duration=9611.179s, table=19, n_packets=1774, n_bytes=173852, priority=20,metadata=0x222fe/0xfffffffe,dl_dst=fa:16:3e:e7:2c:21 actions=goto_table:21
#-------------fa:16:3e:e7:2c:21 为192.168.101.1网关的mac地址

cookie=0x8000003, duration=8001.326s, table=21, n_packets=1854, n_bytes=181692, priority=42,ip,metadata=0x222fe/0xfffffffe,nw_dst=192.168.100.4 actions=write_actions(set_field:0x11186->tun_id,output:5)   

compute2隧道口信息
5(tun843fe0e497d): addr:de:9d:07:58:63:68
    config:     0
    state:      0
    speed: 0 Mbps now, 0 Mbps max
Port "tun843fe0e497d"
            Interface "tun843fe0e497d"
                type: vxlan
                options: {key=flow, local_ip="192.168.10.24", remote_ip="192.168.10.22"}

compute1隧道口信息

Port "tun4a3b08ef6e9"
            Interface "tun4a3b08ef6e9"
                type: vxlan
                options: {key=flow, local_ip="192.168.10.22", remote_ip="192.168.10.24"}

6(tun4a3b08ef6e9): addr:b2:85:a8:5e:1d:b5
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max

compue1:

cookie=0x8000001, duration=523029.274s, table=0, n_packets=707739, n_bytes=51372368, priority=5,in_port=6 actions=write_metadata:0x440000000001/0x1fffff0000000001,goto_table:36

cookie=0x9011186, duration=523051.365s, table=36, n_packets=2073, n_bytes=203154, priority=5,tun_id=0x11186 actions=write_actions(group:150004)

 group_id=150004,type=all,bucket=actions=set_field:fa:16:3e:d2:41:24->eth_dst,load:0x4100->NXM_NX_REG6[],resubmit(,220)

cookie=0x6900000, duration=523112.961s, table=220, n_packets=49851, n_bytes=4181890, priority=6,reg6=0x4100 actions=load:0xe0004100->NXM_NX_REG6[],write_metadata:0xe000410000000000/0xfffffff
ffffffffe,goto_table:251

cookie=0x6900000, duration=9977.597s, table=251, n_packets=49033, n_bytes=4144326, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=523183.920s, table=220, n_packets=49923, n_bytes=4188834, priority=7,reg6=0xe0004100 actions=output:2

2.南北向流表分析

2.1 虚拟机访问外网网关

虚拟机 192.168.100.4

外网网关为 10.89.1.254

流表规则同外部网络访问floatingip,inbound和outbound调换即可

参考阅读netvirt-浮动ip之流表实现分析

2.2 绑定floatingip的虚拟机访问内部私网网关

虚拟机A: 192.168.100.4 floatingip:192.168.30.39

子网网关: 192.168.100.1

outbound—-request

cookie=0x8000000, duration=496736.592s, table=0, n_packets=9974, n_bytes=1118500, priority=4,in_port=2 actions=write_metadata:0x410000000000/0xffffff0000000001,goto_table:17

cookie=0x6900000, duration=496734.338s, table=17, n_packets=9974, n_bytes=1118500, priority=1,metadata=0x410000000000/0xffffff0000000000 actions=write_metadata:0xa000410000000000/0xfffffffffffffffe,goto_table:40

cookie=0x6900000, duration=503280.813s, table=40, n_packets=9860, n_bytes=1118690, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,17)

cookie=0x8000001, duration=503427.291s, table=17, n_packets=10374, n_bytes=1170500, priority=5,metadata=0xa000410000000000/0xffffff0000000000 actions=write_metadata:0xc0004100000222fe/0xfffffffffffffffe,goto_table:19

cookie=0x8000009, duration=503475.503s, table=19, n_packets=10311, n_bytes=1180354, priority=20,metadata=0x222fe/0xfffffffe,dl_dst=fa:16:3e:33:77:83 actions=goto_table:21
#---------处理l3网关,floatingip的表

cookie=0x8000003, duration=503681.784s, table=21, n_packets=461, n_bytes=45178, priority=10,icmp,metadata=0x222fe/0xfffffffe,nw_dst=192.168.100.1,icmp_type=8,icmp_code=0 actions=move:NXM_OF_
ETH_SRC[]->NXM_OF_ETH_DST[],set_field:fa:16:3e:33:77:83->eth_src,move:NXM_OF_IP_SRC[]->NXM_OF_IP_DST[],set_field:192.168.100.1->ip_src,set_field:0->icmp_type,load:0->NXM_OF_IN_PORT[],resubmit(,21)
#-------根据匹配到的request包自学习构建reply包的流表规则,源mac设置为目的mac,
网关mac设置为源mac;源ip设置为目的ip,目的网关ip设置为源ip.set_field:0->icmp_type
即设定icmp包为reply

inbound–reply

cookie=0x8000003, duration=511668.356s, table=21, n_packets=37816, n_bytes=3043845, priority=42,ip,metadata=0x222fe/0xfffffffe,nw_dst=192.168.100.4 actions=write_actions(group:150004)
#------------匹配reply包,目的地址为192.168.100.4,进入组表

group_id=150004,type=all,bucket=actions=set_field:fa:16:3e:d2:41:24->eth_dst,load:0x4100->NXM_NX_REG6[],resubmit(,220)
#---------------设置目的mac

 cookie=0x6900000, duration=512056.590s, table=220, n_packets=38583, n_bytes=3108914, priority=6,reg6=0x4100 actions=load:0xe0004100->NXM_NX_REG6[],write_metadata:0xe000410000000000/0xfffffffffffffffe,goto_table:251

cookie=0x6900000, duration=512094.034s, table=251, n_packets=38326, n_bytes=3095040, priority=61005,ip,metadata=0x410000000000/0x1fffff0000000000 actions=resubmit(,220)

cookie=0x8000007, duration=512142.152s, table=220, n_packets=38671, n_bytes=3117370, priority=7,reg6=0xe0004100 actions=output:2                

本文链接,欢迎学习指正

Neutron的dvr模式下br-int桥二、三层流量泛洪问题分析.pptx neutron的dvr模式下的br-int泛洪问题分析,提出修复方法,并验证通过。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 立即下载

相关推荐

高温环境下RS485通信故障分析与MOS管解决方案

RS485通信作为工业控制领域的基础总线技术,其可靠性直接影响系统稳定性。在高温等恶劣环境下,传统三极管开关电路会因温度特性导致通信故障。通过分析三极管Ube电压随温度变化的特性,揭示了电路失效的物理原理。相比之下,MOS管作为电压控制型器件,具有温度稳定性好、功耗低等优势,更适合工业环境应用。本文通过一个发动机舱内RS485通信故障的实际案例,详细对比了三极管与MOS管在高温环境下的性能差异,并给出了具体的电路改进方案。该案例对工业通信接口设计具有普遍参考价值,特别适用于需要应对高温、振动等挑战性环境的硬

weixin_42612405的博客 406

neutron DVR

DVR 简介 DVR 提出的背景 在 Neutron 的网络环境中,跨子网的虚机通信是需要通过 Neutron 的路由器。这既包括不同子网的虚拟机之间的通信,又包括虚拟机与外网之间的通信。在 DVR 被提出之前, 由于 Neutron 的 legacy router 只会部署在网络节点上,因此会造成网络节点的流量过大,从而产生了两个问题,其一是网络节点将成为整个 Neutron 网络的瓶颈,其...

weixin_33763244的博客 544

Qt UI界面美化教程1:【“飞扬青云” Qt精美控件】使用教程1

相信很多小伙伴在使用Qt Widget的过程中都会遇到一个问题,开发出来的界面,丑!丑!丑!当然Qt做界面美化可以用到QSS,需要对前端知识有一定了解,后续本套教程将会做讲解。本篇文章,我们直接站在巨人(大佬飞扬青云)的肩膀上,使用他开发好的163款自定义控件,请大家一定支持他,去给他小心心,他的个人主页:本篇文章只讲述如何在 QtDesigner 安装这些控件。

2401_87556704的博客 1420

OpenStack Neutron 中的 DVR 简介与 OVS 流表分析

https://www.ibm.com/developerworks/cn/cloud/library/1509_xuwei_dvr/

llxx1234的博客 786

UE5新手必看:3种UI定位方法实战(含蓝图配置截图)

本文为UE5新手详细解析了三种核心UI定位方法:屏幕空间、场景空间和世界空间。通过实战蓝图配置与控件操作,指导开发者如何根据HUD、角色血条、3D物体标记等不同应用场景,正确选择并配置UI的定位方式,以实现清晰的信息传递与沉浸式体验。

weixin_29018815的博客 473

stata:stata软件教程(人大十八讲)(1) 第一章 stata入门

第一章 stata入门1.1 安装1.2 启用和退出1.3 打开和查看数据1.4 寻求帮助与网络资源1.5 命令示例1.6 几个环境设置1.7 复习与练习1.8 附录 注:教材为:Stata 统计分析教程 stata软件教程(人大十八讲) 中国人民大学出版社 陈传波 1.1 安装 1.2 启用和退出 1.3 打开和查看数据 1.4 寻求帮助与网络资源 1.5 命令示例 1.6 几个环境设置 1.7 复习与练习 1.8 附录 ...

qq_47805483的博客 1万+

Neutron 理解 (4): Neutron OVS OpenFlow 流表 和 L2 Population [Netruon OVS OpenFlow tables + L2 Populatio...

学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GRE/VxLAN 虚拟网络 (4)Neutron OVS OpenFlow 流表 和 L2 Population (5)Neutron DHCP Agent (6)Neutron L3 Ag...

weixin_33835690的博客 307

学Simulink——基于风力发电系统的建模与仿真场景:基于自适应控制的风力发电系统输出功率调节

本文详细介绍了使用Simulink搭建风力发电系统自适应控制模型的完整流程。首先阐述了风速波动对电网的影响及自适应控制的优势,然后逐步指导创建Simulink项目、搭建系统结构(包括风速源、风轮机、发电机等模块),重点讲解了模型参考自适应控制器(MRAC)的设计步骤和参数设置方法。通过仿真分析验证了系统在风速变化时仍能保持输出功率稳定,展示了自适应控制的响应速度和鲁棒性。最后提出了引入深度学习预测、多变量控制等优化方向,为新能源领域工程师提供了实用的建模与仿真指导。

amy_mhd的博客 220

netvirt-浮动ip之流表实现分析

分析基于iptalbes和openflow的浮动ip功能实现

rtmdk的博客 2425

Fiori Elements 从入门到精通开发教程的文章目录

Fiori Elements 开发技术相对 SAP 其他历史悠久,发展成熟的开发技术来说,是一个新事物。正因如此,迄今为止国内深入讲解 Fiori Elements 应用的中文材料几乎没有。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 4757

JVM高频面试基本问题与知识点整理

JVM高频面试基本问题与知识点整理

曾经“等你生日那天”都遥远得像未来,如今却可欢愉的挥手说“下个十年见” 87万+

一种SDN路由转发流表实现方法

1.        背景与需求 1.1    背景 传统上,路由器采用Radix树进行IP路由存储,但是到了SDN中,流表的key不一定是IP地址,所以就需要对路由表的存储更换一种算法,可以达到快速增、删、改、查的效果。由于KEY的类型不确定,设置无法比较大小,所以Hash表是一种不错的选择。 一般的HASH表都是通过数组(哈希桶)和链表的组合而成,如下图所示。数据元素的key通过给定的ha

六六哥的博客 1万+

Android 12.0 以太网和wifi共存的产品wifi优先级设置功能实现

在12.0的系统ROM定制化开发中,在对于一些有线网和wifi共存的产品中,由于某些产品的特殊要求首选使用wifi,而在原生 系统中以太网的优先级高于wifi的,所以就需要从优先级的设置来分析,实现设置优先级的相关功能实现

安卓兼职framework和app工程师的博客 944

OpenStack DVR 原理深入分析

一、DVR实验环境 一套vlan模式的openstack环境,interface_driver使用openvswitch,并在计算节点添加br-ex,用于计算节点虚拟机出外网。 二、DVR配置 1、控制节点 a、编辑/etc/neutron/neutron.conf [DEFAULT] router_distributed = True b、重启neutron-server服务 2...

OpenInfra的博客 2512

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

OVS流表分析

在具体介绍OVS的工作机制之前,读者要先理解OVS并不是Neutron网络实现的唯一选择。实际上,Neutron中底层网络的实现千差万别:有的agent本地是真正处理数据流的网络设备(OVS,Router,LoadBalancer等),而有的agent本地是SDN控制器(如ODL、ONOS、OpenContrail、NSX等)。上述Neutron底层网络的两种模型示意如下。第一种模型中Neutron相当于SDN控制器,plugin与agent间的通信机制(如rpc)就相当于简单的南向协议。第二种模型中Neu

weixin_60043341的博客 3889

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

讲清楚说明白openstack中vm流量走向之2——DVR模式

https://blog.51cto.com/arkling/2409789

北观止的博客 2101

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

OpenFlow协议Open Flow交换机跟流表(FlowTable)

Open Flow协议、Open Flow交换机跟流表(FlowTable) 传统网络:传统网络的缺陷或者催生SDN的背景请参考链接https://www.cnblogs.com/031602523liu/p/8887740.html 网络设备手工维护,依靠传统网络管理软件等方式辅助人工进行维护,运维效率低下,容易出现由于个人能力的差异以及响应等原因, 影响...

John_ToStr的博客 1万+

OpenStack 南北流量分析(DVR模式)

DVR 模式不绑定浮动IP的情况下 [root@controller ~] openstack network agent list --router router_snat # 查看 router 所在节点 +--------------------------------------+------------+----------------+------------------...

Nicholas的专栏 1402

OpenStack Security (quqi99)

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明 (http://blog.youkuaiyun.com/quqi99)OpenStack Security includes security group in compute nodes and FWaaS in l3 node. Security group can be implemented by IPtables

技术并艺术着 1624

DVR分布式路由

1. 背景   没有使用DVR的场景:      从图中可以明显看到东西向和南北向的流量会集中到网络节点,这会使网络节点成为瓶颈。   如果启用DVR,如下图:      对于东西向的流量, 流量会直接在计算节点之间传递。   对于南北向的流量,如果有floating ip,流量就直接走计算节点。如果没有floating ip,则会走网络节点。 2.部署以及流量走向 ...

weixin_30496431的博客 801

DVR 和 NVR 的区别

DVR 和 NVR 的区别

woxiangzi的博客 1万+

openvswitch——mac和vlan learning for ingress port

对于普通的switch,都会有这个学习的过程,当一个包到来的时候,由于包里面有MAC,VLAN Tag,以及从哪个口进来的这个信息。于是switch学习后,维护了一个表格port –> MAC –> VLAN Tag。 这样以后如果有需要发给这个MAC的包,不用ARP,switch自然之道应该发给哪个port,应该打什么VLAN Tag。 OVS也要学习这个,并维护三个之间的map...

weixin_30314793的博客 509

二层 netvirt 网络、流表逻辑整理

opendaylight 二层 netvirt 网络、流表逻辑整理 这是自己整理的大致逻辑,代码版本是氧版本的,欢迎大家指教,和我交流讨论!

王の蔑视的博客 335

从代码入手,OpenStack新项目Dragonflow分析报告

随着DragonFlow的不断演进,从最初的利用多级流表解决虚拟网络东西向流量的分布式的问题,到现在的l3 local controller,分布式的dhcp和dnat,再到分布式DB的使用,总体来说DragonFlow在不断的向前推进,功能在不断的完善,基于DragonFlow架构的介绍网上有很多,这里不做过多的介绍,本文将基于DragonFlow现有代码做出分析,有错误或者不完善的地方请批评指...

karamos的专栏 959
上一篇: netvirt-浮动ip之流表实现分析
下一篇: SSL/TLS协议交互流程分析
forrest_zhu
博客等级 码龄11年 8粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值