Hi all,

Actually, with the [0] patch, logical_router is working in hub and spoke
mode.
I'll work in other patch with an option, to indicate if router will work in
this mode or not.


Best,
Lucas

[0]
https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/


Em seg., 8 de set. de 2025 às 13:31, Lucas Vargas Dias (Dev - MGC - SDN) <
[email protected]> escreveu:

> Hi all,
>
> I'm testing the patch [0] in a scenario with dynamic routing multihomed
> using ovn-fake-multinode. Patch allows the announcement in ovn-ic from
> routes learned in dynamic routing.
>
> Scenario configuration:
>
> OS_BASE=ubuntu OS_IMAGE=docker.io/library/ubuntu:jammy ENABLE_SSL=no
> CENTRAL_COUNT=5 CHASSIS_COUNT=5 GW_COUNT=1 ./ovn_cluster.sh start
>
> #External BGP speaker
> podman exec -it ovn-chassis-6 /usr/share/ovn/scripts/ovn-ctl
> stop_controller
> podman exec -it ovn-chassis-6 /usr/share/openvswitch/scripts/ovs-ctl stop
> podman exec -it ovn-chassis-6 ip link add link eth2 name eth2.101 type
> vlan id 101
> podman exec -it ovn-chassis-6 ip link add link eth2 name eth2.201 type
> vlan id 201
> podman exec -it ovn-chassis-6 ip link set up eth2.101
> podman exec -it ovn-chassis-6 ip link set up eth2.201
> podman exec -it ovn-chassis-6 ip a add 169.254.254.1/30 dev eth2.101
> podman exec -it ovn-chassis-6 ip a add 169.254.254.5/30 dev eth2.201
> podman exec -it ovn-chassis-6 ip link set dev eth2.101 mtu 1420
> podman exec -it ovn-chassis-6 ip link set dev eth2.201 mtu 1420
> podman exec -it ovn-chassis-6 ip link add link eth2 name eth2.102 type
> vlan id 102
> podman exec -it ovn-chassis-6 ip link set up eth2.102
> podman exec -it ovn-chassis-6 ip a add 10.0.0.1/24 dev eth2.102
> podman exec -it ovn-chassis-6 ip link set dev eth2.102 mtu 1420
> podman exec -it ovn-chassis-6 sysctl -w
> net.ipv4.fib_multipath_hash_policy=3
> podman exec -it ovn-chassis-6 apt update
> podman exec -it ovn-chassis-6 apt install -y frr vim
> podman exec -it ovn-chassis-6 sed -e '/^\(bgpd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-6 sed -e '/^\(bfdd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-6 sed -e '/^\(zebra_options\)=/s/-A 127.0.0.1
> -s 90000000/-A 127.0.0.1 -s 90000000 -n/' -i /etc/frr/daemons
>
>
> #IC Gateways
>
> podman exec -it ovn-gw-1 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-gw-2 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-gw-3 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-gw-4 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-gw-5 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-chassis-1 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-chassis-2 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-chassis-3 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-chassis-4 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
> podman exec -it ovn-chassis-5 ovs-vsctl set open_vswitch .
> external_ids:ovn-is-interconn=true
>
> #OVN-central-az1-1
> podman exec -it ovn-central-az1 ovn-ic-nbctl ts-add ts1001
>
> #OVN-central-az1-1
>
> #az1
> podman exec -it ovn-central-az1 ovn-nbctl lr-add lr11
> podman exec -it ovn-central-az1 ovn-nbctl ls-add bar11
> podman exec -it ovn-central-az1 ovn-nbctl lrp-add lr11 rp11-bar
> 00:01:ff:22:00:01 192.168.10.1/24
> podman exec -it ovn-central-az1 ovn-nbctl lrp-add lr11 ts1001-lr11
> 12:00:00:d9:b5:d1 169.254.11.1/24
> podman exec -it ovn-central-az1 ovn-nbctl lsp-add bar11 bar11 \
>     -- lsp-set-addresses bar11 "00:00:ff:ff:ff:11 192.168.10.2"
>
> podman exec -it ovn-central-az1 ovn-nbctl lsp-add bar11 bar-rp11 -- set
> Logical_Switch_Port bar-rp11     type=router options:router-port=rp11-bar
>   -- lsp-set-addresses bar-rp11 router
> podman exec -it ovn-central-az1 ovn-nbctl lsp-add ts1001 ts1001-lr11-rp --
> set Logical_Switch_Port ts1001-lr11-rp     type=router
> options:router-port=ts1001-lr11     -- lsp-set-addresses ts1001-lr11-rp
> router
>
> podman exec -it ovn-central-az1 ovn-nbctl ha-chassis-group-add ha-group1
> podman exec -it ovn-central-az1 ovn-nbctl ha-chassis-group-add-chassis
> ha-group1 ovn-gw-1 100
> HA_GROUP1=$(podman exec -it ovn-central-az1 ovn-nbctl
> ha-chassis-group-list | grep ha-group1 | cut -f1 -d" " | head -n 1)
> podman exec -it ovn-central-az1 ovn-nbctl set logical_router_port
> ts1001-lr11 ha_chassis_group="$HA_GROUP1"
>
>
> #netns - ovn-chassis-1
>
> podman exec -it ovn-chassis-1 ip netns add bar11
> podman exec -it ovn-chassis-1 ovs-vsctl add-port br-int bar11 -- set
> interface bar11 type=internal
> podman exec -it ovn-chassis-1 ip link set bar11 netns bar11
> podman exec -it ovn-chassis-1 ip netns exec bar11 ip addr add
> 192.168.10.2/24 dev bar11
> podman exec -it ovn-chassis-1 ip netns exec bar11 ip link set bar11
> address 00:00:ff:ff:ff:11
> podman exec -it ovn-chassis-1 ip netns exec bar11 ip link set bar11 up
> podman exec -it ovn-chassis-1 ip netns exec bar11 ip route add default via
> 192.168.10.1
> podman exec -it ovn-chassis-1 ovs-vsctl set Interface bar11
> external_ids:iface-id=bar11
>
> #OVN-central-az2-1
> #az2
> podman exec -it ovn-central-az2 ovn-nbctl lr-add lr12
> podman exec -it ovn-central-az2 ovn-nbctl ls-add bar12
> podman exec -it ovn-central-az2 ovn-nbctl lrp-add lr12 rp12-bar
> 00:01:ff:22:00:02 192.168.20.1/24
> podman exec -it ovn-central-az2 ovn-nbctl lrp-add lr12 ts1001-lr12
> 12:00:00:d9:b5:d2 169.254.11.2/24
> podman exec -it ovn-central-az2 ovn-nbctl lsp-add bar12 bar12 \
>     -- lsp-set-addresses bar12 "00:00:ff:ff:ff:12 192.168.20.2"
>
> podman exec -it ovn-central-az2 ovn-nbctl lsp-add bar12 bar-rp12 -- set
> Logical_Switch_Port bar-rp12     type=router options:router-port=rp12-bar
>   -- lsp-set-addresses bar-rp12 router
> podman exec -it ovn-central-az2 ovn-nbctl lsp-add ts1001 ts1001-lr12-rp --
> set Logical_Switch_Port ts1001-lr12-rp     type=router
> options:router-port=ts1001-lr12     -- lsp-set-addresses ts1001-lr12-rp
> router
>
> podman exec -it ovn-central-az2 ovn-nbctl ha-chassis-group-add ha-group1
> podman exec -it ovn-central-az2 ovn-nbctl ha-chassis-group-add-chassis
> ha-group1 ovn-gw-2 100
> HA_GROUP1=$(podman exec -it ovn-central-az2 ovn-nbctl
> ha-chassis-group-list | grep ha-group1 | cut -f1 -d" " | head -n 1)
> podman exec -it ovn-central-az2 ovn-nbctl set logical_router_port
> ts1001-lr12 ha_chassis_group="$HA_GROUP1"
>
>
>
> #netns - ovn-chassis-2
>
> podman exec -it ovn-chassis-2 ip netns add bar12
> podman exec -it ovn-chassis-2 ovs-vsctl add-port br-int bar12 -- set
> interface bar12 type=internal
> podman exec -it ovn-chassis-2 ip link set bar12 netns bar12
> podman exec -it ovn-chassis-2 ip netns exec bar12 ip addr add
> 192.168.20.2/24 dev bar12
> podman exec -it ovn-chassis-2 ip netns exec bar12 ip link set bar12
> address 00:00:ff:ff:ff:12
> podman exec -it ovn-chassis-2 ip netns exec bar12 ip link set bar12 up
> podman exec -it ovn-chassis-2 ip netns exec bar12 ip route add default via
> 192.168.20.1
> podman exec -it ovn-chassis-2 ovs-vsctl set Interface bar12
> external_ids:iface-id=bar12
>
> #OVN-central-az3-1
> #az3
> podman exec -it ovn-central-az3 ovn-nbctl lr-add lr13
> podman exec -it ovn-central-az3 ovn-nbctl ls-add bar13
> podman exec -it ovn-central-az3 ovn-nbctl lrp-add lr13 rp13-bar
> 00:01:ff:22:00:03 192.168.30.1/24
> podman exec -it ovn-central-az3 ovn-nbctl lrp-add lr13 ts1001-lr13
> 12:00:00:d9:b5:d3 169.254.11.3/24
> podman exec -it ovn-central-az3 ovn-nbctl lsp-add bar13 bar13 \
>     -- lsp-set-addresses bar13 "00:00:ff:ff:ff:13 192.168.30.2"
> podman exec -it ovn-central-az3 ovn-nbctl lsp-add bar13 bar-rp13 -- set
> Logical_Switch_Port bar-rp13     type=router options:router-port=rp13-bar
>   -- lsp-set-addresses bar-rp13 router
> podman exec -it ovn-central-az3 ovn-nbctl lsp-add ts1001 ts1001-lr13-rp --
> set Logical_Switch_Port ts1001-lr13-rp     type=router
> options:router-port=ts1001-lr13     -- lsp-set-addresses ts1001-lr13-rp
> router
>
> podman exec -it ovn-central-az3 ovn-nbctl ha-chassis-group-add ha-group1
> podman exec -it ovn-central-az3 ovn-nbctl ha-chassis-group-add-chassis
> ha-group1 ovn-gw-3 100
> HA_GROUP1=$(podman exec -it ovn-central-az3 ovn-nbctl
> ha-chassis-group-list | grep ha-group1 | cut -f1 -d" " | head -n 1)
> podman exec -it ovn-central-az3 ovn-nbctl set logical_router_port
> ts1001-lr13 ha_chassis_group="$HA_GROUP1"
>
>
>
> #netns - ovn-chassis-3
>
> podman exec -it ovn-chassis-3 ip netns add bar13
> podman exec -it ovn-chassis-3 ovs-vsctl add-port br-int bar13 -- set
> interface bar13 type=internal
> podman exec -it ovn-chassis-3 ip link set bar13 netns bar13
> podman exec -it ovn-chassis-3 ip netns exec bar13 ip addr add
> 192.168.30.2/24 dev bar13
> podman exec -it ovn-chassis-3 ip netns exec bar13 ip link set bar13
> address 00:00:ff:ff:ff:13
> podman exec -it ovn-chassis-3 ip netns exec bar13 ip link set bar13 up
> podman exec -it ovn-chassis-3 ip netns exec bar13 ip route add default via
> 192.168.30.1
> podman exec -it ovn-chassis-3 ovs-vsctl set Interface bar13
> external_ids:iface-id=bar13
>
>
> #OVN-central-az4-1 - DX AZ - PoP-1
> #az4
>
> #DCX Gateway
> podman exec -it ovn-chassis-4 ovs-vsctl del-port br-ex eth2
> podman exec -it ovn-chassis-4 ip link add link eth2 name eth2.100 type
> vlan id 100
> podman exec -it ovn-chassis-4 ip link set up eth2.100
> podman exec -it ovn-chassis-4 ip link add link eth2 name eth2.101 type
> vlan id 101
> podman exec -it ovn-chassis-4 ip link set up eth2.101
> podman exec -it ovn-chassis-4 ovs-vsctl add-port br-ex eth2.100
> podman exec -it ovn-chassis-4 ovs-vsctl add-br physnet
> podman exec -it ovn-chassis-4 ovs-vsctl add-port physnet eth2.101
> podman exec -it ovn-chassis-4 ip link set physnet up
> podman exec -it ovn-chassis-4 apt update
> podman exec -it ovn-chassis-4 apt install -y frr vim
> linux-modules-extra-$(uname -r)
> podman exec -it ovn-chassis-4 modprobe vrf
> podman exec -it ovn-chassis-4 sed -e '/^\(bgpd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-4 sed -e '/^\(bfdd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-4 sed -e '/^\(zebra_options\)=/s/-A 127.0.0.1
> -s 90000000/-A 127.0.0.1 -s 90000000 /' -i /etc/frr/daemons
> podman exec -it ovn-chassis-4 ovs-vsctl set Open_vSwitch .
> external-ids:ovn-bridge-mappings="phys:physnet,public:br-ex"
> podman exec -it ovn-central-az4 ovn-nbctl ls-add public
> podman exec -it ovn-central-az4 ovn-nbctl lsp-add public public1 --
> lsp-set-addresses public1 unknown -- lsp-set-type public1 localnet --
> lsp-set-options public1 network_name=phys
> podman exec -it ovn-central-az4 ovn-nbctl -- lr-add dcx1
> podman exec -it ovn-central-az4 ovn-nbctl -- lrp-add dcx1 rp-public
> 00:00:02:01:02:03 169.254.254.2/30 -- lrp-set-options rp-public
> podman exec -it ovn-central-az4 ovn-nbctl lsp-add public public-rp
> podman exec -it ovn-central-az4 ovn-nbctl lsp-set-type public-rp router
> podman exec -it ovn-central-az4 ovn-nbctl lsp-set-addresses public-rp
> router
> podman exec -it ovn-central-az4 ovn-nbctl lsp-set-options public-rp
> router-port=rp-public
> podman exec -it ovn-central-az4 ovn-nbctl set logical_router dcx1
> options:dynamic-routing=true
> podman exec -it ovn-central-az4 ovn-nbctl set logical_router dcx1
> options:requested-tnl-key=1002
> podman exec -it ovn-central-az4 ovn-nbctl set logical_router dcx1
> options:dynamic-routing-redistribute="connected,static"
> podman exec -it ovn-central-az4 ovn-nbctl lsp-add public bgpvrf1002     --
> lsp-set-addresses bgpvrf1002 unknown
> podman exec -it ovn-central-az4 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:routing-protocols=BGP,BFD
> podman exec -it ovn-central-az4 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:routing-protocol-redirect=bgpvrf1002
> podman exec -it ovn-central-az4 ovn-nbctl --wait=sb set
> logical_router_port rp-public
> options:dynamic-routing-redistribute="connected,static"
> podman exec -it ovn-central-az4 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:dynamic-routing-maintain-vrf=true
> podman exec -it ovn-central-az4 ovn-nbctl lrp-set-gateway-chassis
> rp-public ovn-chassis-4
> podman exec -it ovn-central-az4 ovn-nbctl lrp-add dcx1 ts1001-dcx1
> 12:00:00:d9:b5:d4 169.254.11.5/24
> podman exec -it ovn-central-az4 ovn-nbctl lsp-add ts1001 ts1001-dcx1-rp --
> set Logical_Switch_Port ts1001-dcx1-rp     type=router
> options:router-port=ts1001-dcx1     -- lsp-set-addresses ts1001-dcx1-rp
> router
>
>
> podman exec -it ovn-central-az4 ovn-nbctl ha-chassis-group-add ha-group1
> podman exec -it ovn-central-az4 ovn-nbctl ha-chassis-group-add-chassis
> ha-group1 ovn-gw-4 100
> HA_GROUP1=$(podman exec -it ovn-central-az4 ovn-nbctl
> ha-chassis-group-list | grep ha-group1 | cut -f1 -d" " | head -n 1)
> podman exec -it ovn-central-az4 ovn-nbctl set logical_router_port
> ts1001-dcx1 ha_chassis_group="$HA_GROUP1"
>
> podman exec -it ovn-chassis-4 ovs-vsctl add-port br-int bgpvrf1002 -- set
> interface bgpvrf1002 type=internal
> podman exec -it ovn-chassis-4 ip link set bgpvrf1002 master ovnvrf1002
> podman exec -it ovn-chassis-4 ip addr add 169.254.254.2/30 dev bgpvrf1002
> podman exec -it ovn-chassis-4 ip link set bgpvrf1002 address
> 00:00:02:01:02:03
> podman exec -it ovn-chassis-4 ip link set bgpvrf1002 up
> podman exec -it ovn-chassis-4 ovs-vsctl set Interface bgpvrf1002
> external_ids:iface-id=bgpvrf1002
>
>
> #OVN-central-az5-1 - DX AZ - PoP-2
> #az5
>
> #DCX Gateway
> podman exec -it ovn-chassis-5 ovs-vsctl del-port br-ex eth2
> podman exec -it ovn-chassis-5 ip link add link eth2 name eth2.100 type
> vlan id 100
> podman exec -it ovn-chassis-5 ip link set up eth2.100
> podman exec -it ovn-chassis-5 ip link add link eth2 name eth2.201 type
> vlan id 201
> podman exec -it ovn-chassis-5 ip link set up eth2.201
> podman exec -it ovn-chassis-5 ovs-vsctl add-port br-ex eth2.100
> podman exec -it ovn-chassis-5 ovs-vsctl add-br physnet
> podman exec -it ovn-chassis-5 ovs-vsctl add-port physnet eth2.201
> podman exec -it ovn-chassis-5 ip link set physnet up
> podman exec -it ovn-chassis-5 apt update
> podman exec -it ovn-chassis-5 apt install -y frr vim
> linux-modules-extra-$(uname -r)
> podman exec -it ovn-chassis-5 modprobe vrf
> podman exec -it ovn-chassis-5 sed -e '/^\(bgpd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-5 sed -e '/^\(bfdd\)=/s/no/yes/' -i
> /etc/frr/daemons
> podman exec -it ovn-chassis-5 sed -e '/^\(zebra_options\)=/s/-A 127.0.0.1
> -s 90000000/-A 127.0.0.1 -s 90000000 /' -i /etc/frr/daemons
> podman exec -it ovn-chassis-5 ovs-vsctl set Open_vSwitch .
> external-ids:ovn-bridge-mappings="phys:physnet,public:br-ex"
> podman exec -it ovn-central-az5 ovn-nbctl ls-add public
> podman exec -it ovn-central-az5 ovn-nbctl lsp-add public public1 --
> lsp-set-addresses public1 unknown -- lsp-set-type public1 localnet --
> lsp-set-options public1 network_name=phys
> podman exec -it ovn-central-az5 ovn-nbctl -- lr-add dcx2
> podman exec -it ovn-central-az5 ovn-nbctl -- lrp-add dcx2 rp-public
> 00:00:02:01:02:03 169.254.254.6/30 -- lrp-set-options rp-public
> podman exec -it ovn-central-az5 ovn-nbctl lsp-add public public-rp
> podman exec -it ovn-central-az5 ovn-nbctl lsp-set-type public-rp router
> podman exec -it ovn-central-az5 ovn-nbctl lsp-set-addresses public-rp
> router
> podman exec -it ovn-central-az5 ovn-nbctl lsp-set-options public-rp
> router-port=rp-public
> podman exec -it ovn-central-az5 ovn-nbctl set logical_router dcx2
> options:dynamic-routing=true
> podman exec -it ovn-central-az5 ovn-nbctl set logical_router dcx2
> options:requested-tnl-key=1002
> podman exec -it ovn-central-az5 ovn-nbctl set logical_router dcx2
> options:dynamic-routing-redistribute="connected,static"
> podman exec -it ovn-central-az5 ovn-nbctl lsp-add public bgpvrf1002     --
> lsp-set-addresses bgpvrf1002 unknown
> podman exec -it ovn-central-az5 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:routing-protocols=BGP,BFD
> podman exec -it ovn-central-az5 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:routing-protocol-redirect=bgpvrf1002
> podman exec -it ovn-central-az5 ovn-nbctl --wait=sb set
> logical_router_port rp-public
> options:dynamic-routing-redistribute="connected,static"
> podman exec -it ovn-central-az5 ovn-nbctl --wait=sb set
> logical_router_port rp-public options:dynamic-routing-maintain-vrf=true
> podman exec -it ovn-central-az5 ovn-nbctl lrp-set-gateway-chassis
> rp-public ovn-chassis-5
> podman exec -it ovn-central-az5 ovn-nbctl lrp-add dcx2 ts1001-dcx2
> 12:00:00:d9:b5:d5 169.254.11.6/24
> podman exec -it ovn-central-az5 ovn-nbctl lsp-add ts1001 ts1001-dcx2-rp --
> set Logical_Switch_Port ts1001-dcx2-rp     type=router
> options:router-port=ts1001-dcx2     -- lsp-set-addresses ts1001-dcx2-rp
> router
>
>
> podman exec -it ovn-central-az5 ovn-nbctl ha-chassis-group-add ha-group1
> podman exec -it ovn-central-az5 ovn-nbctl ha-chassis-group-add-chassis
> ha-group1 ovn-chassis-5 100
> HA_GROUP1=$(podman exec -it ovn-central-az5 ovn-nbctl
> ha-chassis-group-list | grep ha-group1 | cut -f1 -d" " | head -n 1)
> podman exec -it ovn-central-az5 ovn-nbctl set logical_router_port
> ts1001-dcx2 ha_chassis_group="$HA_GROUP1"
>
> podman exec -it ovn-chassis-5 ovs-vsctl add-port br-int bgpvrf1002 -- set
> interface bgpvrf1002 type=internal
> podman exec -it ovn-chassis-5 ip link set bgpvrf1002 master ovnvrf1002
> podman exec -it ovn-chassis-5 ip addr add 169.254.254.6/30 dev bgpvrf1002
> podman exec -it ovn-chassis-5 ip link set bgpvrf1002 address
> 00:00:02:01:02:03
> podman exec -it ovn-chassis-5 ip link set bgpvrf1002 up
> podman exec -it ovn-chassis-5 ovs-vsctl set Interface bgpvrf1002
> external_ids:iface-id=bgpvrf1002
>
>
> cat <<EOF > /tmp/frr1.conf
>
> hostname customer
> debug bgp keepalives
> debug bgp neighbor-events
> debug bgp updates in
> debug bgp updates out
> debug bgp zebra
> !
> password zebra
> !
> router bgp 200
>  bgp router-id 169.254.254.1
>  no bgp ebgp-requires-policy
>  no bgp network import-check
>  bgp bestpath as-path multipath-relax
>  neighbor 169.254.254.2 remote-as 100
>  neighbor 169.254.254.2 bfd
>  neighbor 169.254.254.6 remote-as 100
>  neighbor 169.254.254.6 bfd
> !
>  address-family ipv4 unicast
>   network 10.0.0.0/24
>   neighbor 169.254.254.2 soft-reconfiguration inbound
>   neighbor 169.254.254.2 route-map export out
>   neighbor 169.254.254.6 soft-reconfiguration inbound
>   neighbor 169.254.254.6 route-map export out
>  exit-address-family
> exit
> !
> ip prefix-list export seq 1 permit 10.0.0.0/24
> ip prefix-list export seq 100 deny 0.0.0.0/0 le 32
> !
> route-map export permit 1
>  match ip address prefix-list export
> exit
> !
> end
> EOF
>
>
> cat <<EOF > /tmp/frr2.conf
>
> hostname dcx1
> password zebra
> !
> vrf ovnvrf1002
>     exit-vrf
> !
> router bgp 100 vrf ovnvrf1002
>  bgp router-id 169.254.254.2
>  no bgp ebgp-requires-policy
>  no bgp network import-check
>  neighbor 169.254.254.1 remote-as 200
>  neighbor 169.254.254.1 bfd
>  !
>  address-family ipv4 unicast
>   redistribute kernel
>   neighbor 169.254.254.1 soft-reconfiguration inbound
>   neighbor 169.254.254.1 route-map export out
>  exit-address-family
> exit
>
> route-map export permit 1
>  set metric 100
>  match ip address prefix-list export
> exit
>
> ip prefix-list export seq 1 permit 192.168.0.0/16 le 24
> ip prefix-list export seq 100 deny 0.0.0.0/0 le 32
>
>
> debug bgp neighbor-events
> debug bgp updates
> debug bgp keepalives
> debug bgp zebra
> end
> EOF
>
>
> cat <<EOF > /tmp/frr3.conf
>
> hostname dcx2
> password zebra
> !
> vrf ovnvrf1002
>     exit-vrf
> !
> router bgp 100 vrf ovnvrf1002
>  bgp router-id 169.254.254.6
>  no bgp ebgp-requires-policy
>  no bgp network import-check
>  neighbor 169.254.254.5 remote-as 200
>  neighbor 169.254.254.5 bfd
>  !
>  address-family ipv4 unicast
>   redistribute kernel
>   neighbor 169.254.254.5 soft-reconfiguration inbound
>   neighbor 169.254.254.5 route-map export out
>  exit-address-family
> exit
>
> route-map export permit 1
>  set metric 100
>  match ip address prefix-list export
> exit
>
> ip prefix-list export seq 1 permit 192.168.0.0/16 le 24
> ip prefix-list export seq 100 deny 0.0.0.0/0 le 32
>
>
> debug bgp neighbor-events
> debug bgp updates
> debug bgp keepalives
> debug bgp zebra
> end
> EOF
>
>
> podman cp /tmp/frr1.conf ovn-chassis-6:/etc/frr/frr.conf
> podman cp /tmp/frr2.conf ovn-chassis-4:/etc/frr/frr.conf
> podman cp /tmp/frr3.conf ovn-chassis-5:/etc/frr/frr.conf
> podman exec -it ovn-chassis-4 systemctl restart frr
> podman exec -it ovn-chassis-5 systemctl restart frr
> podman exec -it ovn-chassis-6 systemctl restart frr
>
> #BGP redirect
> podman exec -it ovn-central-az4 ovn-sbctl dump-flows public  | grep 179
> podman exec -it ovn-central-az5 ovn-sbctl dump-flows public  | grep 179
> #External BGP speaker
> podman exec -it ovn-chassis-6 vtysh -c "show ip bgp summary"
>
> #Our BGP speaker
> podman exec -it ovn-chassis-4 vtysh -c "show ip bgp vrf  ovnvrf1002
> summary"
> podman exec -it ovn-chassis-5 vtysh -c "show ip bgp vrf  ovnvrf1002
> summary"
> #Our BGP speaker advertising
> podman exec -it ovn-chassis-4 vtysh -c "show ip bgp vrf  ovnvrf1002
> neighbor 169.254.254.1 advertised"
> podman exec -it ovn-chassis-5 vtysh -c "show ip bgp vrf  ovnvrf1002
> neighbor 169.254.254.5 advertised"
> #Our BGP speaker learning
> podman exec -it ovn-chassis-4 vtysh -c "show ip bgp vrf  ovnvrf1002
> neighbor 169.254.254.1 received"
> podman exec -it ovn-chassis-5 vtysh -c "show ip bgp vrf  ovnvrf1002
> neighbor 169.254.254.5 received"
> #Linux VRF on the DXC Gateway
> podman exec -it ovn-chassis-4 ip route show vrf ovnvrf1002
> podman exec -it ovn-chassis-5 ip route show vrf ovnvrf1002
> #DX AZ SB lflow for earned external route
> podman exec -it ovn-central-az4 ovn-sbctl dump-flows dcx1  | grep 10.0.0
> podman exec -it ovn-central-az5 ovn-sbctl dump-flows dcx2  | grep 10.0.0
> #flows for the routes on the remote AZs
> podman exec -it ovn-central-az1 ovn-sbctl dump-flows lr11  | grep 10.0.0
> podman exec -it ovn-central-az2 ovn-sbctl dump-flows lr12  | grep 10.0.0
> podman exec -it ovn-central-az3 ovn-sbctl dump-flows lr13  | grep 10.0.0
> #PoP-1
> podman exec -it ovn-central-az4 ovn-nbctl lr-route-list dcx1
> #PoP-2
> podman exec -it ovn-central-az5 ovn-nbctl lr-route-list dcx2
>
> #external learned routes on the remote AZs
> podman exec -it ovn-central-az1 ovn-nbctl lr-route-list lr11
> podman exec -it ovn-central-az2 ovn-nbctl lr-route-list lr12
> podman exec -it ovn-central-az3 ovn-nbctl lr-route-list lr13
>
>
> In the scenario above, if one neighbor is shut, the logical router learns
> the prefix via ovn-ic.
> However, if the neighbor is up, the logical router doesn't learn the route
> in dynamic routing.
> To reproduce this, execute the following steps:
> 1 - Neighbor is shut
> podman exec -it ovn-chassis-6 vtysh -c conf -c 'router bgp 200' -c
> 'neighbor 169.254.254.2 shutdown'
>
> 2 - Check route learned in ovn-ic:
> podman exec -it ovn-central-az4 ovn-nbctl lr-route-list dcx1
>
> 3 - Neighbor is up
> podman exec -it ovn-chassis-6 vtysh -c conf -c 'router bgp 200' -c 'no
> neighbor 169.254.254.2 shutdown'
>
> 4 - Route is not learned.
> podman exec -it ovn-central-az4 ovn-sbctl list Learned_route
>
>
> Is there some reason to route from dynamic routing to be ignored in this
> scenario? Is it expected?
> It appears that the controller ignores the route if it is in the
> advertised table for the same datapath.
>
>
>
>
>
> Best,
> Lucas
>
>
> [0]
> https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/
>

-- 




_‘Esta mensagem é direcionada apenas para os endereços constantes no 
cabeçalho inicial. Se você não está listado nos endereços constantes no 
cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa 
mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão 
imediatamente anuladas e proibidas’._


* **‘Apesar do Magazine Luiza tomar 
todas as precauções razoáveis para assegurar que nenhum vírus esteja 
presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por 
quaisquer perdas ou danos causados por esse e-mail ou por seus anexos’.*



_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
  • [ovs-discuss] Static_route... Lucas Vargas Dias (Dev - MGC - SDN) via discuss
    • Re: [ovs-discuss] Sta... Lucas Vargas Dias (Dev - MGC - SDN) via discuss

Reply via email to