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 1789482 - [RFE] NM should provide a way to automatically choose interface's IP address as source when creating iproute2 rule
Summary: [RFE] NM should provide a way to automatically choose interface's IP address ...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: NetworkManager Development Team
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-09 16:53 UTC by Mai Ling
Modified: 2023-09-15 00:20 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-01 07:55:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1652653 0 unspecified CLOSED [RFE] support routing rules in NetworkManager for policy-routing 2021-08-30 13:18:26 UTC

Description Mai Ling 2020-01-09 16:53:48 UTC
Description of problem:

The key "ipv4.routing-rules" creates an iproute2 rule with user specified IP address/network as source, or with source 0.0.0.0/0 if IP address/network is not mentioned.

However, I would like to be able to automatically add the interface IP address as the source. This is also currently impossible if the interface is configured via DHCP, as you would not know what IP address will get before the connection is up.

Version-Release number of selected component (if applicable):
all

How reproducible:
always

Steps to Reproduce:

1a. nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200" ipv4.method auto; nmcli up conn1

1b. nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200 from 192.168.1.1/32" ipv4.method auto; nmcli up conn1

Actual results:
1a.
$ ip -N ru sh prio 30000
30000:	from all lookup 200

1b.
$ ip -N ru sh prio 30000
30000:	from 192.168.1.1 lookup 200


Expected results:
nmcli connecton modify conn1 ipv4.routing-rules-use-interface-ip yes
nmcli connection modify conn1 ipv4.routing-rules "priority 30000 table 200" ipv4.method auto
nmcli up conn1

(connection receives an IP over dhcp...)

$ ip -4 a sh dev wlp1s0|grep inet|awk '{print $2}'
192.168.137.187/24

$ ip -N ru sh prio 30000
30000:	from 192.168.137.187 lookup 200


Additional info:

Comment 3 Gris Ge 2021-03-03 02:50:44 UTC
Hi Mai Ling,

This might be done by dispatch script of NetworkManager.
Could you give it a go to see whether it fit your needs?

Thank you!

Comment 4 Till Maas 2021-04-01 07:55:12 UTC
Thank you for your report Mai Ling. Since we did not get any feedback we are assuming the issue is addressed by using a dispatcher script.

Comment 5 Red Hat Bugzilla 2023-09-15 00:20:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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