dragonflow provider流量走向图示

ARP

dragonflow provider arp处理分按照代理和非代理两种,代理是指controller负责回复,非代理是指云主机直接回复

arp代理是由控制节点的流表,所有的云主机的arp请求数据包,会被拦截回复;dragonflow要求所有的云主机arp均由它自己拦截arp请求并回复;如果没有被拦截的arp请求被判定为非云主机地址,会被发给外网网桥。

针对于从外网发进来的arp流量,会根据目的mac进行匹配,如果这些流量是云主机的mac会负责将该流量转发给具体的云主机,如果无法识别mac,就在table75被丢弃

vm1 arping gw

广播

dd.png

1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=607.261s, table=0, n_packets=538, n_bytes=22596, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=647.825s, table=0, n_packets=1102, n_bytes=47508, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=654.478s, table=5, n_packets=583, n_bytes=24486, idle_age=0, priority=200,arp,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,arp_spa=192.168.56.53,arp_sha=fa:16:3e:21:be:e8 actions=resubmit(,20)

cookie=0x0, duration=665.119s, table=20, n_packets=589, n_bytes=24738, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=672.231s, table=25, n_packets=596, n_bytes=25032, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=689.054s, table=55, n_packets=728, n_bytes=34097, idle_age=0, hard_age=688, priority=100,metadata=0x7,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0x7f->NXM_NX_REG7[],resubmit(,75),load:0x7d->NXM_NX_REG7[],resubmit(,75),load:0->NXM_NX_REG7[],resubmit(,75)

广播流量路径:vm1(drop) vm2 default

1
2
3
4
5
6
7
cookie=0x0, duration=770.378s, table=75, n_packets=698, n_bytes=29316, idle_age=1, priority=200,reg6=0x7d,reg7=0x7d,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop

cookie=0x0, duration=777.680s, table=75, n_packets=818, n_bytes=37945, idle_age=1, priority=100,reg7=0x7f actions=resubmit(,105)

cookie=0x0, duration=733.759s, table=75, n_packets=662, n_bytes=27804, idle_age=0, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=742.917s, table=80, n_packets=671, n_bytes=28182, idle_age=0, priority=100,metadata=0x7 actions=output:1


1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=923.834s, table=0, n_packets=1026, n_bytes=63133, idle_age=1, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=944.640s, table=2, n_packets=1043, n_bytes=64153, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=965.539s, table=55, n_packets=894, n_bytes=53640, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=1023.530s, table=75, n_packets=1081, n_bytes=66433, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=1064.648s, table=105, n_packets=2236, n_bytes=116376, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=1101.283s, table=115, n_packets=1170, n_bytes=70200, idle_age=0, priority=100,reg7=0x7d actions=output:16

从云主机发出的arp广播流量,送给table75,因为是广播流量,将该广播数据包复制给 同一个网段的云主机和复制给br-ex连接的patch口

针对于非flat外网? 广播是如何处理的?

单播

dd.png

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cookie=0x0, duration=1601.401s, table=0, n_packets=1528, n_bytes=64176, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=1623.738s, table=0, n_packets=2073, n_bytes=88290, idle_age=1, priority=1 actions=resubmit(,5)

cookie=0x0, duration=1631.400s, table=5, n_packets=1555, n_bytes=65310, idle_age=1, priority=200,arp,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,arp_spa=192.168.56.53,arp_sha=fa:16:3e:21:be:e8 actions=resubmit(,20)

cookie=0x0, duration=1644.069s, table=20, n_packets=1564, n_bytes=65688, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=1665.411s, table=25, n_packets=1585, n_bytes=66570, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1700.542s, table=55, n_packets=639, n_bytes=30510, idle_age=1, priority=70,metadata=0x7,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,75)

cookie=0x0, duration=1765.619s, table=75, n_packets=1690, n_bytes=70980, idle_age=0, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=1803.244s, table=80, n_packets=1727, n_bytes=72534, idle_age=0, priority=100,metadata=0x7 actions=output:1


1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=1817.453s, table=0, n_packets=2198, n_bytes=135047, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=1830.150s, table=2, n_packets=2206, n_bytes=135527, idle_age=1, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1840.858s, table=55, n_packets=1765, n_bytes=105900, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=1856.090s, table=75, n_packets=2033, n_bytes=125147, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=1876.903s, table=105, n_packets=3461, n_bytes=186258, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=1881.039s, table=115, n_packets=2044, n_bytes=122640, idle_age=0, priority=100,reg7=0x7d actions=output:16

vm1 arping qg

dd.png

广播/单播

1
2
3
4
5
6
7
8
9
10
11
12
13
cookie=0x0, duration=2056.929s, table=0, n_packets=1966, n_bytes=82572, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=2114.828s, table=0, n_packets=2547, n_bytes=108198, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=2118.433s, table=5, n_packets=2025, n_bytes=85050, idle_age=0, priority=200,arp,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,arp_spa=192.168.56.53,arp_sha=fa:16:3e:21:be:e8 actions=resubmit(,20)

cookie=0x0, duration=2133.137s, table=20, n_packets=2035, n_bytes=85470, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=2138.258s, table=25, n_packets=161, n_bytes=6762, idle_age=1, priority=100,arp,metadata=0x7,arp_tpa=192.168.56.60,arp_op=1 actions=load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]->NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]->NXM_OF_ARP_TPA[],move:NXM_OF_E

TH_SRC[]->NXM_OF_ETH_DST[],mod_dl_src:fa:16:3e:41:ef:d4,load:0xfa163e41efd4->NXM_NX_ARP_SHA[],load:0xc0a8383c->NXM_OF_ARP_SPA[],move:NXM_NX_REG6[]->NXM_NX_REG7[],resubmit(,115)

cookie=0x0, duration=2162.722s, table=115, n_packets=2352, n_bytes=137754, idle_age=0, priority=100,reg7=0x7d actions=output:16

vm1 — controller — qg

云主机的arp流量景观table25 转接后,直接将会应数据包,将该数据吧发给该云主机

vm1 arping vm2

dd.png

广播

1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=2399.594s, table=0, n_packets=2273, n_bytes=95466, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=2425.953s, table=0, n_packets=2822, n_bytes=119748, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=2431.584s, table=5, n_packets=2302, n_bytes=96684, idle_age=0, priority=200,arp,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,arp_spa=192.168.56.53,arp_sha=fa:16:3e:21:be:e8 actions=resubmit(,20)

cookie=0x0, duration=2449.325s, table=20, n_packets=2315, n_bytes=97230, idle_age=1, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=2452.901s, table=25, n_packets=91, n_bytes=3822, idle_age=1, priority=100,arp,metadata=0x7,arp_tpa=192.168.56.62,arp_op=1 actions=load:0x2->NXM_OF_ARP_OP[],move:NXM_NX_ARP_SHA[]->NXM_NX_ARP_THA[],move:NXM_OF_ARP_SPA[]->NXM_OF_ARP_TPA[],move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],mod_dl_src:fa:16:3e:26:36:07,load:0xfa163e263607->NXM_NX_ARP_SHA[],load:0xc0a8383e->NXM_OF_ARP_SPA[],move:NXM_NX_REG6[]->NXM_NX_REG7[],resubmit(,115)

cookie=0x0, duration=2476.824s, table=115, n_packets=2695, n_bytes=153330, idle_age=0, priority=100,reg7=0x7d actions=output:16

vm1 — controller — vm1

云主机的arp流量景观table25 转接后,直接将会应数据包,将该数据吧发给该云主机

gw arping vm1

dd.png

广播

1
2
3
4
5
cookie=0x0, duration=2797.647s, table=0, n_packets=2727, n_bytes=168129, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=2828.673s, table=2, n_packets=2753, n_bytes=169689, idle_age=1, priority=1 actions=resubmit(,55)

cookie=0x0, duration=2852.608s, table=55, n_packets=1742, n_bytes=87627, idle_age=0, hard_age=2851, priority=100,metadata=0x7,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0x7f->NXM_NX_REG7[],resubmit(,75),load:0x7d->NXM_NX_REG7[],resubmit(,75),load:0->NXM_NX_REG7[],resubmit(,75)

vm1 ,vm2,default

1
2
3
4
5
6
7
8
9
10
11
 cookie=0x0, duration=3043.548s, table=75, n_packets=2629, n_bytes=162259, idle_age=1, priority=100,reg7=0x7d actions=resubmit(,105) 发给vm

cookie=0x0, duration=3084.365s, table=75, n_packets=1992, n_bytes=102637, idle_age=0, priority=100,reg7=0x7f actions=resubmit(,105) 发给vm

cookie=0x0, duration=3110.547s, table=75, n_packets=1186, n_bytes=75679, idle_age=0, priority=51,reg6=0,metadata=0x7 actions=drop 要广播给外网在此丢弃

cookie=0x0, duration=3150.668s, table=105, n_packets=4789, n_bytes=265938, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=3150.738s, table=115, n_packets=3308, n_bytes=188364, idle_age=0, priority=100,reg7=0x7d actions=output:16

cookie=0x0, duration=3150.726s, table=115, n_packets=2055, n_bytes=101898, idle_age=0, priority=100,reg7=0x7f actions=output:22


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 cookie=0x0, duration=3183.224s, table=0, n_packets=505, n_bytes=21210, idle_age=0, priority=100,in_port=22 actions=load:0x7f->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=3234.066s, table=0, n_packets=3526, n_bytes=149316, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=3241.916s, table=5, n_packets=562, n_bytes=23604, idle_age=0, priority=200,arp,reg6=0x7f,dl_src=fa:16:3e:26:36:07,arp_spa=192.168.56.62,arp_sha=fa:16:3e:26:36:07 actions=resubmit(,20)

cookie=0x0, duration=3267.624s, table=20, n_packets=3029, n_bytes=127218, idle_age=1, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=3273.763s, table=25, n_packets=2473, n_bytes=103866, idle_age=1, priority=1 actions=resubmit(,55)

cookie=0x0, duration=3315.921s, table=55, n_packets=1733, n_bytes=80022, idle_age=0, priority=70,metadata=0x7,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,75) 单播流量发给外网

cookie=0x0, duration=3340.281s, table=75, n_packets=2544, n_bytes=106848, idle_age=1, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=3347.397s, table=80, n_packets=2551, n_bytes=107142, idle_age=1, priority=100,metadata=0x7 actions=output:1

单播

dd.png

1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=3547.656s, table=0, n_packets=3734, n_bytes=228559, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=3563.403s, table=2, n_packets=3748, n_bytes=229399, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=3606.613s, table=55, n_packets=86, n_bytes=5160, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:26:36:07 actions=load:0x7f->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=3625.110s, table=75, n_packets=2641, n_bytes=141577, idle_age=0, priority=100,reg7=0x7f actions=resubmit(,105)

cookie=0x0, duration=3650.798s, table=105, n_packets=5861, n_bytes=330258, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=3664.045s, table=115, n_packets=2668, n_bytes=138678, idle_age=0, priority=100,reg7=0x7f actions=output:22

从外网流入内网,根据目的mac判定要发给云主机的reg7,然后再具体output到22口


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 cookie=0x0, duration=3700.659s, table=0, n_packets=1020, n_bytes=42840, idle_age=0, priority=100,in_port=22 actions=load:0x7f->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=3717.888s, table=0, n_packets=4007, n_bytes=169518, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=3724.775s, table=5, n_packets=1042, n_bytes=43764, idle_age=1, priority=200,arp,reg6=0x7f,dl_src=fa:16:3e:26:36:07,arp_spa=192.168.56.62,arp_sha=fa:16:3e:26:36:07 actions=resubmit(,20)

cookie=0x0, duration=3753.486s, table=20, n_packets=3513, n_bytes=147546, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=3765.676s, table=25, n_packets=2963, n_bytes=124446, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=3834.332s, table=55, n_packets=2354, n_bytes=108084, idle_age=0, priority=70,metadata=0x7,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,75)

cookie=0x0, duration=3855.686s, table=75, n_packets=3052, n_bytes=128184, idle_age=0, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=3875.989s, table=80, n_packets=3072, n_bytes=129024, idle_age=1, priority=100,metadata=0x7 actions=output:1

向外发包单播

qg arping vm1

广播

外网发给云主机方向流量

1
2
3
4
5
cookie=0x0, duration=4174.765s, table=0, n_packets=4364, n_bytes=266842, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=4203.729s, table=2, n_packets=4388, n_bytes=267850, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=4225.600s, table=55, n_packets=2664, n_bytes=142522, idle_age=0, hard_age=4224, priority=100,metadata=0x7,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0x7f->NXM_NX_REG7[],resubmit(,75),load:0x7d->NXM_NX_REG7[],resubmit(,75),load:0->NXM_NX_REG7[],resubmit(,75)

vm1 vm2 外网

1
2
3
4
5
6
7
8
9
10
11
12
13
cookie=0x0, duration=4264.216s, table=75, n_packets=3405, n_bytes=207700, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105) vm1

cookie=0x0, duration=4277.591s, table=75, n_packets=3280, n_bytes=178546, idle_age=1, priority=100,reg7=0x7f actions=resubmit(,105). vm2

cookie=0x0, duration=4313.952s, table=75, n_packets=2112, n_bytes=129220, idle_age=0, priority=51,reg6=0,metadata=0x7 actions=drop 丢弃外网数据

cookie=0x0, duration=4493.285s, table=105, n_packets=7169, n_bytes=395490, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=4497.412s, table=115, n_packets=4230, n_bytes=236844, idle_age=0, priority=100,reg7=0x7d actions=output:16

cookie=0x0, duration=4497.399s, table=115, n_packets=3523, n_bytes=183138, idle_age=0, priority=100,reg7=0x7f actions=output:22

cookie=0x0, duration=4666.052s, table=55, n_packets=547, n_bytes=22974, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:41:ef:d4 actions=load:0x25->NXM_NX_REG7[],resubmit(,75)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cookie=0x0, duration=4515.693s, table=0, n_packets=1788, n_bytes=75096, idle_age=0, priority=100,in_port=22 actions=load:0x7f->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=4539s, table=0, n_packets=4781, n_bytes=202026, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=4547.893s, table=5, n_packets=1818, n_bytes=76356, idle_age=0, priority=200,arp,reg6=0x7f,dl_src=fa:16:3e:26:36:07,arp_spa=192.168.56.62,arp_sha=fa:16:3e:26:36:07 actions=resubmit(,20)

cookie=0x0, duration=4559.372s, table=20, n_packets=4271, n_bytes=179382, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=4569.552s, table=25, n_packets=3719, n_bytes=156198, idle_age=1, priority=1 actions=resubmit(,55)

cookie=0x0, duration=4737.192s, table=55, n_packets=618, n_bytes=25956, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:41:ef:d4 actions=load:0x25->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=4601.053s, table=75, n_packets=482, n_bytes=20244, idle_age=0, priority=100,reg7=0x25 actions=resubmit(,80)

cookie=0x0, duration=4612.758s, table=80, n_packets=3767, n_bytes=158214, idle_age=0, priority=100,metadata=0x7 actions=output:1

单播

1
2
3
4
5
6
7
8
9
10
11
cookie=0x0, duration=4799.759s, table=0, n_packets=5245, n_bytes=309830, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=4812.432s, table=2, n_packets=5253, n_bytes=310166, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=4835.325s, table=55, n_packets=602, n_bytes=35202, idle_age=1, priority=100,metadata=0x7,dl_dst=fa:16:3e:26:36:07 actions=load:0x7f->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=4848.726s, table=75, n_packets=3955, n_bytes=210128, idle_age=0, priority=100,reg7=0x7f actions=resubmit(,105)

cookie=0x0, duration=4869.354s, table=105, n_packets=7946, n_bytes=430068, idle_age=0, priority=1 actions=resubmit(,115)

cookie=0x0, duration=4870.397s, table=115, n_packets=3948, n_bytes=201960, idle_age=0, priority=100,reg7=0x7f actions=output:22

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cookie=0x0, duration=4883.625s, table=0, n_packets=2154, n_bytes=90468, idle_age=0, priority=100,in_port=22 actions=load:0x7f->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=4915.097s, table=0, n_packets=5155, n_bytes=217734, idle_age=1, priority=1 actions=resubmit(,5)

cookie=0x0, duration=4918.884s, table=5, n_packets=2187, n_bytes=91854, idle_age=1, priority=200,arp,reg6=0x7f,dl_src=fa:16:3e:26:36:07,arp_spa=192.168.56.62,arp_sha=fa:16:3e:26:36:07 actions=resubmit(,20)

cookie=0x0, duration=4934.423s, table=20, n_packets=4645, n_bytes=195090, idle_age=0, priority=100,arp actions=resubmit(,25)

cookie=0x0, duration=4948.657s, table=25, n_packets=4097, n_bytes=172074, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=4964.890s, table=55, n_packets=845, n_bytes=35490, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:41:ef:d4 actions=load:0x25->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=5000.459s, table=75, n_packets=880, n_bytes=36960, idle_age=0, priority=100,reg7=0x25 actions=resubmit(,80)

cookie=0x0, duration=5013.163s, table=80, n_packets=4166, n_bytes=174972, idle_age=0, priority=100,metadata=0x7 actions=output:1

IP

云主机访问外网,会走默认策略(根据单播)判别,默认是外网网段,发给外网网口

vm1 ping qg

dd.png

在l2根据目的mac判别,如果是qg地址,就将流量发给外网

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cookie=0x0, duration=914.122s, table=0, n_packets=139, n_bytes=13174, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=926.621s, table=0, n_packets=392, n_bytes=33376, idle_age=1, priority=1 actions=resubmit(,5)

cookie=0x0, duration=937.802s, table=5, n_packets=154, n_bytes=15092, idle_age=1, priority=200,ip,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,nw_src=192.168.56.53 actions=resubmit(,10)

cookie=0x0, duration=952.053s, table=10, n_packets=169, n_bytes=16562, idle_age=0, priority=100,ip,reg6=0x7d actions=ct(table=15,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=970.383s, table=15, n_packets=264, n_bytes=25872, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,20)

cookie=0x0, duration=982.595s, table=20, n_packets=359, n_bytes=35182, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1010.847s, table=55, n_packets=234, n_bytes=22596, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:41:ef:d4 actions=load:0x25->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=1120.621s, table=75, n_packets=343, n_bytes=33110, idle_age=0, priority=100,reg7=0x25 actions=resubmit(,80)

cookie=0x0, duration=1129.899s, table=80, n_packets=352, n_bytes=33992, idle_age=1, priority=100,metadata=0x7 actions=output:1


1
2
3
4
5
6
7
8
9
10
11
12
13
 cookie=0x0, duration=1153.258s, table=0, n_packets=661, n_bytes=55121, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=1163.459s, table=2, n_packets=668, n_bytes=55807, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1179.678s, table=55, n_packets=404, n_bytes=38976, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=1196.945s, table=75, n_packets=561, n_bytes=50719, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=1218.256s, table=105, n_packets=436, n_bytes=44139, idle_age=1, priority=100,ip,reg7=0x7d actions=ct(table=110,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=1231.491s, table=110, n_packets=523, n_bytes=51254, idle_age=1, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,115)

cookie=0x0, duration=1260.884s, table=115, n_packets=657, n_bytes=56892, idle_age=0, priority=100,reg7=0x7d actions=output:16

vm1 ping gw

dd.png

如果被访问的节点属于单播,table55在处理其时候,会将该流量交给table75进行路径选择,该流量最终会交给外网发出(因为没有设置标记该流量肯定不在内网节点中)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cookie=0x0, duration=2609.046s, table=0, n_packets=1778, n_bytes=168644, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=2627.708s, table=0, n_packets=2036, n_bytes=189392, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=2634.802s, table=5, n_packets=1703, n_bytes=166894, idle_age=1, priority=200,ip,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,nw_src=192.168.56.53 actions=resubmit(,10)

cookie=0x0, duration=2642.923s, table=10, n_packets=1711, n_bytes=167678, idle_age=1, priority=100,ip,reg6=0x7d actions=ct(table=15,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=2665.294s, table=15, n_packets=1809, n_bytes=177282, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,20)

cookie=0x0, duration=2675.464s, table=20, n_packets=1903, n_bytes=186494, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=2694.717s, table=55, n_packets=600, n_bytes=44410, idle_age=0, priority=70,metadata=0x7,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,75)

cookie=0x0, duration=2720.125s, table=75, n_packets=266, n_bytes=25284, idle_age=1, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=2726.210s, table=80, n_packets=1853, n_bytes=178346, idle_age=0, priority=100,metadata=0x7 actions=output:1


1
2
3
4
5
6
7
8
9
10
11
12
13
 cookie=0x0, duration=2737.383s, table=0, n_packets=2612, n_bytes=227898, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=2747.577s, table=2, n_packets=2625, n_bytes=229756, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=2758.738s, table=55, n_packets=1887, n_bytes=181854, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=2773.966s, table=75, n_packets=2282, n_bytes=210278, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=2786.128s, table=105, n_packets=1869, n_bytes=186632, idle_age=1, priority=100,ip,reg7=0x7d actions=ct(table=110,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=2802.404s, table=110, n_packets=1949, n_bytes=191002, idle_age=1, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,115)

cookie=0x0, duration=2816.284s, table=115, n_packets=2355, n_bytes=211292, idle_age=0, priority=100,reg7=0x7d actions=output:16

vm1 ping vm2

dd.png

其实这部分包含两种情况,这里只展示了一种情况,就是两个provider的云主机在同一个计算节点的br-int上;

另外一种情况是,vm2位于另一个桥上;那么处理有什么差别?

流量流经table55会按照目的mac进行查找,因为远程主机的mac也含有表项目,也可以查找流量路径标记

但是table75并没有针对于该流量路径标记的处理,该流量会走默认处理路径(被交给外网处理)

gw ping vm1

根据mac查找具体的云主机

1
2
3
4
5
6
7
8
9
10
11
12
13
cookie=0x0, duration=1713.178s, table=0, n_packets=591, n_bytes=46402, idle_age=0, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=1726.168s, table=2, n_packets=604, n_bytes=47638, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1746.737s, table=55, n_packets=1232, n_bytes=120356, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=1772.110s, table=75, n_packets=1434, n_bytes=136768, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=1790.411s, table=105, n_packets=1278, n_bytes=127978, idle_age=0, priority=100,ip,reg7=0x7d actions=ct(table=110,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=1805.436s, table=110, n_packets=2266, n_bytes=222068, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,115)

cookie=0x0, duration=1816.578s, table=115, n_packets=1511, n_bytes=139016, idle_age=0, priority=100,reg7=0x7d actions=output:16


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 cookie=0x0, duration=1834.912s, table=0, n_packets=1361, n_bytes=130466, idle_age=0, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=1846.134s, table=0, n_packets=2771, n_bytes=245630, idle_age=1, priority=1 actions=resubmit(,5)

cookie=0x0, duration=1856.520s, table=5, n_packets=1331, n_bytes=130438, idle_age=0, priority=200,ip,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,nw_src=192.168.56.53 actions=resubmit(,10)

cookie=0x0, duration=1866.695s, table=10, n_packets=1341, n_bytes=131418, idle_age=0, priority=100,ip,reg6=0x7d actions=ct(table=15,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=1878.661s, table=15, n_packets=2340, n_bytes=229320, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,20)

cookie=0x0, duration=1888.822s, table=20, n_packets=2351, n_bytes=230398, idle_age=0, priority=1 actions=resubmit(,55)

cookie=0x0, duration=1903.248s, table=55, n_packets=652, n_bytes=53594, idle_age=0, priority=70,metadata=0x7,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,75)

cookie=0x0, duration=1937.775s, table=75, n_packets=439, n_bytes=42070, idle_age=0, priority=50,metadata=0x7 actions=resubmit(,80)

cookie=0x0, duration=1943.869s, table=80, n_packets=445, n_bytes=42658, idle_age=0, priority=100,metadata=0x7 actions=output:1

qg ping vm1

1
2
3
4
5
6
7
8
9
10
11
12
13
cookie=0x0, duration=2195s, table=0, n_packets=1201, n_bytes=98278, idle_age=6, priority=50,in_port=1,vlan_tci=0x0000/0x1fff actions=load:0->OXM_OF_IN_PORT[],load:0x7->OXM_OF_METADATA[],load:0x64->NXM_NX_REG8[],resubmit(,2)

cookie=0x0, duration=2202.007s, table=2, n_packets=1204, n_bytes=98458, idle_age=2, priority=1 actions=resubmit(,55)

cookie=0x0, duration=2247.938s, table=55, n_packets=1637, n_bytes=159628, idle_age=0, priority=100,metadata=0x7,dl_dst=fa:16:3e:21:be:e8 actions=load:0x7d->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=2276.419s, table=75, n_packets=1953, n_bytes=183032, idle_age=0, priority=100,reg7=0x7d actions=resubmit(,105)

cookie=0x0, duration=2293.667s, table=105, n_packets=1675, n_bytes=166884, idle_age=0, priority=100,ip,reg7=0x7d actions=ct(table=110,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=2310.706s, table=110, n_packets=2665, n_bytes=261170, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,115)

cookie=0x0, duration=2315.762s, table=115, n_packets=2025, n_bytes=184700, idle_age=0, priority=100,reg7=0x7d actions=output:16

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cookie=0x0, duration=2340.117s, table=0, n_packets=1774, n_bytes=170156, idle_age=1, priority=100,in_port=16 actions=load:0x7d->NXM_NX_REG6[],load:0x7->OXM_OF_METADATA[],load:0->OXM_OF_IN_PORT[],resubmit(,)

cookie=0x0, duration=2353.382s, table=0, n_packets=3191, n_bytes=286006, idle_age=0, priority=1 actions=resubmit(,5)

cookie=0x0, duration=2363.778s, table=5, n_packets=1732, n_bytes=169736, idle_age=0, priority=200,ip,reg6=0x7d,dl_src=fa:16:3e:21:be:e8,nw_src=192.168.56.53 actions=resubmit(,10)

cookie=0x0, duration=2372.921s, table=10, n_packets=1741, n_bytes=170618, idle_age=0, priority=100,ip,reg6=0x7d actions=ct(table=15,zone=OXM_OF_METADATA[0..15])

cookie=0x0, duration=2383.859s, table=15, n_packets=2742, n_bytes=268716, idle_age=0, priority=65534,ct_state=-new+est-rel-inv+trk actions=resubmit(,20)

cookie=0x0, duration=2393.010s, table=20, n_packets=2753, n_bytes=269794, idle_age=1, priority=1 actions=resubmit(,55)

cookie=0x0, duration=2461.241s, table=55, n_packets=287, n_bytes=28126, idle_age=1, priority=100,metadata=0x7,dl_dst=fa:16:3e:41:ef:d4 actions=load:0x25->NXM_NX_REG7[],resubmit(,75)

cookie=0x0, duration=2475.472s, table=75, n_packets=302, n_bytes=29596, idle_age=0, priority=100,reg7=0x25 actions=resubmit(,80)

cookie=0x0, duration=2430.835s, table=80, n_packets=827, n_bytes=79870, idle_age=0, priority=100,metadata=0x7 actions=output:1