sysctl no such key error for ipv6 parameters-Record and share programming errors

Recently, I observed that the ssh-ing to my ubuntu (12.04) server had become very, very slow. Typically the login would take 6-7 seconds, and there was a definite lag between me typing my commands and them showing up on the terminal. I have another Ubuntu server(11.04) on the same network, and there were no such issues with that.

We also host a website off the 12.04 server, and that too takes inordinately long times to load up.

So on looking around, I found that disabling ipv6 could solve the problem. I went ahead and modified the sysctl.conf file with the following parameters:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

I executed sudo sysctl -p, rebooted the system, and things seem to be much better. All the lag issues were solved.

However, a couple of days back, we restarted the server after installing some new packages. And lo, all the connectivity lag issues were back. I verified that the sysctl.conf file still had the entries, and they did.

However, when I tried to execute the sudo sysctl -p command again, now I’m getting

error: "net.ipv6.conf.all.disable_ipv6" is an unknown key
error: "net.ipv6.conf.default.disable_ipv6" is an unknown key
error: "net.ipv6.conf.lo.disable_ipv6" is an unknown key

I get it for all the ipv6 parameters. So now the connectivity is really slow, and the sysctl option seems to be jeopardized. Is there anything else I can try?

And yeah, I just ran ip a | grep inet6, and nothing was returned. So I’m guessing the issue is not ipv6 related.

Help, anyone? Thanks!

Originally posted 2013-09-17 00:20:38.