2015년 3월 11일 수요일

sysctl.conf 설정시 bridge 모듈을 못 읽어들이는 문제

sysctl.conf 설정시 bridge 모듈을 못 읽어들이는 문제


sysctl.conf 커널 매개변수 파일을 설정하고 제대로 설정이 되었는지 확인을 해보니까 밑의 문제가 생겼습니다.

[root@netty ~]# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
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
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

위에 프린트된 내용처럼 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

이 문제의 원인은 bridge 모듈이 커널에 입력되지 않아서 생기는 문제입니다.

간단한 방법으로 문제를 해결할 수가 있습니다.

[root@netty ~]# lsmod |grep bridge
bridge                 83177  0
stp                     2218  1 bridge
llc                     5546  2 bridge,stp

바로 bridge를 커널에 입력만 시켜주면 해결됩니다.

[root@netty ~]# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

커널 매개변수를 확인하면 위와 같이 잘 등록이 된 것을 확인할 수 있습니다. 커널에 bridge를 등록하고 다시 한 번 sysctl -p로 커널 매개변수를 확인하면 잘 등록된 것을 볼 수 있습니다.

이상~!

댓글 1개: