RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2031521 - RFE: Support Routing Tables in static routes in Network Role
Summary: RFE: Support Routing Tables in static routes in Network Role
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Jon Trossbach
Eliane Ramos Pereira
URL:
Whiteboard: role:network
: 2020243 (view as bug list)
Depends On:
Blocks: 2049798
TreeView+ depends on / blocked
 
Reported: 2021-12-12 14:17 UTC by Wen Liang
Modified: 2022-05-10 14:39 UTC (History)
12 users (show)

Fixed In Version: rhel-system-roles-1.13.0-1.el8
Doc Type: Enhancement
Doc Text:
.The `network` RHEL System Role now supports both `named` and `numeric` routing tables in static routes. This update adds support for both the `named` and `numeric` routing tables in static routes, which is a prerequisite for supporting the policy routing (for example, source routing). The users can define policy routing rules later to instruct the system which table to use to determine the correct route. As a result, after the user specifies the `table` attribute in the `route`, the system can add routes into the routing table.
Clone Of:
: 2049798 (view as bug list)
Environment:
Last Closed: 2022-05-10 14:12:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles network pull 444 0 None open Support routing tables in static routes 2022-01-25 02:32:54 UTC
Red Hat Issue Tracker RHELPLAN-105444 0 None None None 2021-12-12 14:19:15 UTC
Red Hat Product Errata RHBA-2022:1896 0 None None None 2022-05-10 14:13:12 UTC

Description Wen Liang 2021-12-12 14:17:25 UTC
Description of problem:

General Requirement (User Story) 
As a user, I can use the policy routing, so that I can forward the packet based on other criteria except the destination address in the packet. (e.g. Source Routing)

Acceptance Criteria: 
- Given a Linux system, 
  when a user applies the following playbook,
  ```
    network_connections:
      - name: eth0
        state: up
        type: ethernet
        ip:
          dhcp4: no
          address:
           - 198.51.100.3/26
          route:
           - network: 198.51.100.128
             prefix: 26
             gateway: 198.51.100.1
             metric: 2
  +	     table: 30400  
           - network: 198.51.100.64
             prefix: 26
             gateway: 198.51.100.6
             metric: 4
  +	     table: 30200
  ```
  then `ip route` will show "198.51.100.128/26 via 198.51.100.1 dev eth0 metric 2 table 30400" and "198.51.100.64/26 via 198.51.100.6 dev eth0 metric 4 table 30200"

- Given a Linux system, 
  when a user applies the following playbook,
  ```
  hosts: all
  tasks:
    - name: Add a new routing table
      lineinfile:
        path: /etc/iproute2/rt_tables
        line: "200 custom"

    - name: Set up the network connection
      import_role:
        name: linux-system-roles.network
      vars:
        network_connections:
          - name: eth0
            state: up
            type: ethernet
            ip:
              dhcp4: no
              address:
               - 198.51.100.3/26
              route:
               - network: 198.51.100.128
                 prefix: 26
                 gateway: 198.51.100.1
                 metric: 2
  +	         table: custom 
               - network: 198.51.100.64
                 prefix: 26
                 gateway: 198.51.100.6
                 metric: 4
  +	         table: custom
  ```
  then `ip route` will show "198.51.100.128/26 via 198.51.100.1 dev eth0 metric 2 table custom" and "198.51.100.64/26 via 198.51.100.6 dev eth0 metric 4 table custom"


Notice that the Network role will support both the named and numeric tables. 

How to test:
`ip route` will list the routes and the associated routing tables.

Comment 1 Wen Liang 2021-12-13 12:22:05 UTC
*** Bug 2020243 has been marked as a duplicate of this bug. ***

Comment 6 Fernando F. Mancera 2022-01-27 17:19:42 UTC
I have tested this manually with different VM images. In addition, I have run the integration tests and they are not finding any regression.

Comment 21 errata-xmlrpc 2022-05-10 14:12:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1896


Note You need to log in before you can comment on or make changes to this bug.