sysctl -p的时候发现输出出现"net.bridge.bridge-nf-call-ip6tables" is an unknown key

我在RHEL6.2中执行sysctl -p的时候发现输出出现以下错误:

# sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

error: "net.bridge.bridge-nf-call-iptables" is an unknown key

error: "net.bridge.bridge-nf-call-arptables" is an unknown key

kernel.msgmnb = 65536

kernel.msgmax = 65536

fs.file-max = 6815744

fs.aio-max-nr = 1048576

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576


在网上找的资料都是说以下3个参数依赖于bridge模块,该模块如果没有加载则会现上面的输出错误(当我们安装bridge-util后,会发现/etc/sysctl.conf中添加了与防火墙相关的参数。但是当我们执行sysctl -p时,报错说key未知。这是因为我们没有加载bridge模块,需要手工加载。

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

error: "net.bridge.bridge-nf-call-iptables" is an unknown key

error: "net.bridge.bridge-nf-call-arptables" is an unknown key


加载模块测试,发现问题解决

# modprobe bridge

#lsmod |grep bridge    //查看模块加载

bridge                 79790  0

stp                     2173  1 bridge

llc                     5642  2 bridge,stp


# sysctl -p 

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

fs.file-max = 6815744

fs.aio-max-nr = 1048576

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576


echo "modprobe bridge" >> /etc/rc.local


你可能感兴趣的:(key,unknown,is,An)