neutron/neutron/tests/unit/agent/l3
Rodolfo Alonso Hernandez 8d99593adb [DVR] Allow multiple subnets per external network
An external network can have more than one subnet. Currently only the
first subnet is added to the FIP namespace routing table. Packets for
FIPs with addresses in other subnets can't pass through the external
port because there is no route for those FIP CIDRs.

This change adds routes for those CIDRs via the external port IP and
interface.

These routes doesn't collide with the existing ones, added to provide
a back path for the packets with a destination IP matching a FIP.

E.g.:
$ ip netns exec fip-e1ec0f98-b593-4514-ae08-f1c5cf1c2788 ip route
  (1) 169.254.106.114/31 dev fpr-3937f879-d  proto kernel  scope link \
      src 169.254.106.115
  (2) 192.168.20.250 via 169.254.106.114 dev fpr-3937f879-d
  (3) 192.168.30.0/24 dev fg-bee060f1-dd  proto kernel  scope link  \
      src 192.168.30.129
  (4) 192.168.20.0/24 via 192.168.30.129 dev fg-bee060f1-dd  scope link

Rule (2) is added when a FIP is assigned. This rule permits ingress
packets going into the router namespace. This FIP belongs to the second
subnet of the external network (note the external port CIDR is not the
same). Rule (4), added by this patch, allows egress packets to exit
the FIP namespace through the external port. Rule (2), because of the
prefix length (32), has more priority than rule (4).

Change-Id: I4d476b47e89fa5709dca2f66ffae72a27d88340a
Closes-Bug: #1805456
2019-01-18 08:22:54 +00:00
..
extensions [L3][QoS] Cover mixed dvr_snat and compute node dvr router 2018-05-08 20:06:00 +08:00
__init__.py Move extra routes processing to router classes 2015-02-05 10:25:45 -05:00
test_agent.py Merge "DVR: Centralized FloatingIPs are not cleared after migration." into stable/queens 2018-11-20 03:29:35 +00:00
test_dvr_fip_ns.py [DVR] Allow multiple subnets per external network 2019-01-18 08:22:54 +00:00
test_dvr_local_router.py Install centralized floating IP nat rules to all ha nodes 2018-10-07 12:09:17 +08:00
test_dvr_snat_ns.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
test_fip_rule_priority_allocator.py Merge "Removed unnecessary setUp calls in tests" 2017-08-29 23:57:56 +00:00
test_ha_router.py Move check_ha_state_for_router() into notification code 2017-11-07 13:10:55 -05:00
test_item_allocator.py DVR: Check for item_allocator key before releasing 2018-04-06 02:37:48 +00:00
test_l3_agent_extension_api.py Add iptables metadata marking rule on router init 2018-08-31 14:28:40 +00:00
test_legacy_router.py Remove deprecated send_arp_for_ha option 2017-04-18 13:38:35 -04:00
test_link_local_allocator.py Preserve DVR FIP rule priority over Agent restarts 2015-08-12 15:52:19 -05:00
test_namespace_manager.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
test_router_info.py Add iptables metadata marking rule on router init 2018-08-31 14:28:40 +00:00
test_router_processing_queue.py Move check_ha_state_for_router() into notification code 2017-11-07 13:10:55 -05:00