[ovs-discuss] [ovn] help with creating logical topology with l3 gateway

Moshe Levi moshele at nvidia.com
Thu Mar 25 11:16:18 UTC 2021



> -----Original Message-----
> From: Dumitru Ceara <dceara at redhat.com>
> Sent: Thursday, March 25, 2021 12:49 PM
> To: Moshe Levi <moshele at nvidia.com>; ovs-discuss at openvswitch.org
> Subject: Re: [ovs-discuss] [ovn] help with creating logical topology with l3
> gateway
> 
> External email: Use caution opening links or attachments
> 
> 
> On 3/24/21 11:31 PM, Moshe Levi wrote:
> > Hi all,
> 
> Hi Moshe,
> 
> > I trying to create logical topology with l3 gateway.
> > I have create the following logical topology:
> > I able to ping from ns to 100.64.0.1 but it failed to ping 100.64.0.2 (port on
> the gw-worker1).
> > Below I pasted the command I am using. Can you help me understand what
> is missing or what I doing wrong?
> 
> The problem is gw-worker1 has no route to reach 10.0.0.0/16.
> 
> >
> >          ____|____
> >         |  router | gw-worker1
> >          ---------      port 'gw-worker1-join':    100.64.0.2/16
> >          ____|____
> >         |  switch | join  100.64.0.0/16
> >          ---------
> >          ____|____
> >         |  router | join-router port 'join-router-ls-join':  100.64.0.1/16
> >          ---------          port 'join-router-worker1-net': 10.0.1.1/24
> >              |
> >          ____|____
> >         |  switch | join-router 10.0.1.0/24
> >          ---------
> >          /
> >  _______/_
> > |  ns    |
> >  ---------
> >
> >
> > ## worker 1 - worker1-net
> > ovn-nbctl ls-add worker1-net
> > ovn-nbctl lsp-add worker1-net vm1
> > ovn-nbctl lsp-set-addresses vm1 "40:44:00:00:00:01 10.0.1.2"
> >
> >
> >
> > ## create join router
> > ovn-nbctl lr-add join-router
> >
> > ## create router port to connect
> > ovn-nbctl lrp-add join-router join-router-worker1-net
> > 40:44:00:00:00:03 10.0.1.1/24 ovn-nbctl lrp-add join-router
> > join-router-worker2-net 40:44:00:00:00:04 10.0.2.1/24
> >
> >
> > ## create the 'worker1-net' switch port for connection to 'join-router'
> > ovn-nbctl lsp-add worker1-net worker1-net-join-router ovn-nbctl
> > lsp-set-type worker1-net-join-router  router ovn-nbctl
> > lsp-set-addresses worker1-net-join-router  router ovn-nbctl
> > lsp-set-options worker1-net-join-router
> > router-port=join-router-worker1-net
> >
> >
> >
> >
> > #worker 1
> > ovs-vsctl add-port br-int vm1 -- set Interface vm1 type=internal --
> > set Interface vm1 external_ids:iface-id=vm1 ip netns add vm1 ip link
> > set vm1 netns vm1 ip netns exec vm1 ip link set vm1 address
> > 40:44:00:00:00:01 ip netns exec vm1 ip addr add 10.0.1.2/24 dev vm1 ip
> > netns exec vm1 ip link set vm1 up ip netns exec vm1 ip route add
> > default via 10.0.1.1
> >
> >
> >
> >
> > # create gw-worker1
> > ovn-nbctl create Logical_Router name=gw-worker1
> > options:chassis=9a790be7-a876-48a9-b7c5-1c45c6946dd4
> 
> This should fix it:
> 
> ovn-nbctl lr-route-add gw-worker1 10.0.0.0/16 100.64.0.1
Dumitru, thanks for the response. I added the above route  but It is still don't work. Anything else that I am missing? 
> 
> Regards,
> Dumitru
> 
> >
> >
> > # create a new logical switch for connecting the 'gw-worker1' and
> > 'join-router' routers ovn-nbctl ls-add join
> >
> > # connect 'gw-worker1' to the 'join' switch ovn-nbctl lrp-add
> > gw-worker1 gw-worker1-join 40:44:00:00:00:07 100.64.0.2/16 ovn-nbctl
> > lsp-add join join-gw-worker1 ovn-nbctl lsp-set-type join-gw-worker1
> > router ovn-nbctl lsp-set-addresses join-gw-worker1 router ovn-nbctl
> > lsp-set-options join-gw-worker1 router-port=gw-worker1-join
> >
> >
> > # connect 'join-router' to the 'join' switch ovn-nbctl lrp-add
> > join-router join-router-ls-join 40:44:00:00:00:06 100.64.0.1/16
> > ovn-nbctl lsp-add join ls-join-router-join ovn-nbctl lsp-set-type
> > ls-join-router-join router ovn-nbctl lsp-set-addresses
> > ls-join-router-join router ovn-nbctl lsp-set-options
> > ls-join-router-join router-port=join-router-ls-join
> >
> >
> >
> > _______________________________________________
> > discuss mailing list
> > discuss at openvswitch.org
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail
> > .openvswitch.org%2Fmailman%2Flistinfo%2Fovs-
> discuss&data=04%7C01%7
> >
> Cmoshele%40nvidia.com%7C41f0a5395ca845571e0508d8ef7ba7bb%7C43083
> d15727
> >
> 340c1b7db39efd9ccc17a%7C0%7C0%7C637522661666184044%7CUnknown%7
> CTWFpbGZ
> >
> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M
> n0%3
> >
> D%7C1000&sdata=mHbGww2ylVcT%2FyCUDAfCKPxwaj%2F8NhoUHgN
> cHIkQ9J8%3D&
> > amp;reserved=0
> >



More information about the discuss mailing list