Skip to content

Instantly share code, notes, and snippets.

@trozet
Created November 25, 2024 15:09
Show Gist options
  • Save trozet/f77046b60869b01e6ba312aa50aa5a52 to your computer and use it in GitHub Desktop.
Save trozet/f77046b60869b01e6ba312aa50aa5a52 to your computer and use it in GitHub Desktop.
[root@ovn-worker2 ~]# ovn-trace --ct new default.l3.primary_ovn-worker2 'inport == "default.l3.primary_default_client" && eth.src == 0a:58:0a:14:02:04 && eth.dst==0a:58:0a:14:02:01 && tcp && ip4.src==10.20.2.4 && ip4.dst==10.20.1.3 && ip.ttl==64 && tcp.dst==80'
# tcp,reg14=0x3,vlan_tci=0x0000,dl_src=0a:58:0a:14:02:04,dl_dst=0a:58:0a:14:02:01,nw_src=10.20.2.4,nw_dst=10.20.1.3,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=80,tcp_flags=0
ingress(dp="default.l3.primary_ovn-worker2", inport="default.l3.primary_default_client")
----------------------------------------------------------------------------------------
0. ls_in_check_port_sec (northd.c:9432): 1, priority 50, uuid 8816ec3d
reg0[15] = check_in_port_sec();
next;
4. ls_in_pre_acl (northd.c:6167): ip, priority 100, uuid ebc0eec1
reg0[0] = 1;
next;
6. ls_in_pre_stateful (northd.c:6410): reg0[0] == 1, priority 100, uuid f87926d3
ct_next;
ct_next(ct_state=new|trk)
-------------------------
7. ls_in_acl_hint (northd.c:6464): ct.new && !ct.est, priority 7, uuid e40b7f07
reg0[7] = 1;
reg0[9] = 1;
next;
8. ls_in_acl_eval (northd.c:7534): ip && !ct.est, priority 1, uuid 8fc757ee
reg0[1] = 1;
next;
10. ls_in_acl_action (northd.c:7374): reg8[30..31] == 0, priority 500, uuid 3dc2ec80
reg8[30..31] = 1;
next(8);
8. ls_in_acl_eval (northd.c:7534): ip && !ct.est, priority 1, uuid 8fc757ee
reg0[1] = 1;
next;
10. ls_in_acl_action (northd.c:7374): reg8[30..31] == 1, priority 500, uuid 7df8f97a
reg8[30..31] = 2;
next(8);
8. ls_in_acl_eval (northd.c:7534): ip && !ct.est, priority 1, uuid 8fc757ee
reg0[1] = 1;
next;
10. ls_in_acl_action (northd.c:7363): 1, priority 0, uuid aa56226f
reg8[16] = 0;
reg8[17] = 0;
reg8[18] = 0;
reg8[30..31] = 0;
next;
20. ls_in_acl_after_lb_action (northd.c:7374): reg8[30..31] == 0, priority 500, uuid 9bac487f
reg8[30..31] = 1;
next(18);
20. ls_in_acl_after_lb_action (northd.c:7374): reg8[30..31] == 1, priority 500, uuid cd53f94a
reg8[30..31] = 2;
next(18);
20. ls_in_acl_after_lb_action (northd.c:7363): 1, priority 0, uuid a2f395c5
reg8[16] = 0;
reg8[17] = 0;
reg8[18] = 0;
reg8[30..31] = 0;
next;
21. ls_in_stateful (northd.c:8350): reg0[1] == 1 && reg0[13] == 0, priority 100, uuid 0be0dc14
ct_commit { ct_mark.blocked = 0; };
next;
28. ls_in_l2_lkup (northd.c:10309): eth.dst == 0a:58:0a:14:02:01, priority 50, uuid c31156ca
outport = "stor-default.l3.primary_ovn-worker2";
output;
egress(dp="default.l3.primary_ovn-worker2", inport="default.l3.primary_default_client", outport="stor-default.l3.primary_ovn-worker2")
--------------------------------------------------------------------------------------------------------------------------------------
0. ls_out_pre_acl (northd.c:6019): ip && outport == "stor-default.l3.primary_ovn-worker2", priority 110, uuid ac088374
next;
1. ls_out_pre_lb (northd.c:6019): ip && outport == "stor-default.l3.primary_ovn-worker2", priority 110, uuid 4ee36374
next;
3. ls_out_acl_hint (northd.c:6464): ct.new && !ct.est, priority 7, uuid f4d15dd5
reg0[7] = 1;
reg0[9] = 1;
next;
4. ls_out_acl_eval (northd.c:7536): ip && !ct.est, priority 1, uuid 43bda50a
reg0[1] = 1;
next;
6. ls_out_acl_action (northd.c:7374): reg8[30..31] == 0, priority 500, uuid c77bdd36
reg8[30..31] = 1;
next(4);
4. ls_out_acl_eval (northd.c:7536): ip && !ct.est, priority 1, uuid 43bda50a
reg0[1] = 1;
next;
6. ls_out_acl_action (northd.c:7374): reg8[30..31] == 1, priority 500, uuid 97af767e
reg8[30..31] = 2;
next(4);
4. ls_out_acl_eval (northd.c:7536): ip && !ct.est, priority 1, uuid 43bda50a
reg0[1] = 1;
next;
6. ls_out_acl_action (northd.c:7363): 1, priority 0, uuid 0e001980
reg8[16] = 0;
reg8[17] = 0;
reg8[18] = 0;
reg8[30..31] = 0;
next;
8. ls_out_stateful (northd.c:8355): reg0[1] == 1 && reg0[13] == 0, priority 100, uuid cb825e88
ct_commit { ct_mark.blocked = 0; };
next;
9. ls_out_check_port_sec (northd.c:5979): 1, priority 0, uuid 273797ae
reg0[15] = check_out_port_sec();
next;
10. ls_out_apply_port_sec (northd.c:5987): 1, priority 0, uuid 16daba22
output;
/* output to "stor-default.l3.primary_ovn-worker2", type "patch" */
ingress(dp="default.l3.primary_ovn_cluster_router", inport="rtos-default.l3.primary_ovn-worker2")
-------------------------------------------------------------------------------------------------
0. lr_in_admission (northd.c:13017): eth.dst == 0a:58:0a:14:02:01 && inport == "rtos-default.l3.primary_ovn-worker2" && is_chassis_resident("cr-rtos-default.l3.primary_ovn-worker2"), priority 50, uuid 1d41fa7e
xreg0[0..47] = 0a:58:0a:14:02:01;
next;
1. lr_in_lookup_neighbor (northd.c:13205): 1, priority 0, uuid b01f62b7
reg9[2] = 1;
next;
2. lr_in_learn_neighbor (northd.c:13215): reg9[2] == 1 || reg9[3] == 0, priority 100, uuid 6e56c801
mac_cache_use;
next;
13. lr_in_ip_routing_pre (northd.c:13458): 1, priority 0, uuid eb9cb6df
reg7 = 0;
next;
14. lr_in_ip_routing (northd.c:11686): ip4.src == 10.20.2.0/24, priority 72, uuid 6ff244ff
ip.ttl--;
reg8[0..15] = 0;
reg0 = 100.65.0.4;
reg1 = 100.65.0.1;
eth.src = 0a:58:64:41:00:01;
outport = "rtoj-default.l3.primary_ovn_cluster_router";
flags.loopback = 1;
next;
15. lr_in_ip_routing_ecmp (northd.c:13517): reg8[0..15] == 0, priority 150, uuid 3c63a26e
next;
16. lr_in_policy (northd.c:13795): 1, priority 0, uuid 6d4c11c8
reg8[0..15] = 0;
next;
17. lr_in_policy_ecmp (northd.c:13798): reg8[0..15] == 0, priority 150, uuid e7a33449
next;
20. lr_in_arp_resolve (northd.c:14292): outport == "rtoj-default.l3.primary_ovn_cluster_router" && reg0 == 100.65.0.4, priority 100, uuid 6d3b905a
eth.dst = 0a:58:64:41:00:04;
next;
24. lr_in_arp_request (northd.c:14700): 1, priority 0, uuid cd049541
output;
egress(dp="default.l3.primary_ovn_cluster_router", inport="rtos-default.l3.primary_ovn-worker2", outport="rtoj-default.l3.primary_ovn_cluster_router")
------------------------------------------------------------------------------------------------------------------------------------------------------
0. lr_out_chk_dnat_local (northd.c:16313): 1, priority 0, uuid a509be9a
reg9[4] = 0;
next;
6. lr_out_delivery (northd.c:14749): outport == "rtoj-default.l3.primary_ovn_cluster_router", priority 100, uuid d413e9f2
output;
/* output to "rtoj-default.l3.primary_ovn_cluster_router", type "patch" */
ingress(dp="default.l3.primary_join", inport="jtor-default.l3.primary_ovn_cluster_router")
------------------------------------------------------------------------------------------
0. ls_in_check_port_sec (northd.c:5911): inport == "jtor-default.l3.primary_ovn_cluster_router", priority 70, uuid af71bf79
reg0[18] = 1;
next;
5. ls_in_pre_lb (northd.c:6016): ip && inport == "jtor-default.l3.primary_ovn_cluster_router", priority 110, uuid 3e18c47a
next;
28. ls_in_l2_lkup (northd.c:10309): eth.dst == 0a:58:64:41:00:04, priority 50, uuid 783f41b5
outport = "jtor-GR_default.l3.primary_ovn-worker2";
output;
egress(dp="default.l3.primary_join", inport="jtor-default.l3.primary_ovn_cluster_router", outport="jtor-GR_default.l3.primary_ovn-worker2")
-------------------------------------------------------------------------------------------------------------------------------------------
1. ls_out_pre_lb (northd.c:6019): ip && outport == "jtor-GR_default.l3.primary_ovn-worker2", priority 110, uuid f3a032e6
ct_clear;
next;
9. ls_out_check_port_sec (northd.c:5979): 1, priority 0, uuid 273797ae
reg0[15] = check_out_port_sec();
next;
10. ls_out_apply_port_sec (northd.c:5987): 1, priority 0, uuid 16daba22
output;
/* output to "jtor-GR_default.l3.primary_ovn-worker2", type "l3gateway" */
ingress(dp="GR_default.l3.primary_ovn-worker2", inport="rtoj-GR_default.l3.primary_ovn-worker2")
------------------------------------------------------------------------------------------------
0. lr_in_admission (northd.c:13017): eth.dst == 0a:58:64:41:00:04 && inport == "rtoj-GR_default.l3.primary_ovn-worker2", priority 50, uuid 32dfe4cf
reg9[1] = check_pkt_larger(1414);
xreg0[0..47] = 0a:58:64:41:00:04;
next;
1. lr_in_lookup_neighbor (northd.c:13205): 1, priority 0, uuid b01f62b7
reg9[2] = 1;
next;
2. lr_in_learn_neighbor (northd.c:13215): reg9[2] == 1 || reg9[3] == 0, priority 100, uuid 6e56c801
mac_cache_use;
next;
13. lr_in_ip_routing_pre (northd.c:13458): 1, priority 0, uuid eb9cb6df
reg7 = 0;
next;
14. lr_in_ip_routing (northd.c:11686): reg7 == 0 && ip4.dst == 10.20.0.0/16, priority 49, uuid dc71242b
ip.ttl--;
reg8[0..15] = 0;
reg0 = 100.65.0.1;
reg1 = 100.65.0.4;
eth.src = 0a:58:64:41:00:04;
outport = "rtoj-GR_default.l3.primary_ovn-worker2";
flags.loopback = 1;
next;
15. lr_in_ip_routing_ecmp (northd.c:13517): reg8[0..15] == 0, priority 150, uuid 3c63a26e
next;
16. lr_in_policy (northd.c:13795): 1, priority 0, uuid 6d4c11c8
reg8[0..15] = 0;
next;
17. lr_in_policy_ecmp (northd.c:13798): reg8[0..15] == 0, priority 150, uuid e7a33449
next;
20. lr_in_arp_resolve (northd.c:13837): ip4, priority 1, uuid c2185c40
get_arp(outport, reg0);
/* MAC binding to 0a:58:64:41:00:01. */
next;
21. lr_in_chk_pkt_len (northd.c:13017): outport == "rtoj-GR_default.l3.primary_ovn-worker2", priority 50, uuid 4ee3b654
reg9[1] = check_pkt_larger(1414);
next;
24. lr_in_arp_request (northd.c:14700): 1, priority 0, uuid cd049541
output;
egress(dp="GR_default.l3.primary_ovn-worker2", inport="rtoj-GR_default.l3.primary_ovn-worker2", outport="rtoj-GR_default.l3.primary_ovn-worker2")
-------------------------------------------------------------------------------------------------------------------------------------------------
0. lr_out_chk_dnat_local (northd.c:16313): 1, priority 0, uuid a509be9a
reg9[4] = 0;
next;
1. lr_out_undnat (northd.c:16421): ip, priority 50, uuid 91fd9498
flags.loopback = 1;
ct_dnat;
ct_dnat /* assuming no un-dnat entry, so no change */ /* default (use --ct to customize) */
-------------------------------------------------------------------------------------------
3. lr_out_snat (northd.c:16001): ip && ip4.src == 10.20.2.4 && (!ct.trk || !ct.rpl), priority 33, uuid d41e63a9
ct_snat(169.254.0.11);
ct_snat(ip4.src=169.254.0.11)
-----------------------------
6. lr_out_delivery (northd.c:14749): outport == "rtoj-GR_default.l3.primary_ovn-worker2", priority 100, uuid e8f860f2
output;
/* output to "rtoj-GR_default.l3.primary_ovn-worker2", type "l3gateway" */
ingress(dp="default.l3.primary_join", inport="jtor-GR_default.l3.primary_ovn-worker2")
--------------------------------------------------------------------------------------
0. ls_in_check_port_sec (northd.c:5911): inport == "jtor-GR_default.l3.primary_ovn-worker2", priority 70, uuid 60fba0ca
reg0[18] = 1;
next;
5. ls_in_pre_lb (northd.c:6016): ip && inport == "jtor-GR_default.l3.primary_ovn-worker2", priority 110, uuid 5ab57ed1
next;
28. ls_in_l2_lkup (northd.c:10309): eth.dst == 0a:58:64:41:00:01, priority 50, uuid a932b265
outport = "jtor-default.l3.primary_ovn_cluster_router";
output;
egress(dp="default.l3.primary_join", inport="jtor-GR_default.l3.primary_ovn-worker2", outport="jtor-default.l3.primary_ovn_cluster_router")
-------------------------------------------------------------------------------------------------------------------------------------------
1. ls_out_pre_lb (northd.c:6019): ip && outport == "jtor-default.l3.primary_ovn_cluster_router", priority 110, uuid 0cf554cf
ct_clear;
next;
9. ls_out_check_port_sec (northd.c:5979): 1, priority 0, uuid 273797ae
reg0[15] = check_out_port_sec();
next;
10. ls_out_apply_port_sec (northd.c:5987): 1, priority 0, uuid 16daba22
output;
/* output to "jtor-default.l3.primary_ovn_cluster_router", type "patch" */
ingress(dp="default.l3.primary_ovn_cluster_router", inport="rtoj-default.l3.primary_ovn_cluster_router")
--------------------------------------------------------------------------------------------------------
0. lr_in_admission (northd.c:13017): eth.dst == 0a:58:64:41:00:01 && inport == "rtoj-default.l3.primary_ovn_cluster_router", priority 50, uuid 3295c2d8
xreg0[0..47] = 0a:58:64:41:00:01;
next;
1. lr_in_lookup_neighbor (northd.c:13205): 1, priority 0, uuid b01f62b7
reg9[2] = 1;
next;
2. lr_in_learn_neighbor (northd.c:13215): reg9[2] == 1 || reg9[3] == 0, priority 100, uuid 6e56c801
mac_cache_use;
next;
13. lr_in_ip_routing_pre (northd.c:13458): 1, priority 0, uuid eb9cb6df
reg7 = 0;
next;
14. lr_in_ip_routing (northd.c:13515): 1, priority 0, uuid 30c76332
drop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment