iproute2 不起作用(“RTNETLINK 回答:操作不支持”)

iproute2 不起作用(“RTNETLINK 回答:操作不支持”)

命令和错误信息:

gtwy ~ # ip rule add from 64.251.23.186 table t1
RTNETLINK answers: Operation not supported

较旧的文章有同样的问题,但它对我没有帮助:http://forums.gentoo.org/viewtopic-t-696982-start-0-postdays-0-postorder-asc-highlight-.html

我花了大量时间在 Google 上搜索,试图找到解决方案。好像我的内核配置缺少了一些东西?任何帮助或想法都将不胜感激。我的系统/内核是:2.6.36-gentoo-r5 #3 SMP Thu Jan 13 10:49:06 EST 2011 x86_64 Intel(R) Xeon(R) CPU X3220 @ 2.40GHz GenuineIntel GNU/Linux。

我将此发布在 SuperUser 上,因为该系统用作工作站,并且此问题与服务器专门处理的特定任务无关。

iproute2 已安装:

gtwy etc # emerge --search iproute2 
Searching... 
[ Results for search key : iproute2 ] 
[ Applications found : 1 ] 

*  sys-apps/iproute2 
      Latest version available: 2.6.35-r2 
      Latest version installed: 2.6.35-r2 
      Size of files: 378 kB 
      Homepage:      http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 
      Description:   kernel routing and traffic control utilities 
      License:       GPL-2

我的内核 .config 的一小段代码(查看整个 .config):

gtwy linux # cat .config | grep NETLINK 
CONFIG_NETFILTER_NETLINK=y 
CONFIG_NETFILTER_NETLINK_QUEUE=y 
CONFIG_NETFILTER_NETLINK_LOG=y 
CONFIG_NF_CT_NETLINK=y 
CONFIG_SCSI_NETLINK=y 
gtwy linux # cat .config | grep IP_ADVANCED_ROUTER 
CONFIG_IP_ADVANCED_ROUTER=y 
gtwy linux # cat .config | grep INGRESS 
CONFIG_NET_SCH_INGRESS=y 
gtwy linux # cat .config | grep NET_SCHED 
CONFIG_NET_SCHED=y

出现 --info

Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.1.2, glibc-2.10.1-r1, 2.6.36-gentoo-r5 x86_64) 
================================================================= 
System uname: Linux-2.6.36-gentoo-r5-x86_64-Intel-R-_Xeon-R-_CPU_X3220_@_2.40GHz-with-gentoo-1.12.13 
Timestamp of tree: Thu, 13 Jan 2011 01:15:01 +0000 
app-shells/bash:     4.0_p37 
dev-java/java-config: 1.3.7-r1, 2.1.10 
dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.5-r2, 3.1.2-r3 
sys-apps/baselayout: 1.12.13 
sys-apps/sandbox:    1.6-r2 
sys-devel/autoconf:  2.13, 2.65 
sys-devel/automake:  1.9.6-r2::<unknown repository>, 1.10.2, 1.11.1 
sys-devel/binutils:  2.20.1-r1 
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.3-r2 
sys-devel/gcc-config: 1.4.1 
sys-devel/libtool:   2.2.6b 
sys-devel/make:      3.81 
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers) 
ACCEPT_KEYWORDS="amd64" 
ACCEPT_LICENSE="*" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-march=nocona -O2 -pipe" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc /var/bind" 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" 
CXXFLAGS="-march=nocona -O2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" 
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo" 
LC_ALL="en_US.UTF-8" 
LDFLAGS="-Wl,-O1 -Wl,--as-needed" 
LINGUAS="en" 
MAKEOPTS="-j5" 
PKGDIR="/usr/portage/packages" 
PORTAGE_CONFIGROOT="/" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" 
USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt ctype cups curl cxx dri fortran gdbm gpm iconv jpeg jpeg2k libwww mmx modules mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl php png pppd python readline session sockets sse sse2 ssl symlink sysfs tcpd threads unicode vhosts xml xorg xsl zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

答案1

解决了:

以下是使 iproute2 与您的内核协同工作的最完整列表:

CONFIG_NETFILTER_NETLINK=y 
CONFIG_NETFILTER_NETLINK_QUEUE=y 
CONFIG_NETFILTER_NETLINK_LOG=y 
CONFIG_NF_CT_NETLINK=y 
CONFIG_SCSI_NETLINK=y 
CONFIG_IP_ADVANCED_ROUTER=y 
CONFIG_NET_SCH_INGRESS=y 
CONFIG_NET_SCHED=y 
CONFIG_IP_MULTIPLE_TABLES=y 
CONFIG_NETFILTER_XT_TARGET_MARK=y

相关内容