Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1399057

Summary: Not able to specify src IP when adding static routes using nmcli
Product: Red Hat Enterprise Linux 7 Reporter: Fani Orestiadou <forestia>
Component: NetworkManagerAssignee: sushil kulkarni <sukulkar>
Status: CLOSED DUPLICATE QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-28 09:58:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fani Orestiadou 2016-11-28 07:59:11 UTC
Description of problem:
There is no command to specify a src IP when you try to add static routes via nmcli, in comparison with ip route commands. 

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

In customer's environment:
NetworkManager-1.0.6-29.el7_2.x86_64
3.10.0-327.18.2.el7.x86_64

How reproducible:

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Example with ip route commands |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.25.0.1      0.0.0.0         UG    100    0        0 eno16780032
169.254.105.0   0.0.0.0         255.255.255.0   U     100    0        0 eno33559296
172.25.0.0      0.0.0.0         255.255.254.0   U     100    0        0 eno16780032

# ip route add 169.254.248.0/21 via 169.254.105.254 dev eno33559296 src 169.254.105.14
[root@camel ~]# ip route
default via 172.25.0.1 dev eno16780032  proto static  metric 100
169.254.105.0/24 dev eno33559296  proto kernel  scope link  src 169.254.105.14  metric 100
169.254.248.0/21 via 169.254.105.254 dev eno33559296  src 169.254.105.14
                                                        ^^^^^
172.25.0.0/23 dev eno16780032  proto kernel  scope link  src 172.25.1.155  metric 100

# ping c301bckrab
PING c301bckrab (169.254.251.5) 56(84) bytes of data.
64 bytes from c301bckrab (169.254.251.5): icmp_seq=1 ttl=127 time=0.224 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=2 ttl=127 time=0.266 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=3 ttl=127 time=0.316 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=4 ttl=127 time=0.286 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=5 ttl=127 time=0.283 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=6 ttl=127 time=0.260 ms
64 bytes from c301bckrab (169.254.251.5): icmp_seq=7 ttl=127 time=0.261 ms
^C
--- c301bckrab ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6000ms
rtt min/avg/max/mdev = 0.224/0.270/0.316/0.034 ms

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Example with nmcli commands |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# nmcli connection modify bck +ipv4.routes "169.254.248.0/21 169.254.105.254"


[root@camel ~]# nmcli connection up bck
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
[root@camel ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.25.0.1      0.0.0.0         UG    100    0        0 eno16780032
169.254.105.0   0.0.0.0         255.255.255.0   U     100    0        0 eno33559296
169.254.248.0   169.254.105.254 255.255.248.0   UG    100    0        0 eno33559296
172.25.0.0      0.0.0.0         255.255.254.0   U     100    0        0 eno16780032

[root@camel ~]# ip route
default via 172.25.0.1 dev eno16780032  proto static  metric 100
169.254.105.0/24 dev eno33559296  proto kernel  scope link  src 169.254.105.14  metric 100
169.254.248.0/21 via 169.254.105.254 dev eno33559296  proto static  metric 100
172.25.0.0/23 dev eno16780032  proto kernel  scope link  src 172.25.1.155  metric 100

[root@camel ~]# ping c301bckrab
PING c301bckrab (169.254.251.5) 56(84) bytes of data.
^C
--- c301bckrab ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms


From tcpdumps, when the src IP is not specified, there not even ICMP requests going out of the interface.

Actual results: Without specifying the src IP in the static route, hosts from reaching network are not pinging.


Expected results: Would be nice to have that feature in nmcli commands.


Additional info: Let me know in case you need any addition info.

Thank you

Comment 1 Thomas Haller 2016-11-28 09:58:22 UTC
This is a missing feature. Closing as DUPLICATE.

Please reopen if you disagree this to be a duplicate.
Or better: if you have anything to add, let's discuss it over at bug 1373698.


Thanks.

*** This bug has been marked as a duplicate of bug 1373698 ***

Comment 2 Fani Orestiadou 2016-11-28 10:08:26 UTC
Hello, 

Sorry, it seems i missed the already opened bug. 
Thank you for info.

Have a nice day.