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 1363790 - dhclient does not update routing table after the lease expiry
Summary: dhclient does not update routing table after the lease expiry
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dhcp
Version: 6.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1356054 1373253
TreeView+ depends on / blocked
 
Reported: 2016-08-03 14:50 UTC by Richard D Alloway
Modified: 2017-03-21 11:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 11:55:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch for dhcp-4.1.1-51 (5.06 KB, patch)
2016-08-03 14:50 UTC, Richard D Alloway
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CentOS 11075 0 None None None 2016-08-03 14:50:52 UTC
Red Hat Product Errata RHBA-2017:0792 0 normal SHIPPED_LIVE dhcp bug fix update 2017-03-21 12:50:32 UTC

Description Richard D Alloway 2016-08-03 14:50:52 UTC
Created attachment 1187102 [details]
Proposed patch for dhcp-4.1.1-51

Description of problem:

(At the request of Jiri Popelka, I'm recreating bugs.centos.org ticket 0011075 here)

I run a dhcp-server and push the static routes to the clients, could see routes on the routing table but the problem is with the partial updation on the existing routes. For testing purpose, I had set the lease expiry to minimal time. so after the quick lease expiry,if at all there is a change in the gateway information on dhcp-server, it gets reflected appropriately on the client's leases file but not in the routing table

Below log confirms the renewal happens every defined interval,

Apr 29 13:27:00 dhclient[12270]: DHCPREQUEST on mgmt1 to 192.168.10.2 port 67 (xid=0x2b10e716)
Apr 29 13:27:00 dhclient[12270]: DHCPACK from 192.168.10.2 (xid=0x2b10e716)
Apr 29 13:27:01 dhclient[12270]: bound to 192.168.10.10 -- renewal in 31 seconds.


After the lease updation,

[root@host]# cat /var/lib/dhclient/dhclient-mgmt1.leases
lease {
interface "mgmt1";
fixed-address 192.168.10.10;
option subnet-mask 255.255.255.0;
option routers 192.168.10.1;
option dhcp-lease-time 60;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.10.2;
option classless-static-routes 32.169.254.169.254 192.168.10.101;
renew 5 2016/04/29 13:40:11;
rebind 5 2016/04/29 13:40:32;
expire 5 2016/04/29 13:40:40;
}

Lease file updation happens properly after the defined expiry interval, but the problem is with classless-static-routes, if there is any change with the parameter ("classless-static-routes" new gateway) leases file holds the updated information but not the routing table, can confirm that from the below table:

[root@]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.169.254 192.168.10.100 255.255.255.255 UGH 0 0 0 mgmt1

Leases file hold the updated information but routing table is not aware of the change happened within the existing route.


Version-Release number of selected component (if applicable):
dhcp-4.1.1-51

How reproducible:
Always

Steps to Reproduce:
1. setup a dhcp server and enable the option "classless-static-routes"(121).
2. configure static routes.
3. set a minimal lease expiry interval to witness the issue as early as possible
4. after the lease expiry, can see the updated file "/var/lib/dhclient/dhclient-mgmt1.leases" , but the routing table does not have the updated information.
5. manually restarting the "network" service flushes out all existing information and updates routing table as expected.

Actual results:
Updated or deleted routes are not updated or removed on the client.

Expected results:
Updated or deleted routes should be updated or removed on the client.

Additional info:
Default DHCP client version : 
[root@host ~]# dhclient --version
isc-dhclient-4.1.1-P1

Issues seen on other DHCP client versions as well,
(4.3.4, 4.2.8, 4.1-ESV-R13, 4.1.2-P1)

Can get detailed information from the following link:
https://www.centos.org/forums/viewtopic.php?f=16&t=57656



Raised this issue to ISC DHCP team as well their response as follows,


"
Thank you for your report

With the ISC DHCP client the work is split into
two parts. The protocol work is handled by
the dhclient program while updating the OS
is handled by a shell script called by dhclient.

The issues you are describing are in the
area handled by the shell script. The scripts
that we provide are rather generic and so far
as I can see don't include any that try to update
the routing table based on option 121.

The centos distribution may include a different
script that does update the routing tables based
on that option, I wasn't able to find a copy in a quick
search on line.

Given the above, while this may be a bug in the
Centos script it is probably not a bug in the script
supplied with the default client code. I am marking
this ticket as rejected - if you think this is an issue in the
default script you can re-open the ticket by replying to
this mail and include the client script you are using."

Comment 10 errata-xmlrpc 2017-03-21 11:55:55 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, 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://rhn.redhat.com/errata/RHBA-2017-0792.html


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