my topo is: ------------- | Client | ------------- ---------------- |PHY-SW | ---------------- ------------------|PHY-NIC |------------- ----------------------|PHY-NIC |---------------- |NODE1 | |NODE2 Gateway Chassis with SNAT | | | | | | ---------------- | | ---------------- | | | LS-Public | | | | LS-Public | | | ---------------- | | ---------------- | | | | | | ---------------- | | ---------------- | | | LR1 | | | | LR1 | | | ---------------- | | ---------------- | | | | | | ---------------- | | ---------------- | | | LS1 | | | | LS1 | | | ---------------- | | ---------------- | ------------------------------------------------ ------------------------------------------------ -----邮件原件----- 发件人: discuss [mailto:ovs-discuss-boun...@openvswitch.org] 代表 ovs-discuss-requ...@openvswitch.org 发送时间: 2021年8月24日 15:12 收件人: ovs-discuss@openvswitch.org 主题: discuss Digest, Vol 146, Issue 36
Send discuss mailing list submissions to ovs-discuss@openvswitch.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.openvswitch.org/mailman/listinfo/ovs-discuss or, via email, send a message with subject or body 'help' to ovs-discuss-requ...@openvswitch.org You can reach the person managing the list at ovs-discuss-ow...@openvswitch.org When replying, please edit your Subject line so it is more specific than "Re: Contents of discuss digest..." Today's Topics: 1. [OVN] OVN LoadBalance not work as excepted(non-distributed). (Fengqi Li (???)) ---------------------------------------------------------------------- Message: 1 Date: Tue, 24 Aug 2021 07:05:53 +0000 From: Fengqi Li (???) <lifen...@inspur.com> To: "ovs-discuss@openvswitch.org" <ovs-discuss@openvswitch.org> Subject: [ovs-discuss] [OVN] OVN LoadBalance not work as excepted(non-distributed). Message-ID: <4456611008514bb6bc8d948bbc042...@inspur.com> Content-Type: text/plain; charset="gb2312" Hi: I'm working with OVS 2.13.2&OVN20.03.2,recently?I found OVN LoadBalance not work as excepted(non-distributed). Here is my configuration?refer to https://hustcat.github.io/ovn-lb-practice/ and ovn.at and https://www.ovn.org/support/dist-docs/ovn-nb.5.html ?? 1?Create LS1 and vm1?vm2?vm3?vm4?vm1?vm2?vm3?vm4 connect to LS1 ovn-nbctl ls-add sw1 ovn-nbctl lsp-add sw1 lsp-vm1 ovn-nbctl lsp-set-addresses lsp-vm1 ?00:16:3e:eb:4d:10 21.21.21.21? ovn-nbctl lsp-add sw1 lsp-vm2 ovn-nbctl lsp-set-addresses lsp-vm2 ?00:16:3e:b5:15:d4 21.21.21.22? ovn-nbctl lsp-add sw1 lsp-vm3 ovn-nbctl lsp-set-addresses lsp-vm3 ?00:16:3e:97:fd:e3 22.22.22.21? ovn-nbctl lsp-add sw1 lsp-vm4 ovn-nbctl lsp-set-addresses lsp-vm4 ?00:16:3e:d7:65:f8 22.22.22.22? 2? Create LR1 and connect LS1 to LR1. ovn-nbctl lr-add lr1 ovn-nbctl lrp-add lr1 lr1-sw1 fa:16:3e:ed:dd:66 21.21.21.1/24 ovn-nbctl lsp-add sw1 sw1-lr1 ovn-nbctl lsp-set-type sw1-lr1 router ovn-nbctl lsp-set-options sw1-lr1 router-port=lr1-sw1 ovn-nbctl lrp-add lr1 lr2-sw1 fa:16:3e:e0:0f:b7 22.22.22.1/24 ovn-nbctl lsp-add sw1 sw1-lr2 ovn-nbctl lsp-set-type sw1-lr2 router ovn-nbctl lsp-set-options sw1-lr2 router-port=lr2-sw1 3? Create LS-Public and connect LR1 to LS-Public ovn-nbctl ls-add public ovn-nbctl lrp-add lr1 lr1-public fa:16:3e:94:87:b5 100.7.33.151/20(SNAT) ovn-nbctl lsp-add public public-lr1 ovn-nbctl lsp-set-type public-lr1 router ovn-nbctl lsp-set-options public-lr1 router-port=lr1-public ovn-nbctl lsp-set-gateway-chassis public-lr1 chassis1,chassis2 4? Create virtual port of LSP-Vir on LS-Public ovn-nbctl lsp-add public public-vir ovn-nbctl lsp-set-addresses public-vir "4e:64:5e:4c:e5:68 100.7.33.152" ovn-nbctl lsp-set-type public-vir virtual ovn-nbctl set logical_switch_port public-vir options:virtual-ip=100.7.33.152 ovn-nbctl set logical_switch_port public-vir options:virtual-parents=lsp-vm1,lsp-vm2,lsp-vm3,lsp-vm4 5? Create Loadbalancer lb1,lb backen is vm1?vm2?vm3?vm4?VIP is 100.7.33.152 ovn-nbctl lb-add lb1 100.7.33.152:1234 21.21.21.21:3000,21.21.21.22:3000,22. 22.22.21:3000,22.22.22.22:3000 ovn-nbctl --wait=sb -- --id=@hc create Load_Balancer_Health_Check vip="100.7.33.152\:1234" -- add Load_Balancer . health_check @hc ovn-nbctl --wait=sb set load_balancer . ip_port_mappings: 21.21.21.21=lsp-vm1:21.21.21.2 ovn-nbctl --wait=sb set load_balancer . ip_port_mappings: 21.21.21.22=lsp-vm2:21.21.21.2 ovn-nbctl --wait=sb set load_balancer . ip_port_mappings: 22.22.22.21=lsp-vm3:22.22.22.2 ovn-nbctl --wait=sb set load_balancer . ip_port_mappings: 22.22.22.22=lsp-vm4:22.22.22.2 check service_monitor all backend are online 6? Add lb1 to LS1?LS2 and LR1 ovn-nbctl ls-lb-add sw1 lb1 ovn-nbctl lr-lb-add lr1 lb1 my topo is: My config: When I run curl http://100.7.33.152:1234 from Client,it works,But all traffic pass from NODE2 (SNAT chassis),it?s not distributed! Is there anything I mis-config? By the way,where can I found examples of how virtual port works with loadbalance? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 22178 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 61094 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 30808 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment-0001.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 27461 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment-0002.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.jpg Type: image/jpeg Size: 19245 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment-0003.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3600 bytes Desc: not available URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20210824/f47b 1c30/attachment.p7s> ------------------------------ Subject: Digest Footer _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss ------------------------------ End of discuss Digest, Vol 146, Issue 36 ****************************************
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss