Bug 10199

Summary: unknown key when configuring kernel parms with sysctl
Product: [Retired] Red Hat Linux Reporter: Andreas J. Bathe <ajb>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.2CC: peter.urban, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-25 12:33:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andreas J. Bathe 2000-03-16 04:51:40 UTC
initscripts-4.97-1:

When including an "net.ipv4.conf.eth0.proxy_arp = 1" entry in
/etc/sysctl.conf an "sysctl: error: 'net.ipv4.conf.eth0.proxy_arp' is an
unknown key" entry shows up in /var/log/messages after a reboot.

sysctl -p /etc/sysctl.conf will do the job without difficulties means
the keywort 'net.ipv4.conf.eth0.proxy_arp' is known when the system is up.

Comment 1 Bill Nottingham 2000-03-20 16:09:59 UTC
Hmm... it doesn't know it on the first try because there is no
eth0 interface at that time, and you probably don't want to
set proxy arp on *all* the interfaces, correct?

Comment 2 Andreas J. Bathe 2000-03-22 11:30:59 UTC
Right, only on eth0 should be proxy arp. My colleague discovered (one sun
complaint very loud...) that our firewall did proxy arp on all devices so I
worked around it with
	echo 0 > /proc/sys/net/ipv4/conf/all/proxy_arp
	echo 0 > /proc/sys/net/ipv4/conf/default/proxy_arp
	echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
	echo 0 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
	echo 0 > /proc/sys/net/ipv4/conf/eth2/proxy_arp
in the rc.local script.

There might be more keys which aren't recognized at this startup timepoint.
Maybe sysctl should find another place in the bootup sequence...

Comment 3 advax 2000-04-05 17:34:59 UTC
I see sysctl is run once from inittab (where eth* are undefined)
then again from /etc/rc.d/init.d/network (where they become defined).
Hmm. Maybe one could move the call in init.d/network a bit lower down
after the interfaces are brought up.

Incidentally, I couldn't find much documentation on how to set this
up properly - manpages, kernel docs, etc. Maybe I didn't look hard enough..

Comment 4 Bill Nottingham 2000-04-05 20:54:59 UTC
The problem is that for some cases (i.e., IP forwarding), you want
to run it before you bring up any interfaces, while for others
(such as the proxy arp case mentioned), you want to bring it up
after the interface is up.

Comment 5 Peter Urban 2002-01-25 12:33:53 UTC
I solved the problem by modifying the /etc/init.d/network file (in
initscripts-6.40-1 of Red Hat 7.2)
-- the patch is below. It's a generic solution for all related problems: setups
with
some parameters that need to be set before the interfaces are brought up 
and some that need to be set afterwards.
I simply added a second call to sysctl once the interfaces are brought up. So
/etc/init.d/network start now gives the following output:

Setting network parameters:                                [  OK  ]
Bringing up interface lo:                                  [  OK  ]
Bringing up interface eth0:                                [  OK  ]
Bringing up interface eth1:                                [  OK  ]
Setting network parameters (2nd pass):                     [  OK  ]


*** network.orig        Fri Jan 25 20:20:02 2002
--- network     Fri Jan 25 20:05:38 2002
***************
*** 133,138 ****
--- 133,144 ----
  
        sysctl -w kernel.hotplug=$oldhotplug > /dev/null 2>&1
  
+         # some of the sysctl parameters might refer to parameters
+         # only created once the interfaces are brought up.
+         # /proc/sys/net/ipv4/conf/eth1/proxy_arp is such a parameter.
+         # Peter Urban, 25 Jan 2002
+         action "Setting network parameters (2nd pass): " sysctl -e -p
/etc/sysctl.conf
+ 
        # Add non interface-specific static-routes.
        if [ -f /etc/sysconfig/static-routes ]; then
           grep "^any" /etc/sysconfig/static-routes | while read ignore args ;
do




Comment 6 Bill Nottingham 2002-04-12 20:32:48 UTC
Something similar to what was suggested is in 6.63-1 (basically, we just don't
output the message that we are running a second pass.)