LoginSignup
0
0

More than 5 years have passed since last update.

kernel: ip_local_port_range: prefer different parity for start/end values. を消す

Posted at

カーネルを"3.10.0-327.22.2.el7.x86_64"にアップデートしたところ、OS起動時に"kernel: ip_local_port_range: prefer different parity for start/end values."というメッセージが/var/log/messagesに出た。その際の対処まとめ。

メッセージの意味

カーネルパラメータの"net.ipv4.ip_local_port_range"の始めと終わりをそれぞれ偶数と奇数にした方がいいよ、というメッセージ。
※parity=偶奇性

エラーや警告ではなく、単なる推奨。
なお、kernel.orgのドキュメントにも以下の記載がある。

ip_local_port_range - 2 INTEGERS
(中略)
If possible, it is better these numbers have different parity.(one even and one odd values)

対処その1

言われた通りに始めと終わりをそれぞれ偶数・奇数にする。
# sysctl -a | grep range
net.ipv4.ip_local_port_range = 32768 60999

が、OS再起動してみても同じメッセージが出ていた。

対処その2

初期RAMのカーネルパラメータが変更前のままになっており、それが検知されていたため、初期RAMを再作成する。
# dracut "initramfs-$(uname -r).img" $(uname -r)
# mv /boot/OLD_INITRAMFS /BACKUP/DIR #古い初期RAMを退避
# mv initramfs-$(uname -r).img /boot #新しい初期RAM
# systemctl reboot

これで完全にメッセージが出なくなった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0