Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【u2o】Underlay network in custom vpc can't reroute to physical gw when set u2o. #3446

Closed
xujunjie-cover opened this issue Nov 21, 2023 · 3 comments · Fixed by #3462
Closed

Comments

@xujunjie-cover
Copy link
Member

xujunjie-cover commented Nov 21, 2023

Bug Report

Expected Behavior

  • only connects the Underlay and Overlay subnets within Kube-OVN
  • and other traffic accessing the Internet will still be forwarded through the physical gateway

Actual Behavior

drop

Steps to Reproduce the Problem

  1. create vlan subnet with "U2O=true" in custom vpc.

trace:
ingress(dp="vpc1", inport="vpc1-under30")

  1. lr_in_admission (northd.c:11885): eth.dst == 00:00:00:0d:48:5e && inport == "vpc1-under30", priority 50, uuid b307c20b
    xreg0[0..47] = 00:00:00:0d:48:5e;
    next;
  2. lr_in_lookup_neighbor (northd.c:12062): 1, priority 0, uuid b23ff5d7
    reg9[2] = 1;
    next;
  3. lr_in_learn_neighbor (northd.c:12071): reg9[2] == 1, priority 100, uuid d6143ffa
    next;
  4. lr_in_ip_routing_pre (northd.c:12299): 1, priority 0, uuid 29e8b11f
    reg7 = 0;
    next;
  5. lr_in_ip_routing (northd.c:12376): 1, priority 0, uuid 0214cc43
    drop;
  • set +x

in vpc can't hit any flow in table 13 lr_in_ip_routing, after add a static route like " kubectl ko nbctl --policy src-ip lr-route-add vpc1 192.168.30.0/24 192.168.30.1"

ingress(dp="vpc1", inport="vpc1-under30")

  1. lr_in_admission (northd.c:11885): eth.dst == 00:00:00:0d:48:5e && inport == "vpc1-under30", priority 50, uuid b307c20b
    xreg0[0..47] = 00:00:00:0d:48:5e;
    next;
  2. lr_in_lookup_neighbor (northd.c:12062): 1, priority 0, uuid b23ff5d7
    reg9[2] = 1;
    next;
  3. lr_in_learn_neighbor (northd.c:12071): reg9[2] == 1, priority 100, uuid d6143ffa
    next;
  4. lr_in_ip_routing_pre (northd.c:12299): 1, priority 0, uuid 29e8b11f
    reg7 = 0;
    next;
  5. lr_in_ip_routing (northd.c:10580): ip4.src == 192.168.30.0/24, priority 1, uuid 28cc7a36
    ip.ttl--;
    reg8[0..15] = 0;
    reg0 = 192.168.30.1;
    reg1 = 192.168.30.5;
    eth.src = 00:00:00:0d:48:5e;
    outport = "vpc1-under30";
    flags.loopback = 1;
    next;
  6. lr_in_ip_routing_ecmp (northd.c:12377): reg8[0..15] == 0, priority 150, uuid c8a55107
    next;
  7. lr_in_policy (northd.c:9718): ip4.src == 192.168.30.0/24, priority 29000, uuid 9e297e76
    reg0 = 192.168.30.1;
    reg1 = 192.168.30.5;
    eth.src = 00:00:00:0d:48:5e;
    outport = "vpc1-under30";
    flags.loopback = 1;
    reg8[0..15] = 0;
    next;
  8. lr_in_policy_ecmp (northd.c:12546): reg8[0..15] == 0, priority 150, uuid 63b4debd
    next;
  9. lr_in_arp_resolve (northd.c:12581): ip4, priority 1, uuid 726616ab
    get_arp(outport, reg0);
    /* No MAC binding. */
    next;
  10. lr_in_arp_request (northd.c:13262): eth.dst == 00:00:00:00:00:00 && ip4, priority 100, uuid f7024caa
    arp { eth.dst = ff:ff:ff:ff:ff:ff; arp.spa = reg1; arp.tpa = reg0; arp.op = 1; output; };

Add static route for vlan subnet with "u2o == true" is necessary ?

@xujunjie-cover
Copy link
Member Author

xujunjie-cover commented Nov 21, 2023

default vpc has dst-ip 0.0.0.0/0 gw join logical gw. so subnets in default_vpc don't have same issue.

@zhangzujian
Copy link
Member

Please provide Kube-OVN version.

@xujunjie-cover
Copy link
Member Author

Please provide Kube-OVN version.

Kube-OVN:
Version: v1.13.0
Build: 2023-11-18_00:35:09
Commit: git-14f136fe
Go Version: go1.21.3
Arch: amd64

commit 14f136f
merged 7 hours ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants